GeoDistance Filteredit

See Geo Distance Filter

FilterBuilder filter = geoDistanceFilter("pin.location")    
    .point(40, -70)                                         
    .distance(200, DistanceUnit.KILOMETERS)                 


center point

distance from center point

optimize bounding box: memory, indexed or none

distance computation mode: GeoDistance.SLOPPY_ARC (default), GeoDistance.ARC (slightly more precise but significantly slower) or GeoDistance.PLANE (faster, but inaccurate on long distances and close to the poles)

Note that you can cache the result using GeoDistanceFilterBuilder#cache(boolean) method. See Caching.