Question mark in field name

(Jim Nill) #1


If I have a field called string_field? (with a question mark), will it affect searching? Locally, I'm using 1.0.1 and the query below works fine while on our staging server running 1.3.9, the query returns other results.

{"query":{"bool":{"must":[{"query_string":{"fields":["string_field?"],"query":""foo" OR "bar""}}]}},"from":"0","size":"20"}

I am pretty sure that I have items in the index with string_field? = foo/bar but they are not shown as the top results. I have the same logic for another field but the field name doesn't have a question mark and it works fine in 1.3.9. Is there a way to make the field work with a question mark?

(system) #2