-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Open
Labels
:Analytics/GeoIndexing, search aggregations of geo points and shapesIndexing, search aggregations of geo points and shapes>bugTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)Meta label for analytical engine team (ESQL/Aggs/Geo)
Description
Elasticsearch might accept illegal polygon that contain polygons with disjoint holes, for example:
POST example/_doc?error_trace=true
{
"location": {
"type": "Polygon",
"coordinates": [
[[0, 0], [10, 0], [-0, 10], [0, 0]],
[[-20, 0], [-19, 0], [-20, 1], [-20, 0]]
]
}
}
In this case, the hole is dropped and it will only index the outer ring. In other cases Elasticsearch will throw a cryptic error message:
POST example/_doc?error_trace=true
{
"location": {
"type": "Polygon",
"coordinates": [
[[179, 50], [180, 50], [180, 60], [179, 60], [179, 50]],
[[-180, 50], [-170, 50], [-170, 60], [-180, 60], [-180.0, 50]]
]
}
}
it will throw the following error:
"type": "illegal_state_exception",
"reason": "Negative longs unsupported, use writeLong or writeZLong for negative numbers [-4587338432941916160]",
"stack_trace": """org.elasticsearch.ElasticsearchException$1: Negative longs unsupported, use writeLong or writeZLong for negative numbers [-4587338432941916160]
Elasticsearch should detect those cases and throw a nicer error message.
Metadata
Metadata
Assignees
Labels
:Analytics/GeoIndexing, search aggregations of geo points and shapesIndexing, search aggregations of geo points and shapes>bugTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)Meta label for analytical engine team (ESQL/Aggs/Geo)