I've read that "We no longer recommend using the scroll API for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the search_after
parameter with a point in time (PIT)." (source: Paginate search results | Elasticsearch Guide [7.16] | Elastic )
However, I haven't been able to find any explanation WHY search_after is preferred and Scroll API is being cast aside. As far as I can tell, using search_after with PIT would require Elasticsearch to keep data around for the duration of the time window just like with Scroll API. Also, I've run a basic test comparing the two approaches, and it appears that search_after is actually slower and scales worse.