Practical guide to grouping results with elasticsearch
Jose Raymundo Cruz

Hi Jose,

I have similar query regarding pagination.

In your example, you are dispalying 10 unique emails in first page by doing aggregation based on email and displaying top hits for each unique mail. But how are you doing pagination on the unique emails since pagination is not supported inside aggregation I feel from and size that you mentioned is for supporting pagination at “query” level and not aggregation level as per the reference ( Please correct me and let me know how you achieved pagination.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.