原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/cat-alias.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/cat-alias.html
本地英文版地址: ../en/cat-alias.html
重要: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 当前版本文档。
cat aliases APIedit
Returns information about currently configured aliases to indices, including filter and routing information.
Path parametersedit
-
<alias> - (Optional, string) Comma-separated list or wildcard expression of index alias names used to limit the request.
Query parametersedit
-
format - (Optional, string) Short version of the HTTP accept header. Valid values include JSON, YAML, etc.
-
h - (Optional, string) Comma-separated list of column names to display.
-
help -
(Optional, boolean) If
true, the response includes help information. Defaults tofalse. -
local -
(Optional, boolean) If
true, the request retrieves information from the local node only. Defaults tofalse, which means information is retrieved from the master node. -
s - (Optional, string) Comma-separated list of column names or column aliases used to sort the response.
-
v -
(Optional, boolean) If
true, the response includes column headings. Defaults tofalse. -
expand_wildcards -
(Optional, string) Controls what kind of indices that wildcard expressions can expand to. Multiple values are accepted when separated by a comma, as in
open,hidden. Valid values are:-
all - Expand to open and closed indices, including hidden indices.
-
open - Expand only to open indices.
-
closed - Expand only to closed indices.
-
hidden -
Expansion of wildcards will include hidden indices.
Must be combined with
open,closed, or both. -
none - Wildcard expressions are not accepted.
-
Examplesedit
GET /_cat/aliases?v
The API returns the following response:
alias index filter routing.index routing.search is_write_index alias1 test1 - - - - alias2 test1 * - - - alias3 test1 - 1 1 - alias4 test1 - 2 1,2 -
This response shows that alias2 has configured a filter, and specific routing
configurations in alias3 and alias4.
If you only want to get information about specific aliases, you can specify the aliases in comma-delimited format as a URL parameter, e.g., /_cat/aliases/alias1,alias2.