You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Elasticsearch version (bin/elasticsearch --version): 5.6.3 (bug also appears to be on master)
Plugins installed: []
JVM version (java -version): 1.8.0_161
OS version (uname -a if on a Unix-like system): Darwin
Description of the problem including expected versus actual behavior:
When using a geo_polygon query using points, I would expect any lon value < -180 or > 180 to be invalid and return an error similar to the one returned when any lat value is < -90 or > 90. Looking at the code here the check does exist but is using the lat value instead of the lon value.
This also appears to exist in the current master version (link to code here)
Steps to reproduce:
You can reproduce by running a geo_polygon query using lat/long points in elasticsearch 5.6.3. Note that you will need a geo_point field to query against. Using a lat of < -90 or > 90 will return an error about an illegal latitude value, but using a lon of < -180 or > 180 will not return an error.
Based on the code link above, I would also assume you could do the same on any version > 5.6.3.
The text was updated successfully, but these errors were encountered:
Tested it in 6.x and it looks like the query with invalid longitude actually fails but with a quite convoluted error that is generated during polygon validation.
imotov
added a commit
to imotov/elasticsearch
that referenced
this issue
May 9, 2018
Fixes longitude validation in geo_polygon_query builder. The queries
with wrong longitude currently fail but only later during polygon
with quite complicated error message.
Fixeselastic#30488
Fixes longitude validation in geo_polygon_query builder. The queries
with wrong longitude currently fail but only later during polygon
with quite complicated error message.
Fixes#30488
Fixes longitude validation in geo_polygon_query builder. The queries
with wrong longitude currently fail but only later during polygon
with quite complicated error message.
Fixes#30488
Elasticsearch version (
bin/elasticsearch --version
):5.6.3
(bug also appears to be on master)Plugins installed: []
JVM version (
java -version
): 1.8.0_161OS version (
uname -a
if on a Unix-like system): DarwinDescription of the problem including expected versus actual behavior:
When using a
geo_polygon
query using points, I would expect any lon value< -180
or> 180
to be invalid and return an error similar to the one returned when any lat value is< -90
or> 90
. Looking at the code here the check does exist but is using the lat value instead of the lon value.This also appears to exist in the current master version (link to code here)
Steps to reproduce:
You can reproduce by running a
geo_polygon
query using lat/long points in elasticsearch5.6.3
. Note that you will need ageo_point
field to query against. Using a lat of< -90
or> 90
will return an error about anillegal latitude value
, but using a lon of< -180
or> 180
will not return an error.Based on the code link above, I would also assume you could do the same on any version
> 5.6.3
.The text was updated successfully, but these errors were encountered: