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
editFilterBuilders.geoDistanceFilter("pin.location")
.point(40, -70)
.distance(200, DistanceUnit.KILOMETERS)
.optimizeBbox("memory") // Can be also "indexed" or "none"
.geoDistance(GeoDistance.ARC); // Or GeoDistance.PLANE
Note that you can cache the result using
GeoDistanceFilterBuilder#cache(boolean) method. See
Caching.