Odd behavior when similar paths contain different types


(John D. Ament) #1

I have an area of my data that is just default mapped, I'm not providing any specific mapping. My structure may look like

"fields.bob.value"="some string"
"fields.dt.value"=123456

I was implemented a multi match query, where the input for fields look like "fields.*.value", and the search term "string". I receive a NumberFormatException, which I'm assuming is because fields.dt.value is a numeric value. Is this a limitation of how the paths resolve? I assumed that since the documents go flat the name "value" shouldn't matter much across, however I can see the issue with a search like this.

I'm using ES 1.5.2


(Mark Walkom) #2

Yep, and ES doesn't know how to compare a string to an number. So it's not a path issue.
The only way around that would be to map the fields.dt.value as a string as well.


(system) #3