Hi,
I have upgraded my elasticsearch recently from 5.5 to 7.7.
While running my automation test suite, I found that query_string
in ES 5.5 was returning me expected document but ES 7.7 is returning empty results.
I noticed this issue only when I search with multiple words where term is present in different fields of a document. Please have a look on my example below:
My indexed document is like below
{ field1: "Hello Nik", field2: "NYC" }
_mappings:
"field1" : { "type" : "text", "fields" : { "keyword" : { "type" : "keyword", "ignore_above" : 256 } } }
Same mapping is there for field2.
My query snippet:
"query_string": { "query": "Hello NYC", "default_operator": "AND" }
In elasticsearch 5.5 i was getting result successfully but in 7.7 I am getting empty result.
As per my understanding, ES will look for the search terms in all the fields as I have not provided fields section.
Could you please suggest why ES 7.7 is not returning expected result ?
Are there any changes in search query algo?