# ES6.x - Prevent new index to be created with replica shards

**URL:** https://discuss.elastic.co/t/es6-x-prevent-new-index-to-be-created-with-replica-shards/178168
**Category:** Elasticsearch
**Created:** [April 24, 2019, 7:27am UTC](https://discuss.elastic.co/t/es6-x-prevent-new-index-to-be-created-with-replica-shards/178168 "2019-04-24T07:27:14Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![EldrosKandar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eldroskandar/32/33188_2.png) [@EldrosKandar](https://discuss.elastic.co/u/EldrosKandar)
#### Post date: [May 14, 2019, 8:42am UTC](https://discuss.elastic.co/t/es6-x-prevent-new-index-to-be-created-with-replica-shards/178168/5 "2019-05-14T08:42:53Z")

</div>

@Bernt_Rostad

So I found out about the `auto_expand_replicas` setting from [this thread](https://discuss.elastic.co/t/change-number-of-replicas-to-0-on-existing-indices/141622) while searching something else. I've set it to `false` and I will see if it works tomorrow when the new index is created.

EDIT: Marking this as the solution, since then the cluster configuration changed so I needed the replicas, as such I couldn't test it thoroughly, but this is as close of a solution I came, and I hope it can help someone.

---

_[View the full topic](https://discuss.elastic.co/t/es6-x-prevent-new-index-to-be-created-with-replica-shards/178168)._
