Create bucket of 2 documents - Elasticsearch

I have a set of documents having timestamps. I want to sort them in ascending order of timestamp and then bucket them into documents of two.

Suppose documents have timestamps 1,2,3,4

I want to bucket them into sets of two i.e 1,2 in one bucket, 2 and 4 in the next bucket. How do I do this in elasticsearch?

I'm not sure you can do that.

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