How scroll in elasticsearch handles continually updating data? How scroll in elasticsearch handles continually updating data? elasticsearch elasticsearch

How scroll in elasticsearch handles continually updating data?


The way the scan-and-scroll API works is described one link away from your link, i.e. at http://www.elastic.co/guide/en/elasticsearch/guide/master/scan-scroll.html

On that page, it's stated that

A scrolled search takes a snapshot in time — it doesn’t see any changes that are made to the index after the initial search request has been made. It does this by keeping the old datafiles around, so that it can preserve its “view” on what the index looked like at the time it started.

So what this implies is that whether you use a specific date for your end date or simply now, it won't make any difference since the snapshot of documents taken into account by your scroll query will always be constant during the whole time the query runs.

Say you're issuing a scroll query right now (e.g. at 2015-05-11 06:22:27), then no new documents contributed to your index after that date will ever be returned.