-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Analytics/GeoIndexing, search aggregations of geo points and shapesIndexing, search aggregations of geo points and shapes>bug
Description
Linestrings that cross the dateline 4 times have the last segment repeated after decomposition and linestrings that cross the date line 5 times can fail with index out of bound exception. To reproduce:
DELETE test
PUT test
{
"mappings": {
"properties": {
"shape": {
"type": "geo_shape"
}
}
}
}
PUT test/_doc/1
{
"shape": "LINESTRING (160 0, 200 10, 160 20, 200 30, 160 40, 200 50)"
}
Both issues seem to be caused by offset in the line
elasticsearch/server/src/main/java/org/elasticsearch/common/geo/builders/LineStringBuilder.java
Line 182 in 68149b6
| coordinates[offset+i-1] = Edge.position(coordinates[i-1], coordinates[i], t); |
Metadata
Metadata
Assignees
Labels
:Analytics/GeoIndexing, search aggregations of geo points and shapesIndexing, search aggregations of geo points and shapes>bug