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

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


        if (numberOfAliases < BASE_ALIAS_COUNT) {
            int diff = BASE_ALIAS_COUNT - numberOfAliases;
            System.out.println("Adding " + diff + " more aliases to get to the start amount of " + BASE_ALIAS_COUNT + " aliases");
            IndicesAliasesRequestBuilder builder = client.admin().indices().prepareAliases();
            for (int i = 1; i <= diff; i++) {
                builder.addAlias(INDEX_NAME, Strings.randomBase64UUID());
                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.