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();
}
}
if (!builder.request().getAliasActions().isEmpty()) {
builder.execute().actionGet();