Query_string is not returning expected result ES 5.x vs ES 7.7

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?

The _all field has been deprecated so the search behaviour may change. What is the mapping of the fields?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.