I use below command to add an alias
client.admin().indices().prepareAliases().addAlias(index, alias).execute().actionGet()
;
but always gets an exception:
org.elasticsearch.indices.InvalidAliasNameException: Invalid alias name [active_index], an index exists with the same name as the alias
when I use:
client.admin().indices().prepareAliases().removeAlias(index, alias).execute().actionGet();
to remove all index from an alias, will an index has the same name with alias be left in the system?