# Elasticsearch Number of Replicas

**URL:** https://discuss.elastic.co/t/elasticsearch-number-of-replicas/265593
**Category:** Elasticsearch
**Created:** [February 26, 2021, 10:09am UTC](https://discuss.elastic.co/t/elasticsearch-number-of-replicas/265593 "2021-02-26T10:09:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dfoot](https://avatars.discourse-cdn.com/v4/letter/d/ea5d25/32.png) [@dfoot](https://discuss.elastic.co/u/dfoot)
#### Post date: [February 26, 2021, 10:09am UTC](https://discuss.elastic.co/t/elasticsearch-number-of-replicas/265593/1 "2021-02-26T10:09:22Z")

</div>

Elasticsearch only has one node I created template in error e.g. 1 shard (Primary) and 1 replica so I have updated the template for no replica.

PUT friday-000012/\_settings  
{"number\_of\_replicas": 0}

I checked the template and all look fine.

{  
"friday\_template" : {  
"order" : 0,  
"index\_patterns" : [  
"friday\*"  
],  
"settings" : {  
"index" : {  
"lifecycle" : {  
"name" : "friday\_policy",  
"rollover\_alias" : "friday-alias"  
},  
"number\_of\_shards" : "1",  
"number\_of\_replicas" : "0"  
}  
},  
"mappings" : { },  
"aliases" : { }  
}  
}

But after 1 day rollover I see 1 primary and 1 replica for some reason.

health status index uuid pri rep docs.count docs.deleted store.size pri.store.size  
yellow open friday-000014 XXXXXXXXXXXXXXXXXXXXXX 1 1 136 0 265.8kb 265.8kb  
green open friday-000007 XXXXXXXXXXXXXXXXXXXXXX 1 0 198 0 359.9kb 359.9kb  
yellow open friday-000013 XXXXXXXXXXXXXXXXXXXXXX 1 1 194 0 376.2kb 376.2kb  
green open friday-000001 XXXXXXXXXXXXXXXXXXXXXX 1 0 190 0 290.4kb 290.4kb  
green open friday-000004 XXXXXXXXXXXXXXXXXXXXXX 1 0 60 0 312.3kb 312.3kb

Please advise.

Thanks

---

<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: [February 27, 2021, 12:14am UTC](https://discuss.elastic.co/t/elasticsearch-number-of-replicas/265593/2 "2021-02-27T00:14:07Z")

</div>

Templates are not retrospective, so if you want to remove them from older indices you need to update them specifically.

---

<div class="post-metadata">

### Author: ![dfoot](https://avatars.discourse-cdn.com/v4/letter/d/ea5d25/32.png) [@dfoot](https://discuss.elastic.co/u/dfoot)
#### Post date: [March 1, 2021, 10:39am UTC](https://discuss.elastic.co/t/elasticsearch-number-of-replicas/265593/3 "2021-03-01T10:39:18Z")

</div>

I did update the older indices as example below command for any yellow status, this updated from yellow to green but next roll over (next day) I see yellow again which is 1 shard and 1 replica but the template is correct.

PUT friday-000012/\_settings  
{"number\_of\_replicas": 0}

Please advise.

---

<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: [March 29, 2021, 10:39am UTC](https://discuss.elastic.co/t/elasticsearch-number-of-replicas/265593/4 "2021-03-29T10:39:26Z")

</div>

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