2014-01-20 03:23:00 -05:00
|
|
|
[[cat-alias]]
|
2014-05-16 15:43:35 -04:00
|
|
|
== cat aliases
|
2014-01-20 03:23:00 -05:00
|
|
|
|
|
|
|
`aliases` shows information about currently configured aliases to indices
|
|
|
|
including filter and routing infos.
|
|
|
|
|
2016-10-06 13:31:18 -04:00
|
|
|
////
|
|
|
|
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:
|
|
|
|
|
2016-10-25 10:56:30 -04:00
|
|
|
[source,txt]
|
2014-01-20 03:23:00 -05:00
|
|
|
--------------------------------------------------
|
2015-10-15 15:55:06 -04:00
|
|
|
alias index filter routing.index routing.search
|
2014-01-20 03:23:00 -05:00
|
|
|
alias1 test1 - - -
|
2016-10-06 13:31:18 -04:00
|
|
|
alias2 test1 * - -
|
2014-01-20 03:23:00 -05:00
|
|
|
alias3 test1 - 1 1
|
2016-10-06 13:31:18 -04:00
|
|
|
alias4 test1 - 2 1,2
|
2014-01-20 03:23:00 -05:00
|
|
|
--------------------------------------------------
|
2016-10-06 13:31:18 -04:00
|
|
|
// TESTRESPONSE[s/[*]/[*]/ _cat]
|
2014-01-20 03:23:00 -05:00
|
|
|
|
2017-02-16 14:41:42 -05:00
|
|
|
The output shows that `alias2` has configured a filter, and specific routing
|
2014-05-16 15:43:35 -04:00
|
|
|
configurations in `alias3` and `alias4`.
|
2014-01-20 03:23:00 -05:00
|
|
|
|
|
|
|
If you only want to get information about a single alias, you can specify
|
|
|
|
the alias in the URL, for example `/_cat/aliases/alias1`.
|