diff --git a/src/main/java/org/elasticsearch/action/ActionModule.java b/src/main/java/org/elasticsearch/action/ActionModule.java index 8c648b9ad57..5ab2c177d99 100644 --- a/src/main/java/org/elasticsearch/action/ActionModule.java +++ b/src/main/java/org/elasticsearch/action/ActionModule.java @@ -42,8 +42,8 @@ import org.elasticsearch.action.admin.cluster.state.ClusterStateAction; import org.elasticsearch.action.admin.cluster.state.TransportClusterStateAction; import org.elasticsearch.action.admin.indices.alias.IndicesAliasesAction; import org.elasticsearch.action.admin.indices.alias.TransportIndicesAliasesAction; -import org.elasticsearch.action.admin.indices.alias.exists.IndicesExistsAliasesAction; -import org.elasticsearch.action.admin.indices.alias.exists.TransportIndicesExistsAliasesAction; +import org.elasticsearch.action.admin.indices.alias.exists.AliasesExistAction; +import org.elasticsearch.action.admin.indices.alias.exists.TransportAliasesExistAction; import org.elasticsearch.action.admin.indices.alias.get.IndicesGetAliasesAction; import org.elasticsearch.action.admin.indices.alias.get.TransportIndicesGetAliasesAction; import org.elasticsearch.action.admin.indices.analyze.AnalyzeAction; @@ -214,7 +214,7 @@ public class ActionModule extends AbstractModule { registerAction(DeleteWarmerAction.INSTANCE, TransportDeleteWarmerAction.class); registerAction(GetWarmersAction.INSTANCE, TransportGetWarmersAction.class); registerAction(IndicesGetAliasesAction.INSTANCE, TransportIndicesGetAliasesAction.class); - registerAction(IndicesExistsAliasesAction.INSTANCE, TransportIndicesExistsAliasesAction.class); + registerAction(AliasesExistAction.INSTANCE, TransportAliasesExistAction.class); registerAction(IndexAction.INSTANCE, TransportIndexAction.class); registerAction(GetAction.INSTANCE, TransportGetAction.class); diff --git a/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/IndicesExistsAliasesAction.java b/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/AliasesExistAction.java similarity index 68% rename from src/main/java/org/elasticsearch/action/admin/indices/alias/exists/IndicesExistsAliasesAction.java rename to src/main/java/org/elasticsearch/action/admin/indices/alias/exists/AliasesExistAction.java index f0d5bc63c62..d75e5484b06 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/IndicesExistsAliasesAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/AliasesExistAction.java @@ -25,22 +25,22 @@ import org.elasticsearch.client.IndicesAdminClient; /** */ -public class IndicesExistsAliasesAction extends IndicesAction { +public class AliasesExistAction extends IndicesAction { - public static final IndicesExistsAliasesAction INSTANCE = new IndicesExistsAliasesAction(); + public static final AliasesExistAction INSTANCE = new AliasesExistAction(); public static final String NAME = "indices/exists/aliases"; - private IndicesExistsAliasesAction() { + private AliasesExistAction() { super(NAME); } @Override - public IndicesExistsAliasesRequestBuilder newRequestBuilder(IndicesAdminClient client) { - return new IndicesExistsAliasesRequestBuilder(client); + public AliasesExistRequestBuilder newRequestBuilder(IndicesAdminClient client) { + return new AliasesExistRequestBuilder(client); } @Override - public IndicesExistsAliasesResponse newResponse() { - return new IndicesExistsAliasesResponse(); + public AliasesExistResponse newResponse() { + return new AliasesExistResponse(); } } diff --git a/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/IndicesExistsAliasesRequestBuilder.java b/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/AliasesExistRequestBuilder.java similarity index 73% rename from src/main/java/org/elasticsearch/action/admin/indices/alias/exists/IndicesExistsAliasesRequestBuilder.java rename to src/main/java/org/elasticsearch/action/admin/indices/alias/exists/AliasesExistRequestBuilder.java index 17a65bfb0ed..2ea231cf653 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/IndicesExistsAliasesRequestBuilder.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/AliasesExistRequestBuilder.java @@ -25,15 +25,15 @@ import org.elasticsearch.client.IndicesAdminClient; /** */ -public class IndicesExistsAliasesRequestBuilder extends BaseIndicesAliasesRequestBuilder { +public class AliasesExistRequestBuilder extends BaseIndicesAliasesRequestBuilder { - public IndicesExistsAliasesRequestBuilder(IndicesAdminClient client, String... aliases) { + public AliasesExistRequestBuilder(IndicesAdminClient client, String... aliases) { super(client, aliases); } @Override - protected void doExecute(ActionListener listener) { - ((IndicesAdminClient) client).existsAliases(request, listener); + protected void doExecute(ActionListener listener) { + ((IndicesAdminClient) client).aliasesExist(request, listener); } } diff --git a/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/IndicesExistsAliasesResponse.java b/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/AliasesExistResponse.java similarity index 90% rename from src/main/java/org/elasticsearch/action/admin/indices/alias/exists/IndicesExistsAliasesResponse.java rename to src/main/java/org/elasticsearch/action/admin/indices/alias/exists/AliasesExistResponse.java index 0c57f586812..08e9948c442 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/IndicesExistsAliasesResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/AliasesExistResponse.java @@ -27,15 +27,15 @@ import java.io.IOException; /** */ -public class IndicesExistsAliasesResponse extends ActionResponse { +public class AliasesExistResponse extends ActionResponse { private boolean exists; - public IndicesExistsAliasesResponse(boolean exists) { + public AliasesExistResponse(boolean exists) { this.exists = exists; } - IndicesExistsAliasesResponse() { + AliasesExistResponse() { } public boolean exists() { diff --git a/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/TransportIndicesExistsAliasesAction.java b/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/TransportAliasesExistAction.java similarity index 75% rename from src/main/java/org/elasticsearch/action/admin/indices/alias/exists/TransportIndicesExistsAliasesAction.java rename to src/main/java/org/elasticsearch/action/admin/indices/alias/exists/TransportAliasesExistAction.java index 88ec7317cfe..e3e03f788a6 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/TransportIndicesExistsAliasesAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/TransportAliasesExistAction.java @@ -30,16 +30,16 @@ import org.elasticsearch.transport.TransportService; /** */ -public class TransportIndicesExistsAliasesAction extends TransportMasterNodeOperationAction { +public class TransportAliasesExistAction extends TransportMasterNodeOperationAction { @Inject - public TransportIndicesExistsAliasesAction(Settings settings, TransportService transportService, ClusterService clusterService, ThreadPool threadPool) { + public TransportAliasesExistAction(Settings settings, TransportService transportService, ClusterService clusterService, ThreadPool threadPool) { super(settings, transportService, clusterService, threadPool); } @Override protected String transportAction() { - return IndicesExistsAliasesAction.NAME; + return AliasesExistAction.NAME; } @Override @@ -53,17 +53,17 @@ public class TransportIndicesExistsAliasesAction extends TransportMasterNodeOper } @Override - protected IndicesExistsAliasesResponse newResponse() { - return new IndicesExistsAliasesResponse(); + protected AliasesExistResponse newResponse() { + return new AliasesExistResponse(); } @Override - protected IndicesExistsAliasesResponse masterOperation(IndicesGetAliasesRequest request, ClusterState state) throws ElasticSearchException { + protected AliasesExistResponse masterOperation(IndicesGetAliasesRequest request, ClusterState state) throws ElasticSearchException { String[] concreteIndices = state.metaData().concreteIndices(request.indices(), request.ignoreIndices(), true); request.indices(concreteIndices); boolean result = state.metaData().hasAliases(request.aliases(), request.indices()); - return new IndicesExistsAliasesResponse(result); + return new AliasesExistResponse(result); } } diff --git a/src/main/java/org/elasticsearch/client/IndicesAdminClient.java b/src/main/java/org/elasticsearch/client/IndicesAdminClient.java index f8b69ac6c1d..2f7c4732666 100644 --- a/src/main/java/org/elasticsearch/client/IndicesAdminClient.java +++ b/src/main/java/org/elasticsearch/client/IndicesAdminClient.java @@ -24,8 +24,8 @@ import org.elasticsearch.action.admin.indices.IndicesAction; import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest; import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequestBuilder; import org.elasticsearch.action.admin.indices.alias.IndicesAliasesResponse; -import org.elasticsearch.action.admin.indices.alias.exists.IndicesExistsAliasesRequestBuilder; -import org.elasticsearch.action.admin.indices.alias.exists.IndicesExistsAliasesResponse; +import org.elasticsearch.action.admin.indices.alias.exists.AliasesExistRequestBuilder; +import org.elasticsearch.action.admin.indices.alias.exists.AliasesExistResponse; import org.elasticsearch.action.admin.indices.alias.get.IndicesGetAliasesRequest; import org.elasticsearch.action.admin.indices.alias.get.IndicesGetAliasesRequestBuilder; import org.elasticsearch.action.admin.indices.alias.get.IndicesGetAliasesResponse; @@ -516,14 +516,14 @@ public interface IndicesAdminClient { /** * Allows to check to existence of aliases from indices. */ - IndicesExistsAliasesRequestBuilder prepareExistsAliases(String... aliases); + AliasesExistRequestBuilder prepareAliasesExist(String... aliases); /** * Check to existence of index aliases. * * @param request The result future */ - ActionFuture existsAliases(IndicesGetAliasesRequest request); + ActionFuture aliasesExist(IndicesGetAliasesRequest request); /** * Check the existence of specified index aliases. @@ -531,7 +531,7 @@ public interface IndicesAdminClient { * @param request The index aliases request * @param listener A listener to be notified with a result */ - void existsAliases(IndicesGetAliasesRequest request, ActionListener listener); + void aliasesExist(IndicesGetAliasesRequest request, ActionListener listener); /** * Clear indices cache. diff --git a/src/main/java/org/elasticsearch/client/support/AbstractIndicesAdminClient.java b/src/main/java/org/elasticsearch/client/support/AbstractIndicesAdminClient.java index a19b03566dc..ebe2d3d8fea 100644 --- a/src/main/java/org/elasticsearch/client/support/AbstractIndicesAdminClient.java +++ b/src/main/java/org/elasticsearch/client/support/AbstractIndicesAdminClient.java @@ -25,9 +25,9 @@ import org.elasticsearch.action.admin.indices.alias.IndicesAliasesAction; import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest; import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequestBuilder; import org.elasticsearch.action.admin.indices.alias.IndicesAliasesResponse; -import org.elasticsearch.action.admin.indices.alias.exists.IndicesExistsAliasesAction; -import org.elasticsearch.action.admin.indices.alias.exists.IndicesExistsAliasesRequestBuilder; -import org.elasticsearch.action.admin.indices.alias.exists.IndicesExistsAliasesResponse; +import org.elasticsearch.action.admin.indices.alias.exists.AliasesExistAction; +import org.elasticsearch.action.admin.indices.alias.exists.AliasesExistRequestBuilder; +import org.elasticsearch.action.admin.indices.alias.exists.AliasesExistResponse; import org.elasticsearch.action.admin.indices.alias.get.IndicesGetAliasesAction; import org.elasticsearch.action.admin.indices.alias.get.IndicesGetAliasesRequest; import org.elasticsearch.action.admin.indices.alias.get.IndicesGetAliasesRequestBuilder; @@ -211,18 +211,18 @@ public abstract class AbstractIndicesAdminClient implements InternalIndicesAdmin } @Override - public void existsAliases(IndicesGetAliasesRequest request, ActionListener listener) { - execute(IndicesExistsAliasesAction.INSTANCE, request, listener); + public void aliasesExist(IndicesGetAliasesRequest request, ActionListener listener) { + execute(AliasesExistAction.INSTANCE, request, listener); } @Override - public ActionFuture existsAliases(IndicesGetAliasesRequest request) { - return execute(IndicesExistsAliasesAction.INSTANCE, request); + public ActionFuture aliasesExist(IndicesGetAliasesRequest request) { + return execute(AliasesExistAction.INSTANCE, request); } @Override - public IndicesExistsAliasesRequestBuilder prepareExistsAliases(String... aliases) { - return new IndicesExistsAliasesRequestBuilder(this, aliases); + public AliasesExistRequestBuilder prepareAliasesExist(String... aliases) { + return new AliasesExistRequestBuilder(this, aliases); } @Override diff --git a/src/main/java/org/elasticsearch/rest/action/RestActionModule.java b/src/main/java/org/elasticsearch/rest/action/RestActionModule.java index 5e3ed9e4e6e..f7d2ae9adb5 100644 --- a/src/main/java/org/elasticsearch/rest/action/RestActionModule.java +++ b/src/main/java/org/elasticsearch/rest/action/RestActionModule.java @@ -37,7 +37,7 @@ import org.elasticsearch.rest.action.admin.indices.alias.RestGetIndicesAliasesAc import org.elasticsearch.rest.action.admin.indices.alias.RestIndicesAliasesAction; import org.elasticsearch.rest.action.admin.indices.alias.delete.RestIndexDeleteAliasesAction; import org.elasticsearch.rest.action.admin.indices.alias.get.RestIndicesGetAliasesAction; -import org.elasticsearch.rest.action.admin.indices.alias.head.RestIndicesHeadAliasesAction; +import org.elasticsearch.rest.action.admin.indices.alias.head.RestAliasesExistAction; import org.elasticsearch.rest.action.admin.indices.alias.put.RestIndexPutAliasAction; import org.elasticsearch.rest.action.admin.indices.analyze.RestAnalyzeAction; import org.elasticsearch.rest.action.admin.indices.cache.clear.RestClearIndicesCacheAction; @@ -128,7 +128,7 @@ public class RestActionModule extends AbstractModule { bind(RestIndicesSegmentsAction.class).asEagerSingleton(); bind(RestGetIndicesAliasesAction.class).asEagerSingleton(); bind(RestIndicesGetAliasesAction.class).asEagerSingleton(); - bind(RestIndicesHeadAliasesAction.class).asEagerSingleton(); + bind(RestAliasesExistAction.class).asEagerSingleton(); bind(RestIndexDeleteAliasesAction.class).asEagerSingleton(); bind(RestIndexPutAliasAction.class).asEagerSingleton(); bind(RestIndicesAliasesAction.class).asEagerSingleton(); diff --git a/src/main/java/org/elasticsearch/rest/action/admin/indices/alias/head/RestIndicesHeadAliasesAction.java b/src/main/java/org/elasticsearch/rest/action/admin/indices/alias/head/RestAliasesExistAction.java similarity index 87% rename from src/main/java/org/elasticsearch/rest/action/admin/indices/alias/head/RestIndicesHeadAliasesAction.java rename to src/main/java/org/elasticsearch/rest/action/admin/indices/alias/head/RestAliasesExistAction.java index 06b33e7b6e8..b4a01613b67 100644 --- a/src/main/java/org/elasticsearch/rest/action/admin/indices/alias/head/RestIndicesHeadAliasesAction.java +++ b/src/main/java/org/elasticsearch/rest/action/admin/indices/alias/head/RestAliasesExistAction.java @@ -21,7 +21,7 @@ package org.elasticsearch.rest.action.admin.indices.alias.head; import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.action.ActionListener; -import org.elasticsearch.action.admin.indices.alias.exists.IndicesExistsAliasesResponse; +import org.elasticsearch.action.admin.indices.alias.exists.AliasesExistResponse; import org.elasticsearch.action.admin.indices.alias.get.IndicesGetAliasesRequest; import org.elasticsearch.action.support.IgnoreIndices; import org.elasticsearch.client.Client; @@ -37,10 +37,10 @@ import static org.elasticsearch.rest.RestStatus.OK; /** */ -public class RestIndicesHeadAliasesAction extends BaseRestHandler { +public class RestAliasesExistAction extends BaseRestHandler { @Inject - public RestIndicesHeadAliasesAction(Settings settings, Client client, RestController controller) { + public RestAliasesExistAction(Settings settings, Client client, RestController controller) { super(settings, client); controller.registerHandler(HEAD, "/_alias/{name}", this); controller.registerHandler(HEAD, "/{index}/_alias/{name}", this); @@ -57,10 +57,10 @@ public class RestIndicesHeadAliasesAction extends BaseRestHandler { getAliasesRequest.ignoreIndices(IgnoreIndices.fromString(request.param("ignore_indices"))); } - client.admin().indices().existsAliases(getAliasesRequest, new ActionListener() { + client.admin().indices().aliasesExist(getAliasesRequest, new ActionListener() { @Override - public void onResponse(IndicesExistsAliasesResponse response) { + public void onResponse(AliasesExistResponse response) { try { if (response.isExists()) { channel.sendResponse(new StringRestResponse(OK)); diff --git a/src/test/java/org/elasticsearch/test/integration/aliases/IndexAliasesTests.java b/src/test/java/org/elasticsearch/test/integration/aliases/IndexAliasesTests.java index 9e3fdca0ec2..2c57a7616a5 100644 --- a/src/test/java/org/elasticsearch/test/integration/aliases/IndexAliasesTests.java +++ b/src/test/java/org/elasticsearch/test/integration/aliases/IndexAliasesTests.java @@ -22,12 +22,10 @@ package org.elasticsearch.test.integration.aliases; import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus; import org.elasticsearch.action.admin.indices.alias.IndicesAliasesResponse; -import org.elasticsearch.action.admin.indices.alias.exists.IndicesExistsAliasesResponse; +import org.elasticsearch.action.admin.indices.alias.exists.AliasesExistResponse; import org.elasticsearch.action.admin.indices.alias.get.IndicesGetAliasesResponse; import org.elasticsearch.action.index.IndexResponse; import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.metadata.AliasAction; import org.elasticsearch.cluster.metadata.AliasMetaData; @@ -39,20 +37,15 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.index.query.FilterBuilder; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.indices.AliasMissingException; -import org.elasticsearch.indices.IndexMissingException; -import org.elasticsearch.node.internal.InternalNode; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.SearchHits; import org.elasticsearch.search.facet.FacetBuilders; import org.elasticsearch.search.facet.terms.TermsFacet; import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.integration.AbstractNodesTests; import org.elasticsearch.test.integration.AbstractSharedClusterTest; -import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import java.util.Random; import java.util.Set; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -632,7 +625,7 @@ public class IndexAliasesTests extends AbstractSharedClusterTest { assertThat(getResponse.getAliases().get("foobar").get(0).getFilter(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(0).getIndexRouting(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(0).getSearchRouting(), nullValue()); - IndicesExistsAliasesResponse existsResponse = client().admin().indices().prepareExistsAliases("alias1").execute().actionGet(); + AliasesExistResponse existsResponse = client().admin().indices().prepareAliasesExist("alias1").execute().actionGet(); assertThat(existsResponse.exists(), equalTo(true)); logger.info("--> getting all aliases that start with alias*"); @@ -650,7 +643,7 @@ public class IndexAliasesTests extends AbstractSharedClusterTest { assertThat(getResponse.getAliases().get("foobar").get(1).getFilter(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(1).getIndexRouting(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(1).getSearchRouting(), nullValue()); - existsResponse = client().admin().indices().prepareExistsAliases("alias*").execute().actionGet(); + existsResponse = client().admin().indices().prepareAliasesExist("alias*").execute().actionGet(); assertThat(existsResponse.exists(), equalTo(true)); @@ -683,7 +676,7 @@ public class IndexAliasesTests extends AbstractSharedClusterTest { assertThat(getResponse.getAliases().get("bazbar").get(1).getFilter(), nullValue()); assertThat(getResponse.getAliases().get("bazbar").get(1).getIndexRouting(), nullValue()); assertThat(getResponse.getAliases().get("bazbar").get(1).getSearchRouting(), nullValue()); - existsResponse = client().admin().indices().prepareExistsAliases("bar", "bac") + existsResponse = client().admin().indices().prepareAliasesExist("bar", "bac") .addIndices("bazbar").execute().actionGet(); assertThat(existsResponse.exists(), equalTo(true)); @@ -704,7 +697,7 @@ public class IndexAliasesTests extends AbstractSharedClusterTest { assertThat(getResponse.getAliases().get("bazbar").get(1).getFilter(), nullValue()); assertThat(getResponse.getAliases().get("bazbar").get(1).getIndexRouting(), nullValue()); assertThat(getResponse.getAliases().get("bazbar").get(1).getSearchRouting(), nullValue()); - existsResponse = client().admin().indices().prepareExistsAliases("*b*") + existsResponse = client().admin().indices().prepareAliasesExist("*b*") .addIndices("baz*").execute().actionGet(); assertThat(existsResponse.exists(), equalTo(true)); @@ -730,7 +723,7 @@ public class IndexAliasesTests extends AbstractSharedClusterTest { assertThat(getResponse.getAliases().get("foobar").get(0).getFilter(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(0).getIndexRouting(), equalTo("bla")); assertThat(getResponse.getAliases().get("foobar").get(0).getSearchRouting(), equalTo("bla")); - existsResponse = client().admin().indices().prepareExistsAliases("b*") + existsResponse = client().admin().indices().prepareAliasesExist("b*") .addIndices("*bar").execute().actionGet(); assertThat(existsResponse.exists(), equalTo(true)); @@ -743,7 +736,7 @@ public class IndexAliasesTests extends AbstractSharedClusterTest { assertThat(getResponse.getAliases().get("foobar").get(0).getFilter(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(0).getIndexRouting(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(0).getSearchRouting(), nullValue()); - existsResponse = client().admin().indices().prepareExistsAliases("f*") + existsResponse = client().admin().indices().prepareAliasesExist("f*") .addIndices("*bar").execute().actionGet(); assertThat(existsResponse.exists(), equalTo(true)); @@ -758,7 +751,7 @@ public class IndexAliasesTests extends AbstractSharedClusterTest { assertThat(getResponse.getAliases().get("foobar").get(0).getFilter(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(0).getIndexRouting(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(0).getSearchRouting(), nullValue()); - existsResponse = client().admin().indices().prepareExistsAliases("foo") + existsResponse = client().admin().indices().prepareAliasesExist("foo") .addIndices("*bac").execute().actionGet(); assertThat(existsResponse.exists(), equalTo(true)); @@ -771,7 +764,7 @@ public class IndexAliasesTests extends AbstractSharedClusterTest { assertThat(getResponse.getAliases().get("foobar").get(0).getFilter(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(0).getIndexRouting(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(0).getSearchRouting(), nullValue()); - existsResponse = client().admin().indices().prepareExistsAliases("foo") + existsResponse = client().admin().indices().prepareAliasesExist("foo") .addIndices("foobar").execute().actionGet(); assertThat(existsResponse.exists(), equalTo(true)); @@ -782,7 +775,7 @@ public class IndexAliasesTests extends AbstractSharedClusterTest { assertThat(getResponse.getAliases().size(), equalTo(2)); assertThat(getResponse.getAliases().get("foobar").size(), equalTo(4)); assertThat(getResponse.getAliases().get("bazbar").size(), equalTo(2)); - existsResponse = client().admin().indices().prepareExistsAliases("*") + existsResponse = client().admin().indices().prepareAliasesExist("*") .addIndices("*bac").execute().actionGet(); assertThat(existsResponse.exists(), equalTo(true)); @@ -797,7 +790,7 @@ public class IndexAliasesTests extends AbstractSharedClusterTest { } catch (AliasMissingException e) { assertThat(e.getMessage(), equalTo("alias [foo] missing")); } - existsResponse = client().admin().indices().prepareExistsAliases("foo") + existsResponse = client().admin().indices().prepareAliasesExist("foo") .addIndices("foobar").execute().actionGet(); assertThat(existsResponse.exists(), equalTo(false)); }