IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
GeoDistance Filter
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
GeoDistance Filter
editFilterBuilder filter = geoDistanceFilter("pin.location")
.point(40, -70)
.distance(200, DistanceUnit.KILOMETERS)
.optimizeBbox("memory")
.geoDistance(GeoDistance.ARC);
|
field |
|
|
center point |
|
|
distance from center point |
|
|
optimize bounding box: |
|
|
distance computation mode: |
Note that you can cache the result using
GeoDistanceFilterBuilder#cache(boolean) method. See
Caching.