Scroll query with slice


Can someone confirm me that when querying using the scroll api, with slices,
it will be targeting the same "state/snapshot" of the index ?

As far as I know, to simplify, scroll allow to "freeze" a state of the index, and then paginate over it. So that if a new document is added during the pagination process, it will be ignored.

To work with scroll we first perform a regular search, adding scroll parameter, and we get a scroll_id, then we switch to the scroll api with that id to get the other results pages.

Now when it's about using slices, how Elasticsearch can know, internally, that it must target the same "frozen" state of the index ?
Because if I want 2 slices, I'll have 2 perform 2 distinct search query with distinct slice id, retrieve 2 distinct scroll id, and then process the next pages using scroll API with those 2 ids...


1 Like

Hello, any updates on this please as it's not very clear in the documentation.