Currently the compute engine return false when executing a spatial function with multivalues but if the function is pushed down to lucene, then the relationship is computed as it the multivalues is a Geometry collection. These means the results might be different depending on a function being pushed down to lucene or not.
This can be reproduced with the following commands:
PUT indexed
{
"mappings": {
"properties": {
"location": {
"type": "geo_point"
}
}
}
}
PUT not_indexed
{
"mappings": {
"properties": {
"location": {
"type": "geo_point",
"index": false,
"doc_values": false
}
}
}
}
POST indexed/_doc
{
"location" : ["POINT(0 0)", "POINT(180 0)"]
}
POST not_indexed/_doc
{
"location" : ["POINT(0 0)", "POINT(180 0)"]
}
POST _query
{
"query" : """
FROM indexed | WHERE ST_INTERSECTS(location, TO_GEOSHAPE("POINT(0 0)"))
"""
}
POST _query
{
"query" : """
FROM not_indexed | WHERE ST_INTERSECTS(location, TO_GEOSHAPE("POINT(0 0)"))
"""
}
The results of the queries should be the same regardless of how the field is defined in the mappings.
Currently the compute engine return false when executing a spatial function with multivalues but if the function is pushed down to lucene, then the relationship is computed as it the multivalues is a Geometry collection. These means the results might be different depending on a function being pushed down to lucene or not.
This can be reproduced with the following commands:
The results of the queries should be the same regardless of how the field is defined in the mappings.