[DOC] Support switch_aliases in shrink action. (#5511)

* Support switch_aliases in shrink action DOC.

Signed-off-by: ikibo <oleg.kravchuk@logz.io>

* Update _im-plugin/ism/policies.md

Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM>
Signed-off-by: Oleg Kravchuk <oleg.ikibo@gmail.com>

* Update _im-plugin/ism/policies.md

Co-authored-by: Melissa Vagi <vagimeli@amazon.com>
Signed-off-by: Oleg Kravchuk <oleg.ikibo@gmail.com>

* Update _im-plugin/ism/policies.md

Co-authored-by: Melissa Vagi <vagimeli@amazon.com>
Signed-off-by: Oleg Kravchuk <oleg.ikibo@gmail.com>

* Update _im-plugin/ism/policies.md

Co-authored-by: Melissa Vagi <vagimeli@amazon.com>
Signed-off-by: Oleg Kravchuk <oleg.ikibo@gmail.com>

* Data types in TYPE column  must be capitalized

Signed-off-by: ikibo <oleg.kravchuk@logz.io>

* Update policies.md

Added tick marks to two parameters

Signed-off-by: Heather Halter <HDHALTER@AMAZON.COM>

* Update _im-plugin/ism/policies.md

Co-authored-by: Melissa Vagi <vagimeli@amazon.com>
Signed-off-by: Heather Halter <HDHALTER@AMAZON.COM>

* Update _im-plugin/ism/policies.md

Co-authored-by: Melissa Vagi <vagimeli@amazon.com>
Signed-off-by: Heather Halter <HDHALTER@AMAZON.COM>

* Update _im-plugin/ism/policies.md

Co-authored-by: Melissa Vagi <vagimeli@amazon.com>
Signed-off-by: Heather Halter <HDHALTER@AMAZON.COM>

* Update _im-plugin/ism/policies.md

Co-authored-by: Melissa Vagi <vagimeli@amazon.com>
Signed-off-by: Heather Halter <HDHALTER@AMAZON.COM>

* Update _im-plugin/ism/policies.md

Co-authored-by: Melissa Vagi <vagimeli@amazon.com>
Signed-off-by: Heather Halter <HDHALTER@AMAZON.COM>

* Update _im-plugin/ism/policies.md

Co-authored-by: Melissa Vagi <vagimeli@amazon.com>
Signed-off-by: Heather Halter <HDHALTER@AMAZON.COM>

---------

Signed-off-by: ikibo <oleg.kravchuk@logz.io>
Signed-off-by: Oleg Kravchuk <oleg.ikibo@gmail.com>
Signed-off-by: Heather Halter <HDHALTER@AMAZON.COM>
Co-authored-by: ikibo <oleg.kravchuk@logz.io>
Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM>
Co-authored-by: Melissa Vagi <vagimeli@amazon.com>
This commit is contained in:
Oleg Kravchuk 2024-02-01 21:03:38 +02:00 committed by GitHub
parent 80fbd210a1
commit 51499aeac1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 7 deletions

View File

@ -119,8 +119,8 @@ Reduces the number of Lucene segments by merging the segments of individual shar
Parameter | Description | Type | Required
:--- | :--- |:--- |:--- |
`max_num_segments` | The number of segments to reduce the shard to. | `number` | Yes
wait_for_completion | Boolean | When set to `false`, the request returns immediately instead of after the operation is finished. To monitor the operation status, use the [Tasks API]({{site.url}}{{site.baseurl}}/api-reference/tasks/) with the task ID returned by the request. Default is `true`.
task_execution_timeout | Time | The explicit task execution timeout. Only useful when wait_for_completion is set to `false`. Default is `1h`. | No
`wait_for_completion` | Boolean | When set to `false`, the request returns immediately instead of after the operation is finished. To monitor the operation status, use the [Tasks API]({{site.url}}{{site.baseurl}}/api-reference/tasks/) with the task ID returned by the request. Default is `true`.
`task_execution_timeout` | Time | The explicit task execution timeout. Only useful when `wait_for_completion` is set to `false`. Default is `1h`. | No
```json
{
@ -189,18 +189,20 @@ Allows you to reduce the number of primary shards in your indexes. With this act
"my-alias": {}
}
],
"switch_aliases": true,
"force_unsafe": false
}
```
Parameter | Description | Type | Example | Required
:--- | :--- |:--- |:--- |
`num_new_shards` | The maximum number of primary shards in the shrunken index. | integer | `5` | Yes, however it cannot be used with `max_shard_size` or `percentage_of_source_shards`
`max_shard_size` | The maximum size in bytes of a shard for the target index. | keyword | `5gb` | Yes, however it cannot be used with `num_new_shards` or `percentage_of_source_shards`
`num_new_shards` | The maximum number of primary shards in the shrunken index. | Integer | `5` | Yes. It, however, cannot be used with `max_shard_size` or `percentage_of_source_shards`.
`max_shard_size` | The maximum size in bytes of a shard for the target index. | Keyword | `5gb` | Yes, however, it cannot be used with `num_new_shards` or `percentage_of_source_shards`.
`percentage_of_source_shards` | Percentage of the number of original primary shards to shrink. This parameter indicates the minimum percentage to use when shrinking the number of primary shards. Must be between 0.0 and 1.0, exclusive. | Percentage | `0.5` | Yes, however it cannot be used with `max_shard_size` or `num_new_shards`
`target_index_name_template` | The name of the shrunken index. Accepts strings and the Mustache variables `{{ctx.index}}` and `{{ctx.indexUuid}}`. | `string` or Mustache template | `{"source": "{{ctx.index}}_shrunken"}` | No
`aliases` | Aliases to add to the new index. | object | `myalias` | No, but must be an array of alias objects
`force_unsafe` | If true, executes the shrink action even if there are no replicas. | boolean | `false` | No
`target_index_name_template` | The name of the shrunken index. Accepts strings and the Mustache variables `{{ctx.index}}` and `{{ctx.indexUuid}}`. | String or Mustache template | `{"source": "{{ctx.index}}_shrunken"}` | No
`aliases` | Aliases to add to the new index. | Object | `myalias` | No. It must be an array of alias objects.
`switch_aliases` | If `true`, copies the aliases from the source index to the target index. If there is a name conflict with an alias from the `aliases` field, the alias in the `aliases` field is used instead of the name. | Boolean | `true` | No. The default implicit value is `false`, which means no aliases are copied by default.
`force_unsafe` | If `true`, shrinks the index even if it has no replicas. | Boolean | `false` | No
If you want to add `aliases` to the action, the parameter must include an array of [alias objects]({{site.url}}{{site.baseurl}}/api-reference/alias/). For example,