# Where can I actually set index.allocation.max\_retries

**URL:** <https://discuss.elastic.co/t/where-can-i-actually-set-index-allocation-max-retries/181272>\
**Category:** Elasticsearch\
**Created:** [May 15, 2019, 8:35pm UTC](https://discuss.elastic.co/t/where-can-i-actually-set-index-allocation-max-retries/181272 "2019-05-15T20:35:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![preddy75](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@preddy75](https://discuss.elastic.co/u/preddy75)\
**Post date:** [May 15, 2019, 8:35pm UTC](https://discuss.elastic.co/t/where-can-i-actually-set-index-allocation-max-retries/181272/1 "2019-05-15T20:35:21Z")

</div>

I cannot find a way to set the property cluster wide.

The API only allows in on an index, I want to set it for every index and every index created after that.

---

<div class="post-metadata">

**Author:** ![whatgeorgemade](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whatgeorgemade/32/103246_2.png) [@whatgeorgemade](https://discuss.elastic.co/u/whatgeorgemade)\
**Post date:** [May 15, 2019, 9:29pm UTC](https://discuss.elastic.co/t/where-can-i-actually-set-index-allocation-max-retries/181272/2 "2019-05-15T21:29:50Z")

</div>

It's an index setting so I'm pretty sure you can't set it at a cluster level.

I think the only way you'll be able to do this for all indices going forward is to define an [index template](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html) that matches all index name patterns, and specify the setting in there.

Something like this:

```
PUT _template/my_default_template
{
  "index_patterns": ["*"],
  "order": 0,
  "settings": {
    "allocation.max_retries": 1
  }
}

```

Hope this helps.

---

<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:** [June 12, 2019, 9:29pm UTC](https://discuss.elastic.co/t/where-can-i-actually-set-index-allocation-max-retries/181272/3 "2019-06-12T21:29:51Z")

</div>

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