opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
8.83k stars 1.62k forks source link

Apply the fast filter optimization to range aggregation #13531

Open bowenlan-amzn opened 2 weeks ago

bowenlan-amzn commented 2 weeks ago

For the past few months, we have optimized the performance of date histogram aggregation. The idea is to first build the buckets ranges from the date histogram aggregation. Then utilize the index structure to compute the results for each buckets. The same idea can be applied to other aggregaitons which can also produce their buckets ranges beforehead. A good example is the range aggregation where user provides the ranges directly.

This issue will be used to track the effort to apply the optimization to range aggregation, and refactor the existing code accordingly.