we are trying below simple query. Here filter working as expected but query match_all = travel is not working. I am expecting that below query should first look for all documents having "travel" any where, then it should filter documents based on cityname and weather.
But results only shows documents from filtered section. Some how it is not executing query portion.
{
"query": {
"filtered": {
"query": {
"match": {
"_all": "travel"
},
"filter": {
"bool": {
"must": [
{
"terms": {
"cityname": [
"bangalore",
"delhi"
]
}
},
{
"terms": {
"weather": [
"winter",
"spring"
]
}
}
]
}
}
}
}
}
}