I am doing a geo_distance filter in my search (and I also have geo_distance
as one of my sorting fields).
I'm not sure how ES performs the geo_distance filtering under the hood but
I was wondering whether I should consider applying a bounding box
(geo_bbox) filter as well to my search to limit the number of records that
the geo_distance filter then needs to check individual distances for.
This way ES would be only be checking the distance of records that were
within the bounding box rather than all records that matched the search
term.
I'm not sure how ES performs the geo_distance filtering under the hood
but I was wondering whether I should consider applying a bounding box
(geo_bbox) filter as well to my search to limit the number of records
that the geo_distance filter then needs to check individual distances
for.
Have a look at the optimize_bbox parameter on the geo-distance filter
page:
thanks for pointing out to this option, looks like I've overseen it in the
past. I am not sure what the possible values (memory, indexed, ?) mean in
detail, can you share a line on this here? In the meantime I will throw
away my manual bounding box preprocessing ...
Thanks!
Andrej
Am Freitag, 8. Februar 2013 11:02:48 UTC+1 schrieb Clinton Gormley:
I'm not sure how ES performs the geo_distance filtering under the hood
but I was wondering whether I should consider applying a bounding box
(geo_bbox) filter as well to my search to limit the number of records
that the geo_distance filter then needs to check individual distances
for.
Have a look at the optimize_bbox parameter on the geo-distance filter
page:
On Fri, 2013-02-08 at 02:22 -0800, Andrej Rosenheinrich wrote:
Hi Clint,
thanks for pointing out to this option, looks like I've overseen it in
the past. I am not sure what the possible values (memory, indexed, ?)
mean in detail, can you share a line on this here? In the meantime I
will throw away my manual bounding box preprocessing ...
'memory' the default, just runs a geo_bbox check on each geo-point
loaded in memory.
'indexed' can only apply if you also set the lat/lon values to be
indexed separately (set lat_lon to true in your geo-point mapping)
that way it can use a range filter to do the bbox check, which is
faster. (note that this option will only work for single geopoint values
it won't work if you have multiple geopoints per field)
clint
Thanks!
Andrej
Am Freitag, 8. Februar 2013 11:02:48 UTC+1 schrieb Clinton Gormley:
> I'm not sure how ES performs the geo_distance filtering
under the hood
> but I was wondering whether I should consider applying a
bounding box
> (geo_bbox) filter as well to my search to limit the number
of records
> that the geo_distance filter then needs to check individual
distances
> for.
Have a look at the optimize_bbox parameter on the geo-distance
filter
page:
http://www.elasticsearch.org/guide/reference/query-dsl/geo-distance-filter.html
clint
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.