There is a way to use search_after to restart an scroll?

It is possible to start an scroll with search_after ? The idea is to :

  • Create an scroll with a good "sort"
  • Iterate thanks to the scroll_id and process each batch of docs
  • If when asking for the next batch, a "search_context_missing_exception" arise we create a new scroll with search after, making the scroll start just there where we need it.

This "fallback" will be handy when processing some batches takes more time than expected.

Any thoughts ? Facts ?

Thx !

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