OpenSearch/docs/reference/cat/alias.asciidoc
Nik Everett 44c3b04bef Convert more docs to // CONSOLE
Converts docs for `_cat/segments`, `_cat/plugins` and `_cat/repositories`
from `curl` to `// CONSOLE` so they are tested as part of the build and
are cleaner to use in Console. They should work fine with `curl` with
the `COPY AS CURL` link.

Also swaps the `source` type of the response from `js` to `txt` because
that is more correct. The syntax highlighter doesn't care. It looks at
the text to figure out the language. So it looks a little funny for `_cat`
responses regardless.

Relates to #18160
2016-10-25 11:17:24 -04:00

59 lines
1.3 KiB
Plaintext

[[cat-alias]]
== cat aliases
`aliases` shows information about currently configured aliases to indices
including filter and routing infos.
////
Hidden setup for example:
[source,js]
--------------------------------------------------
PUT test1
{
"aliases": {
"alias1": {},
"alias2": {
"filter": {
"match": {
"user": "kimchy"
}
}
},
"alias3": {
"routing": "1"
},
"alias4": {
"index_routing": "2",
"search_routing": "1,2"
}
}
}
--------------------------------------------------
// CONSOLE
////
[source,js]
--------------------------------------------------
GET /_cat/aliases?v
--------------------------------------------------
// CONSOLE
// TEST[continued]
Might respond with:
[source,txt]
--------------------------------------------------
alias index filter routing.index routing.search
alias1 test1 - - -
alias2 test1 * - -
alias3 test1 - 1 1
alias4 test1 - 2 1,2
--------------------------------------------------
// TESTRESPONSE[s/[*]/[*]/ _cat]
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`.