Skip to content

Commit

Permalink
Document cluster.default_number_of_replicas and update index.number_o…
Browse files Browse the repository at this point in the history
…f_replicas (opensearch-project#8526)

* Document cluster.default_number_of_replicas and update index.number_of_replicas

Signed-off-by: Liyun Xiu <[email protected]>

* Apply suggestions from code review

Signed-off-by: kolchfa-aws <[email protected]>

---------

Signed-off-by: Liyun Xiu <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Co-authored-by: kolchfa-aws <[email protected]>
  • Loading branch information
chishui and kolchfa-aws authored Oct 14, 2024
1 parent e92f41e commit 485202c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ OpenSearch supports the following dynamic cluster-level index settings:

- `cluster.snapshot.shard.path.prefix` (String): Controls the fixed path prefix for snapshot shard-level blobs. This setting only applies when the repository `shard_path_type` setting is either `HASHED_PREFIX` or `HASHED_INFIX`. Default is an empty string, `""`.

- `cluster.default_number_of_replicas` (Integer): Controls the default number of replicas for indexes in the cluster. The index-level `index.number_of_replicas` setting defaults to this value if not configured. Default is `1`.

## Index-level index settings

You can specify index settings at index creation. There are two types of index settings:
Expand Down Expand Up @@ -185,7 +187,7 @@ For more information about updating settings, including supported query paramete

OpenSearch supports the following dynamic index-level index settings:

- `index.number_of_replicas` (Integer): The number of replica shards each primary shard should have. For example, if you have 4 primary shards and set `index.number_of_replicas` to 3, the index has 12 replica shards. Default is 1.
- `index.number_of_replicas` (Integer): The number of replica shards each primary shard should have. For example, if you have 4 primary shards and set `index.number_of_replicas` to 3, the index has 12 replica shards. If not set, defaults to `cluster.default_number_of_replicas` (which is `1` by default).

- `index.auto_expand_replicas` (String): Whether the cluster should automatically add replica shards based on the number of data nodes. Specify a lower bound and upper limit (for example, 0--9) or `all` for the upper limit. For example, if you have 5 data nodes and set `index.auto_expand_replicas` to 0--3, then the cluster does not automatically add another replica shard. However, if you set this value to `0-all` and add 2 more nodes for a total of 7, the cluster will expand to now have 6 replica shards. Default is disabled.

Expand Down

0 comments on commit 485202c

Please sign in to comment.