[DOCS] Simple patch to make creating aliases with glob patterns clearer

This PR is a simple doc patch to explicitly mention with an example of
how to create an alias using a glob pattern.  This comes up from
time-to-time with our customers and in the community and although
mentioned in the documentation already, is not obvious.

Also mention that the alias will not auto-update as indices matching the
glob change.

Closes #12175
Closes #12176
This commit is contained in:
Joshua Rich 2015-07-10 14:44:55 +10:00 committed by Clinton Gormley
parent f86e8c33c1
commit 58f9839197

View File

@ -63,6 +63,23 @@ curl -XPOST 'http://localhost:9200/_aliases' -d '
}'
--------------------------------------------------
Alternatively, you can use a glob pattern to associate an alias to
more than one index that share a common name:
[source,js]
--------------------------------------------------
curl -XPOST 'http://localhost:9200/_aliases' -d '
{
"actions" : [
{ "add" : { "index" : "test*", "alias" : "all_test_indices" } }
]
}'
--------------------------------------------------
In this case, the alias is a point-in-time alias that will group all
current indices that match, it will not automatically update as new
indices that match this pattern are added/removed.
It is an error to index to an alias which points to more than one index.
[float]