Hi guys,
I'm attempting to implement pagination for our application. The catch is
that our documents require a little post-query filtering, so sometimes if a
user requests 500 documents, we scroll, get 500 from ES, filter and end up
with a lower number. In this case, we perform the next scroll, get a number
of results and build until we have 500 valid docs.
I had some related questions about scrolling / the scroll id returned by
search scroll requests.
Question1: Is it possible to use the same scroll id multiple times to get
the same set of results in the over-all result set?
Question2: (related to Question1) I'm confused by the scroll_id returned
whilst doing a scan search then scrolling. What I see is that that when I
start scrolling, for a period of time I get the same _scroll_id back. After
some number of requests it changes. I would have expected to either (1) get
the same _scroll_id over and over or (2) get a different _scroll_id each
time. Are either of these correct? At the bottom of this mail I've given a
short example set of req/resp.
Any pointers on this appreciated. I'd also be interested in hearing from
anyone who has successfully implemented pagination and the approach you
took.
Cheers,
oli
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.