Elasticsearch not creating defaultly 5 shards

Viewed 42

I wanted to ask a question about Elasticsearch making 5 shards in each index by default. Well for some reason this is not the case for me. I was wondering whether it was an error on my side (even though I didn't make any changes to the custom template) or this is no longer a case (no longer 5 shards defaultly for each index)? I didn't find anything in documentation or in internet about it. I know I can change this by running:

PUT _template/default
{
"index_patterns": ["*"],
"order": -1,
"settings": {
  "number_of_shards": "5",
 "number_of_replicas": "1"
}
}

however this is not my point I just wanted to learn what is current way of working for Elasticsearch.

Thanks for all answers!

1 Answers

From the 7.x version, the default number of primary shard in each index is 1, as mentioned here in the documentation

Before the 7.x version, the default number of primary shared for each index were 5

You can refer to the breaking changes of the elasticsearch 7.0.0 version here

Index creation no longer defaults to five shards Previous versions of Elasticsearch defaulted to creating five shards per index. Starting with 7.0.0, the default is now one shard per index.

Related