ElasticSearch 2.x exists filter for nested field doesn't work
问题 I have the following mapping { "properties": { "restaurant_name": {"type": "string"}, "menu": { "type": "nested", "properties": { "name": {"type": "string"} } } } } I am trying to filter all those documents which have optional "menu" field exists GET /restaurnats/_search { "filter": { "query": { "bool": { "must": [ {"exists" : { "field" : "menu" }} ] } } } } But, when I try the same query to filter those documents which have "restaurant_name", then it works fine. So why nested field check