From 816df4edfccdb82f4e656fbea4d09a8d818a90d7 Mon Sep 17 00:00:00 2001 From: gaobinlong Date: Tue, 9 Jul 2024 22:55:24 +0800 Subject: [PATCH] Refine the wording Signed-off-by: gaobinlong --- _api-reference/index-apis/update-alias.md | 30 +++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/_api-reference/index-apis/update-alias.md b/_api-reference/index-apis/update-alias.md index d3256fd43c..fa93f34d44 100644 --- a/_api-reference/index-apis/update-alias.md +++ b/_api-reference/index-apis/update-alias.md @@ -9,7 +9,7 @@ nav_order: 5 **Introduced 1.0** {: .label .label-purple } -You can use this API to add a data stream or index to an alias, or update the settings for an existing alias. +The Create or Update Alias API adds a data stream or index to an alias or updates the settings for an existing alias. ## Example @@ -44,33 +44,33 @@ PUT /_alias ## Path parameters -| Parameter | Data type | Description | +| Parameter | Type | Description | :--- | :--- | :--- -| target | String | Comma-delimited list of data streams, indexes. Wildcard expressions (`*`) are supported. To target all data streams and indexes in a cluster, use `_all` or `*`. Optional. | -| alias-name | String | The alias name to be created or updated. Optional. | +| `target` | String | A comma-delimited list of data streams, indexes. Wildcard expressions (`*`) are supported. To target all data streams and indexes in a cluster, use `_all` or `*`. Optional. | +| `alias-name` | String | The alias name to be created or updated. Optional. | ## Query parameters All query parameters are optional. -Parameter | Data type | Description +Parameter | Type | Description :--- | :--- | :--- -cluster_manager_timeout | Time | The amount of time to wait for a response from the cluster manager node. Default is `30s`. -timeout | Time | The amount of time to wait for a response from the cluster. Default is `30s`. +`cluster_manager_timeout` | Time | The amount of time to wait for a response from the cluster manager node. Default is `30s`. +`timeout` | Time | The amount of time to wait for a response from the cluster. Default is `30s`. ## Request body In the request body, you can specify the index name, the alias name, and the settings for the alias. All fields are optional. -Field | Data type | Description +Field | Type | Description :--- | :--- | :--- | :--- -index | String | Comma-delimited list of data streams or indexes you want to associate with the alias. If this field is set, it will override the index name specified in the URL path. -alias | String | The name of the alias. If this field is set, it will override the alias name specified in the URL path. -is_write_index | Boolean | Specifies whether the index should be a write index. An alias can only have one write index at a time. If a write request is submitted to a alias that links to multiple indexes, OpenSearch executes the request only on the write index. -routing | String | Used to assign a custom value to a shard for specific operations. -index_routing | String | Assigns a custom value to a shard only for index operations. -search_routing | String | Assigns a custom value to a shard only for search operations. -filter | Object | A filter to use with the alias, so the alias points to a filtered part of the index. +`index` | String | Comma-delimited list of data streams or indexes you want to associate with the alias. If this field is set, it will override the index name specified in the URL path. +`alias` | String | The name of the alias. If this field is set, it will override the alias name specified in the URL path. +`is_write_index` | Boolean | Specifies whether the index should be a write index. An alias can only have one write index at a time. If a write request is submitted to a alias that links to multiple indexes, OpenSearch runs the request only on the write index. +`routing` | String | Assigns a custom value to a shard for specific operations. +`index_routing` | String | Assigns a custom value to a shard only for index operations. +`search_routing` | String | Assigns a custom value to a shard only for search operations. +`filter` | Object | A filter to use with the alias, so the alias points to a filtered part of the index. ## Response