# Curator: What is the recommended way to change static index setting?

**URL:** <https://discuss.elastic.co/t/curator-what-is-the-recommended-way-to-change-static-index-setting/214004>\
**Category:** Elasticsearch\
**Tags:** curator\
**Created:** [January 7, 2020, 8:14am UTC](https://discuss.elastic.co/t/curator-what-is-the-recommended-way-to-change-static-index-setting/214004 "2020-01-07T08:14:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajiv](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajiv/32/47644_2.png) [@Rajiv](https://discuss.elastic.co/u/Rajiv)\
**Post date:** [January 7, 2020, 8:14am UTC](https://discuss.elastic.co/t/curator-what-is-the-recommended-way-to-change-static-index-setting/214004/1 "2020-01-07T08:14:03Z")

</div>

Once we rollover an index, we use Curator to mark it read-only. We use filter element "pattern" to exclude the active index [as suggested in Curator documentation](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.8/fe_pattern.html). Ideally, we want to filter out indices which have already been marked read-only, but I could not find a way to filter based on index setting in curator. Since multiple calls to mark an index as read-only seemed "harmless", we are able to get-by with filtering only on pattern, without filtering out indices already having the read-only setting.

Now, apart from marking these indices as read-only, we would like to add the setting "index.codec:best\_compression" to the index. Since this is a static setting, we need to close the index, set the property and open the index. Just filtering on pattern while marking the indices for compression would mean a lot of indices get closed and opened even though they already had the setting.

Is there a recommended way to change static codec setting that avoids open/close of indices that already have the setting? Is there a way to filter indices based on existing value of a setting?

---

<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:** [February 4, 2020, 8:14am UTC](https://discuss.elastic.co/t/curator-what-is-the-recommended-way-to-change-static-index-setting/214004/2 "2020-02-04T08:14:10Z")

</div>

Closed on February 4, 2020, 8:14am UTC

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