When creating an alias from an action that uses a wildcard expression in indices field that matches with a data stream via the update aliases api then an error occurs instead of creating the alias.
Note that error doesn't occur if a concrete data stream name is used in the indices field of an alias action.
Reproduction:
PUT /_data_stream/logs-foo-bar
GET /_cat/indices
POST /_aliases
{
"actions": [
{
"add": {
"indices": ["logs-foo-* "],
"aliases": ["my-alias"]
}
}
]
}
Result:
{
"error": {
"root_cause": [
{
"type": "index_not_found_exception",
"reason": "no such index [logs-foo-*]",
"index_uuid": "_na_",
"index": "logs-foo-*"
}
],
"type": "index_not_found_exception",
"reason": "no such index [logs-foo-*]",
"index_uuid": "_na_",
"index": "logs-foo-*"
},
"status": 404
}
Expected behaviour is that an alias is created with the name my-alias that points to data stream with the name logs-foo-bar.
When creating an alias from an action that uses a wildcard expression in
indicesfield that matches with a data stream via the update aliases api then an error occurs instead of creating the alias.Note that error doesn't occur if a concrete data stream name is used in the
indicesfield of an alias action.Reproduction:
Result:
Expected behaviour is that an alias is created with the name
my-aliasthat points to data stream with the namelogs-foo-bar.