Geo Distance Range Filter

edit

Geo Distance Range Filter

edit

See Geo Distance Range Filter

FilterBuilders.geoDistanceRangeFilter("pin.location")
    .point(40, -70)
    .from("200km")
    .to("400km")
    .includeLower(true)
    .includeUpper(false)
    .optimizeBbox("memory")                    // Can be also "indexed" or "none"
    .geoDistance(GeoDistance.ARC);            // Or GeoDistance.PLANE

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