# Stale index

**URL:** <https://discuss.elastic.co/t/stale-index/35918>\
**Category:** Elasticsearch\
**Created:** [November 30, 2015, 3:22pm UTC](https://discuss.elastic.co/t/stale-index/35918 "2015-11-30T15:22:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![antonkallenberg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/antonkallenberg/32/6259_2.png) [@antonkallenberg](https://discuss.elastic.co/u/antonkallenberg)\
**Post date:** [November 30, 2015, 3:22pm UTC](https://discuss.elastic.co/t/stale-index/35918/1 "2015-11-30T15:22:57Z")

</div>

Hi Guys,

Is there some way to know if an index is stale?

Regards,  
Anton

---

<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:** [November 30, 2015, 6:29pm UTC](https://discuss.elastic.co/t/stale-index/35918/2 "2015-11-30T18:29:40Z")

</div>

What do you mean by "stale index"?

---

<div class="post-metadata">

**Author:** ![antonkallenberg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/antonkallenberg/32/6259_2.png) [@antonkallenberg](https://discuss.elastic.co/u/antonkallenberg)\
**Post date:** [November 30, 2015, 7:15pm UTC](https://discuss.elastic.co/t/stale-index/35918/3 "2015-11-30T19:15:54Z")

</div>

Sorry for being unclear, I mean the time when a index is not up to date  
with the latest writes. Would be great to be able to get some kind of  
notification or being able to check if a index is up to date.

Like in RavenDb, you can check the status of an index to see if it's up to  
date with all the latest documents or you can get a notification when  
documents of a certain type has been indexed. With this type of  
functionality we can inform the end user when a large import of data is  
available for searching.

Thanks,  
Anton

---

<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:** [November 30, 2015, 7:54pm UTC](https://discuss.elastic.co/t/stale-index/35918/4 "2015-11-30T19:54:19Z")

</div>

Data that you have fed to ES and received an acknowledgement for will be available for queries after the next refresh of the index, which is initiated explicitly via an API call or periodically every few seconds (configurable per index).

So if you know the refresh interval you have an upper bound for how stale queries can be, and if you want an immediate refresh that's also an option (but doing it too often hurts performance).

To improve performance it's a common practice to disable periodic refreshes for the duration of a bulk indexing operation.

---

<div class="post-metadata">

**Author:** ![antonkallenberg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/antonkallenberg/32/6259_2.png) [@antonkallenberg](https://discuss.elastic.co/u/antonkallenberg)\
**Post date:** [November 30, 2015, 8:20pm UTC](https://discuss.elastic.co/t/stale-index/35918/5 "2015-11-30T20:20:30Z")

</div>

Thank you for your response! Wow, I didn't realize that data is available  
directly after the refresh interval, even so if the index is really large?

Great tip to disable periodic refreshes for the duration of a bulk indexing  
operation. I guess that is something which can be configured per index  
through the API?

Thanks,  
Anton

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 30, 2015, 8:45pm UTC](https://discuss.elastic.co/t/stale-index/35918/6 "2015-11-30T20:45:00Z")

</div>

You can update the `refresh.interval` via the index APIs, yep.

---

<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:34pm UTC](https://discuss.elastic.co/t/stale-index/35918/7 "2017-07-05T23:34:43Z")

</div>


