Elastic Search GeoGrid – 高精度请求 vs 边界框过滤

huangapple go评论97阅读模式
英文:

Elastic Search GeoGrid - High precision request vs bounding box filter

问题

以下是翻译好的部分:

我正在研究 Elastic Search 的地理网格聚合,并考虑一个问题。

在使用 高精度请求边界框过滤 之间,在性能方面是否有差异,因为过滤和聚合的顺序很重要。

在我搜索时,我发现了这个帖子 Elastic search filter applied in which order ,他们说这可以优化查询。但我认为文档将这两个查询分开的原因一定是有道理的。

非常感谢!

我查看了以下文档:

英文:

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:

答案1

得分: 1

筛选器的顺序不再重要,ES 将尝试足够智能地筛选出尽可能多的文档,以其自认为合适的顺序。

关于您的第一个问题,如果您使用边界框筛选,您可能会或可能不会使用额外的 geo_bounding_box 查询,bounds 聚合参数将充当边界框查询,并仅在指定边界的上下文中运行高精度 geohash 网格聚合。

这个边界框可以与附加的 geo_bounding_box 查询一起使用,也可以在聚合上下文中与任何其他定义的 geo_bounding_box 查询相交、相等或不相交。

英文:

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.

huangapple
  • 本文由 发表于 2023年6月5日 18:56:56
  • 转载请务必保留本文链接:https://go.coder-hub.com/76405756.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定