Re: Detecting end of Scroll...

2014-06-16 Thread mooky
Just to confirm: Is it correct that in order to automatically clean up the resources associated with a scroll, you must execute it until zero results are retrieved? What about the case when all of the hits are returned in the first result (ie num hits = total hits) -- You received this messag

Re: Detecting end of Scroll...

2014-06-16 Thread mooky
Oh, I see. Can we make any assumption about the scrollId not changing when we reach the end of the results? On Monday, 16 June 2014 15:58:20 UTC+1, Ralph Meijer wrote: > > On Mon, Jun 16, 2014 at 07:45:00AM -0700, mooky wrote: > > [..] > > That said, I do notice that when the end of the resu

Re: Detecting end of Scroll...

2014-06-16 Thread Ralph Meijer
On Mon, Jun 16, 2014 at 07:45:00AM -0700, mooky wrote: > [..] > That said, I do notice that when the end of the results are reached, the > scrollId stops changing - and its also a lot shorter - and also it seems to > always be the same value (c2NhbjswOzE7dG90YWxfaGl0czoxOw==) That scroll id is the

Detecting end of Scroll...

2014-06-16 Thread mooky
According to the documentation, you know when you have reached the end of the scroll results when you receive zero hits in the response. However, if your SearchType is SCAN, then you receive zero hits in the *first* result, The question is how to avoid this ambiguity. My code that handles the s