Skip to content

Potential bug for 3d point arrays in geo_polygon queries #55741

Closed
@mbarretta

Description

@mbarretta

Elasticsearch version (bin/elasticsearch --version):
7.6.2

JVM version (java -version):
ESS

OS version (uname -a if on a Unix-like system):
ESS

Description of the problem including expected versus actual behavior:
When using a 3d points array in a geo_polygon query, it results in an exception

Steps to reproduce:

PUT /example
{
    "mappings": {
        "properties": {
            "location": {
                "type": "geo_point"
            }
        }
    }
}

POST /example/_doc?refresh
{
    "location": [13.400544, 52.530286]
}

GET /example/_search
{
    "query": {
        "geo_polygon": {
            "location": {
                "points": [
                    [
                       [13.0, 53.0], 
                       [14.0, 52.0]                
                    ],
                    [
                       [13.0, 53.0], 
                       [14.0, 52.0]                
                    ]                   
                ]
            }
        }
    }
}

Output:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "parse_exception",
        "reason" : "numeric value expected"
      }
    ],
    "type" : "parse_exception",
    "reason" : "numeric value expected"
  },
  "status" : 400
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Analytics/GeoIndexing, search aggregations of geo points and shapesTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions