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
I have a geoshape query which returns more documents than it should.
Some of the documents are outside of the coordinates specified in the query.
The query specifies a latitude between 54 and 55, but in the results documents with a latitude of 55.01 are also returned (longitude is inside specified coordinate range).
However searching for a longitude between -8 and 9, a longitude of 9.01 is not included in the results (latitude is inside specified coordinate range)
Did I miss something what causes the document with latitude 55.01 to be returned, or is this a bug?
Elasticsearch version: 6.0.0-rc1 JVM version: 1.8.0_144 OS version: Windows 10
Geo_shape does not provide 100% accuracy and depending on how it is configured it may return some false positives or false negatives for certain queries. To mitigate this, it is important to select an appropriate value for the tree_levels parameter and to adjust expectations accordingly.
If you require more accuracy, please configure your mapping appropriately using the precision and distance_error_pct parameters.
I have a geoshape query which returns more documents than it should.
Some of the documents are outside of the coordinates specified in the query.
The query specifies a latitude between 54 and 55, but in the results documents with a latitude of 55.01 are also returned (longitude is inside specified coordinate range).
However searching for a longitude between -8 and 9, a longitude of 9.01 is not included in the results (latitude is inside specified coordinate range)
Did I miss something what causes the document with latitude 55.01 to be returned, or is this a bug?
Elasticsearch version: 6.0.0-rc1
JVM version: 1.8.0_144
OS version: Windows 10
Steps to reproduce:
Mapping
curl -XPUT "http://localhost:9200/test" -H 'Content-Type: application/json' -d' {"settings":{"number_of_shards":1,"number_of_replicas":0},"mappings":{"value":{"properties":{"location":{"type":"geo_shape"}}}}}'
Data
curl -XPOST "http://localhost:9200/_bulk" -H 'Content-Type: application/json' -d' {"index":{"_index":"test","_type":"value"}} {"location":{"type":"point","coordinates":[54.999,7.497]}} {"index":{"_index":"test","_type":"value"}} {"location":{"type":"point","coordinates":[55,7.497]}} {"index":{"_index":"test","_type":"value"}} {"location":{"type":"point","coordinates":[55.01,8.2]}} {"index":{"_index":"test","_type":"value"}} {"location":{"type":"point","coordinates":[54.5,9.01]}} {"index":{"_index":"test","_type":"value"}} {"location":{"type":"point","coordinates":[54.5,9.01]}} '
Query
curl -XGET "http://localhost:9200/test/_search" -H 'Content-Type: application/json' -d' {"query":{"bool":{"must":{"match_all":{}},"filter":{"geo_shape":{"location":{"shape":{"type":"envelope","coordinates":[[55,-8],[54,9]]},"relation":"within"}}}}}}'
The text was updated successfully, but these errors were encountered: