Support for Composite Aggregation
See original GitHub issueCurrent elasticsearch-py
release does not have support to Elasticsearch composite aggregation API.
Since I am using it, I handled the composite aggregation pagination manually, by multiple searches with the proper after
element set in each request body. I propose two ways to integrate the composite aggregation in the client:
- an helper method
elasticsearch.helpers.composite_agg()
, similar toelasticsearch.helpers.scan()
, that provides a simple abstraction on top of the composite aggregation API, i.e. a simple iterator that yields all hits as returned by underlining composite aggregation requests. - by adding the parameter
after
in search(**kwargs), that similarly to the parameterscroll
allows the user to specify the after element in the next request and continue the paging.
What do you think? If they are sound, I can start preparing my PR.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Composite aggregation | Elasticsearch Guide [8.5] | Elastic
This aggregation provides a way to stream all buckets of a specific aggregation, similar to what scroll does for documents.
Read more >Composite aggregation doesn't support min_doc_count option
The aggregation works fine on it's own. Only when I put it in a composite-aggregation it fails. ... I hope this is just...
Read more >Elasticsearch Composite Aggregations - How to Use ... - Opster
The composite aggregation allows you to paginate every bucket from a multi-level aggregation effectively, unlike other multi-bucket aggregations. In a manner ...
Read more >Composite Aggregation
A multi-bucket aggregation that creates composite buckets from different sources. Unlike the other multi-bucket aggregation the composite aggregation can be ...
Read more >Does Composite aggregation support minimum doc count filter?
min_doc_count is not supported by the composite aggregation and according to this issue it doesn't seem like it will ever be the case....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Feel free to open a PR 😃
I’ll gladly review it. Sorry for the delay in response ☹️
Hi. This will be really useful! Can you share with us the progress on this feature request?