Clear scroll clarification

Hi all,

Question about scroll and clear scroll:
Ref: https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-request-scroll.html

The documentation says that

    The initial search request and each subsequent scroll request returns a new _scroll_id 
    ā€” only the most recent       _scroll_id should be used.

and

scrolls should be explicitly cleared as soon as the scroll is not being used anymore

My question is
Does it mean that each loop can clear the previous scrollId, or do we have to call the clear API when everything is scrolled with the list of all scrollIds ?

thx !
Xavier

1 Like

Hey,

only clear the last scroll id after you are done, dont do that in between, as then your scroll would not work anymore.

--Alex

1 Like

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