Elasticsearch Number of Replicas

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

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

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.

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