My use case in this regard is pretty simple, I am running a query, with aggregations, which returns result > 10000 documents. For navigating this result set I am using
from and retrieving documents in batches of 20.
Everything runs fine except for pagination doesn't work beyond page 500 with the following message (trimmed) appearing in logs,
Result window is too large, from + size must be less than or equal to:  but was . See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting.
The message is pretty clear as to what went wrong and what needs to be done. However neither of the stated solution seems to be applicable for my use case,
Scroll API - As far as I have read, with scroll api getting back aggregations for subsequent scrolls is not possible.
If the request specifies aggregations, only the initial search response will contain the aggregations results.
index.max_result_windowlooks more of a temporary hack with a good possibility of putting extra strain on resources.
Search After on the other hand looks like a viable solution, however, I am not really sure if this is the best way to go or there's a better way out to get around this issue.
Thanks for the help!