Skip to content

Commit

Permalink
Refine the wording
Browse files Browse the repository at this point in the history
Signed-off-by: gaobinlong <[email protected]>
  • Loading branch information
gaobinlong committed Jul 9, 2024
1 parent a503655 commit 816df4e
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions _api-reference/index-apis/update-alias.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 816df4e

Please sign in to comment.