Add shard action

Signed-off-by: Naarcha-AWS <naarcha@amazon.com>
This commit is contained in:
Naarcha-AWS 2022-04-07 18:12:37 -05:00
parent 02a913f988
commit e0c2f9448b
1 changed files with 41 additions and 0 deletions

View File

@ -99,6 +99,7 @@ ISM supports the following operations:
- [read_only](#read_only) - [read_only](#read_only)
- [read_write](#read_write) - [read_write](#read_write)
- [replica_count](#replica_count) - [replica_count](#replica_count)
- [shrink](#shrink)
- [close](#close) - [close](#close)
- [open](#open) - [open](#open)
- [delete](#delete) - [delete](#delete)
@ -162,6 +163,46 @@ Parameter | Description | Type | Required
For information about setting replicas, see [Primary and replica shards]({{site.url}}{{site.baseurl}}/opensearch#primary-and-replica-shards). For information about setting replicas, see [Primary and replica shards]({{site.url}}{{site.baseurl}}/opensearch#primary-and-replica-shards).
### shrink
Allows you to reduce the number of primary shards in your indexes. With this action, you can specify:
- the number of primary shards that the target index should contain.
- A max shard size for the primary shards in the target index.
- Specify a percentage to shrink the number of primary shards in the target index.
```json
"shrink": {
"num_new_shards": {
"type": "integer"
},
"max_shard_size": {
"type": "keyword"
},
"percentage_of_source_shards": {
"type": "double"
},
"target_index_suffix": {
"type": "text"
},
"aliases": {
"type": "object"
},
"force_unsafe": {
"type": "boolean"
}
}
```
Parameter | Description | Type | Example | Required
:--- | :--- |:--- |:--- |
`num_new_shards` | The maximum number of primary shards in the shrunken index | integer | `5` | Yes, however cannot be used with `max_shard_size` or `percentage_of_source_shards`.
`max_shard_size` | The maximum size in bytes of a shard on in the target index. | keyword | `5gb` | Yes, however cannot be used with `max_shard_size` or `percentage_of_source_shards`.
`percentage_of_source_shards` | Percentage of the number of original primary shards. This indicates the minimum percentage by which the number of primary shards will shrink. Must be between 0.0 and 1.0 exclusive | Percentage | `0.5` | Yes, however cannot be used with `max_shard_size` or `percentage_of_source_shards`.
`target_index_suffix` | Suffix that will be appended to the target index to by shrunk | text | `shrunken` | No
`aliases` | Aliases which will be added to the new index | object | `myalias` | No
`force_unsafe` | If true, executes the shrink action even if there are no replicas | boolean | `false` | No
### close ### close
Closes the managed index. Closes the managed index.