"exists" query on geo_point property with doc_values=false incorrectly matches documents with a null value #65306
Labels
:Analytics/Geo
Indexing, search aggregations of geo points and shapes
>bug
:Search/Search
Search-related issues that do not fall into other categories
Team:Analytics
Meta label for analytical engine team (ESQL/Aggs/Geo)
Team:Search
Meta label for search team
Elasticsearch version (
bin/elasticsearch --version
): docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.0Plugins installed: []
JVM version (
java -version
): N/A (using container)OS version (
uname -a
if on a Unix-like system): N/A (using container)Description of the problem including expected versus actual behavior:
The
exists
query does not behave properly forgeo_point
properties whendoc_values
are set tofalse
.It will match all documents that have a value set for this property, even if that value is
null
.I would expect documents whose value is
null
not to be matched by theexists
query.This is inconsistent in multiple ways:
null
as non-existing forgeo_point
properties withdoc_values
set totrue
(the default).null
as non-existing for other property types.null
as non-existing forgeo_point
properties. I tested 7.9.2 with the reproducer below in order to confirm this.Steps to reproduce:
The search query returns the document that has a
null
value for itsgeo_point
property:The text was updated successfully, but these errors were encountered: