Hi,
i am using 5.x version of elasticsearch. my loaded documents are:
POST index1/_bulk
{ "index" : {"_type" : "type1", "_id" : "1" } }
{"name": "sahana","rollno": "123456","class": "first"}
{ "index" : {"_type" : "type1", "_id" : "2" } }
{"name": "sahana","rollno": "654321","class": "first"}
and my query having must operator query:
"query": {"bool":{"must":[{"term":{"name":"sahana"}},{"term":{"rollno":"123456"}}]}}
and my get request on above documents:
GET index1/_search
i am seeing an issue where if a query, such as a simple_query_string used in must clause of a bool query, and the analyzed query string results in an empty query string, then the it behaves like the entire query is ignored and all documents are matched. Even if the simple_query_string. query is inside a filtered query, then the filters are ignored. i am expecting the document with id 1 only for this.
any ideas or help on this would be much appreciated.
Note: i am also tried with query_string query, but still able to get the all the documents