monstache-site
monstache-site copied to clipboard
UUID fields transmitted as binary data to Elasticsearch
If I have a document in Mongo where the document _id is a UUID(v4) and various other fields in the document are UUID(v4), monstache is passing them to elasticsearch as a string representation of the binary format.
For example in a mongo document { "_id" : UUID("752afe3a-fed1-4ea4-bc8a-caefd294a12c"), "createdByUserId" : UUID("00000000-0000-0000-0000-00016dedf9bb") }
Ends up looking like this in Elasticsearch (allowing monstache to create default mapping) { "_id" : "{4 [117 42 254 58 254 209 78 164 188 138 202 239 210 148 161 44]}", "createdByUserId" : { "Subtype" : 4, "Data" : "AAAAAAAAAAAAAAABbe35uw==" } }
My goal is to be able to do a search in elasticsearch on the _id or the other uuid fields, and use the string representation of the UUID.
@concurrent-recursion
I've pushed a fix for this to all 4 monstache branches at https://github.com/rwynn/monstache
For now, until the next release, you would need to build the binary from source.
Thanks for the report. Please create future issues under monstache as monstache-site is just to host the docs.