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 scrolling results doesn't know what the SearchType
is - so it doesn't know how to differentiate between the two scenarios of
in which we receive zero hits.
Can the end of the results not be signalled through the scrollId?
I kind of expected the scrollId to be null when we reached the end of the
results (but I can see its not).
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==)
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 base64 encoding of the following string:
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 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 base64 encoding of the following string:
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)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.