New

The executive guide to generative AI

Read more

Geo Bounding Box Filter

edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.

Geo Bounding Box Filter

edit

See Geo Bounding Box Filter

FilterBuilder filter = geoBoundingBoxFilter("pin.location") 
    .topLeft(40.73, -74.1)                                  
    .bottomRight(40.717, -73.99);                           

field

bounding box top left point

bounding box bottom right point

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

Was this helpful?
Feedback