# Changing the default number of shard/replicas?

**URL:** https://discuss.elastic.co/t/changing-the-default-number-of-shard-replicas/3115
**Category:** Elasticsearch
**Created:** [July 17, 2010, 12:31am UTC](https://discuss.elastic.co/t/changing-the-default-number-of-shard-replicas/3115 "2010-07-17T00:31:29Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![David\_Jensen\_2](https://avatars.discourse-cdn.com/v4/letter/d/bc79bd/32.png) [@David\_Jensen\_2](https://discuss.elastic.co/u/David_Jensen_2)
#### Post date: [July 17, 2010, 12:31am UTC](https://discuss.elastic.co/t/changing-the-default-number-of-shard-replicas/3115/1 "2010-07-17T00:31:29Z")

</div>

Is there a way I can change the default number of shards and replicas  
so that I don't have to include that information each time I create an  
index?

For instance if I put the following in elasticsearch.yaml will it  
work?

index:  
number\_of\_shards: 10  
number\_of\_replicas: 2

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [July 17, 2010, 12:35am UTC](https://discuss.elastic.co/t/changing-the-default-number-of-shard-replicas/3115/2 "2010-07-17T00:35:07Z")

</div>

Yep. Index level settings set on the settings file will be used. They  
basically provide the "defaults" unless explicit settings to override them  
are set on the index creation level.

-shay.banon

On Sat, Jul 17, 2010 at 3:31 AM, David Jensen [djensen47@gmail.com](mailto:djensen47@gmail.com) wrote:

> Is there a way I can change the default number of shards and replicas  
> so that I don't have to include that information each time I create an  
> index?
> 
> For instance if I put the following in elasticsearch.yaml will it  
> work?
> 
> index:  
> number\_of\_shards: 10  
> number\_of\_replicas: 2

---

<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 6, 2017, 4:22am UTC](https://discuss.elastic.co/t/changing-the-default-number-of-shard-replicas/3115/3 "2017-07-06T04:22:07Z")

</div>


