# Refresh interval guarantee

**URL:** https://discuss.elastic.co/t/refresh-interval-guarantee/289125
**Category:** Elasticsearch
**Created:** [November 13, 2021, 9:01pm UTC](https://discuss.elastic.co/t/refresh-interval-guarantee/289125 "2021-11-13T21:01:26Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![krezno](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krezno/32/97090_2.png) [@krezno](https://discuss.elastic.co/u/krezno)
#### Post date: [November 13, 2021, 9:01pm UTC](https://discuss.elastic.co/t/refresh-interval-guarantee/289125/1 "2021-11-13T21:01:26Z")

</div>

The [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html#refresh-api-desc) on refreshes says:

> By default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds.

What happens if the index was not queried in the last 30 seconds? When does it get refreshed? If I for example write to an index, don't search it for a long time and then search it, will I get up to date results? When I write I get the results immediately on the first search, so I seem to be misunderstanding something. Is there a guarantee on a maximum time for the availability of newly indexed documents? If this varies from cluster to cluster or index to index, how can I check this in my case?

I am interested what is the case on both elasticsearch 5 and 7

thanks

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [November 14, 2021, 9:37am UTC](https://discuss.elastic.co/t/refresh-interval-guarantee/289125/2 "2021-11-14T09:37:28Z")

</div>

> [@krezno](#):
>
> If I for example write to an index, don't search it for a long time and then search it, will I get up to date results?

Yes, the search will itself trigger a refresh in this case.

> [@krezno](#):
>
> I am interested what is the case on both Elasticsearch 5 and 7

Elasticsearch 5 is ancient, years past EOL, I don't remember its behaviour.

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [November 14, 2021, 12:40pm UTC](https://discuss.elastic.co/t/refresh-interval-guarantee/289125/3 "2021-11-14T12:40:19Z")

</div>

If I remember correctly Elasticsearch 5.x simply follows the refresh interval.

---

<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: [December 12, 2021, 12:41pm UTC](https://discuss.elastic.co/t/refresh-interval-guarantee/289125/4 "2021-12-12T12:41:08Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
