You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of the problem including expected versus actual behavior:
Steps to reproduce:
It is possible to use special characters, e.g. * in aliases which are not allowed in Index names. I think this is a bug as it can lead to very confusing states - below is an example:
PUT /foo
PUT /bar
# This will fail with invalid_index_name_exception
PUT /foo*
PUT /foo/bar/1
{
"message": "Indexed into /foo/bar/1"
}
PUT /bar/bar/1
{
"message":"Idexed into /bar/bar/1"
}
# This will fail� with invalid_index_name_exception
PUT /bar*/bar/2
{
"message":"Indexed into /bar*/bar/2"
}
POST /_aliases
{
"actions":[
{"add": { "index": "foo", "alias":"bar*" } }
]
}
# Now this will be successful - confusing!
PUT /bar*/bar/2
{
"message":"Indexed into /bar*/bar/2"
}
# A search on indexes /bar* responds with results both from the index `bar` and from `foo` as a result of the alias.
GET /bar*/_search
{
"took": 3,
"timed_out": false,
"_shards": {
"total": 10,
"successful": 10,
"failed": 0
},
"hits": {
"total": 3,
"max_score": 1,
"hits": [
{
"_index": "foo",
"_type": "bar",
"_id": "2",
"_score": 1,
"_source": {
"message": "Indexed into /bar*/bar/2"
}
},
{
"_index": "bar",
"_type": "bar",
"_id": "1",
"_score": 1,
"_source": {
"message": "Idexed into /bar/bar/1"
}
},
{
"_index": "foo",
"_type": "bar",
"_id": "1",
"_score": 1,
"_source": {
"message": "Indexed into /foo/bar/1"
}
}
]
}
}
The text was updated successfully, but these errors were encountered:
Applied (almost) the same rules we use to validate index names
to new alias names. The only rule not applies it "must be lowercase".
We have tests that don't follow that rule and I except there are lots
of examples of camelCase alias names in the wild. We can add that
validation but I'm not sure it is worth it.
Closeselastic#20748
Adds an alias that starts with `#` to the BWC index and validates
that you can read from it and remove it. Starting with `#` isn't
allowed after 5.1.0/6.0.0 so we don't create the alias or check it
after those versions.
Applied (almost) the same rules we use to validate index names
to new alias names. The only rule not applies it "must be lowercase".
We have tests that don't follow that rule and I except there are lots
of examples of camelCase alias names in the wild. We can add that
validation but I'm not sure it is worth it.
Closes#20748
Adds an alias that starts with `#` to the BWC index and validates
that you can read from it and remove it. Starting with `#` isn't
allowed after 5.1.0/6.0.0 so we don't create the alias or check it
after those versions.
Elasticsearch version: 5.0.0-alpha5
Plugins installed: [] x-pack
JVM version:1.8.0_101
OS version: Ubuntu 14.04
Description of the problem including expected versus actual behavior:
Steps to reproduce:
It is possible to use special characters, e.g.
*
in aliases which are not allowed in Index names. I think this is a bug as it can lead to very confusing states - below is an example:The text was updated successfully, but these errors were encountered: