{
"query":
{
"query_string" :
{
"query" : "((name:the_search_phrase) OR (keywords:the_search_phrase)) AND (city:Sydney, Australia)"
}
}
}
New to elasticsearch. Building the JSON as per the documentation here: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html
The query runs, however, results with city other that Sydney, Australia
are returned too. Why the AND part is not working?
I want the search phrase to match against either or both name, keywords but the city should be strictly Sydney.