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
Elasticsearch version (bin/elasticsearch --version):
Version: 6.5.1, Build: default/tar/8c58350/2018-11-16T02:22:42.182257Z, JVM: 11.0.1
OS version (uname -a if on a Unix-like system):
Linux 15484e2ef940 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u5 (2017-09-19) x86_64 x86_64 x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
PUT test-1
PUT test-2
POST _aliases
{
"actions": [{
"remove_index": {
"index": "test-*,-test-1"
}
}]
}
I had a look at this and the issue seems to be that _aliases support two separate fields index and indices. If an index is provided, ES will take the expression as is (without splitting it by ,), and then try to resolve it. Hence ES cannot find the expression test-*,-test-1.
If "index":"test-*" is provided, both test-1 and test-2 are deleted. If you want to delete only test-2, please use "indices" : ["test-*", "-test-1"]
Elasticsearch version (
bin/elasticsearch --version
):Version: 6.5.1, Build: default/tar/8c58350/2018-11-16T02:22:42.182257Z, JVM: 11.0.1
OS version (
uname -a
if on a Unix-like system):Linux 15484e2ef940 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u5 (2017-09-19) x86_64 x86_64 x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
Last command produces
But I expect the last command to successfully delete test-2 and keep test-1 because doc says that
remove_index
is just like Delete Indexhttps://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html#CO181-3
And
DELETE test-*,-test-1
works as expectedThe text was updated successfully, but these errors were encountered: