230k aggregation trying to get an output

Need some wisdom on aggregations.

I have around 230k aggregated IPs I am trying to aggregate and get them to a JSON file.

What would be the best way to do this in the ElasticSearch api?

using the scroll api?
or just using search?

I'd use the Composite aggregation to do that. It's essentially an aggregation that can page through the buckets, much like the scroll API can page through search hits.

It will be a lot more memory friendly than trying to aggregate all 230k IPs in one request :slight_smile:

Thank you!

I got a script written and it is working .

The whole last key thing through me for major loop.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.