diff --git a/docs/reference/option_number_of_shards.md b/docs/reference/option_number_of_shards.md index c804fba4..2ed86695 100644 --- a/docs/reference/option_number_of_shards.md +++ b/docs/reference/option_number_of_shards.md @@ -1,15 +1,35 @@ --- mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/client/curator/current/option_number_of_shards.html +applies_to: + stack: both + serverless: unavailable +products: + - id: elasticsearch --- # number_of_shards [option_number_of_shards] +The `number_of_shards` option specifies the number of primary shards in the target index created by the shrink action. + ::::{note} -This setting is only used by the [shrink](/reference/shrink.md) action. +`number_of_shards` is used only by the [shrink](/reference/shrink.md) action. :::: +* **Type:** Integer +* **Required:** Optional +* **Required:** Optional + +The value of `number_of_shards` determines the number of primary shards in the target index after the shrink operation. + +::::{important} +The value of `number_of_shards` must meet the following criteria: +* It must be lower than the number of primary shards in the source index. +* It must be a factor of the number of primary shards in the source index. +For example, a source index with 8 primary shards can be shrunk to 4, 2, or 1, and cannot be shrunk to 3 or 5. +:::: + ## number_of_shards example [option-number-of-shards-example] ```yaml action: shrink description: >- @@ -22,14 +42,10 @@ filters: - filtertype: ... ``` -The value of this setting determines the number of primary shards in the target index. The default value is `1`. - -::::{important} -The value for `number_of_shards` must meet the following criteria: +Before you use `number_of_shards`, learn about shards and how shard count and sizing affect performance and scalability. For details, check the following: -* It must be lower than the number of primary shards in the source index. -* It must be a factor of the number of primary shards in the source index. +* [Clusters, nodes, and shards](docs-content://deploy-manage/distributed-architecture/clusters-nodes-shards.md) +* [Size your shards](docs-content://deploy-manage/production-guidance/optimize-performance/size-shards.md) -::::