# Where to change auto\_expand\_replicas for enrich indices?

**URL:** <https://discuss.elastic.co/t/where-to-change-auto-expand-replicas-for-enrich-indices/337907>\
**Category:** Elasticsearch\
**Created:** [July 7, 2023, 4:51pm UTC](https://discuss.elastic.co/t/where-to-change-auto-expand-replicas-for-enrich-indices/337907 "2023-07-07T16:51:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [July 7, 2023, 4:51pm UTC](https://discuss.elastic.co/t/where-to-change-auto-expand-replicas-for-enrich-indices/337907/1 "2023-07-07T16:51:51Z")

</div>

Hello,

I need to change the `auto_expand_replicas` for the indices created by enrich policies, the `.enrich-*` indices, but I could not find any system template with this mapping, so it seems to be hard-coded elsewhere.

Currently the settings uses `0-all`, I want to change it to `0-6`, or any other number, because if some of our nodes have hit the high watermark setting the replica for the enrich indice will note be allocated and the cluster will be in the yellow state, which will trigger some alerts, but for us this is a false positive.

i tried to create the following index template with a priority of 500, but it didn't work.

```auto
PUT _index_template/enrich-template
{
  "priority": 500,
  "template": {
    "settings": {
      "index": {
        "auto_expand_replicas": "0-6",
        "number_of_replicas": "6"
      }
    }
  },
  "index_patterns": [
    ".enrich-*"
  ]
}

```

Tried using `"auto_expand_replicas": "false"` in the template as well, but it also didn't work.

So, where and how can I change this 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:** [August 4, 2023, 4:52pm UTC](https://discuss.elastic.co/t/where-to-change-auto-expand-replicas-for-enrich-indices/337907/2 "2023-08-04T16:52:23Z")

</div>

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