# How to update refresh interval for all existing indices

**URL:** <https://discuss.elastic.co/t/how-to-update-refresh-interval-for-all-existing-indices/203174>\
**Category:** Elasticsearch\
**Created:** [October 11, 2019, 7:37am UTC](https://discuss.elastic.co/t/how-to-update-refresh-interval-for-all-existing-indices/203174 "2019-10-11T07:37:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anikesh\_Paul](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anikesh_paul/32/54900_2.png) [@Anikesh\_Paul](https://discuss.elastic.co/u/Anikesh_Paul)\
**Post date:** [October 11, 2019, 7:37am UTC](https://discuss.elastic.co/t/how-to-update-refresh-interval-for-all-existing-indices/203174/1 "2019-10-11T07:37:38Z")

</div>

Hi,

I want to update the refresh interval for all my existing indices(approx 200-300 indices) to 60s.  
Though I know we can achieve it using template, but per my understanding that template will be effective only for new indices.  
Is there any possible way to update refresh interval for all **existing** indices. Either on cluster basis or some other way of doing that.

---

<div class="post-metadata">

**Author:** ![Bernt\_Rostad](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@Bernt\_Rostad](https://discuss.elastic.co/u/Bernt_Rostad)\
**Post date:** [October 11, 2019, 8:02am UTC](https://discuss.elastic.co/t/how-to-update-refresh-interval-for-all-existing-indices/203174/2 "2019-10-11T08:02:30Z")

</div>

> [@Anikesh\_Paul](#):
>
> Is there any possible way to update refresh interval for all **existing** indices.

You can specify **\_all** which will then affect all your indices. For instance, this will set the refresh interval to 20 seconds in all the indices:

```
curl -XPUT "http://localhost:9200/_all/_settings?pretty" -H "Content-Type: application/json" -d '{
      "index" : {
           "refresh_interval" : "20s"
      }
}'

```

---

<div class="post-metadata">

**Author:** ![Anikesh\_Paul](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anikesh_paul/32/54900_2.png) [@Anikesh\_Paul](https://discuss.elastic.co/u/Anikesh_Paul)\
**Post date:** [October 11, 2019, 9:55am UTC](https://discuss.elastic.co/t/how-to-update-refresh-interval-for-all-existing-indices/203174/3 "2019-10-11T09:55:53Z")

</div>

That's work fine. Thanks for contributing. 👍

---

<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:** [November 8, 2019, 9:55am UTC](https://discuss.elastic.co/t/how-to-update-refresh-interval-for-all-existing-indices/203174/4 "2019-11-08T09:55:59Z")

</div>

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