How to efficiently implement pagination along with aggregation?

If I prefer composite aggregation, then for say Nth page, I need to query (n-1) times to get after_key value which is inefficient. Can someone please suggest efficient way to achieve the same?

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