-
Notifications
You must be signed in to change notification settings - Fork 25.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geo point on the edges of the bounding box not considered? #29196
Comments
Pinging @elastic/es-search-aggs |
@nknize could you take a look at this one? |
The current implementation in lucene excludes edges most of the time due to the way rounding is implemented. Basically, the query in the example is converted into:
As far as I can see this is intentional (although undocumented) behaviour. Should we convert this into a documentation issue? @nknize, @jpountz what do you think? |
Discussed this with @jpountz. This is indeed an intended behavior introduced in LUCENE-7166. Geopoints have limited precision and as a result they are rounded. Geopoints are always rounded down during index time. During the query time upper boundaries of the bounding boxes are rounded down, while lower boundaries are rounded up. As a result the points along on the lower bounds (bottom and left edges of the bounding box) might not make it into the bounding box due to the rounding error. I am going to change this issue to documentation issue and add some clarification to docs. |
The geo_bounding_box query might produce false positives alongside the right and upper edges and false negatives alongside left and bottom edges. This commit documents the behavior and defines the maximum error. Closes elastic#29196
The geo_bounding_box query might produce false positives alongside the right and upper edges and false negatives alongside left and bottom edges. This commit documents the behavior and defines the maximum error. Closes #29196
The geo_bounding_box query might produce false positives alongside the right and upper edges and false negatives alongside left and bottom edges. This commit documents the behavior and defines the maximum error. Closes #29196
The geo_bounding_box query might produce false positives alongside the right and upper edges and false negatives alongside left and bottom edges. This commit documents the behavior and defines the maximum error. Closes #29196
Elasticsearch server version:
{"number": "5.6.6","lucene_version": "6.6.1"}
Elasticsearch client version:
6.2.1
Plugins installed:
[{ "name": "x-pack", "version": "5.6.6", "description": "Elasticsearch Expanded Pack Plugin", "classname": "org.elasticsearch.xpack.XPackPlugin", "has_native_controller": true }]
JVM version:
1.8.0_151
OS version: Linux ubuntu 4.4.0-116-generic
Steps to reproduce
"Location":[-83.106,28]
Expected
The query returns my document.
Actual
The query returns nothing. The query contains other filters but they do not interfere with the results because once I change the top value of the
top_level
field of the geo bounding box filter to -83.107, the document gets returned.Observations & Questions
The text was updated successfully, but these errors were encountered: