public void addAlias(String alias, String indexName) {
        Index old = indices.get(alias);
        if (old != null) {
            if (old.getName().equals(indexName)) return;
            throw new IllegalArgumentException("Tried adding the alias '" + alias + "' for the index name '" +
                                               indexName + "' when the name '" + alias +
                                               "' already maps to '" + old.getName() + "'");
        }
        Index index = indices.get(indexName);
        if (index == null)
            throw new IllegalArgumentException("Failed adding alias '" + alias + "' for the index name '" + indexName +
                                               "' as there is no index with that name available.");
        indices.put(alias, index);
        index.addAlias(alias);

        String lca = toLowerCase(alias);
        if (lowerCase.get(lca) == null)
            lowerCase.put(lca, index);
    }
A map of all indices in this search definition, indexed by name
container-search/src/main/java/com/yahoo/prelude/SearchDefinition.java