Query_string filter get all record using elastic search version 1.7

I m trying to find user by nationality using query_string but it query return other nationality records. Can anyone help me out how query_string is working.

curl -X GET 'http:/' -d '{"query":{"filtered":{"query":{"query_string":{"query":"nationality:""AF"""}}}},"filter":{"and":[{"terms":{"room_id":["591"]}},{"bool":{"must":[{"exists":{"field":"nationality"}}]}},{"bool":{"must":[{"exists":{"field":"user.id"}}]}}]},"size":1000,"fields":["user.id", "nationality"]}'

For example
Data returns :

  1. id : 1
    nationality : FA
  2. id : 2
    nationality : CA

It looks like this may be related to Elasticsearch, not App Search. In that case, you are better off posting under the Elasticsearch topic: https://discuss.elastic.co/c/elasticsearch.

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