# Index refresh and search&scroll

**URL:** <https://discuss.elastic.co/t/index-refresh-and-search-scroll/36209>\
**Category:** Elasticsearch\
**Created:** [December 2, 2015, 5:19pm UTC](https://discuss.elastic.co/t/index-refresh-and-search-scroll/36209 "2015-12-02T17:19:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbalaguero](https://avatars.discourse-cdn.com/v4/letter/j/c68b51/32.png) [@jbalaguero](https://discuss.elastic.co/u/jbalaguero)\
**Post date:** [December 2, 2015, 5:19pm UTC](https://discuss.elastic.co/t/index-refresh-and-search-scroll/36209/1 "2015-12-02T17:19:07Z")

</div>

Hello,

I have an index with these settings:

```
   properties: {
     ( . . . )

     "creationTime" : { "type" : "long", "index" : "not_analyzed" },

  settings: {

    ( . . . )
    "number_of_replicas" : "0",
    "number_of_shards" : "1",
    "refresh_interval" : "10000ms",

```

Now I'm performing a search&scroll against this index using the 'creationTime'. Our search starts at 02-12-2015 18:02:58, takes about 200ms and retrieves 416.000 documents.

Now I'm printing the oldest and newest 'creationTime' from these 416.0000 documents:  
[min, max] = [02-12-2015 17:47:13, 02-12-2015 18:02:55]

So, how is it possible that this search has found a document with creationTime = 18:02:55 if the search started at 18:02:58 and the refresh interval is 10 seconds? Shouldn't it find only documents with creationTime less than 18:02:48 (18:02:58 minus 10 seconds)?

Thanks.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [December 6, 2015, 3:03pm UTC](https://discuss.elastic.co/t/index-refresh-and-search-scroll/36209/2 "2015-12-06T15:03:05Z")

</div>

A 10 second refresh rate means that an index refresh takes place every ten seconds, not that a document is included in a refresh after ten seconds. Consequently, an updated document is included in a refresh after _at most_ ten seconds. On average it'll take half that time.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:33pm UTC](https://discuss.elastic.co/t/index-refresh-and-search-scroll/36209/3 "2017-07-05T23:33:13Z")

</div>


