Search code examples
elasticsearchgeospatialelastic-stackgeo

Elastic Search GeoGrid - High precision request vs bounding box filter


I am working on the Geo grid aggregation of the Elastic Search and having a consideration.

Is there any different in terms of performance, between using the High precision requests and Bounding box filtering. Because the filter and aggregation order is important.

While I was searching for it, I found this thread Elastic search filter applied in which order and they said that it can optimize the query. But I think there must be a reason that the documents have separate these two queries.

Thank you a lot!

I have taken a look at these documents:


Solution

  • The order of the filters is not important anymore, ES will try to be smart enough to filter out as many documents as it can in order order it sees fit.

    Regarding your first question, if you use bounding box filtering, you may or may not use an additional geo_bounding_box query, the bounds aggregation parameter will act as bounding box query and only run the high-precision geohash grid aggregation in the context of the specified bound.

    This bounding box can be used with or without an additional geo_bounding_box query filtering the points prior to aggregating. It is an independent bounding box that can intersect with, be equal to, or be disjoint to any additional geo_bounding_box queries defined in the context of the aggregation.