**同步结果摘要**: | 目录 | 同步前 | 同步后 | 官方 | |------|--------|--------|------| | aggregations | 40 | 65 | 64 | | analyzers | 8 | 141 | 140 | | api-reference | 97 | 186 | 174 | | benchmark | 34 | 67 | 53 | | clients | 17 | 18 | 18 | | dashboards | 38 | 149 | 131 | | data-prepper | 77 | 134 | 123 | | im-plugin | 22 | 37 | 37 | | ingest-pipelines | 27 | 52 | 51 | | install-and-configure | 37 | 57 | 53 | | ml-commons-plugin | 81 | 157 | 155 | | observing-your-data | 39 | 73 | 66 | | query-dsl | 40 | 77 | 75 | | search-plugins | 80 | 139 | 95 | | security-analytics | 22 | 47 | 46 | **说明**: - 本地文件数 > 官方:本地有一些官方已删除或重命名的文件 - 新增了约 **740 个英文文档文件** - 已有文件保持不变(未覆盖)
89 lines
2.2 KiB
Markdown
89 lines
2.2 KiB
Markdown
---
|
|
layout: default
|
|
title: Delete alias
|
|
parent: Alias APIs
|
|
grand_parent: Index APIs
|
|
nav_order: 30
|
|
---
|
|
|
|
# Delete Index Alias API
|
|
**Introduced 1.0**
|
|
{: .label .label-purple }
|
|
|
|
Deletes an existing alias.
|
|
|
|
## Endpoints
|
|
|
|
```json
|
|
DELETE /{index}/_alias/{alias}
|
|
DELETE /{index}/_aliases/{alias}
|
|
```
|
|
|
|
## Path parameters
|
|
|
|
The following table lists the available path parameters. All path parameters are required.
|
|
|
|
| Parameter | Data type | Description |
|
|
| :--- | :--- | :--- |
|
|
| `<index>` | String | Comma-separated list or wildcard expression of index names used to limit the request. To include all indexes in the cluster, use `_all` or `*`. |
|
|
| `<alias>` | String | Comma-separated list or wildcard expression of alias names to delete. To delete all aliases, use `_all` or `*`. |
|
|
|
|
## Query parameters
|
|
|
|
The following table lists the available query parameters. All query parameters are optional.
|
|
|
|
| Parameter | Data 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`. |
|
|
|
|
## Example request
|
|
|
|
The following request deletes the `alias1` alias from the `logs_20302801` index:
|
|
|
|
<!-- spec_insert_start
|
|
component: example_code
|
|
rest: DELETE /logs_20302801/_alias/alias1
|
|
-->
|
|
{% capture step1_rest %}
|
|
DELETE /logs_20302801/_alias/alias1
|
|
{% endcapture %}
|
|
|
|
{% capture step1_python %}
|
|
|
|
|
|
response = client.indices.delete_alias(
|
|
index = "logs_20302801",
|
|
name = "alias1"
|
|
)
|
|
|
|
{% endcapture %}
|
|
|
|
{% include code-block.html
|
|
rest=step1_rest
|
|
python=step1_python %}
|
|
<!-- spec_insert_end -->
|
|
|
|
## Example response
|
|
|
|
```json
|
|
{
|
|
"acknowledged": true
|
|
}
|
|
```
|
|
|
|
## Response body fields
|
|
|
|
The following table lists all response body fields.
|
|
|
|
| Field | Data type | Description |
|
|
| :--- | :--- | :--- |
|
|
| `acknowledged` | Boolean | Whether the request was received. |
|
|
|
|
## Required permissions
|
|
|
|
If you use the Security plugin, make sure you have the appropriate permissions: `indices:admin/aliases`.
|
|
|
|
## Related documentation
|
|
|
|
For more information about index aliases, see [Index aliases]({{site.url}}{{site.baseurl}}/im-plugin/index-alias/). |