One of the most difficult choices when creating an Elasticsearch cluster and its indexes is deciding how many primary shards should be created and how many replica shards should be created.
Let's understand how the number of shards becomes important in the following sub-sections:
- Unit of parallelism in Elasticsearch:
- The effect of the number of shards on the relevance score
- The effect of the number of shards on the accuracy of aggregations