Package org.elasticsearch.action.admin.indices.alias

Examples of org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequestBuilder.removeAlias()


            System.out.println("Removing " + diff + " aliases to get to the start amount of " + BASE_ALIAS_COUNT + " aliases");
            List<AliasMetaData> aliases= client.admin().indices().prepareGetAliases("*")
                    .addIndices(INDEX_NAME)
                    .execute().actionGet().getAliases().get(INDEX_NAME);
            for (int i = 0; i <= diff; i++) {
                builder.removeAlias(INDEX_NAME, aliases.get(i).alias());
                if (i % 1000 == 0) {
                    builder.execute().actionGet();
                    builder = client.admin().indices().prepareAliases();
                }
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.