optimize_bbox
for geo_distance filters can cause missing results
#6008
Labels
:Analytics/Geo
Indexing, search aggregations of geo points and shapes
blocker
>bug
v1.1.2
v1.2.0
v2.0.0-beta1
When optimize_bbox is enabled for geo_distance filters, it can cause missing results:
https://gist.github.com/jtibshirani/1e42809a52be9ac651fc
This issue occurs on ES 1.1.1, and also in ES 1.0.3 and below, before the upgrade to Lucene 4.7. It seems the distance calculation for the bounding box uses DistanceUnit#getEarthRadius(), which is the radius at the semi-major axis, whereas the actual geo_distance filter uses SloppyMath to do the calculation. In Lucene 4.6 SloppyMath uses the average earth radius, and in 4.7 it averages the radii at the two points.
The same problem exists for both 'memory' and 'indexed' bounding boxes.
The text was updated successfully, but these errors were encountered: