For fields within nested docs with norms disabled, querying for their existence via 'exists' query appears to not be working. It does however work when norms is enabled.
curl -XPUT localhost:9200/test -d '{
{
"mappings": {
"properties": {
"user": {
"type": "nested",
"properties": {
"first": {
"type": "text",
"norms": false
},
"last": {
"type": "text"
}
}
}
}
}
}'
curl -XPUT localhost:9200/test/_doc/1 -d '{
"user" : [
{
"first" : "John",
"last" : "Smith"
}
]
}'
curl -XGET localhost:9200/test/_search -d '{
"query": {
"nested": {
"path": "user",
"query": {
"bool": {
"must": [
{ "exists": { "field": "user.first" }}
]
}
}
}
}
}'
This seems to work in version 7.10.2 which was the version we used prior to a recent upgrade.
Thanks for your help!