Summary
GeoShape Polygon Query not returning expected documents that suspect are within the polygon; but am aware it maybe related to crossing the International Date Line.
My environment details below
Kibana version: 8.14.3
Elasticsearch version: 8.14.3
Server OS version: Windows 11 Enterprise
Steps to reproduce:
- Index a document with a geopoint property that is within the UK, in my case I have
"metadata": {
"mapLocations": [
{
"lon": -1.865,
"lat": 53.811
}
]
}
with the following mapping:
"metadata": {
...,
"mapLocations": {
"type": "geo_point"
}
}
- Query the index in kibana with the following query that uses geo_shape of type polygon with counter clockwise coordinates from geoJSON object with the intersect relation
GET test_index/_search
{
"query": {
"geo_shape": {
"metadata.mapLocations": {
"shape": {
"type": "Polygon",
"orientation": "RIGHT",
"coordinates": [
[
[
-283.359375,
-87.599705
],
[
984.375,
-87.599705
],
[
984.375,
86.574207
],
[
-283.359375,
86.574207
],
[
-283.359375,
-87.599705
]
]
]
},
"relation": "intersects"
}
}
}
}
Expected behavior: Although the rectangle shaped polygon has a large longitude range than -180 to 180 I still expect it to return the document as it is within the given range.
Screenshots (if relevant): There is nothing to show as I get no hits but if I input the above geoJSON into the Analytics > Map within Kibana it seems to show the expected shape that overlaps longitudinally which makes me think it should find the document as it seems to suggest the shape is valid