rwynn / monstache-site

documentation for the monstache project
https://rwynn.github.io/monstache-site/
MIT License
22 stars 31 forks source link

UUID fields transmitted as binary data to Elasticsearch #16

Open concurrent-recursion opened 5 years ago

concurrent-recursion commented 5 years ago

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.

rwynn commented 5 years ago

@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.