WARNING: The 2.x versions of Elasticsearch have passed their EOL dates. If you are running a 2.x version, we strongly advise you to upgrade.
This documentation is no longer maintained and may be removed. For the latest information, see the current Elasticsearch documentation.
This is by far the most efficient geo-filter because its calculation is very
simple. You provide it with the
coordinates of a rectangle, and all it does is compare the longitude with the
left and right coordinates, and the latitude with the top and bottom
geo_bounding_box is the one geo-filter that doesn’t require all
geo-points to be loaded into memory. Because all it has to do is check
lon values fall within the specified ranges, it can
use the inverted index to do a glorified
To use this optimization, the
geo_point field must be mapped to
lon values separately:
Now, when we run our query, we have to tell Elasticsearch to use the indexed
geo_point field can contain multiple geo-points, the
lat_lon optimization can be used only on fields that contain a single