[DOCS] Added documentation for CAT Aliases API
Added asciidoc. Added new lines in java class.
This commit is contained in:
parent
5003ca9278
commit
e34a35244c
|
@ -94,6 +94,8 @@ green foo 1 0 227 0 2065131 2065131
|
|||
|
||||
--
|
||||
|
||||
include::cat/alias.asciidoc[]
|
||||
|
||||
include::cat/allocation.asciidoc[]
|
||||
|
||||
include::cat/count.asciidoc[]
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
[[cat-alias]]
|
||||
== Aliases
|
||||
|
||||
`aliases` shows information about currently configured aliases to indices
|
||||
including filter and routing infos.
|
||||
|
||||
[source,shell]
|
||||
--------------------------------------------------
|
||||
% curl '192.168.56.10:9200/_cat/aliases?v'
|
||||
alias index filter indexRouting searchRouting
|
||||
alias2 test1 * - -
|
||||
alias4 test1 - 2 1,2
|
||||
alias1 test1 - - -
|
||||
alias3 test1 - 1 1
|
||||
--------------------------------------------------
|
||||
|
||||
The output shows that `alias` has configured a filter, and specific routing
|
||||
configurations in `alias3` and `alias4`.
|
||||
|
||||
If you only want to get information about a single alias, you can specify
|
||||
the alias in the URL, for example `/_cat/aliases/alias1`.
|
||||
|
|
@ -82,8 +82,8 @@ public class RestAliasAction extends AbstractCatAction {
|
|||
|
||||
@Override
|
||||
void documentation(StringBuilder sb) {
|
||||
sb.append("/_cat/aliases");
|
||||
sb.append("/_cat/aliases/{alias}");
|
||||
sb.append("/_cat/aliases\n");
|
||||
sb.append("/_cat/aliases/{alias}\n");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -93,8 +93,8 @@ public class RestAliasAction extends AbstractCatAction {
|
|||
table.addCell("alias", "desc:alias name");
|
||||
table.addCell("index", "desc:index alias points to");
|
||||
table.addCell("filter", "desc:filter");
|
||||
table.addCell("index_routing", "desc:index routing");
|
||||
table.addCell("search_routing", "desc:search routing");
|
||||
table.addCell("indexRouting", "desc:index routing");
|
||||
table.addCell("searchRouting", "desc:search routing");
|
||||
table.endHeaders();
|
||||
return table;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue