Closed
Description
Elasticsearch version (bin/elasticsearch --version
): 7.15.1
Plugins installed: []
JVM version (java -version
): 11.0.9
OS version (uname -a
if on a Unix-like system): Darwin Kernel Version 20.6.0
Description of the problem including expected versus actual behavior:
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 are enabled. This works with 7.10.2, but no longer does in 7.14.1/7.15.1
Thanks for your help!
Steps to reproduce:
1.
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"
}
]
}'
- Fails to find via
user.first
curl -XGET localhost:9200/test/_search -d '{
"query": {
"nested": {
"path": "user",
"query": {
"exists": {
"field": "user.first"
}
}
}
}
}'
- Succeeds to find via
user.last
curl -XGET localhost:9200/test/_search -d '{
"query": {
"nested": {
"path": "user",
"query": {
"exists": {
"field": "user.last"
}
}
}
}
}'
Provide logs (if relevant):