Open andrearota opened 6 years ago
Hello, any interest on the proposed idea?
If any, I can work on it, please let me know.
Would be very interested to have an helper function on the model of what scan does ! Did you end up opening a PR on this ?
No, I did not, because I have not received any confirmation of interest on this topic by the maintainers.
Feel free to open a PR :)
I'll gladly review it. Sorry for the delay in response :frowning_face:
No problem ;) I am going to work on it and open the PR.
Hey have you guys finished this? I am using composite right now not using the elasticsearch-py, and Jesus is it complicated
Hey @andrearota Did you do any progress on this feature?
Hi. This will be really useful! Can you share with us the progress on this feature request?
Current
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: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.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.