# How to set the default value for "number\_of\_replicas" parameter which can not be overridden while creating the index

**URL:** <https://discuss.elastic.co/t/how-to-set-the-default-value-for-number-of-replicas-parameter-which-can-not-be-overridden-while-creating-the-index/27375>\
**Category:** Elasticsearch\
**Created:** [August 14, 2015, 7:13am UTC](https://discuss.elastic.co/t/how-to-set-the-default-value-for-number-of-replicas-parameter-which-can-not-be-overridden-while-creating-the-index/27375 "2015-08-14T07:13:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Himanshu\_Joshi](https://avatars.discourse-cdn.com/v4/letter/h/c57346/32.png) [@Himanshu\_Joshi](https://discuss.elastic.co/u/Himanshu_Joshi)\
**Post date:** [August 14, 2015, 7:13am UTC](https://discuss.elastic.co/t/how-to-set-the-default-value-for-number-of-replicas-parameter-which-can-not-be-overridden-while-creating-the-index/27375/1 "2015-08-14T07:13:56Z")

</div>

I have set a default value for "index.number\_of\_replicas" parameter in elasticsearch.yml file. Is it possible to restrict users from overriding this value while creating an index ?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 15, 2015, 9:36am UTC](https://discuss.elastic.co/t/how-to-set-the-default-value-for-number-of-replicas-parameter-which-can-not-be-overridden-while-creating-the-index/27375/2 "2015-08-15T09:36:01Z")

</div>

Not that I am aware of.  
Any parameters passed when creating the index take precedence.

---

<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:** [July 5, 2017, 11:55pm UTC](https://discuss.elastic.co/t/how-to-set-the-default-value-for-number-of-replicas-parameter-which-can-not-be-overridden-while-creating-the-index/27375/3 "2017-07-05T23:55:41Z")

</div>


