diff --git a/client/rest-high-level/src/main/java/org/elasticsearch/client/IndicesClient.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/IndicesClient.java index 29a754035aaae..661edbbeab1cd 100644 --- a/client/rest-high-level/src/main/java/org/elasticsearch/client/IndicesClient.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/IndicesClient.java @@ -21,6 +21,7 @@ import org.apache.http.Header; import org.elasticsearch.action.ActionListener; +import org.elasticsearch.action.admin.indices.alias.get.GetAliasesRequest; import org.elasticsearch.action.admin.indices.close.CloseIndexRequest; import org.elasticsearch.action.admin.indices.close.CloseIndexResponse; import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest; @@ -35,7 +36,8 @@ import org.elasticsearch.action.admin.indices.open.OpenIndexResponse; import java.io.IOException; -import java.util.Collections; + +import static java.util.Collections.emptySet; /** * A wrapper for the {@link RestHighLevelClient} that provides methods for accessing the Indices API. @@ -57,7 +59,7 @@ public final class IndicesClient { */ public DeleteIndexResponse delete(DeleteIndexRequest deleteIndexRequest, Header... headers) throws IOException { return restHighLevelClient.performRequestAndParseEntity(deleteIndexRequest, Request::deleteIndex, DeleteIndexResponse::fromXContent, - Collections.emptySet(), headers); + emptySet(), headers); } /** @@ -68,7 +70,7 @@ public DeleteIndexResponse delete(DeleteIndexRequest deleteIndexRequest, Header. */ public void deleteAsync(DeleteIndexRequest deleteIndexRequest, ActionListener listener, Header... headers) { restHighLevelClient.performRequestAsyncAndParseEntity(deleteIndexRequest, Request::deleteIndex, DeleteIndexResponse::fromXContent, - listener, Collections.emptySet(), headers); + listener, emptySet(), headers); } /** @@ -79,7 +81,7 @@ public void deleteAsync(DeleteIndexRequest deleteIndexRequest, ActionListener listener, Header... headers) { restHighLevelClient.performRequestAsyncAndParseEntity(createIndexRequest, Request::createIndex, CreateIndexResponse::fromXContent, - listener, Collections.emptySet(), headers); + listener, emptySet(), headers); } /** @@ -101,7 +103,7 @@ public void createAsync(CreateIndexRequest createIndexRequest, ActionListener listener, Header... headers) { restHighLevelClient.performRequestAsyncAndParseEntity(putMappingRequest, Request::putMapping, PutMappingResponse::fromXContent, - listener, Collections.emptySet(), headers); + listener, emptySet(), headers); } /** @@ -125,7 +127,7 @@ public void putMappingAsync(PutMappingRequest putMappingRequest, ActionListener< */ public IndicesAliasesResponse updateAliases(IndicesAliasesRequest indicesAliasesRequest, Header... headers) throws IOException { return restHighLevelClient.performRequestAndParseEntity(indicesAliasesRequest, Request::updateAliases, - IndicesAliasesResponse::fromXContent, Collections.emptySet(), headers); + IndicesAliasesResponse::fromXContent, emptySet(), headers); } /** @@ -138,7 +140,7 @@ public IndicesAliasesResponse updateAliases(IndicesAliasesRequest indicesAliases public void updateAliasesAsync(IndicesAliasesRequest indicesAliasesRequestRequest, ActionListener listener, Header... headers) { restHighLevelClient.performRequestAsyncAndParseEntity(indicesAliasesRequestRequest, Request::updateAliases, - IndicesAliasesResponse::fromXContent, listener, Collections.emptySet(), headers); + IndicesAliasesResponse::fromXContent, listener, emptySet(), headers); } /** @@ -149,7 +151,7 @@ public void updateAliasesAsync(IndicesAliasesRequest indicesAliasesRequestReques */ public OpenIndexResponse open(OpenIndexRequest openIndexRequest, Header... headers) throws IOException { return restHighLevelClient.performRequestAndParseEntity(openIndexRequest, Request::openIndex, OpenIndexResponse::fromXContent, - Collections.emptySet(), headers); + emptySet(), headers); } /** @@ -160,7 +162,7 @@ public OpenIndexResponse open(OpenIndexRequest openIndexRequest, Header... heade */ public void openAsync(OpenIndexRequest openIndexRequest, ActionListener listener, Header... headers) { restHighLevelClient.performRequestAsyncAndParseEntity(openIndexRequest, Request::openIndex, OpenIndexResponse::fromXContent, - listener, Collections.emptySet(), headers); + listener, emptySet(), headers); } /** @@ -171,7 +173,7 @@ public void openAsync(OpenIndexRequest openIndexRequest, ActionListener listener, Header... headers) { restHighLevelClient.performRequestAsyncAndParseEntity(closeIndexRequest, Request::closeIndex, CloseIndexResponse::fromXContent, - listener, Collections.emptySet(), headers); + listener, emptySet(), headers); + } + + /** + * Checks if one or more aliases exist using the Aliases Exist API + *

+ * See + * Indices Aliases API on elastic.co + */ + public boolean existsAlias(GetAliasesRequest getAliasesRequest, Header... headers) throws IOException { + return restHighLevelClient.performRequest(getAliasesRequest, Request::existsAlias, RestHighLevelClient::convertExistsResponse, + emptySet(), headers); + } + + /** + * Asynchronously checks if one or more aliases exist using the Aliases Exist API + *

+ * See + * Indices Aliases API on elastic.co + */ + public void existsAliasAsync(GetAliasesRequest getAliasesRequest, ActionListener listener, Header... headers) { + restHighLevelClient.performRequestAsync(getAliasesRequest, Request::existsAlias, RestHighLevelClient::convertExistsResponse, + listener, emptySet(), headers); } } diff --git a/client/rest-high-level/src/main/java/org/elasticsearch/client/Request.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/Request.java index 4bbe6bc91b4e1..6becd24b22a69 100755 --- a/client/rest-high-level/src/main/java/org/elasticsearch/client/Request.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/Request.java @@ -29,6 +29,7 @@ import org.apache.http.entity.ContentType; import org.apache.lucene.util.BytesRef; import org.elasticsearch.action.DocWriteRequest; +import org.elasticsearch.action.admin.indices.alias.get.GetAliasesRequest; import org.elasticsearch.action.admin.indices.close.CloseIndexRequest; import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest; import org.elasticsearch.action.admin.indices.create.CreateIndexRequest; @@ -133,7 +134,7 @@ static Request delete(DeleteRequest deleteRequest) { } static Request deleteIndex(DeleteIndexRequest deleteIndexRequest) { - String endpoint = endpoint(deleteIndexRequest.indices(), Strings.EMPTY_ARRAY, ""); + String endpoint = endpoint(deleteIndexRequest.indices()); Params parameters = Params.builder(); parameters.withTimeout(deleteIndexRequest.timeout()); @@ -144,7 +145,7 @@ static Request deleteIndex(DeleteIndexRequest deleteIndexRequest) { } static Request openIndex(OpenIndexRequest openIndexRequest) { - String endpoint = endpoint(openIndexRequest.indices(), Strings.EMPTY_ARRAY, "_open"); + String endpoint = endpoint(openIndexRequest.indices(), "_open"); Params parameters = Params.builder(); @@ -157,7 +158,7 @@ static Request openIndex(OpenIndexRequest openIndexRequest) { } static Request closeIndex(CloseIndexRequest closeIndexRequest) { - String endpoint = endpoint(closeIndexRequest.indices(), Strings.EMPTY_ARRAY, "_close"); + String endpoint = endpoint(closeIndexRequest.indices(), "_close"); Params parameters = Params.builder(); @@ -169,7 +170,7 @@ static Request closeIndex(CloseIndexRequest closeIndexRequest) { } static Request createIndex(CreateIndexRequest createIndexRequest) throws IOException { - String endpoint = endpoint(createIndexRequest.indices(), Strings.EMPTY_ARRAY, ""); + String endpoint = endpoint(createIndexRequest.indices()); Params parameters = Params.builder(); parameters.withTimeout(createIndexRequest.timeout()); @@ -474,13 +475,44 @@ static Request multiSearch(MultiSearchRequest multiSearchRequest) throws IOExcep return new Request(HttpPost.METHOD_NAME, "/_msearch", params.getParams(), entity); } + static Request existsAlias(GetAliasesRequest getAliasesRequest) { + Params params = Params.builder(); + params.withIndicesOptions(getAliasesRequest.indicesOptions()); + params.withLocal(getAliasesRequest.local()); + if (getAliasesRequest.indices().length == 0 && getAliasesRequest.aliases().length == 0) { + throw new IllegalArgumentException("existsAlias requires at least an alias or an index"); + } + String endpoint = endpoint(getAliasesRequest.indices(), "_alias", getAliasesRequest.aliases()); + return new Request("HEAD", endpoint, params.getParams(), null); + } + private static HttpEntity createEntity(ToXContent toXContent, XContentType xContentType) throws IOException { BytesRef source = XContentHelper.toXContent(toXContent, xContentType, false).toBytesRef(); return new ByteArrayEntity(source.bytes, source.offset, source.length, createContentType(xContentType)); } + static String endpoint(String index, String type, String id) { + return buildEndpoint(index, type, id); + } + + static String endpoint(String index, String type, String id, String endpoint) { + return buildEndpoint(index, type, id, endpoint); + } + + static String endpoint(String[] indices) { + return buildEndpoint(String.join(",", indices)); + } + + static String endpoint(String[] indices, String endpoint) { + return buildEndpoint(String.join(",", indices), endpoint); + } + static String endpoint(String[] indices, String[] types, String endpoint) { - return endpoint(String.join(",", indices), String.join(",", types), endpoint); + return buildEndpoint(String.join(",", indices), String.join(",", types), endpoint); + } + + static String endpoint(String[] indices, String endpoint, String[] suffixes) { + return buildEndpoint(String.join(",", indices), endpoint, String.join(",", suffixes)); } static String endpoint(String[] indices, String endpoint, String type) { @@ -488,9 +520,9 @@ static String endpoint(String[] indices, String endpoint, String type) { } /** - * Utility method to build request's endpoint. + * Utility method to build request's endpoint given its parts as strings */ - static String endpoint(String... parts) { + static String buildEndpoint(String... parts) { StringJoiner joiner = new StringJoiner("/", "/", ""); for (String part : parts) { if (Strings.hasLength(part)) { @@ -665,6 +697,11 @@ Params withIndicesOptions(IndicesOptions indicesOptions) { return this; } + Params withLocal(boolean local) { + putParam("local", Boolean.toString(local)); + return this; + } + Map getParams() { return Collections.unmodifiableMap(params); } diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesClientIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesClientIT.java index 3fb0c32cd64ff..f23ef92e19b6f 100755 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesClientIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesClientIT.java @@ -22,6 +22,7 @@ import org.elasticsearch.ElasticsearchException; import org.elasticsearch.ElasticsearchStatusException; import org.elasticsearch.action.admin.indices.alias.Alias; +import org.elasticsearch.action.admin.indices.alias.get.GetAliasesRequest; import org.elasticsearch.action.admin.indices.close.CloseIndexRequest; import org.elasticsearch.action.admin.indices.close.CloseIndexResponse; import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest; @@ -355,6 +356,22 @@ private static boolean aliasExists(String index, String alias) throws IOExceptio return RestStatus.OK.getStatus() == response.getStatusLine().getStatusCode(); } + public void testExistsAlias() throws IOException { + GetAliasesRequest getAliasesRequest = new GetAliasesRequest("alias"); + assertFalse(execute(getAliasesRequest, highLevelClient().indices()::existsAlias, highLevelClient().indices()::existsAliasAsync)); + + createIndex("index"); + client().performRequest("PUT", "/index/_alias/alias"); + assertTrue(execute(getAliasesRequest, highLevelClient().indices()::existsAlias, highLevelClient().indices()::existsAliasAsync)); + + GetAliasesRequest getAliasesRequest2 = new GetAliasesRequest(); + getAliasesRequest2.aliases("alias"); + getAliasesRequest2.indices("index"); + assertTrue(execute(getAliasesRequest2, highLevelClient().indices()::existsAlias, highLevelClient().indices()::existsAliasAsync)); + getAliasesRequest2.indices("does_not_exist"); + assertFalse(execute(getAliasesRequest2, highLevelClient().indices()::existsAlias, highLevelClient().indices()::existsAliasAsync)); + } + @SuppressWarnings("unchecked") private Map getIndexMetadata(String index) throws IOException { Response response = client().performRequest("GET", index); diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/RequestTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/RequestTests.java index 2ab0aa30ff353..4c6111711b8e4 100755 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/RequestTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/RequestTests.java @@ -30,6 +30,7 @@ import org.apache.http.entity.StringEntity; import org.apache.http.util.EntityUtils; import org.elasticsearch.action.DocWriteRequest; +import org.elasticsearch.action.admin.indices.alias.get.GetAliasesRequest; import org.elasticsearch.action.admin.indices.close.CloseIndexRequest; import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest; import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest.AliasActions; @@ -985,6 +986,44 @@ public void testClearScroll() throws IOException { assertEquals(REQUEST_BODY_CONTENT_TYPE.mediaTypeWithoutParameters(), request.getEntity().getContentType().getValue()); } + public void testExistsAlias() { + GetAliasesRequest getAliasesRequest = new GetAliasesRequest(); + String[] indices = randomIndicesNames(0, 5); + getAliasesRequest.indices(indices); + //the HEAD endpoint requires at least an alias or an index + String[] aliases = randomIndicesNames(indices.length == 0 ? 1 : 0, 5); + getAliasesRequest.aliases(aliases); + Map expectedParams = new HashMap<>(); + if (randomBoolean()) { + boolean local = randomBoolean(); + getAliasesRequest.local(local); + } + expectedParams.put("local", Boolean.toString(getAliasesRequest.local())); + + setRandomIndicesOptions(getAliasesRequest::indicesOptions, getAliasesRequest::indicesOptions, expectedParams); + + Request request = Request.existsAlias(getAliasesRequest); + StringJoiner expectedEndpoint = new StringJoiner("/", "/", ""); + String index = String.join(",", indices); + if (Strings.hasLength(index)) { + expectedEndpoint.add(index); + } + expectedEndpoint.add("_alias"); + String alias = String.join(",", aliases); + if (Strings.hasLength(alias)) { + expectedEndpoint.add(alias); + } + assertEquals(expectedEndpoint.toString(), request.getEndpoint()); + assertEquals(expectedParams, request.getParameters()); + assertNull(request.getEntity()); + } + + public void testExistsAliasNoAliasNoIndex() { + GetAliasesRequest getAliasesRequest = new GetAliasesRequest(); + IllegalArgumentException iae = expectThrows(IllegalArgumentException.class, () -> Request.existsAlias(getAliasesRequest)); + assertEquals("existsAlias requires at least an alias or an index", iae.getMessage()); + } + private static void assertToXContentBody(ToXContent expectedBody, HttpEntity actualEntity) throws IOException { BytesReference expectedBytes = XContentHelper.toXContent(expectedBody, REQUEST_BODY_CONTENT_TYPE, false); assertEquals(XContentType.JSON.mediaTypeWithoutParameters(), actualEntity.getContentType().getValue()); @@ -1019,14 +1058,25 @@ public void testParamsNoDuplicates() { assertEquals("1", requestParams.values().iterator().next()); } + public void testBuildEndpoint() { + assertEquals("/", Request.buildEndpoint()); + assertEquals("/", Request.buildEndpoint(Strings.EMPTY_ARRAY)); + assertEquals("/", Request.buildEndpoint("")); + assertEquals("/a/b", Request.buildEndpoint("a", "b")); + assertEquals("/a/b/_create", Request.buildEndpoint("a", "b", "_create")); + assertEquals("/a/b/c/_create", Request.buildEndpoint("a", "b", "c", "_create")); + assertEquals("/a/_create", Request.buildEndpoint("a", null, null, "_create")); + } + public void testEndpoint() { - assertEquals("/", Request.endpoint()); - assertEquals("/", Request.endpoint(Strings.EMPTY_ARRAY)); - assertEquals("/", Request.endpoint("")); - assertEquals("/a/b", Request.endpoint("a", "b")); - assertEquals("/a/b/_create", Request.endpoint("a", "b", "_create")); - assertEquals("/a/b/c/_create", Request.endpoint("a", "b", "c", "_create")); - assertEquals("/a/_create", Request.endpoint("a", null, null, "_create")); + assertEquals("/index/type/id", Request.endpoint("index", "type", "id")); + assertEquals("/index/type/id/_endpoint", Request.endpoint("index", "type", "id", "_endpoint")); + assertEquals("/index1,index2", Request.endpoint(new String[]{"index1", "index2"})); + assertEquals("/index1,index2/_endpoint", Request.endpoint(new String[]{"index1", "index2"}, "_endpoint")); + assertEquals("/index1,index2/type1,type2/_endpoint", Request.endpoint(new String[]{"index1", "index2"}, + new String[]{"type1", "type2"}, "_endpoint")); + assertEquals("/index1,index2/_endpoint/suffix1,suffix2", Request.endpoint(new String[]{"index1", "index2"}, + "_endpoint", new String[]{"suffix1", "suffix2"})); } public void testCreateContentType() { diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/IndicesClientDocumentationIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/IndicesClientDocumentationIT.java index e363552f870db..14b9e0d8086ed 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/IndicesClientDocumentationIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/IndicesClientDocumentationIT.java @@ -22,6 +22,7 @@ import org.elasticsearch.ElasticsearchException; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.admin.indices.alias.Alias; +import org.elasticsearch.action.admin.indices.alias.get.GetAliasesRequest; import org.elasticsearch.action.admin.indices.close.CloseIndexRequest; import org.elasticsearch.action.admin.indices.close.CloseIndexResponse; import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest; @@ -304,16 +305,10 @@ public void onFailure(Exception e) { } }); // end::put-mapping-execute-async - - assertBusy(() -> { - // TODO Use Indices Exist API instead once it exists - Response response = client.getLowLevelClient().performRequest("HEAD", "twitter"); - assertTrue(RestStatus.OK.getStatus() == response.getStatusLine().getStatusCode()); - }); } } - public void testOpenIndex() throws IOException { + public void testOpenIndex() throws Exception { RestHighLevelClient client = highLevelClient(); { @@ -384,7 +379,7 @@ public void onFailure(Exception e) { } } - public void testCloseIndex() throws IOException { + public void testCloseIndex() throws Exception { RestHighLevelClient client = highLevelClient(); { @@ -432,19 +427,59 @@ public void onFailure(Exception e) { } }); // end::close-index-execute-async + } + } + + public void testExistsAlias() throws Exception { + RestHighLevelClient client = highLevelClient(); { - // tag::close-index-notfound - try { - CloseIndexRequest request = new CloseIndexRequest("does_not_exist"); - client.indices().close(request); - } catch (ElasticsearchException exception) { - if (exception.status() == RestStatus.BAD_REQUEST) { + CreateIndexResponse createIndexResponse = client.indices().create(new CreateIndexRequest("index") + .alias(new Alias("alias"))); + assertTrue(createIndexResponse.isAcknowledged()); + } + + { + // tag::exists-alias-request + GetAliasesRequest request = new GetAliasesRequest(); + GetAliasesRequest requestWithAlias = new GetAliasesRequest("alias1"); + GetAliasesRequest requestWithAliases = new GetAliasesRequest(new String[]{"alias1", "alias2"}); + // end::exists-alias-request + + // tag::exists-alias-request-alias + request.aliases("alias"); // <1> + // end::exists-alias-request-alias + // tag::exists-alias-request-indices + request.indices("index"); // <1> + // end::exists-alias-request-indices + + // tag::exists-alias-request-indicesOptions + request.indicesOptions(IndicesOptions.lenientExpandOpen()); // <1> + // end::exists-alias-request-indicesOptions + + // tag::exists-alias-request-local + request.local(true); // <1> + // end::exists-alias-request-local + + // tag::exists-alias-execute + boolean exists = client.indices().existsAlias(request); + // end::exists-alias-execute + assertTrue(exists); + + // tag::exists-alias-execute-async + client.indices().existsAliasAsync(request, new ActionListener() { + @Override + public void onResponse(Boolean exists) { // <1> } - } - // end::close-index-notfound + + @Override + public void onFailure(Exception e) { + // <2> + } + }); + // end::exists-alias-execute-async } } diff --git a/docs/java-rest/high-level/apis/exists_alias.asciidoc b/docs/java-rest/high-level/apis/exists_alias.asciidoc new file mode 100644 index 0000000000000..cbbb2c3315c2b --- /dev/null +++ b/docs/java-rest/high-level/apis/exists_alias.asciidoc @@ -0,0 +1,69 @@ +[[java-rest-high-exists-alias]] +=== Exists Alias API + +[[java-rest-high-exists-alias-request]] +==== Exists Alias Request + +The Exists Alias API uses `GetAliasesRequest` as its request object. +One or more aliases can be optionally provided either at construction +time or later on through the relevant setter method. + +["source","java",subs="attributes,callouts,macros"] +-------------------------------------------------- +include-tagged::{doc-tests}/IndicesClientDocumentationIT.java[exists-alias-request] +-------------------------------------------------- + +==== Optional arguments +The following arguments can optionally be provided: + +["source","java",subs="attributes,callouts,macros"] +-------------------------------------------------- +include-tagged::{doc-tests}/IndicesClientDocumentationIT.java[exists-alias-request-alias] +-------------------------------------------------- +<1> One or more aliases to look for + +["source","java",subs="attributes,callouts,macros"] +-------------------------------------------------- +include-tagged::{doc-tests}/IndicesClientDocumentationIT.java[exists-alias-request-indices] +-------------------------------------------------- +<1> The index or indices that the alias is associated with + +["source","java",subs="attributes,callouts,macros"] +-------------------------------------------------- +include-tagged::{doc-tests}/IndicesClientDocumentationIT.java[exists-alias-request-indicesOptions] +-------------------------------------------------- +<1> Setting `IndicesOptions` controls how unavailable indices are resolved and +how wildcard expressions are expanded + +["source","java",subs="attributes,callouts,macros"] +-------------------------------------------------- +include-tagged::{doc-tests}/IndicesClientDocumentationIT.java[exists-alias-request-local] +-------------------------------------------------- +<1> The `local` flag (defaults to `false`) controls whether the aliases need +to be looked up in the local cluster state or in the cluster state held by +the elected master node. + +[[java-rest-high-exists-alias-sync]] +==== Synchronous Execution + +["source","java",subs="attributes,callouts,macros"] +-------------------------------------------------- +include-tagged::{doc-tests}/IndicesClientDocumentationIT.java[exists-alias-execute] +-------------------------------------------------- + +[[java-rest-high-exists-alias-async]] +==== Asynchronous Execution + +["source","java",subs="attributes,callouts,macros"] +-------------------------------------------------- +include-tagged::{doc-tests}/IndicesClientDocumentationIT.java[exists-alias-execute-async] +-------------------------------------------------- +<1> Called when the execution is successfully completed. The response is +provided as an argument +<2> Called in case of failure. The raised exception is provided as an argument + +[[java-rest-high-exists-alias-response]] +==== Exists Alias Response + +The Exists Alias API returns a `boolean` that indicates whether the provided +alias (or aliases) was found or not. diff --git a/docs/java-rest/high-level/apis/index.asciidoc b/docs/java-rest/high-level/apis/index.asciidoc index b24d226671179..5f1f15b644799 100644 --- a/docs/java-rest/high-level/apis/index.asciidoc +++ b/docs/java-rest/high-level/apis/index.asciidoc @@ -10,6 +10,8 @@ include::putmapping.asciidoc[] include::update_aliases.asciidoc[] +include::exists_alias.asciidoc[] + include::_index.asciidoc[] include::get.asciidoc[] diff --git a/docs/java-rest/high-level/supported-apis.asciidoc b/docs/java-rest/high-level/supported-apis.asciidoc index 4fe32401cac31..8eb2590e99d9d 100644 --- a/docs/java-rest/high-level/supported-apis.asciidoc +++ b/docs/java-rest/high-level/supported-apis.asciidoc @@ -10,6 +10,7 @@ Indices APIs:: * <> * <> * <> +* <> Single document APIs:: * <>