Composite aggregation doesn't work very well with bucket_sort aggregation.
I know this was talked and explained lot of times.
My scenario works with a composite aggregation on few fields, some metrics inside (max, min, avg) and then I need to sort on some of those metrics using pagination.
My problem comes that I could have more than 50k results so I have to do pagination (using after).
Then my question is what would be the best solution to achieve this?
Transformations? Rollups? Large size results on on call?