From 1be77af798579edaae044640c53756cc2f2a594e Mon Sep 17 00:00:00 2001 From: Sylvain Wallez Date: Tue, 2 Jan 2024 20:48:12 +0100 Subject: [PATCH] [codegen] Update to latest API spec --- .../ElasticsearchAsyncClient.java | 30 +- .../elasticsearch/ElasticsearchClient.java | 30 +- .../elasticsearch/_types/ClusterDetails.java | 311 +++++++++ .../_types/ClusterSearchStatus.java | 61 ++ .../_types/ClusterStatistics.java | 130 ++++ .../elasticsearch/_types/KnnQuery.java | 33 + .../elasticsearch/_types/SortOptions.java | 2 +- .../aggregations/FrequentItemSetsField.java | 71 +-- .../SignificantTextAggregation.java | 35 +- .../_types/analysis/Normalizer.java | 2 +- .../analysis/PathHierarchyTokenizer.java | 17 +- .../_types/mapping/FieldType.java | 2 + .../_types/mapping/GeoShapeProperty.java | 2 +- .../_types/mapping/Property.java | 31 + .../_types/mapping/PropertyBuilders.java | 19 + .../_types/mapping/ShapeProperty.java | 2 +- .../_types/mapping/SparseVectorProperty.java | 113 ++++ .../elasticsearch/_types/query_dsl/Like.java | 2 +- .../elasticsearch/_types/query_dsl/Query.java | 2 +- .../query_dsl/SimpleQueryStringFlags.java | 192 ------ .../async_search/AsyncSearchResponseBase.java | 65 ++ .../ElasticsearchAsyncSearchAsyncClient.java | 24 +- .../ElasticsearchAsyncSearchClient.java | 24 +- .../status/StatusResponseBase.java | 46 ++ .../ElasticsearchAutoscalingAsyncClient.java | 14 +- .../ElasticsearchAutoscalingClient.java | 14 +- .../cat/ElasticsearchCatAsyncClient.java | 126 ++-- .../cat/ElasticsearchCatClient.java | 126 ++-- .../ccr/ElasticsearchCcrAsyncClient.java | 52 +- .../ccr/ElasticsearchCcrClient.java | 52 +- .../ElasticsearchClusterAsyncClient.java | 84 +-- .../cluster/ElasticsearchClusterClient.java | 84 +-- .../reroute/CommandAllocateReplicaAction.java | 2 +- .../elasticsearch/core/BulkRequest.java | 109 ++-- .../core/ClearScrollRequest.java | 8 +- .../core/ClosePointInTimeRequest.java | 10 +- .../elasticsearch/core/CountRequest.java | 142 +++-- .../elasticsearch/core/CreateRequest.java | 100 +-- .../core/DeleteByQueryRequest.java | 260 ++++---- .../core/DeleteByQueryRethrottleRequest.java | 10 +- .../elasticsearch/core/DeleteRequest.java | 84 ++- .../core/DeleteScriptRequest.java | 24 +- .../elasticsearch/core/ExistsRequest.java | 80 ++- .../core/ExistsSourceRequest.java | 68 +- .../elasticsearch/core/ExplainRequest.java | 95 +-- .../elasticsearch/core/GetRequest.java | 16 +- .../elasticsearch/core/GetScriptRequest.java | 6 +- .../elasticsearch/core/IndexRequest.java | 125 ++-- .../core/MsearchTemplateRequest.java | 32 +- .../core/MtermvectorsRequest.java | 111 ++-- .../core/OpenPointInTimeRequest.java | 50 +- .../elasticsearch/core/PutScriptRequest.java | 47 +- .../core/ReindexRethrottleRequest.java | 12 +- .../core/RenderSearchTemplateRequest.java | 27 +- .../core/ScriptsPainlessExecuteRequest.java | 18 +- .../core/SearchShardsRequest.java | 82 ++- .../core/SearchTemplateRequest.java | 95 ++- .../core/TermvectorsRequest.java | 93 ++- .../core/UpdateByQueryRequest.java | 286 +++++---- .../core/UpdateByQueryRethrottleRequest.java | 10 +- .../core/bulk/BulkOperationBase.java | 12 + .../core/bulk/BulkResponseItem.java | 63 +- .../core/bulk/UpdateOperation.java | 4 + .../core/bulk/WriteOperation.java | 34 + .../core/msearch_template/TemplateConfig.java | 19 + .../MultiTermVectorsOperation.java | 73 ++- ...ankEvalMetricDiscountedCumulativeGain.java | 2 +- .../RankEvalMetricExpectedReciprocalRank.java | 2 +- .../RankEvalMetricMeanReciprocalRank.java | 2 +- .../rank_eval/RankEvalMetricPrecision.java | 2 +- .../core/rank_eval/RankEvalMetricRecall.java | 2 +- .../reindex_rethrottle/ReindexStatus.java | 116 +++- .../PainlessContextSetup.java | 34 +- .../elasticsearch/core/search/Context.java | 2 +- .../core/termvectors/Filter.java | 32 + .../elasticsearch/doc-files/api-spec.html | 374 +++++------ .../ElasticsearchEnrichAsyncClient.java | 8 +- .../enrich/ElasticsearchEnrichClient.java | 8 +- .../eql/ElasticsearchEqlAsyncClient.java | 42 +- .../eql/ElasticsearchEqlClient.java | 42 +- .../esql/ElasticsearchEsqlAsyncClient.java | 90 +++ .../esql/ElasticsearchEsqlClient.java | 91 +++ .../elasticsearch/esql/QueryRequest.java | 430 +++++++++++++ .../graph/ElasticsearchGraphAsyncClient.java | 4 +- .../graph/ElasticsearchGraphClient.java | 4 +- .../indices/DataLifecycleWithRollover.java | 233 ------- .../elasticsearch/indices/DataStream.java | 60 ++ .../indices/DataStreamIndex.java | 93 +++ .../indices/DlmRolloverConditions.java | 420 ------------ .../ElasticsearchIndicesAsyncClient.java | 86 +-- .../indices/ElasticsearchIndicesClient.java | 86 +-- .../elasticsearch/indices/IndexSettings.java | 2 +- .../elasticsearch/indices/ManagedBy.java | 57 ++ .../indices/MappingLimitSettings.java | 2 +- .../MappingLimitSettingsDimensionFields.java | 12 +- .../DataLifecycleExplain.java | 406 ------------ .../inference/DeleteModelRequest.java | 201 ++++++ .../inference/DeleteModelResponse.java | 96 +++ .../ElasticsearchInferenceAsyncClient.java | 191 ++++++ .../ElasticsearchInferenceClient.java | 190 ++++++ .../inference/GetModelRequest.java | 199 ++++++ .../inference/GetModelResponse.java | 171 +++++ .../inference/InferenceRequest.java | 314 +++++++++ .../inference/InferenceResponse.java | 144 +++++ .../inference/InferenceResult.java | 230 +++++++ .../InferenceResultBuilders.java} | 14 +- .../inference/InferenceResultVariant.java | 37 ++ .../elasticsearch/inference/ModelConfig.java | 212 +++++++ .../inference/ModelConfigContainer.java | 171 +++++ .../inference/PutModelRequest.java | 254 ++++++++ .../inference/PutModelResponse.java | 95 +++ .../SparseEmbeddingResult.java} | 89 +-- .../elasticsearch/inference/TaskType.java | 54 ++ .../TextEmbeddingResult.java} | 103 ++- .../ElasticsearchIngestAsyncClient.java | 8 +- .../ingest/ElasticsearchIngestClient.java | 8 +- .../elasticsearch/ingest/Pipeline.java | 55 ++ .../ElasticsearchLogstashAsyncClient.java | 13 + .../logstash/ElasticsearchLogstashClient.java | 13 + .../logstash/GetPipelineRequest.java | 15 +- .../ml/ElasticsearchMlAsyncClient.java | 28 +- .../ml/ElasticsearchMlClient.java | 28 +- .../ml/PutTrainedModelRequest.java | 49 ++ .../ml/PutTrainedModelVocabularyRequest.java | 51 ++ .../StartTrainedModelDeploymentRequest.java | 30 + .../nodes/ElasticsearchNodesAsyncClient.java | 24 +- .../nodes/ElasticsearchNodesClient.java | 24 +- .../query_ruleset/PutRequest.java | 99 +-- .../query_ruleset/QueryRuleset.java | 40 +- .../AnalyticsCollection.java | 6 +- ...ticsearchSearchApplicationAsyncClient.java | 4 +- .../ElasticsearchSearchApplicationClient.java | 4 +- .../search_application/ListRequest.java | 12 +- .../PutBehavioralAnalyticsRequest.java | 6 +- .../search_application/PutRequest.java | 12 +- .../search_application/SearchApplication.java | 24 +- .../SearchApplicationSearchRequest.java | 15 +- .../SearchApplicationTemplate.java | 12 +- .../security/GetApiKeyRequest.java | 40 ++ .../security/PutRoleMappingRequest.java | 54 ++ .../elasticsearch/security/RoleMapping.java | 1 - .../security/{get_role => }/RoleTemplate.java | 7 +- .../{get_role => }/TemplateFormat.java | 5 +- .../elasticsearch/security/get_role/Role.java | 1 + .../elasticsearch/sql/ClearCursorRequest.java | 8 +- .../elasticsearch/sql/DeleteAsyncRequest.java | 4 +- .../elasticsearch/sql/GetAsyncRequest.java | 4 +- .../sql/GetAsyncStatusRequest.java | 4 +- .../elasticsearch/sql/QueryRequest.java | 28 +- .../elasticsearch/sql/TranslateRequest.java | 22 +- .../elasticsearch/tasks/CancelRequest.java | 34 +- .../tasks/ElasticsearchTasksAsyncClient.java | 16 +- .../tasks/ElasticsearchTasksClient.java | 16 +- .../elasticsearch/tasks/GetTasksRequest.java | 17 +- .../elasticsearch/tasks/TaskStatus.java | 600 ------------------ .../transform/DeleteTransformRequest.java | 32 + .../ElasticsearchTestServer.java | 40 +- .../elasticsearch/model/UnionTests.java | 15 - 158 files changed, 7221 insertions(+), 3821 deletions(-) create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterDetails.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterSearchStatus.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/SparseVectorProperty.java delete mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/SimpleQueryStringFlags.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/esql/ElasticsearchEsqlAsyncClient.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/esql/ElasticsearchEsqlClient.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/esql/QueryRequest.java delete mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataLifecycleWithRollover.java delete mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DlmRolloverConditions.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ManagedBy.java delete mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/indices/explain_data_lifecycle/DataLifecycleExplain.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/inference/DeleteModelRequest.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/inference/DeleteModelResponse.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceAsyncClient.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceClient.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/inference/GetModelRequest.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/inference/GetModelResponse.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceRequest.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceResponse.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceResult.java rename java-client/src/main/java/co/elastic/clients/elasticsearch/{_types/query_dsl/SimpleQueryStringFlagsBuilders.java => inference/InferenceResultBuilders.java} (73%) create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceResultVariant.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ModelConfig.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ModelConfigContainer.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutModelRequest.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutModelResponse.java rename java-client/src/main/java/co/elastic/clients/elasticsearch/{indices/DataLifecycle.java => inference/SparseEmbeddingResult.java} (53%) create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TaskType.java rename java-client/src/main/java/co/elastic/clients/elasticsearch/{indices/get_data_lifecycle/DataStreamLifecycle.java => inference/TextEmbeddingResult.java} (55%) rename java-client/src/main/java/co/elastic/clients/elasticsearch/security/{get_role => }/RoleTemplate.java (96%) rename java-client/src/main/java/co/elastic/clients/elasticsearch/security/{get_role => }/TemplateFormat.java (90%) delete mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/TaskStatus.java diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java index 4663f1eea..5248b4c2a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java @@ -117,11 +117,13 @@ import co.elastic.clients.elasticsearch.dangling_indices.ElasticsearchDanglingIndicesAsyncClient; import co.elastic.clients.elasticsearch.enrich.ElasticsearchEnrichAsyncClient; import co.elastic.clients.elasticsearch.eql.ElasticsearchEqlAsyncClient; +import co.elastic.clients.elasticsearch.esql.ElasticsearchEsqlAsyncClient; import co.elastic.clients.elasticsearch.features.ElasticsearchFeaturesAsyncClient; import co.elastic.clients.elasticsearch.fleet.ElasticsearchFleetAsyncClient; import co.elastic.clients.elasticsearch.graph.ElasticsearchGraphAsyncClient; import co.elastic.clients.elasticsearch.ilm.ElasticsearchIlmAsyncClient; import co.elastic.clients.elasticsearch.indices.ElasticsearchIndicesAsyncClient; +import co.elastic.clients.elasticsearch.inference.ElasticsearchInferenceAsyncClient; import co.elastic.clients.elasticsearch.ingest.ElasticsearchIngestAsyncClient; import co.elastic.clients.elasticsearch.license.ElasticsearchLicenseAsyncClient; import co.elastic.clients.elasticsearch.logstash.ElasticsearchLogstashAsyncClient; @@ -210,6 +212,10 @@ public ElasticsearchEqlAsyncClient eql() { return new ElasticsearchEqlAsyncClient(this.transport, this.transportOptions); } + public ElasticsearchEsqlAsyncClient esql() { + return new ElasticsearchEsqlAsyncClient(this.transport, this.transportOptions); + } + public ElasticsearchFeaturesAsyncClient features() { return new ElasticsearchFeaturesAsyncClient(this.transport, this.transportOptions); } @@ -230,6 +236,10 @@ public ElasticsearchIndicesAsyncClient indices() { return new ElasticsearchIndicesAsyncClient(this.transport, this.transportOptions); } + public ElasticsearchInferenceAsyncClient inference() { + return new ElasticsearchInferenceAsyncClient(this.transport, this.transportOptions); + } + public ElasticsearchIngestAsyncClient ingest() { return new ElasticsearchIngestAsyncClient(this.transport, this.transportOptions); } @@ -325,7 +335,7 @@ public ElasticsearchXpackAsyncClient xpack() { * request. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/docs-bulk.html">Documentation * on elastic.co */ @@ -344,7 +354,7 @@ public CompletableFuture bulk(BulkRequest request) { * a function that initializes a builder to create the * {@link BulkRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/docs-bulk.html">Documentation * on elastic.co */ @@ -357,7 +367,7 @@ public final CompletableFuture bulk(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/docs-bulk.html">Documentation * on elastic.co */ @@ -372,7 +382,7 @@ public CompletableFuture bulk() { * Explicitly clears the search context for a scroll. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/clear-scroll-api.html">Documentation * on elastic.co */ @@ -390,7 +400,7 @@ public CompletableFuture clearScroll(ClearScrollRequest req * a function that initializes a builder to create the * {@link ClearScrollRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/clear-scroll-api.html">Documentation * on elastic.co */ @@ -403,7 +413,7 @@ public final CompletableFuture clearScroll( * Explicitly clears the search context for a scroll. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/clear-scroll-api.html">Documentation * on elastic.co */ @@ -418,7 +428,7 @@ public CompletableFuture clearScroll() { * Close a point in time * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/point-in-time-api.html">Documentation * on elastic.co */ @@ -436,7 +446,7 @@ public CompletableFuture closePointInTime(ClosePointIn * a function that initializes a builder to create the * {@link ClosePointInTimeRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/point-in-time-api.html">Documentation * on elastic.co */ @@ -1474,7 +1484,7 @@ public CompletableFuture mtermvectors() { * Open a point in time that can be used in subsequent searches * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/point-in-time-api.html">Documentation * on elastic.co */ @@ -1492,7 +1502,7 @@ public CompletableFuture openPointInTime(OpenPointInTim * a function that initializes a builder to create the * {@link OpenPointInTimeRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/point-in-time-api.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java index 0c8d66982..7dba0babd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java @@ -118,11 +118,13 @@ import co.elastic.clients.elasticsearch.dangling_indices.ElasticsearchDanglingIndicesClient; import co.elastic.clients.elasticsearch.enrich.ElasticsearchEnrichClient; import co.elastic.clients.elasticsearch.eql.ElasticsearchEqlClient; +import co.elastic.clients.elasticsearch.esql.ElasticsearchEsqlClient; import co.elastic.clients.elasticsearch.features.ElasticsearchFeaturesClient; import co.elastic.clients.elasticsearch.fleet.ElasticsearchFleetClient; import co.elastic.clients.elasticsearch.graph.ElasticsearchGraphClient; import co.elastic.clients.elasticsearch.ilm.ElasticsearchIlmClient; import co.elastic.clients.elasticsearch.indices.ElasticsearchIndicesClient; +import co.elastic.clients.elasticsearch.inference.ElasticsearchInferenceClient; import co.elastic.clients.elasticsearch.ingest.ElasticsearchIngestClient; import co.elastic.clients.elasticsearch.license.ElasticsearchLicenseClient; import co.elastic.clients.elasticsearch.logstash.ElasticsearchLogstashClient; @@ -211,6 +213,10 @@ public ElasticsearchEqlClient eql() { return new ElasticsearchEqlClient(this.transport, this.transportOptions); } + public ElasticsearchEsqlClient esql() { + return new ElasticsearchEsqlClient(this.transport, this.transportOptions); + } + public ElasticsearchFeaturesClient features() { return new ElasticsearchFeaturesClient(this.transport, this.transportOptions); } @@ -231,6 +237,10 @@ public ElasticsearchIndicesClient indices() { return new ElasticsearchIndicesClient(this.transport, this.transportOptions); } + public ElasticsearchInferenceClient inference() { + return new ElasticsearchInferenceClient(this.transport, this.transportOptions); + } + public ElasticsearchIngestClient ingest() { return new ElasticsearchIngestClient(this.transport, this.transportOptions); } @@ -326,7 +336,7 @@ public ElasticsearchXpackClient xpack() { * request. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/docs-bulk.html">Documentation * on elastic.co */ @@ -345,7 +355,7 @@ public BulkResponse bulk(BulkRequest request) throws IOException, ElasticsearchE * a function that initializes a builder to create the * {@link BulkRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/docs-bulk.html">Documentation * on elastic.co */ @@ -359,7 +369,7 @@ public final BulkResponse bulk(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/docs-bulk.html">Documentation * on elastic.co */ @@ -374,7 +384,7 @@ public BulkResponse bulk() throws IOException, ElasticsearchException { * Explicitly clears the search context for a scroll. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/clear-scroll-api.html">Documentation * on elastic.co */ @@ -392,7 +402,7 @@ public ClearScrollResponse clearScroll(ClearScrollRequest request) throws IOExce * a function that initializes a builder to create the * {@link ClearScrollRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/clear-scroll-api.html">Documentation * on elastic.co */ @@ -406,7 +416,7 @@ public final ClearScrollResponse clearScroll( * Explicitly clears the search context for a scroll. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/clear-scroll-api.html">Documentation * on elastic.co */ @@ -421,7 +431,7 @@ public ClearScrollResponse clearScroll() throws IOException, ElasticsearchExcept * Close a point in time * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/point-in-time-api.html">Documentation * on elastic.co */ @@ -440,7 +450,7 @@ public ClosePointInTimeResponse closePointInTime(ClosePointInTimeRequest request * a function that initializes a builder to create the * {@link ClosePointInTimeRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/point-in-time-api.html">Documentation * on elastic.co */ @@ -1500,7 +1510,7 @@ public MtermvectorsResponse mtermvectors() throws IOException, ElasticsearchExce * Open a point in time that can be used in subsequent searches * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/point-in-time-api.html">Documentation * on elastic.co */ @@ -1519,7 +1529,7 @@ public OpenPointInTimeResponse openPointInTime(OpenPointInTimeRequest request) * a function that initializes a builder to create the * {@link OpenPointInTimeRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/point-in-time-api.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterDetails.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterDetails.java new file mode 100644 index 000000000..5b60019a7 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterDetails.java @@ -0,0 +1,311 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch._types; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +// typedef: _types.ClusterDetails + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ClusterDetails implements JsonpSerializable { + private final ClusterSearchStatus status; + + private final String indices; + + @Nullable + private final Long took; + + private final boolean timedOut; + + @Nullable + private final ShardStatistics shards; + + private final List failures; + + // --------------------------------------------------------------------------------------------- + + private ClusterDetails(Builder builder) { + + this.status = ApiTypeHelper.requireNonNull(builder.status, this, "status"); + this.indices = ApiTypeHelper.requireNonNull(builder.indices, this, "indices"); + this.took = builder.took; + this.timedOut = ApiTypeHelper.requireNonNull(builder.timedOut, this, "timedOut"); + this.shards = builder.shards; + this.failures = ApiTypeHelper.unmodifiable(builder.failures); + + } + + public static ClusterDetails of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code status} + */ + public final ClusterSearchStatus status() { + return this.status; + } + + /** + * Required - API name: {@code indices} + */ + public final String indices() { + return this.indices; + } + + /** + * API name: {@code took} + */ + @Nullable + public final Long took() { + return this.took; + } + + /** + * Required - API name: {@code timed_out} + */ + public final boolean timedOut() { + return this.timedOut; + } + + /** + * API name: {@code _shards} + */ + @Nullable + public final ShardStatistics shards() { + return this.shards; + } + + /** + * API name: {@code failures} + */ + public final List failures() { + return this.failures; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("status"); + this.status.serialize(generator, mapper); + generator.writeKey("indices"); + generator.write(this.indices); + + if (this.took != null) { + generator.writeKey("took"); + generator.write(this.took); + + } + generator.writeKey("timed_out"); + generator.write(this.timedOut); + + if (this.shards != null) { + generator.writeKey("_shards"); + this.shards.serialize(generator, mapper); + + } + if (ApiTypeHelper.isDefined(this.failures)) { + generator.writeKey("failures"); + generator.writeStartArray(); + for (ShardFailure item0 : this.failures) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ClusterDetails}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private ClusterSearchStatus status; + + private String indices; + + @Nullable + private Long took; + + private Boolean timedOut; + + @Nullable + private ShardStatistics shards; + + @Nullable + private List failures; + + /** + * Required - API name: {@code status} + */ + public final Builder status(ClusterSearchStatus value) { + this.status = value; + return this; + } + + /** + * Required - API name: {@code indices} + */ + public final Builder indices(String value) { + this.indices = value; + return this; + } + + /** + * API name: {@code took} + */ + public final Builder took(@Nullable Long value) { + this.took = value; + return this; + } + + /** + * Required - API name: {@code timed_out} + */ + public final Builder timedOut(boolean value) { + this.timedOut = value; + return this; + } + + /** + * API name: {@code _shards} + */ + public final Builder shards(@Nullable ShardStatistics value) { + this.shards = value; + return this; + } + + /** + * API name: {@code _shards} + */ + public final Builder shards(Function> fn) { + return this.shards(fn.apply(new ShardStatistics.Builder()).build()); + } + + /** + * API name: {@code failures} + *

+ * Adds all elements of list to failures. + */ + public final Builder failures(List list) { + this.failures = _listAddAll(this.failures, list); + return this; + } + + /** + * API name: {@code failures} + *

+ * Adds one or more values to failures. + */ + public final Builder failures(ShardFailure value, ShardFailure... values) { + this.failures = _listAdd(this.failures, value, values); + return this; + } + + /** + * API name: {@code failures} + *

+ * Adds a value to failures using a builder lambda. + */ + public final Builder failures(Function> fn) { + return failures(fn.apply(new ShardFailure.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ClusterDetails}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ClusterDetails build() { + _checkSingleUse(); + + return new ClusterDetails(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ClusterDetails} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + ClusterDetails::setupClusterDetailsDeserializer); + + protected static void setupClusterDetailsDeserializer(ObjectDeserializer op) { + + op.add(Builder::status, ClusterSearchStatus._DESERIALIZER, "status"); + op.add(Builder::indices, JsonpDeserializer.stringDeserializer(), "indices"); + op.add(Builder::took, JsonpDeserializer.longDeserializer(), "took"); + op.add(Builder::timedOut, JsonpDeserializer.booleanDeserializer(), "timed_out"); + op.add(Builder::shards, ShardStatistics._DESERIALIZER, "_shards"); + op.add(Builder::failures, JsonpDeserializer.arrayDeserializer(ShardFailure._DESERIALIZER), "failures"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterSearchStatus.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterSearchStatus.java new file mode 100644 index 000000000..07253da2c --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterSearchStatus.java @@ -0,0 +1,61 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch._types; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum ClusterSearchStatus implements JsonEnum { + Running("running"), + + Successful("successful"), + + Partial("partial"), + + Skipped("skipped"), + + Failed("failed"), + + ; + + private final String jsonValue; + + ClusterSearchStatus(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + ClusterSearchStatus.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterStatistics.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterStatistics.java index 7c730fdfd..58dcc2bda 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterStatistics.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterStatistics.java @@ -35,8 +35,11 @@ import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; +import java.lang.String; +import java.util.Map; import java.util.Objects; import java.util.function.Function; +import javax.annotation.Nullable; // typedef: _types.ClusterStatistics @@ -53,6 +56,14 @@ public class ClusterStatistics implements JsonpSerializable { private final int total; + private final int running; + + private final int partial; + + private final int failed; + + private final Map details; + // --------------------------------------------------------------------------------------------- private ClusterStatistics(Builder builder) { @@ -60,6 +71,10 @@ private ClusterStatistics(Builder builder) { this.skipped = ApiTypeHelper.requireNonNull(builder.skipped, this, "skipped"); this.successful = ApiTypeHelper.requireNonNull(builder.successful, this, "successful"); this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total"); + this.running = ApiTypeHelper.requireNonNull(builder.running, this, "running"); + this.partial = ApiTypeHelper.requireNonNull(builder.partial, this, "partial"); + this.failed = ApiTypeHelper.requireNonNull(builder.failed, this, "failed"); + this.details = ApiTypeHelper.unmodifiable(builder.details); } @@ -88,6 +103,34 @@ public final int total() { return this.total; } + /** + * Required - API name: {@code running} + */ + public final int running() { + return this.running; + } + + /** + * Required - API name: {@code partial} + */ + public final int partial() { + return this.partial; + } + + /** + * Required - API name: {@code failed} + */ + public final int failed() { + return this.failed; + } + + /** + * API name: {@code details} + */ + public final Map details() { + return this.details; + } + /** * Serialize this object to JSON. */ @@ -108,6 +151,27 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("total"); generator.write(this.total); + generator.writeKey("running"); + generator.write(this.running); + + generator.writeKey("partial"); + generator.write(this.partial); + + generator.writeKey("failed"); + generator.write(this.failed); + + if (ApiTypeHelper.isDefined(this.details)) { + generator.writeKey("details"); + generator.writeStartObject(); + for (Map.Entry item0 : this.details.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + } @Override @@ -128,6 +192,15 @@ public static class Builder extends WithJsonObjectBuilderBase implement private Integer total; + private Integer running; + + private Integer partial; + + private Integer failed; + + @Nullable + private Map details; + /** * Required - API name: {@code skipped} */ @@ -152,6 +225,59 @@ public final Builder total(int value) { return this; } + /** + * Required - API name: {@code running} + */ + public final Builder running(int value) { + this.running = value; + return this; + } + + /** + * Required - API name: {@code partial} + */ + public final Builder partial(int value) { + this.partial = value; + return this; + } + + /** + * Required - API name: {@code failed} + */ + public final Builder failed(int value) { + this.failed = value; + return this; + } + + /** + * API name: {@code details} + *

+ * Adds all entries of map to details. + */ + public final Builder details(Map map) { + this.details = _mapPutAll(this.details, map); + return this; + } + + /** + * API name: {@code details} + *

+ * Adds an entry to details. + */ + public final Builder details(String key, ClusterDetails value) { + this.details = _mapPut(this.details, key, value); + return this; + } + + /** + * API name: {@code details} + *

+ * Adds an entry to details using a builder lambda. + */ + public final Builder details(String key, Function> fn) { + return details(key, fn.apply(new ClusterDetails.Builder()).build()); + } + @Override protected Builder self() { return this; @@ -183,6 +309,10 @@ protected static void setupClusterStatisticsDeserializer(ObjectDeserializer filter; + @Nullable + private final Float similarity; + // --------------------------------------------------------------------------------------------- private KnnQuery(Builder builder) { @@ -79,6 +82,7 @@ private KnnQuery(Builder builder) { this.numCandidates = ApiTypeHelper.requireNonNull(builder.numCandidates, this, "numCandidates"); this.boost = builder.boost; this.filter = ApiTypeHelper.unmodifiable(builder.filter); + this.similarity = builder.similarity; } @@ -152,6 +156,16 @@ public final List filter() { return this.filter; } + /** + * The minimum similarity for a vector to be considered a match + *

+ * API name: {@code similarity} + */ + @Nullable + public final Float similarity() { + return this.similarity; + } + /** * Serialize this object to JSON. */ @@ -202,6 +216,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeEnd(); } + if (this.similarity != null) { + generator.writeKey("similarity"); + generator.write(this.similarity); + + } } @@ -235,6 +254,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private List filter; + @Nullable + private Float similarity; + /** * Required - The name of the vector field to search against *

@@ -356,6 +378,16 @@ public final Builder filter(Function> fn) { return filter(fn.apply(new Query.Builder()).build()); } + /** + * The minimum similarity for a vector to be considered a match + *

+ * API name: {@code similarity} + */ + public final Builder similarity(@Nullable Float value) { + this.similarity = value; + return this; + } + @Override protected Builder self() { return this; @@ -392,6 +424,7 @@ protected static void setupKnnQueryDeserializer(ObjectDeserializerDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/sort-search-results.html">Documentation * on elastic.co * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FrequentItemSetsField.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FrequentItemSetsField.java index 3439f164f..08351dc84 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FrequentItemSetsField.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FrequentItemSetsField.java @@ -35,7 +35,6 @@ import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; -import java.util.List; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -52,17 +51,19 @@ public class FrequentItemSetsField implements JsonpSerializable { private final String field; - private final List exclude; + @Nullable + private final TermsExclude exclude; - private final List include; + @Nullable + private final TermsInclude include; // --------------------------------------------------------------------------------------------- private FrequentItemSetsField(Builder builder) { this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); - this.exclude = ApiTypeHelper.unmodifiable(builder.exclude); - this.include = ApiTypeHelper.unmodifiable(builder.include); + this.exclude = builder.exclude; + this.include = builder.include; } @@ -83,7 +84,8 @@ public final String field() { *

* API name: {@code exclude} */ - public final List exclude() { + @Nullable + public final TermsExclude exclude() { return this.exclude; } @@ -93,7 +95,8 @@ public final List exclude() { *

* API name: {@code include} */ - public final List include() { + @Nullable + public final TermsInclude include() { return this.include; } @@ -111,24 +114,14 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("field"); generator.write(this.field); - if (ApiTypeHelper.isDefined(this.exclude)) { + if (this.exclude != null) { generator.writeKey("exclude"); - generator.writeStartArray(); - for (String item0 : this.exclude) { - generator.write(item0); - - } - generator.writeEnd(); + this.exclude.serialize(generator, mapper); } - if (ApiTypeHelper.isDefined(this.include)) { + if (this.include != null) { generator.writeKey("include"); - generator.writeStartArray(); - for (String item0 : this.include) { - generator.write(item0); - - } - generator.writeEnd(); + this.include.serialize(generator, mapper); } @@ -151,10 +144,10 @@ public static class Builder extends WithJsonObjectBuilderBase private String field; @Nullable - private List exclude; + private TermsExclude exclude; @Nullable - private List include; + private TermsInclude include; /** * Required - API name: {@code field} @@ -169,11 +162,9 @@ public final Builder field(String value) { * exact terms. *

* API name: {@code exclude} - *

- * Adds all elements of list to exclude. */ - public final Builder exclude(List list) { - this.exclude = _listAddAll(this.exclude, list); + public final Builder exclude(@Nullable TermsExclude value) { + this.exclude = value; return this; } @@ -182,12 +173,9 @@ public final Builder exclude(List list) { * exact terms. *

* API name: {@code exclude} - *

- * Adds one or more values to exclude. */ - public final Builder exclude(String value, String... values) { - this.exclude = _listAdd(this.exclude, value, values); - return this; + public final Builder exclude(Function> fn) { + return this.exclude(fn.apply(new TermsExclude.Builder()).build()); } /** @@ -195,11 +183,9 @@ public final Builder exclude(String value, String... values) { * exact terms. *

* API name: {@code include} - *

- * Adds all elements of list to include. */ - public final Builder include(List list) { - this.include = _listAddAll(this.include, list); + public final Builder include(@Nullable TermsInclude value) { + this.include = value; return this; } @@ -208,12 +194,9 @@ public final Builder include(List list) { * exact terms. *

* API name: {@code include} - *

- * Adds one or more values to include. */ - public final Builder include(String value, String... values) { - this.include = _listAdd(this.include, value, values); - return this; + public final Builder include(Function> fn) { + return this.include(fn.apply(new TermsInclude.Builder()).build()); } @Override @@ -245,10 +228,8 @@ public FrequentItemSetsField build() { protected static void setupFrequentItemSetsFieldDeserializer(ObjectDeserializer op) { op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field"); - op.add(Builder::exclude, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), - "exclude"); - op.add(Builder::include, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), - "include"); + op.add(Builder::exclude, TermsExclude._DESERIALIZER, "exclude"); + op.add(Builder::include, TermsInclude._DESERIALIZER, "include"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SignificantTextAggregation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SignificantTextAggregation.java index cbc22532b..d20b0adc6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SignificantTextAggregation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SignificantTextAggregation.java @@ -73,7 +73,8 @@ public class SignificantTextAggregation extends BucketAggregationBase implements @Nullable private final GoogleNormalizedDistanceHeuristic gnd; - private final List include; + @Nullable + private final TermsInclude include; @Nullable private final EmptyObject jlh; @@ -113,7 +114,7 @@ private SignificantTextAggregation(Builder builder) { this.field = builder.field; this.filterDuplicateText = builder.filterDuplicateText; this.gnd = builder.gnd; - this.include = ApiTypeHelper.unmodifiable(builder.include); + this.include = builder.include; this.jlh = builder.jlh; this.minDocCount = builder.minDocCount; this.mutualInformation = builder.mutualInformation; @@ -217,7 +218,8 @@ public final GoogleNormalizedDistanceHeuristic gnd() { *

* API name: {@code include} */ - public final List include() { + @Nullable + public final TermsInclude include() { return this.include; } @@ -356,14 +358,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { this.gnd.serialize(generator, mapper); } - if (ApiTypeHelper.isDefined(this.include)) { + if (this.include != null) { generator.writeKey("include"); - generator.writeStartArray(); - for (String item0 : this.include) { - generator.write(item0); - - } - generator.writeEnd(); + this.include.serialize(generator, mapper); } if (this.jlh != null) { @@ -450,7 +447,7 @@ public static class Builder extends BucketAggregationBase.AbstractBuilder include; + private TermsInclude include; @Nullable private EmptyObject jlh; @@ -597,11 +594,9 @@ public final Builder gnd( * Values to include. *

* API name: {@code include} - *

- * Adds all elements of list to include. */ - public final Builder include(List list) { - this.include = _listAddAll(this.include, list); + public final Builder include(@Nullable TermsInclude value) { + this.include = value; return this; } @@ -609,12 +604,9 @@ public final Builder include(List list) { * Values to include. *

* API name: {@code include} - *

- * Adds one or more values to include. */ - public final Builder include(String value, String... values) { - this.include = _listAdd(this.include, value, values); - return this; + public final Builder include(Function> fn) { + return this.include(fn.apply(new TermsInclude.Builder()).build()); } /** @@ -807,8 +799,7 @@ protected static void setupSignificantTextAggregationDeserializer( op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field"); op.add(Builder::filterDuplicateText, JsonpDeserializer.booleanDeserializer(), "filter_duplicate_text"); op.add(Builder::gnd, GoogleNormalizedDistanceHeuristic._DESERIALIZER, "gnd"); - op.add(Builder::include, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), - "include"); + op.add(Builder::include, TermsInclude._DESERIALIZER, "include"); op.add(Builder::jlh, EmptyObject._DESERIALIZER, "jlh"); op.add(Builder::minDocCount, JsonpDeserializer.longDeserializer(), "min_doc_count"); op.add(Builder::mutualInformation, MutualInformationHeuristic._DESERIALIZER, "mutual_information"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Normalizer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Normalizer.java index 3216902c6..688946e50 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Normalizer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Normalizer.java @@ -46,7 +46,7 @@ /** * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/analysis-normalizers.html">Documentation * on elastic.co * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PathHierarchyTokenizer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PathHierarchyTokenizer.java index df6c2034c..e10575b8a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PathHierarchyTokenizer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PathHierarchyTokenizer.java @@ -52,6 +52,7 @@ public class PathHierarchyTokenizer extends TokenizerBase implements TokenizerDe private final String delimiter; + @Nullable private final String replacement; private final boolean reverse; @@ -65,7 +66,7 @@ private PathHierarchyTokenizer(Builder builder) { this.bufferSize = ApiTypeHelper.requireNonNull(builder.bufferSize, this, "bufferSize"); this.delimiter = ApiTypeHelper.requireNonNull(builder.delimiter, this, "delimiter"); - this.replacement = ApiTypeHelper.requireNonNull(builder.replacement, this, "replacement"); + this.replacement = builder.replacement; this.reverse = ApiTypeHelper.requireNonNull(builder.reverse, this, "reverse"); this.skip = ApiTypeHelper.requireNonNull(builder.skip, this, "skip"); @@ -98,8 +99,9 @@ public final String delimiter() { } /** - * Required - API name: {@code replacement} + * API name: {@code replacement} */ + @Nullable public final String replacement() { return this.replacement; } @@ -128,9 +130,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("delimiter"); generator.write(this.delimiter); - generator.writeKey("replacement"); - generator.write(this.replacement); + if (this.replacement != null) { + generator.writeKey("replacement"); + generator.write(this.replacement); + } generator.writeKey("reverse"); generator.write(this.reverse); @@ -152,6 +156,7 @@ public static class Builder extends TokenizerBase.AbstractBuilder private String delimiter; + @Nullable private String replacement; private Boolean reverse; @@ -175,9 +180,9 @@ public final Builder delimiter(String value) { } /** - * Required - API name: {@code replacement} + * API name: {@code replacement} */ - public final Builder replacement(String value) { + public final Builder replacement(@Nullable String value) { this.replacement = value; return this; } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/FieldType.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/FieldType.java index 092eff417..10a8e77f5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/FieldType.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/FieldType.java @@ -116,6 +116,8 @@ public enum FieldType implements JsonEnum { DenseVector("dense_vector"), + SparseVector("sparse_vector"), + MatchOnlyText("match_only_text"), ; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/GeoShapeProperty.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/GeoShapeProperty.java index 6786ad75c..2a3046645 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/GeoShapeProperty.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/GeoShapeProperty.java @@ -42,7 +42,7 @@ * searching with arbitrary geo shapes such as rectangles and polygons. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/geo-shape.html">Documentation * on elastic.co * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/Property.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/Property.java index 38551035e..2c5854ec7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/Property.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/Property.java @@ -143,6 +143,8 @@ public enum Kind implements JsonEnum { Short("short"), + SparseVector("sparse_vector"), + Text("text"), TokenCount("token_count"), @@ -915,6 +917,23 @@ public ShortNumberProperty short_() { return TaggedUnionUtils.get(this, Kind.Short); } + /** + * Is this variant instance of kind {@code sparse_vector}? + */ + public boolean isSparseVector() { + return _kind == Kind.SparseVector; + } + + /** + * Get the {@code sparse_vector} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code sparse_vector} kind. + */ + public SparseVectorProperty sparseVector() { + return TaggedUnionUtils.get(this, Kind.SparseVector); + } + /** * Is this variant instance of kind {@code text}? */ @@ -1490,6 +1509,17 @@ public ObjectBuilder short_( return this.short_(fn.apply(new ShortNumberProperty.Builder()).build()); } + public ObjectBuilder sparseVector(SparseVectorProperty v) { + this._kind = Kind.SparseVector; + this._value = v; + return this; + } + + public ObjectBuilder sparseVector( + Function> fn) { + return this.sparseVector(fn.apply(new SparseVectorProperty.Builder()).build()); + } + public ObjectBuilder text(TextProperty v) { this._kind = Kind.Text; this._value = v; @@ -1609,6 +1639,7 @@ protected static void setupPropertyDeserializer(ObjectDeserializer op) op.add(Builder::searchAsYouType, SearchAsYouTypeProperty._DESERIALIZER, "search_as_you_type"); op.add(Builder::shape, ShapeProperty._DESERIALIZER, "shape"); op.add(Builder::short_, ShortNumberProperty._DESERIALIZER, "short"); + op.add(Builder::sparseVector, SparseVectorProperty._DESERIALIZER, "sparse_vector"); op.add(Builder::text, TextProperty._DESERIALIZER, "text"); op.add(Builder::tokenCount, TokenCountProperty._DESERIALIZER, "token_count"); op.add(Builder::unsignedLong, UnsignedLongNumberProperty._DESERIALIZER, "unsigned_long"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/PropertyBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/PropertyBuilders.java index 6c8ad3a6f..62d81dd58 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/PropertyBuilders.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/PropertyBuilders.java @@ -773,6 +773,25 @@ public static Property short_(Function> fn) { + Property.Builder builder = new Property.Builder(); + builder.sparseVector(fn.apply(new SparseVectorProperty.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link TextProperty text} {@code Property} variant. */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/ShapeProperty.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/ShapeProperty.java index c8a387138..a0d37dc9b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/ShapeProperty.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/ShapeProperty.java @@ -43,7 +43,7 @@ * polygons. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/shape.html">Documentation * on elastic.co * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/SparseVectorProperty.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/SparseVectorProperty.java new file mode 100644 index 000000000..b2ad7d218 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/SparseVectorProperty.java @@ -0,0 +1,113 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch._types.mapping; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +// typedef: _types.mapping.SparseVectorProperty + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SparseVectorProperty extends PropertyBase implements PropertyVariant { + // --------------------------------------------------------------------------------------------- + + private SparseVectorProperty(Builder builder) { + super(builder); + + } + + public static SparseVectorProperty of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Property variant kind. + */ + @Override + public Property.Kind _propertyKind() { + return Property.Kind.SparseVector; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "sparse_vector"); + super.serializeInternal(generator, mapper); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SparseVectorProperty}. + */ + + public static class Builder extends PropertyBase.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SparseVectorProperty}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SparseVectorProperty build() { + _checkSingleUse(); + + return new SparseVectorProperty(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SparseVectorProperty} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SparseVectorProperty::setupSparseVectorPropertyDeserializer); + + protected static void setupSparseVectorPropertyDeserializer(ObjectDeserializer op) { + PropertyBase.setupPropertyBaseDeserializer(op); + + op.ignore("type"); + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/Like.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/Like.java index 8f330b2f6..6dacaa83c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/Like.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/Like.java @@ -49,7 +49,7 @@ * the text. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/query-dsl-mlt-query.html#_document_input_parameters">Documentation * on elastic.co * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/Query.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/Query.java index ec61bd5fd..0c5685137 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/Query.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/Query.java @@ -50,7 +50,7 @@ /** * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/query-dsl.html">Documentation * on elastic.co * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/SimpleQueryStringFlags.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/SimpleQueryStringFlags.java deleted file mode 100644 index c28ca93b2..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/SimpleQueryStringFlags.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - -package co.elastic.clients.elasticsearch._types.query_dsl; - -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.json.UnionDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; -import co.elastic.clients.util.TaggedUnion; -import co.elastic.clients.util.TaggedUnionUtils; -import jakarta.json.stream.JsonGenerator; -import java.lang.Object; -import java.lang.String; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -// typedef: _types.query_dsl.SimpleQueryStringFlags - -/** - * Query flags can be either a single flag or a combination of flags, e.g. - * OR|AND|PREFIX - * - * @see Documentation - * on elastic.co - * @see API - * specification - */ -@JsonpDeserializable -public class SimpleQueryStringFlags implements TaggedUnion, JsonpSerializable { - - public enum Kind { - Single, Multiple - - } - - private final Kind _kind; - private final Object _value; - - @Override - public final Kind _kind() { - return _kind; - } - - @Override - public final Object _get() { - return _value; - } - - private SimpleQueryStringFlags(Kind kind, Object value) { - this._kind = kind; - this._value = value; - } - - public String _toJsonString() { - switch (_kind) { - case Single : - return this.single().jsonValue(); - case Multiple : - return this.multiple(); - - default : - throw new IllegalStateException("Unknown kind " + _kind); - } - } - - private SimpleQueryStringFlags(Builder builder) { - - this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); - this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); - - } - - public static SimpleQueryStringFlags of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Is this variant instance of kind {@code single}? - */ - public boolean isSingle() { - return _kind == Kind.Single; - } - - /** - * Get the {@code single} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code single} kind. - */ - public SimpleQueryStringFlag single() { - return TaggedUnionUtils.get(this, Kind.Single); - } - - /** - * Is this variant instance of kind {@code multiple}? - */ - public boolean isMultiple() { - return _kind == Kind.Multiple; - } - - /** - * Get the {@code multiple} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code multiple} kind. - */ - public String multiple() { - return TaggedUnionUtils.get(this, Kind.Multiple); - } - - @Override - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - if (_value instanceof JsonpSerializable) { - ((JsonpSerializable) _value).serialize(generator, mapper); - } else { - switch (_kind) { - case Multiple : - generator.write(((String) this._value)); - - break; - } - } - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Kind _kind; - private Object _value; - - public ObjectBuilder single(SimpleQueryStringFlag v) { - this._kind = Kind.Single; - this._value = v; - return this; - } - - public ObjectBuilder multiple(String v) { - this._kind = Kind.Multiple; - this._value = v; - return this; - } - - public SimpleQueryStringFlags build() { - _checkSingleUse(); - return new SimpleQueryStringFlags(this); - } - - } - - private static JsonpDeserializer buildSimpleQueryStringFlagsDeserializer() { - return new UnionDeserializer.Builder(SimpleQueryStringFlags::new, true) - .addMember(Kind.Single, SimpleQueryStringFlag._DESERIALIZER) - .addMember(Kind.Multiple, JsonpDeserializer.stringDeserializer()).build(); - } - - public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer - .lazy(SimpleQueryStringFlags::buildSimpleQueryStringFlagsDeserializer); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchResponseBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchResponseBase.java index 840403414..a8c39ebd0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchResponseBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchResponseBase.java @@ -68,6 +68,12 @@ public abstract class AsyncSearchResponseBase implements JsonpSerializable { private final long startTimeInMillis; + @Nullable + private final DateTime completionTime; + + @Nullable + private final Long completionTimeInMillis; + // --------------------------------------------------------------------------------------------- protected AsyncSearchResponseBase(AbstractBuilder builder) { @@ -80,6 +86,8 @@ protected AsyncSearchResponseBase(AbstractBuilder builder) { "expirationTimeInMillis"); this.startTime = builder.startTime; this.startTimeInMillis = ApiTypeHelper.requireNonNull(builder.startTimeInMillis, this, "startTimeInMillis"); + this.completionTime = builder.completionTime; + this.completionTimeInMillis = builder.completionTimeInMillis; } @@ -147,6 +155,25 @@ public final long startTimeInMillis() { return this.startTimeInMillis; } + /** + * Indicates when the async search completed. Only present when the search has + * completed. + *

+ * API name: {@code completion_time} + */ + @Nullable + public final DateTime completionTime() { + return this.completionTime; + } + + /** + * API name: {@code completion_time_in_millis} + */ + @Nullable + public final Long completionTimeInMillis() { + return this.completionTimeInMillis; + } + /** * Serialize this object to JSON. */ @@ -183,6 +210,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("start_time_in_millis"); generator.write(this.startTimeInMillis); + if (this.completionTime != null) { + generator.writeKey("completion_time"); + this.completionTime.serialize(generator, mapper); + } + if (this.completionTimeInMillis != null) { + generator.writeKey("completion_time_in_millis"); + generator.write(this.completionTimeInMillis); + + } + } @Override @@ -210,6 +247,12 @@ public abstract static class AbstractBuilder + * API name: {@code completion_time} + */ + public final BuilderT completionTime(@Nullable DateTime value) { + this.completionTime = value; + return self(); + } + + /** + * API name: {@code completion_time_in_millis} + */ + public final BuilderT completionTimeInMillis(@Nullable Long value) { + this.completionTimeInMillis = value; + return self(); + } + protected abstract BuilderT self(); } @@ -294,6 +356,9 @@ protected static > void setupAsyncSea "expiration_time_in_millis"); op.add(AbstractBuilder::startTime, DateTime._DESERIALIZER, "start_time"); op.add(AbstractBuilder::startTimeInMillis, JsonpDeserializer.longDeserializer(), "start_time_in_millis"); + op.add(AbstractBuilder::completionTime, DateTime._DESERIALIZER, "completion_time"); + op.add(AbstractBuilder::completionTimeInMillis, JsonpDeserializer.longDeserializer(), + "completion_time_in_millis"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/ElasticsearchAsyncSearchAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/ElasticsearchAsyncSearchAsyncClient.java index 92c6f667d..90555fcaa 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/ElasticsearchAsyncSearchAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/ElasticsearchAsyncSearchAsyncClient.java @@ -65,7 +65,7 @@ public ElasticsearchAsyncSearchAsyncClient withTransportOptions(@Nullable Transp * request will be cancelled. Otherwise, the saved search results are deleted. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -84,7 +84,7 @@ public CompletableFuture delete(DeleteAsyncSearchRequ * a function that initializes a builder to create the * {@link DeleteAsyncSearchRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -100,7 +100,7 @@ public final CompletableFuture delete( * its ID. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -122,7 +122,7 @@ public CompletableFuture> get(GetA * a function that initializes a builder to create the * {@link GetAsyncSearchRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -137,7 +137,7 @@ public final CompletableFuture> ge * its ID. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -159,7 +159,7 @@ public CompletableFuture> get(GetA * a function that initializes a builder to create the * {@link GetAsyncSearchRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -175,7 +175,7 @@ public final CompletableFuture> ge * ID. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -194,7 +194,7 @@ public CompletableFuture status(AsyncSearchStatusRequ * a function that initializes a builder to create the * {@link AsyncSearchStatusRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -209,7 +209,7 @@ public final CompletableFuture status( * Executes a search request asynchronously. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -230,7 +230,7 @@ public CompletableFuture> submit(SubmitReq * a function that initializes a builder to create the * {@link SubmitRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -243,7 +243,7 @@ public final CompletableFuture> submit( * Executes a search request asynchronously. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -263,7 +263,7 @@ public CompletableFuture> submit(SubmitReq * a function that initializes a builder to create the * {@link SubmitRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/ElasticsearchAsyncSearchClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/ElasticsearchAsyncSearchClient.java index 29f38aa17..7c6e2cb30 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/ElasticsearchAsyncSearchClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/ElasticsearchAsyncSearchClient.java @@ -64,7 +64,7 @@ public ElasticsearchAsyncSearchClient withTransportOptions(@Nullable TransportOp * request will be cancelled. Otherwise, the saved search results are deleted. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -84,7 +84,7 @@ public DeleteAsyncSearchResponse delete(DeleteAsyncSearchRequest request) * a function that initializes a builder to create the * {@link DeleteAsyncSearchRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -101,7 +101,7 @@ public final DeleteAsyncSearchResponse delete( * its ID. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -123,7 +123,7 @@ public GetAsyncSearchResponse get(GetAsyncSearchRequest r * a function that initializes a builder to create the * {@link GetAsyncSearchRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -138,7 +138,7 @@ public final GetAsyncSearchResponse get( * its ID. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -160,7 +160,7 @@ public GetAsyncSearchResponse get(GetAsyncSearchRequest r * a function that initializes a builder to create the * {@link GetAsyncSearchRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -177,7 +177,7 @@ public final GetAsyncSearchResponse get( * ID. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -197,7 +197,7 @@ public AsyncSearchStatusResponse status(AsyncSearchStatusRequest request) * a function that initializes a builder to create the * {@link AsyncSearchStatusRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -213,7 +213,7 @@ public final AsyncSearchStatusResponse status( * Executes a search request asynchronously. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -234,7 +234,7 @@ public SubmitResponse submit(SubmitRequest request, Class * a function that initializes a builder to create the * {@link SubmitRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -248,7 +248,7 @@ public final SubmitResponse submit( * Executes a search request asynchronously. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ @@ -269,7 +269,7 @@ public SubmitResponse submit(SubmitRequest request, Type * a function that initializes a builder to create the * {@link SubmitRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/status/StatusResponseBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/status/StatusResponseBase.java index eed6bcf01..a8764d67c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/status/StatusResponseBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/status/StatusResponseBase.java @@ -23,6 +23,7 @@ package co.elastic.clients.elasticsearch.async_search.status; +import co.elastic.clients.elasticsearch._types.ClusterStatistics; import co.elastic.clients.elasticsearch._types.ShardStatistics; import co.elastic.clients.elasticsearch.async_search.AsyncSearchResponseBase; import co.elastic.clients.json.JsonpDeserializable; @@ -51,6 +52,9 @@ public abstract class StatusResponseBase extends AsyncSearchResponseBase { private final ShardStatistics shards; + @Nullable + private final ClusterStatistics clusters; + @Nullable private final Integer completionStatus; @@ -60,6 +64,7 @@ protected StatusResponseBase(AbstractBuilder builder) { super(builder); this.shards = ApiTypeHelper.requireNonNull(builder.shards, this, "shards"); + this.clusters = builder.clusters; this.completionStatus = builder.completionStatus; } @@ -73,6 +78,17 @@ public final ShardStatistics shards() { return this.shards; } + /** + * Metadata about clusters involved in the cross-cluster search. Not shown for + * local-only searches. + *

+ * API name: {@code _clusters} + */ + @Nullable + public final ClusterStatistics clusters() { + return this.clusters; + } + /** * If the async search completed, this field shows the status code of the * search. For example, 200 indicates that the async search was successfully @@ -91,6 +107,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("_shards"); this.shards.serialize(generator, mapper); + if (this.clusters != null) { + generator.writeKey("_clusters"); + this.clusters.serialize(generator, mapper); + + } if (this.completionStatus != null) { generator.writeKey("completion_status"); generator.write(this.completionStatus); @@ -104,6 +125,9 @@ public abstract static class AbstractBuilder { private ShardStatistics shards; + @Nullable + private ClusterStatistics clusters; + @Nullable private Integer completionStatus; @@ -126,6 +150,27 @@ public final BuilderT shards(Function + * API name: {@code _clusters} + */ + public final BuilderT clusters(@Nullable ClusterStatistics value) { + this.clusters = value; + return self(); + } + + /** + * Metadata about clusters involved in the cross-cluster search. Not shown for + * local-only searches. + *

+ * API name: {@code _clusters} + */ + public final BuilderT clusters(Function> fn) { + return this.clusters(fn.apply(new ClusterStatistics.Builder()).build()); + } + /** * If the async search completed, this field shows the status code of the * search. For example, 200 indicates that the async search was successfully @@ -145,6 +190,7 @@ protected static > void setupStatusRe ObjectDeserializer op) { AsyncSearchResponseBase.setupAsyncSearchResponseBaseDeserializer(op); op.add(AbstractBuilder::shards, ShardStatistics._DESERIALIZER, "_shards"); + op.add(AbstractBuilder::clusters, ClusterStatistics._DESERIALIZER, "_clusters"); op.add(AbstractBuilder::completionStatus, JsonpDeserializer.integerDeserializer(), "completion_status"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingAsyncClient.java index 2f1933bc1..f31acb315 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingAsyncClient.java @@ -63,7 +63,7 @@ public ElasticsearchAutoscalingAsyncClient withTransportOptions(@Nullable Transp * Direct use is not supported. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-delete-autoscaling-policy.html">Documentation * on elastic.co */ @@ -83,7 +83,7 @@ public CompletableFuture deleteAutoscalingPolic * a function that initializes a builder to create the * {@link DeleteAutoscalingPolicyRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-delete-autoscaling-policy.html">Documentation * on elastic.co */ @@ -100,7 +100,7 @@ public final CompletableFuture deleteAutoscalin * supported. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-get-autoscaling-capacity.html">Documentation * on elastic.co */ public CompletableFuture getAutoscalingCapacity() { @@ -115,7 +115,7 @@ public CompletableFuture getAutoscalingCapacity( * ECK. Direct use is not supported. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-get-autoscaling-capacity.html">Documentation * on elastic.co */ @@ -134,7 +134,7 @@ public CompletableFuture getAutoscalingPolicy(GetA * a function that initializes a builder to create the * {@link GetAutoscalingPolicyRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-get-autoscaling-capacity.html">Documentation * on elastic.co */ @@ -150,7 +150,7 @@ public final CompletableFuture getAutoscalingPolic * ECK. Direct use is not supported. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-put-autoscaling-policy.html">Documentation * on elastic.co */ @@ -169,7 +169,7 @@ public CompletableFuture putAutoscalingPolicy(PutA * a function that initializes a builder to create the * {@link PutAutoscalingPolicyRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-put-autoscaling-policy.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingClient.java index 053cf8a31..cde839f78 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingClient.java @@ -62,7 +62,7 @@ public ElasticsearchAutoscalingClient withTransportOptions(@Nullable TransportOp * Direct use is not supported. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-delete-autoscaling-policy.html">Documentation * on elastic.co */ @@ -82,7 +82,7 @@ public DeleteAutoscalingPolicyResponse deleteAutoscalingPolicy(DeleteAutoscaling * a function that initializes a builder to create the * {@link DeleteAutoscalingPolicyRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-delete-autoscaling-policy.html">Documentation * on elastic.co */ @@ -100,7 +100,7 @@ public final DeleteAutoscalingPolicyResponse deleteAutoscalingPolicy( * supported. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-get-autoscaling-capacity.html">Documentation * on elastic.co */ public GetAutoscalingCapacityResponse getAutoscalingCapacity() throws IOException, ElasticsearchException { @@ -115,7 +115,7 @@ public GetAutoscalingCapacityResponse getAutoscalingCapacity() throws IOExceptio * ECK. Direct use is not supported. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-get-autoscaling-capacity.html">Documentation * on elastic.co */ @@ -135,7 +135,7 @@ public GetAutoscalingPolicyResponse getAutoscalingPolicy(GetAutoscalingPolicyReq * a function that initializes a builder to create the * {@link GetAutoscalingPolicyRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-get-autoscaling-capacity.html">Documentation * on elastic.co */ @@ -152,7 +152,7 @@ public final GetAutoscalingPolicyResponse getAutoscalingPolicy( * ECK. Direct use is not supported. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-put-autoscaling-policy.html">Documentation * on elastic.co */ @@ -172,7 +172,7 @@ public PutAutoscalingPolicyResponse putAutoscalingPolicy(PutAutoscalingPolicyReq * a function that initializes a builder to create the * {@link PutAutoscalingPolicyRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-put-autoscaling-policy.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatAsyncClient.java index 2fb991eb6..673a18228 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatAsyncClient.java @@ -60,7 +60,7 @@ public ElasticsearchCatAsyncClient withTransportOptions(@Nullable TransportOptio * filter and routing infos. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-alias.html">Documentation * on elastic.co */ @@ -79,7 +79,7 @@ public CompletableFuture aliases(AliasesRequest request) { * a function that initializes a builder to create the * {@link AliasesRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-alias.html">Documentation * on elastic.co */ @@ -93,7 +93,7 @@ public final CompletableFuture aliases( * filter and routing infos. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-alias.html">Documentation * on elastic.co */ @@ -109,7 +109,7 @@ public CompletableFuture aliases() { * how much disk space they are using. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-allocation.html">Documentation * on elastic.co */ @@ -128,7 +128,7 @@ public CompletableFuture allocation(AllocationRequest reques * a function that initializes a builder to create the * {@link AllocationRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-allocation.html">Documentation * on elastic.co */ @@ -142,7 +142,7 @@ public final CompletableFuture allocation( * how much disk space they are using. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-allocation.html">Documentation * on elastic.co */ @@ -204,7 +204,7 @@ public CompletableFuture componentTemplates() { * individual indices. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-count.html">Documentation * on elastic.co */ @@ -223,7 +223,7 @@ public CompletableFuture count(CountRequest request) { * a function that initializes a builder to create the * {@link CountRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-count.html">Documentation * on elastic.co */ @@ -237,7 +237,7 @@ public final CompletableFuture count( * individual indices. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-count.html">Documentation * on elastic.co */ @@ -253,7 +253,7 @@ public CompletableFuture count() { * node in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-fielddata.html">Documentation * on elastic.co */ @@ -272,7 +272,7 @@ public CompletableFuture fielddata(FielddataRequest request) * a function that initializes a builder to create the * {@link FielddataRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-fielddata.html">Documentation * on elastic.co */ @@ -286,7 +286,7 @@ public final CompletableFuture fielddata( * node in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-fielddata.html">Documentation * on elastic.co */ @@ -301,7 +301,7 @@ public CompletableFuture fielddata() { * Returns a concise representation of the cluster health. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-health.html">Documentation * on elastic.co */ @@ -319,7 +319,7 @@ public CompletableFuture health(HealthRequest request) { * a function that initializes a builder to create the * {@link HealthRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-health.html">Documentation * on elastic.co */ @@ -332,7 +332,7 @@ public final CompletableFuture health( * Returns a concise representation of the cluster health. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-health.html">Documentation * on elastic.co */ @@ -347,7 +347,7 @@ public CompletableFuture health() { * Returns help for the Cat APIs. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat.html">Documentation * on elastic.co */ public CompletableFuture help() { @@ -361,7 +361,7 @@ public CompletableFuture help() { * counts, disk size, ... * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-indices.html">Documentation * on elastic.co */ @@ -380,7 +380,7 @@ public CompletableFuture indices(IndicesRequest request) { * a function that initializes a builder to create the * {@link IndicesRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-indices.html">Documentation * on elastic.co */ @@ -394,7 +394,7 @@ public final CompletableFuture indices( * counts, disk size, ... * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-indices.html">Documentation * on elastic.co */ @@ -409,7 +409,7 @@ public CompletableFuture indices() { * Returns information about the master node. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-master.html">Documentation * on elastic.co */ public CompletableFuture master() { @@ -423,7 +423,7 @@ public CompletableFuture master() { * Gets configuration and usage information about data frame analytics jobs. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-dfanalytics.html">Documentation * on elastic.co */ @@ -441,7 +441,7 @@ public CompletableFuture mlDataFrameAnalytics(MlDa * a function that initializes a builder to create the * {@link MlDataFrameAnalyticsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-dfanalytics.html">Documentation * on elastic.co */ @@ -454,7 +454,7 @@ public final CompletableFuture mlDataFrameAnalytic * Gets configuration and usage information about data frame analytics jobs. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-dfanalytics.html">Documentation * on elastic.co */ @@ -469,7 +469,7 @@ public CompletableFuture mlDataFrameAnalytics() { * Gets configuration and usage information about datafeeds. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-datafeeds.html">Documentation * on elastic.co */ @@ -487,7 +487,7 @@ public CompletableFuture mlDatafeeds(MlDatafeedsRequest req * a function that initializes a builder to create the * {@link MlDatafeedsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-datafeeds.html">Documentation * on elastic.co */ @@ -500,7 +500,7 @@ public final CompletableFuture mlDatafeeds( * Gets configuration and usage information about datafeeds. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-datafeeds.html">Documentation * on elastic.co */ @@ -515,7 +515,7 @@ public CompletableFuture mlDatafeeds() { * Gets configuration and usage information about anomaly detection jobs. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-anomaly-detectors.html">Documentation * on elastic.co */ @@ -533,7 +533,7 @@ public CompletableFuture mlJobs(MlJobsRequest request) { * a function that initializes a builder to create the * {@link MlJobsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-anomaly-detectors.html">Documentation * on elastic.co */ @@ -546,7 +546,7 @@ public final CompletableFuture mlJobs( * Gets configuration and usage information about anomaly detection jobs. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-anomaly-detectors.html">Documentation * on elastic.co */ @@ -561,7 +561,7 @@ public CompletableFuture mlJobs() { * Gets configuration and usage information about inference trained models. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-trained-model.html">Documentation * on elastic.co */ @@ -579,7 +579,7 @@ public CompletableFuture mlTrainedModels(MlTrainedModel * a function that initializes a builder to create the * {@link MlTrainedModelsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-trained-model.html">Documentation * on elastic.co */ @@ -592,7 +592,7 @@ public final CompletableFuture mlTrainedModels( * Gets configuration and usage information about inference trained models. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-trained-model.html">Documentation * on elastic.co */ @@ -607,7 +607,7 @@ public CompletableFuture mlTrainedModels() { * Returns information about custom node attributes. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-nodeattrs.html">Documentation * on elastic.co */ public CompletableFuture nodeattrs() { @@ -621,7 +621,7 @@ public CompletableFuture nodeattrs() { * Returns basic statistics about performance of cluster nodes. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-nodes.html">Documentation * on elastic.co */ @@ -639,7 +639,7 @@ public CompletableFuture nodes(NodesRequest request) { * a function that initializes a builder to create the * {@link NodesRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-nodes.html">Documentation * on elastic.co */ @@ -652,7 +652,7 @@ public final CompletableFuture nodes( * Returns basic statistics about performance of cluster nodes. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-nodes.html">Documentation * on elastic.co */ @@ -667,7 +667,7 @@ public CompletableFuture nodes() { * Returns a concise representation of the cluster pending tasks. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-pending-tasks.html">Documentation * on elastic.co */ public CompletableFuture pendingTasks() { @@ -681,7 +681,7 @@ public CompletableFuture pendingTasks() { * Returns information about installed plugins across nodes node. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-plugins.html">Documentation * on elastic.co */ public CompletableFuture plugins() { @@ -695,7 +695,7 @@ public CompletableFuture plugins() { * Returns information about index shard recoveries, both on-going completed. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-recovery.html">Documentation * on elastic.co */ @@ -713,7 +713,7 @@ public CompletableFuture recovery(RecoveryRequest request) { * a function that initializes a builder to create the * {@link RecoveryRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-recovery.html">Documentation * on elastic.co */ @@ -726,7 +726,7 @@ public final CompletableFuture recovery( * Returns information about index shard recoveries, both on-going completed. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-recovery.html">Documentation * on elastic.co */ @@ -741,7 +741,7 @@ public CompletableFuture recovery() { * Returns information about snapshot repositories registered in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-repositories.html">Documentation * on elastic.co */ public CompletableFuture repositories() { @@ -755,7 +755,7 @@ public CompletableFuture repositories() { * Provides low-level information about the segments in the shards of an index. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-segments.html">Documentation * on elastic.co */ @@ -773,7 +773,7 @@ public CompletableFuture segments(SegmentsRequest request) { * a function that initializes a builder to create the * {@link SegmentsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-segments.html">Documentation * on elastic.co */ @@ -786,7 +786,7 @@ public final CompletableFuture segments( * Provides low-level information about the segments in the shards of an index. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-segments.html">Documentation * on elastic.co */ @@ -801,7 +801,7 @@ public CompletableFuture segments() { * Provides a detailed view of shard allocation on nodes. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-shards.html">Documentation * on elastic.co */ @@ -819,7 +819,7 @@ public CompletableFuture shards(ShardsRequest request) { * a function that initializes a builder to create the * {@link ShardsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-shards.html">Documentation * on elastic.co */ @@ -832,7 +832,7 @@ public final CompletableFuture shards( * Provides a detailed view of shard allocation on nodes. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-shards.html">Documentation * on elastic.co */ @@ -847,7 +847,7 @@ public CompletableFuture shards() { * Returns all snapshots in a specific repository. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-snapshots.html">Documentation * on elastic.co */ @@ -865,7 +865,7 @@ public CompletableFuture snapshots(SnapshotsRequest request) * a function that initializes a builder to create the * {@link SnapshotsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-snapshots.html">Documentation * on elastic.co */ @@ -878,7 +878,7 @@ public final CompletableFuture snapshots( * Returns all snapshots in a specific repository. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-snapshots.html">Documentation * on elastic.co */ @@ -894,7 +894,7 @@ public CompletableFuture snapshots() { * in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ @@ -913,7 +913,7 @@ public CompletableFuture tasks(TasksRequest request) { * a function that initializes a builder to create the * {@link TasksRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ @@ -927,7 +927,7 @@ public final CompletableFuture tasks( * in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ @@ -942,7 +942,7 @@ public CompletableFuture tasks() { * Returns information about existing templates. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-templates.html">Documentation * on elastic.co */ @@ -960,7 +960,7 @@ public CompletableFuture templates(TemplatesRequest request) * a function that initializes a builder to create the * {@link TemplatesRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-templates.html">Documentation * on elastic.co */ @@ -973,7 +973,7 @@ public final CompletableFuture templates( * Returns information about existing templates. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-templates.html">Documentation * on elastic.co */ @@ -989,7 +989,7 @@ public CompletableFuture templates() { * queue and rejected statistics are returned for all thread pools. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-thread-pool.html">Documentation * on elastic.co */ @@ -1008,7 +1008,7 @@ public CompletableFuture threadPool(ThreadPoolRequest reques * a function that initializes a builder to create the * {@link ThreadPoolRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-thread-pool.html">Documentation * on elastic.co */ @@ -1022,7 +1022,7 @@ public final CompletableFuture threadPool( * queue and rejected statistics are returned for all thread pools. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-thread-pool.html">Documentation * on elastic.co */ @@ -1037,7 +1037,7 @@ public CompletableFuture threadPool() { * Gets configuration and usage information about transforms. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-transforms.html">Documentation * on elastic.co */ @@ -1055,7 +1055,7 @@ public CompletableFuture transforms(TransformsRequest reques * a function that initializes a builder to create the * {@link TransformsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-transforms.html">Documentation * on elastic.co */ @@ -1068,7 +1068,7 @@ public final CompletableFuture transforms( * Gets configuration and usage information about transforms. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-transforms.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatClient.java index a5c9d91a9..471feb1ba 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatClient.java @@ -61,7 +61,7 @@ public ElasticsearchCatClient withTransportOptions(@Nullable TransportOptions tr * filter and routing infos. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-alias.html">Documentation * on elastic.co */ @@ -80,7 +80,7 @@ public AliasesResponse aliases(AliasesRequest request) throws IOException, Elast * a function that initializes a builder to create the * {@link AliasesRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-alias.html">Documentation * on elastic.co */ @@ -94,7 +94,7 @@ public final AliasesResponse aliases(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-alias.html">Documentation * on elastic.co */ @@ -110,7 +110,7 @@ public AliasesResponse aliases() throws IOException, ElasticsearchException { * how much disk space they are using. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-allocation.html">Documentation * on elastic.co */ @@ -129,7 +129,7 @@ public AllocationResponse allocation(AllocationRequest request) throws IOExcepti * a function that initializes a builder to create the * {@link AllocationRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-allocation.html">Documentation * on elastic.co */ @@ -143,7 +143,7 @@ public final AllocationResponse allocation(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-allocation.html">Documentation * on elastic.co */ @@ -207,7 +207,7 @@ public ComponentTemplatesResponse componentTemplates() throws IOException, Elast * individual indices. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-count.html">Documentation * on elastic.co */ @@ -226,7 +226,7 @@ public CountResponse count(CountRequest request) throws IOException, Elasticsear * a function that initializes a builder to create the * {@link CountRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-count.html">Documentation * on elastic.co */ @@ -240,7 +240,7 @@ public final CountResponse count(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-count.html">Documentation * on elastic.co */ @@ -256,7 +256,7 @@ public CountResponse count() throws IOException, ElasticsearchException { * node in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-fielddata.html">Documentation * on elastic.co */ @@ -275,7 +275,7 @@ public FielddataResponse fielddata(FielddataRequest request) throws IOException, * a function that initializes a builder to create the * {@link FielddataRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-fielddata.html">Documentation * on elastic.co */ @@ -289,7 +289,7 @@ public final FielddataResponse fielddata(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-fielddata.html">Documentation * on elastic.co */ @@ -304,7 +304,7 @@ public FielddataResponse fielddata() throws IOException, ElasticsearchException * Returns a concise representation of the cluster health. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-health.html">Documentation * on elastic.co */ @@ -322,7 +322,7 @@ public HealthResponse health(HealthRequest request) throws IOException, Elastics * a function that initializes a builder to create the * {@link HealthRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-health.html">Documentation * on elastic.co */ @@ -335,7 +335,7 @@ public final HealthResponse health(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-health.html">Documentation * on elastic.co */ @@ -350,7 +350,7 @@ public HealthResponse health() throws IOException, ElasticsearchException { * Returns help for the Cat APIs. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat.html">Documentation * on elastic.co */ public HelpResponse help() throws IOException, ElasticsearchException { @@ -364,7 +364,7 @@ public HelpResponse help() throws IOException, ElasticsearchException { * counts, disk size, ... * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-indices.html">Documentation * on elastic.co */ @@ -383,7 +383,7 @@ public IndicesResponse indices(IndicesRequest request) throws IOException, Elast * a function that initializes a builder to create the * {@link IndicesRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-indices.html">Documentation * on elastic.co */ @@ -397,7 +397,7 @@ public final IndicesResponse indices(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-indices.html">Documentation * on elastic.co */ @@ -412,7 +412,7 @@ public IndicesResponse indices() throws IOException, ElasticsearchException { * Returns information about the master node. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-master.html">Documentation * on elastic.co */ public MasterResponse master() throws IOException, ElasticsearchException { @@ -425,7 +425,7 @@ public MasterResponse master() throws IOException, ElasticsearchException { * Gets configuration and usage information about data frame analytics jobs. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-dfanalytics.html">Documentation * on elastic.co */ @@ -444,7 +444,7 @@ public MlDataFrameAnalyticsResponse mlDataFrameAnalytics(MlDataFrameAnalyticsReq * a function that initializes a builder to create the * {@link MlDataFrameAnalyticsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-dfanalytics.html">Documentation * on elastic.co */ @@ -458,7 +458,7 @@ public final MlDataFrameAnalyticsResponse mlDataFrameAnalytics( * Gets configuration and usage information about data frame analytics jobs. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-dfanalytics.html">Documentation * on elastic.co */ @@ -473,7 +473,7 @@ public MlDataFrameAnalyticsResponse mlDataFrameAnalytics() throws IOException, E * Gets configuration and usage information about datafeeds. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-datafeeds.html">Documentation * on elastic.co */ @@ -491,7 +491,7 @@ public MlDatafeedsResponse mlDatafeeds(MlDatafeedsRequest request) throws IOExce * a function that initializes a builder to create the * {@link MlDatafeedsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-datafeeds.html">Documentation * on elastic.co */ @@ -505,7 +505,7 @@ public final MlDatafeedsResponse mlDatafeeds( * Gets configuration and usage information about datafeeds. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-datafeeds.html">Documentation * on elastic.co */ @@ -520,7 +520,7 @@ public MlDatafeedsResponse mlDatafeeds() throws IOException, ElasticsearchExcept * Gets configuration and usage information about anomaly detection jobs. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-anomaly-detectors.html">Documentation * on elastic.co */ @@ -538,7 +538,7 @@ public MlJobsResponse mlJobs(MlJobsRequest request) throws IOException, Elastics * a function that initializes a builder to create the * {@link MlJobsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-anomaly-detectors.html">Documentation * on elastic.co */ @@ -551,7 +551,7 @@ public final MlJobsResponse mlJobs(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-anomaly-detectors.html">Documentation * on elastic.co */ @@ -566,7 +566,7 @@ public MlJobsResponse mlJobs() throws IOException, ElasticsearchException { * Gets configuration and usage information about inference trained models. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-trained-model.html">Documentation * on elastic.co */ @@ -585,7 +585,7 @@ public MlTrainedModelsResponse mlTrainedModels(MlTrainedModelsRequest request) * a function that initializes a builder to create the * {@link MlTrainedModelsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-trained-model.html">Documentation * on elastic.co */ @@ -599,7 +599,7 @@ public final MlTrainedModelsResponse mlTrainedModels( * Gets configuration and usage information about inference trained models. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-trained-model.html">Documentation * on elastic.co */ @@ -614,7 +614,7 @@ public MlTrainedModelsResponse mlTrainedModels() throws IOException, Elasticsear * Returns information about custom node attributes. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-nodeattrs.html">Documentation * on elastic.co */ public NodeattrsResponse nodeattrs() throws IOException, ElasticsearchException { @@ -628,7 +628,7 @@ public NodeattrsResponse nodeattrs() throws IOException, ElasticsearchException * Returns basic statistics about performance of cluster nodes. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-nodes.html">Documentation * on elastic.co */ @@ -646,7 +646,7 @@ public NodesResponse nodes(NodesRequest request) throws IOException, Elasticsear * a function that initializes a builder to create the * {@link NodesRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-nodes.html">Documentation * on elastic.co */ @@ -659,7 +659,7 @@ public final NodesResponse nodes(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-nodes.html">Documentation * on elastic.co */ @@ -674,7 +674,7 @@ public NodesResponse nodes() throws IOException, ElasticsearchException { * Returns a concise representation of the cluster pending tasks. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-pending-tasks.html">Documentation * on elastic.co */ public PendingTasksResponse pendingTasks() throws IOException, ElasticsearchException { @@ -688,7 +688,7 @@ public PendingTasksResponse pendingTasks() throws IOException, ElasticsearchExce * Returns information about installed plugins across nodes node. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-plugins.html">Documentation * on elastic.co */ public PluginsResponse plugins() throws IOException, ElasticsearchException { @@ -701,7 +701,7 @@ public PluginsResponse plugins() throws IOException, ElasticsearchException { * Returns information about index shard recoveries, both on-going completed. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-recovery.html">Documentation * on elastic.co */ @@ -719,7 +719,7 @@ public RecoveryResponse recovery(RecoveryRequest request) throws IOException, El * a function that initializes a builder to create the * {@link RecoveryRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-recovery.html">Documentation * on elastic.co */ @@ -732,7 +732,7 @@ public final RecoveryResponse recovery(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-recovery.html">Documentation * on elastic.co */ @@ -747,7 +747,7 @@ public RecoveryResponse recovery() throws IOException, ElasticsearchException { * Returns information about snapshot repositories registered in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-repositories.html">Documentation * on elastic.co */ public RepositoriesResponse repositories() throws IOException, ElasticsearchException { @@ -761,7 +761,7 @@ public RepositoriesResponse repositories() throws IOException, ElasticsearchExce * Provides low-level information about the segments in the shards of an index. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-segments.html">Documentation * on elastic.co */ @@ -779,7 +779,7 @@ public SegmentsResponse segments(SegmentsRequest request) throws IOException, El * a function that initializes a builder to create the * {@link SegmentsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-segments.html">Documentation * on elastic.co */ @@ -792,7 +792,7 @@ public final SegmentsResponse segments(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-segments.html">Documentation * on elastic.co */ @@ -807,7 +807,7 @@ public SegmentsResponse segments() throws IOException, ElasticsearchException { * Provides a detailed view of shard allocation on nodes. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-shards.html">Documentation * on elastic.co */ @@ -825,7 +825,7 @@ public ShardsResponse shards(ShardsRequest request) throws IOException, Elastics * a function that initializes a builder to create the * {@link ShardsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-shards.html">Documentation * on elastic.co */ @@ -838,7 +838,7 @@ public final ShardsResponse shards(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-shards.html">Documentation * on elastic.co */ @@ -853,7 +853,7 @@ public ShardsResponse shards() throws IOException, ElasticsearchException { * Returns all snapshots in a specific repository. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-snapshots.html">Documentation * on elastic.co */ @@ -871,7 +871,7 @@ public SnapshotsResponse snapshots(SnapshotsRequest request) throws IOException, * a function that initializes a builder to create the * {@link SnapshotsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-snapshots.html">Documentation * on elastic.co */ @@ -884,7 +884,7 @@ public final SnapshotsResponse snapshots(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-snapshots.html">Documentation * on elastic.co */ @@ -900,7 +900,7 @@ public SnapshotsResponse snapshots() throws IOException, ElasticsearchException * in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ @@ -919,7 +919,7 @@ public TasksResponse tasks(TasksRequest request) throws IOException, Elasticsear * a function that initializes a builder to create the * {@link TasksRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ @@ -933,7 +933,7 @@ public final TasksResponse tasks(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ @@ -948,7 +948,7 @@ public TasksResponse tasks() throws IOException, ElasticsearchException { * Returns information about existing templates. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-templates.html">Documentation * on elastic.co */ @@ -966,7 +966,7 @@ public TemplatesResponse templates(TemplatesRequest request) throws IOException, * a function that initializes a builder to create the * {@link TemplatesRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-templates.html">Documentation * on elastic.co */ @@ -979,7 +979,7 @@ public final TemplatesResponse templates(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-templates.html">Documentation * on elastic.co */ @@ -995,7 +995,7 @@ public TemplatesResponse templates() throws IOException, ElasticsearchException * queue and rejected statistics are returned for all thread pools. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-thread-pool.html">Documentation * on elastic.co */ @@ -1014,7 +1014,7 @@ public ThreadPoolResponse threadPool(ThreadPoolRequest request) throws IOExcepti * a function that initializes a builder to create the * {@link ThreadPoolRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-thread-pool.html">Documentation * on elastic.co */ @@ -1028,7 +1028,7 @@ public final ThreadPoolResponse threadPool(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-thread-pool.html">Documentation * on elastic.co */ @@ -1043,7 +1043,7 @@ public ThreadPoolResponse threadPool() throws IOException, ElasticsearchExceptio * Gets configuration and usage information about transforms. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-transforms.html">Documentation * on elastic.co */ @@ -1061,7 +1061,7 @@ public TransformsResponse transforms(TransformsRequest request) throws IOExcepti * a function that initializes a builder to create the * {@link TransformsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-transforms.html">Documentation * on elastic.co */ @@ -1074,7 +1074,7 @@ public final TransformsResponse transforms(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-transforms.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ElasticsearchCcrAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ElasticsearchCcrAsyncClient.java index e4c636d24..971248929 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ElasticsearchCcrAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ElasticsearchCcrAsyncClient.java @@ -59,7 +59,7 @@ public ElasticsearchCcrAsyncClient withTransportOptions(@Nullable TransportOptio * Deletes auto-follow patterns. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-delete-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -78,7 +78,7 @@ public CompletableFuture deleteAutoFollowPatter * a function that initializes a builder to create the * {@link DeleteAutoFollowPatternRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-delete-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -94,7 +94,7 @@ public final CompletableFuture deleteAutoFollow * index. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-put-follow.html">Documentation * on elastic.co */ @@ -113,7 +113,7 @@ public CompletableFuture follow(FollowRequest request) { * a function that initializes a builder to create the * {@link FollowRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-put-follow.html">Documentation * on elastic.co */ @@ -129,7 +129,7 @@ public final CompletableFuture follow( * status for each follower index * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-get-follow-info.html">Documentation * on elastic.co */ @@ -148,7 +148,7 @@ public CompletableFuture followInfo(FollowInfoRequest reques * a function that initializes a builder to create the * {@link FollowInfoRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-get-follow-info.html">Documentation * on elastic.co */ @@ -164,7 +164,7 @@ public final CompletableFuture followInfo( * associated with each shard for the specified indices. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-get-follow-stats.html">Documentation * on elastic.co */ @@ -183,7 +183,7 @@ public CompletableFuture followStats(FollowStatsRequest req * a function that initializes a builder to create the * {@link FollowStatsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-get-follow-stats.html">Documentation * on elastic.co */ @@ -198,7 +198,7 @@ public final CompletableFuture followStats( * Removes the follower retention leases from the leader. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-post-forget-follower.html">Documentation * on elastic.co */ @@ -216,7 +216,7 @@ public CompletableFuture forgetFollower(ForgetFollowerRe * a function that initializes a builder to create the * {@link ForgetFollowerRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-post-forget-follower.html">Documentation * on elastic.co */ @@ -232,7 +232,7 @@ public final CompletableFuture forgetFollower( * pattern collection. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-get-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -251,7 +251,7 @@ public CompletableFuture getAutoFollowPattern(GetA * a function that initializes a builder to create the * {@link GetAutoFollowPatternRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-get-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -265,7 +265,7 @@ public final CompletableFuture getAutoFollowPatter * pattern collection. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-get-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -280,7 +280,7 @@ public CompletableFuture getAutoFollowPattern() { * Pauses an auto-follow pattern * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-pause-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -299,7 +299,7 @@ public CompletableFuture pauseAutoFollowPattern( * a function that initializes a builder to create the * {@link PauseAutoFollowPatternRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-pause-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -315,7 +315,7 @@ public final CompletableFuture pauseAutoFollowPa * operations from the leader index. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-post-pause-follow.html">Documentation * on elastic.co */ @@ -334,7 +334,7 @@ public CompletableFuture pauseFollow(PauseFollowRequest req * a function that initializes a builder to create the * {@link PauseFollowRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-post-pause-follow.html">Documentation * on elastic.co */ @@ -351,7 +351,7 @@ public final CompletableFuture pauseFollow( * the specified patterns will be automatically configured as follower indices. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-put-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -371,7 +371,7 @@ public CompletableFuture putAutoFollowPattern(PutA * a function that initializes a builder to create the * {@link PutAutoFollowPatternRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-put-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -386,7 +386,7 @@ public final CompletableFuture putAutoFollowPatter * Resumes an auto-follow pattern that has been paused * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-resume-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -405,7 +405,7 @@ public CompletableFuture resumeAutoFollowPatter * a function that initializes a builder to create the * {@link ResumeAutoFollowPatternRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-resume-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -420,7 +420,7 @@ public final CompletableFuture resumeAutoFollow * Resumes a follower index that has been paused * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-post-resume-follow.html">Documentation * on elastic.co */ @@ -438,7 +438,7 @@ public CompletableFuture resumeFollow(ResumeFollowRequest * a function that initializes a builder to create the * {@link ResumeFollowRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-post-resume-follow.html">Documentation * on elastic.co */ @@ -453,7 +453,7 @@ public final CompletableFuture resumeFollow( * Gets all stats related to cross-cluster replication. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-get-stats.html">Documentation * on elastic.co */ public CompletableFuture stats() { @@ -468,7 +468,7 @@ public CompletableFuture stats() { * metadata and settings associated with cross-cluster replication. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-post-unfollow.html">Documentation * on elastic.co */ @@ -487,7 +487,7 @@ public CompletableFuture unfollow(UnfollowRequest request) { * a function that initializes a builder to create the * {@link UnfollowRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-post-unfollow.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ElasticsearchCcrClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ElasticsearchCcrClient.java index 75e677285..35f467715 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ElasticsearchCcrClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ElasticsearchCcrClient.java @@ -60,7 +60,7 @@ public ElasticsearchCcrClient withTransportOptions(@Nullable TransportOptions tr * Deletes auto-follow patterns. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-delete-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -79,7 +79,7 @@ public DeleteAutoFollowPatternResponse deleteAutoFollowPattern(DeleteAutoFollowP * a function that initializes a builder to create the * {@link DeleteAutoFollowPatternRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-delete-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -96,7 +96,7 @@ public final DeleteAutoFollowPatternResponse deleteAutoFollowPattern( * index. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-put-follow.html">Documentation * on elastic.co */ @@ -115,7 +115,7 @@ public FollowResponse follow(FollowRequest request) throws IOException, Elastics * a function that initializes a builder to create the * {@link FollowRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-put-follow.html">Documentation * on elastic.co */ @@ -131,7 +131,7 @@ public final FollowResponse follow(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-get-follow-info.html">Documentation * on elastic.co */ @@ -150,7 +150,7 @@ public FollowInfoResponse followInfo(FollowInfoRequest request) throws IOExcepti * a function that initializes a builder to create the * {@link FollowInfoRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-get-follow-info.html">Documentation * on elastic.co */ @@ -166,7 +166,7 @@ public final FollowInfoResponse followInfo(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-get-follow-stats.html">Documentation * on elastic.co */ @@ -185,7 +185,7 @@ public FollowStatsResponse followStats(FollowStatsRequest request) throws IOExce * a function that initializes a builder to create the * {@link FollowStatsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-get-follow-stats.html">Documentation * on elastic.co */ @@ -201,7 +201,7 @@ public final FollowStatsResponse followStats( * Removes the follower retention leases from the leader. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-post-forget-follower.html">Documentation * on elastic.co */ @@ -220,7 +220,7 @@ public ForgetFollowerResponse forgetFollower(ForgetFollowerRequest request) * a function that initializes a builder to create the * {@link ForgetFollowerRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-post-forget-follower.html">Documentation * on elastic.co */ @@ -237,7 +237,7 @@ public final ForgetFollowerResponse forgetFollower( * pattern collection. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-get-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -257,7 +257,7 @@ public GetAutoFollowPatternResponse getAutoFollowPattern(GetAutoFollowPatternReq * a function that initializes a builder to create the * {@link GetAutoFollowPatternRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-get-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -272,7 +272,7 @@ public final GetAutoFollowPatternResponse getAutoFollowPattern( * pattern collection. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-get-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -287,7 +287,7 @@ public GetAutoFollowPatternResponse getAutoFollowPattern() throws IOException, E * Pauses an auto-follow pattern * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-pause-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -306,7 +306,7 @@ public PauseAutoFollowPatternResponse pauseAutoFollowPattern(PauseAutoFollowPatt * a function that initializes a builder to create the * {@link PauseAutoFollowPatternRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-pause-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -323,7 +323,7 @@ public final PauseAutoFollowPatternResponse pauseAutoFollowPattern( * operations from the leader index. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-post-pause-follow.html">Documentation * on elastic.co */ @@ -342,7 +342,7 @@ public PauseFollowResponse pauseFollow(PauseFollowRequest request) throws IOExce * a function that initializes a builder to create the * {@link PauseFollowRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-post-pause-follow.html">Documentation * on elastic.co */ @@ -360,7 +360,7 @@ public final PauseFollowResponse pauseFollow( * the specified patterns will be automatically configured as follower indices. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-put-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -381,7 +381,7 @@ public PutAutoFollowPatternResponse putAutoFollowPattern(PutAutoFollowPatternReq * a function that initializes a builder to create the * {@link PutAutoFollowPatternRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-put-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -397,7 +397,7 @@ public final PutAutoFollowPatternResponse putAutoFollowPattern( * Resumes an auto-follow pattern that has been paused * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-resume-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -416,7 +416,7 @@ public ResumeAutoFollowPatternResponse resumeAutoFollowPattern(ResumeAutoFollowP * a function that initializes a builder to create the * {@link ResumeAutoFollowPatternRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-resume-auto-follow-pattern.html">Documentation * on elastic.co */ @@ -432,7 +432,7 @@ public final ResumeAutoFollowPatternResponse resumeAutoFollowPattern( * Resumes a follower index that has been paused * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-post-resume-follow.html">Documentation * on elastic.co */ @@ -450,7 +450,7 @@ public ResumeFollowResponse resumeFollow(ResumeFollowRequest request) throws IOE * a function that initializes a builder to create the * {@link ResumeFollowRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-post-resume-follow.html">Documentation * on elastic.co */ @@ -466,7 +466,7 @@ public final ResumeFollowResponse resumeFollow( * Gets all stats related to cross-cluster replication. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-get-stats.html">Documentation * on elastic.co */ public CcrStatsResponse stats() throws IOException, ElasticsearchException { @@ -481,7 +481,7 @@ public CcrStatsResponse stats() throws IOException, ElasticsearchException { * metadata and settings associated with cross-cluster replication. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-post-unfollow.html">Documentation * on elastic.co */ @@ -500,7 +500,7 @@ public UnfollowResponse unfollow(UnfollowRequest request) throws IOException, El * a function that initializes a builder to create the * {@link UnfollowRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-post-unfollow.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterAsyncClient.java index 1181cf073..f81b82a1b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterAsyncClient.java @@ -63,7 +63,7 @@ public ElasticsearchClusterAsyncClient withTransportOptions(@Nullable TransportO * Provides explanations for shard allocations in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-allocation-explain.html">Documentation * on elastic.co */ @@ -81,7 +81,7 @@ public CompletableFuture allocationExplain(Allocation * a function that initializes a builder to create the * {@link AllocationExplainRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-allocation-explain.html">Documentation * on elastic.co */ @@ -94,7 +94,7 @@ public final CompletableFuture allocationExplain( * Provides explanations for shard allocations in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-allocation-explain.html">Documentation * on elastic.co */ @@ -109,7 +109,7 @@ public CompletableFuture allocationExplain() { * Deletes a component template * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-component-template.html">Documentation * on elastic.co */ @@ -128,7 +128,7 @@ public CompletableFuture deleteComponentTemplat * a function that initializes a builder to create the * {@link DeleteComponentTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-component-template.html">Documentation * on elastic.co */ @@ -143,7 +143,7 @@ public final CompletableFuture deleteComponentT * Clears cluster voting config exclusions. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/voting-config-exclusions.html">Documentation * on elastic.co */ @@ -162,7 +162,7 @@ public CompletableFuture deleteVotingConfigExclusions( * a function that initializes a builder to create the * {@link DeleteVotingConfigExclusionsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/voting-config-exclusions.html">Documentation * on elastic.co */ @@ -175,7 +175,7 @@ public final CompletableFuture deleteVotingConfigExclusions( * Clears cluster voting config exclusions. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/voting-config-exclusions.html">Documentation * on elastic.co */ @@ -190,7 +190,7 @@ public CompletableFuture deleteVotingConfigExclusions() { * Returns information about whether a particular component template exist * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-component-template.html">Documentation * on elastic.co */ @@ -208,7 +208,7 @@ public CompletableFuture existsComponentTemplate(ExistsComponen * a function that initializes a builder to create the * {@link ExistsComponentTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-component-template.html">Documentation * on elastic.co */ @@ -223,7 +223,7 @@ public final CompletableFuture existsComponentTemplate( * Returns one or more component templates * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-component-template.html">Documentation * on elastic.co */ @@ -241,7 +241,7 @@ public CompletableFuture getComponentTemplate(GetC * a function that initializes a builder to create the * {@link GetComponentTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-component-template.html">Documentation * on elastic.co */ @@ -254,7 +254,7 @@ public final CompletableFuture getComponentTemplat * Returns one or more component templates * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-component-template.html">Documentation * on elastic.co */ @@ -269,7 +269,7 @@ public CompletableFuture getComponentTemplate() { * Returns cluster settings. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-get-settings.html">Documentation * on elastic.co */ @@ -287,7 +287,7 @@ public CompletableFuture getSettings(GetClusterSetti * a function that initializes a builder to create the * {@link GetClusterSettingsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-get-settings.html">Documentation * on elastic.co */ @@ -300,7 +300,7 @@ public final CompletableFuture getSettings( * Returns cluster settings. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-get-settings.html">Documentation * on elastic.co */ @@ -315,7 +315,7 @@ public CompletableFuture getSettings() { * Returns basic information about the health of the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-health.html">Documentation * on elastic.co */ @@ -333,7 +333,7 @@ public CompletableFuture health(HealthRequest request) { * a function that initializes a builder to create the * {@link HealthRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-health.html">Documentation * on elastic.co */ @@ -346,7 +346,7 @@ public final CompletableFuture health( * Returns basic information about the health of the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-health.html">Documentation * on elastic.co */ @@ -361,7 +361,7 @@ public CompletableFuture health() { * Returns different information about the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-info.html">Documentation * on elastic.co */ @@ -379,7 +379,7 @@ public CompletableFuture info(ClusterInfoRequest request) { * a function that initializes a builder to create the * {@link ClusterInfoRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-info.html">Documentation * on elastic.co */ @@ -395,7 +395,7 @@ public final CompletableFuture info( * mapping, allocate or fail shard) which have not yet been executed. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-pending.html">Documentation * on elastic.co */ @@ -414,7 +414,7 @@ public CompletableFuture pendingTasks(PendingTasksRequest * a function that initializes a builder to create the * {@link PendingTasksRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-pending.html">Documentation * on elastic.co */ @@ -428,7 +428,7 @@ public final CompletableFuture pendingTasks( * mapping, allocate or fail shard) which have not yet been executed. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-pending.html">Documentation * on elastic.co */ @@ -443,7 +443,7 @@ public CompletableFuture pendingTasks() { * Updates the cluster voting config exclusions by node ids or node names. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/voting-config-exclusions.html">Documentation * on elastic.co */ @@ -461,7 +461,7 @@ public CompletableFuture postVotingConfigExclusions(PostVotingC * a function that initializes a builder to create the * {@link PostVotingConfigExclusionsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/voting-config-exclusions.html">Documentation * on elastic.co */ @@ -474,7 +474,7 @@ public final CompletableFuture postVotingConfigExclusions( * Updates the cluster voting config exclusions by node ids or node names. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/voting-config-exclusions.html">Documentation * on elastic.co */ @@ -489,7 +489,7 @@ public CompletableFuture postVotingConfigExclusions() { * Creates or updates a component template * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-component-template.html">Documentation * on elastic.co */ @@ -507,7 +507,7 @@ public CompletableFuture putComponentTemplate(PutC * a function that initializes a builder to create the * {@link PutComponentTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-component-template.html">Documentation * on elastic.co */ @@ -522,7 +522,7 @@ public final CompletableFuture putComponentTemplat * Updates the cluster settings. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-update-settings.html">Documentation * on elastic.co */ @@ -540,7 +540,7 @@ public CompletableFuture putSettings(PutClusterSetti * a function that initializes a builder to create the * {@link PutClusterSettingsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-update-settings.html">Documentation * on elastic.co */ @@ -553,7 +553,7 @@ public final CompletableFuture putSettings( * Updates the cluster settings. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-update-settings.html">Documentation * on elastic.co */ @@ -568,7 +568,7 @@ public CompletableFuture putSettings() { * Returns the information about configured remote clusters. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-remote-info.html">Documentation * on elastic.co */ public CompletableFuture remoteInfo() { @@ -582,7 +582,7 @@ public CompletableFuture remoteInfo() { * Allows to manually change the allocation of individual shards in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-reroute.html">Documentation * on elastic.co */ @@ -600,7 +600,7 @@ public CompletableFuture reroute(RerouteRequest request) { * a function that initializes a builder to create the * {@link RerouteRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-reroute.html">Documentation * on elastic.co */ @@ -613,7 +613,7 @@ public final CompletableFuture reroute( * Allows to manually change the allocation of individual shards in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-reroute.html">Documentation * on elastic.co */ @@ -628,7 +628,7 @@ public CompletableFuture reroute() { * Returns a comprehensive information about the state of the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-state.html">Documentation * on elastic.co */ @@ -646,7 +646,7 @@ public CompletableFuture state(StateRequest request) { * a function that initializes a builder to create the * {@link StateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-state.html">Documentation * on elastic.co */ @@ -659,7 +659,7 @@ public final CompletableFuture state( * Returns a comprehensive information about the state of the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-state.html">Documentation * on elastic.co */ @@ -674,7 +674,7 @@ public CompletableFuture state() { * Returns high-level overview of cluster statistics. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-stats.html">Documentation * on elastic.co */ @@ -692,7 +692,7 @@ public CompletableFuture stats(ClusterStatsRequest request * a function that initializes a builder to create the * {@link ClusterStatsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-stats.html">Documentation * on elastic.co */ @@ -705,7 +705,7 @@ public final CompletableFuture stats( * Returns high-level overview of cluster statistics. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-stats.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterClient.java index 2e631e7cc..7ad84bd15 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterClient.java @@ -61,7 +61,7 @@ public ElasticsearchClusterClient withTransportOptions(@Nullable TransportOption * Provides explanations for shard allocations in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-allocation-explain.html">Documentation * on elastic.co */ @@ -80,7 +80,7 @@ public AllocationExplainResponse allocationExplain(AllocationExplainRequest requ * a function that initializes a builder to create the * {@link AllocationExplainRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-allocation-explain.html">Documentation * on elastic.co */ @@ -94,7 +94,7 @@ public final AllocationExplainResponse allocationExplain( * Provides explanations for shard allocations in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-allocation-explain.html">Documentation * on elastic.co */ @@ -109,7 +109,7 @@ public AllocationExplainResponse allocationExplain() throws IOException, Elastic * Deletes a component template * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-component-template.html">Documentation * on elastic.co */ @@ -128,7 +128,7 @@ public DeleteComponentTemplateResponse deleteComponentTemplate(DeleteComponentTe * a function that initializes a builder to create the * {@link DeleteComponentTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-component-template.html">Documentation * on elastic.co */ @@ -144,7 +144,7 @@ public final DeleteComponentTemplateResponse deleteComponentTemplate( * Clears cluster voting config exclusions. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/voting-config-exclusions.html">Documentation * on elastic.co */ @@ -163,7 +163,7 @@ public BooleanResponse deleteVotingConfigExclusions(DeleteVotingConfigExclusions * a function that initializes a builder to create the * {@link DeleteVotingConfigExclusionsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/voting-config-exclusions.html">Documentation * on elastic.co */ @@ -177,7 +177,7 @@ public final BooleanResponse deleteVotingConfigExclusions( * Clears cluster voting config exclusions. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/voting-config-exclusions.html">Documentation * on elastic.co */ @@ -192,7 +192,7 @@ public BooleanResponse deleteVotingConfigExclusions() throws IOException, Elasti * Returns information about whether a particular component template exist * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-component-template.html">Documentation * on elastic.co */ @@ -211,7 +211,7 @@ public BooleanResponse existsComponentTemplate(ExistsComponentTemplateRequest re * a function that initializes a builder to create the * {@link ExistsComponentTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-component-template.html">Documentation * on elastic.co */ @@ -227,7 +227,7 @@ public final BooleanResponse existsComponentTemplate( * Returns one or more component templates * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-component-template.html">Documentation * on elastic.co */ @@ -246,7 +246,7 @@ public GetComponentTemplateResponse getComponentTemplate(GetComponentTemplateReq * a function that initializes a builder to create the * {@link GetComponentTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-component-template.html">Documentation * on elastic.co */ @@ -260,7 +260,7 @@ public final GetComponentTemplateResponse getComponentTemplate( * Returns one or more component templates * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-component-template.html">Documentation * on elastic.co */ @@ -275,7 +275,7 @@ public GetComponentTemplateResponse getComponentTemplate() throws IOException, E * Returns cluster settings. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-get-settings.html">Documentation * on elastic.co */ @@ -294,7 +294,7 @@ public GetClusterSettingsResponse getSettings(GetClusterSettingsRequest request) * a function that initializes a builder to create the * {@link GetClusterSettingsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-get-settings.html">Documentation * on elastic.co */ @@ -308,7 +308,7 @@ public final GetClusterSettingsResponse getSettings( * Returns cluster settings. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-get-settings.html">Documentation * on elastic.co */ @@ -323,7 +323,7 @@ public GetClusterSettingsResponse getSettings() throws IOException, Elasticsearc * Returns basic information about the health of the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-health.html">Documentation * on elastic.co */ @@ -341,7 +341,7 @@ public HealthResponse health(HealthRequest request) throws IOException, Elastics * a function that initializes a builder to create the * {@link HealthRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-health.html">Documentation * on elastic.co */ @@ -354,7 +354,7 @@ public final HealthResponse health(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-health.html">Documentation * on elastic.co */ @@ -369,7 +369,7 @@ public HealthResponse health() throws IOException, ElasticsearchException { * Returns different information about the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-info.html">Documentation * on elastic.co */ @@ -387,7 +387,7 @@ public ClusterInfoResponse info(ClusterInfoRequest request) throws IOException, * a function that initializes a builder to create the * {@link ClusterInfoRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-info.html">Documentation * on elastic.co */ @@ -403,7 +403,7 @@ public final ClusterInfoResponse info(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-pending.html">Documentation * on elastic.co */ @@ -422,7 +422,7 @@ public PendingTasksResponse pendingTasks(PendingTasksRequest request) throws IOE * a function that initializes a builder to create the * {@link PendingTasksRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-pending.html">Documentation * on elastic.co */ @@ -437,7 +437,7 @@ public final PendingTasksResponse pendingTasks( * mapping, allocate or fail shard) which have not yet been executed. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-pending.html">Documentation * on elastic.co */ @@ -452,7 +452,7 @@ public PendingTasksResponse pendingTasks() throws IOException, ElasticsearchExce * Updates the cluster voting config exclusions by node ids or node names. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/voting-config-exclusions.html">Documentation * on elastic.co */ @@ -471,7 +471,7 @@ public BooleanResponse postVotingConfigExclusions(PostVotingConfigExclusionsRequ * a function that initializes a builder to create the * {@link PostVotingConfigExclusionsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/voting-config-exclusions.html">Documentation * on elastic.co */ @@ -485,7 +485,7 @@ public final BooleanResponse postVotingConfigExclusions( * Updates the cluster voting config exclusions by node ids or node names. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/voting-config-exclusions.html">Documentation * on elastic.co */ @@ -500,7 +500,7 @@ public BooleanResponse postVotingConfigExclusions() throws IOException, Elastics * Creates or updates a component template * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-component-template.html">Documentation * on elastic.co */ @@ -519,7 +519,7 @@ public PutComponentTemplateResponse putComponentTemplate(PutComponentTemplateReq * a function that initializes a builder to create the * {@link PutComponentTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-component-template.html">Documentation * on elastic.co */ @@ -535,7 +535,7 @@ public final PutComponentTemplateResponse putComponentTemplate( * Updates the cluster settings. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-update-settings.html">Documentation * on elastic.co */ @@ -554,7 +554,7 @@ public PutClusterSettingsResponse putSettings(PutClusterSettingsRequest request) * a function that initializes a builder to create the * {@link PutClusterSettingsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-update-settings.html">Documentation * on elastic.co */ @@ -568,7 +568,7 @@ public final PutClusterSettingsResponse putSettings( * Updates the cluster settings. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-update-settings.html">Documentation * on elastic.co */ @@ -583,7 +583,7 @@ public PutClusterSettingsResponse putSettings() throws IOException, Elasticsearc * Returns the information about configured remote clusters. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-remote-info.html">Documentation * on elastic.co */ public RemoteInfoResponse remoteInfo() throws IOException, ElasticsearchException { @@ -597,7 +597,7 @@ public RemoteInfoResponse remoteInfo() throws IOException, ElasticsearchExceptio * Allows to manually change the allocation of individual shards in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-reroute.html">Documentation * on elastic.co */ @@ -615,7 +615,7 @@ public RerouteResponse reroute(RerouteRequest request) throws IOException, Elast * a function that initializes a builder to create the * {@link RerouteRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-reroute.html">Documentation * on elastic.co */ @@ -628,7 +628,7 @@ public final RerouteResponse reroute(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-reroute.html">Documentation * on elastic.co */ @@ -643,7 +643,7 @@ public RerouteResponse reroute() throws IOException, ElasticsearchException { * Returns a comprehensive information about the state of the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-state.html">Documentation * on elastic.co */ @@ -661,7 +661,7 @@ public StateResponse state(StateRequest request) throws IOException, Elasticsear * a function that initializes a builder to create the * {@link StateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-state.html">Documentation * on elastic.co */ @@ -674,7 +674,7 @@ public final StateResponse state(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-state.html">Documentation * on elastic.co */ @@ -689,7 +689,7 @@ public StateResponse state() throws IOException, ElasticsearchException { * Returns high-level overview of cluster statistics. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-stats.html">Documentation * on elastic.co */ @@ -707,7 +707,7 @@ public ClusterStatsResponse stats(ClusterStatsRequest request) throws IOExceptio * a function that initializes a builder to create the * {@link ClusterStatsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-stats.html">Documentation * on elastic.co */ @@ -721,7 +721,7 @@ public final ClusterStatsResponse stats( * Returns high-level overview of cluster statistics. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-stats.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/CommandAllocateReplicaAction.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/CommandAllocateReplicaAction.java index 889698335..d87875f23 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/CommandAllocateReplicaAction.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/CommandAllocateReplicaAction.java @@ -45,7 +45,7 @@ /** * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/modules-cluster.html">Documentation * on elastic.co * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java index fe1e6a4bd..58f8b1c88 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java @@ -56,8 +56,8 @@ // typedef: _global.bulk.Request /** - * Allows to perform multiple index/update/delete operations in a single - * request. + * Performs multiple indexing or delete operations in a single API call. This + * reduces overhead and can greatly increase indexing speed. * * @see API * specification @@ -121,8 +121,8 @@ public Iterator _serializables() { return this.operations.iterator(); } /** - * True or false to return the _source field or not, or default list of fields - * to return, can be overridden on each sub-request + * true or false to return the _source + * field or not, or a list of fields to return. *

* API name: {@code _source} */ @@ -132,8 +132,7 @@ public final SourceConfigParam source() { } /** - * Default list of fields to exclude from the returned _source field, can be - * overridden on each sub-request + * A comma-separated list of source fields to exclude from the response. *

* API name: {@code _source_excludes} */ @@ -142,8 +141,7 @@ public final List sourceExcludes() { } /** - * Default list of fields to extract and return from the _source field, can be - * overridden on each sub-request + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} */ @@ -152,7 +150,7 @@ public final List sourceIncludes() { } /** - * Default index for items which don't provide one + * Name of the data stream, index, or index alias to perform bulk actions on. *

* API name: {@code index} */ @@ -162,7 +160,11 @@ public final String index() { } /** - * The pipeline id to preprocess incoming documents with + * ID of the pipeline to use to preprocess incoming documents. If the index has + * a default ingest pipeline specified, then setting the value to + * _none disables the default ingest pipeline for this request. If + * a final pipeline is configured it will always run, regardless of the value of + * this parameter. *

* API name: {@code pipeline} */ @@ -172,10 +174,11 @@ public final String pipeline() { } /** - * If true then refresh the affected shards to make this operation - * visible to search, if wait_for then wait for a refresh to make - * this operation visible to search, if false (the default) then do - * nothing with refreshes. + * If true, Elasticsearch refreshes the affected shards to make + * this operation visible to search, if wait_for then wait for a + * refresh to make this operation visible to search, if false do + * nothing with refreshes. Valid values: true, false, + * wait_for. *

* API name: {@code refresh} */ @@ -185,7 +188,7 @@ public final Refresh refresh() { } /** - * Sets require_alias for all incoming documents. Defaults to unset (false) + * If true, the request’s actions must target an index alias. *

* API name: {@code require_alias} */ @@ -195,7 +198,7 @@ public final Boolean requireAlias() { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -205,7 +208,8 @@ public final String routing() { } /** - * Explicit operation timeout + * Period each action waits for the following operations: automatic index + * creation, dynamic mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -215,11 +219,9 @@ public final Time timeout() { } /** - * Sets the number of shard copies that must be active before proceeding with - * the bulk operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total number of + * shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -288,8 +290,8 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private List operations; /** - * True or false to return the _source field or not, or default list of fields - * to return, can be overridden on each sub-request + * true or false to return the _source + * field or not, or a list of fields to return. *

* API name: {@code _source} */ @@ -299,8 +301,8 @@ public final Builder source(@Nullable SourceConfigParam value) { } /** - * True or false to return the _source field or not, or default list of fields - * to return, can be overridden on each sub-request + * true or false to return the _source + * field or not, or a list of fields to return. *

* API name: {@code _source} */ @@ -309,8 +311,7 @@ public final Builder source(Function * API name: {@code _source_excludes} *

@@ -322,8 +323,7 @@ public final Builder sourceExcludes(List list) { } /** - * Default list of fields to exclude from the returned _source field, can be - * overridden on each sub-request + * A comma-separated list of source fields to exclude from the response. *

* API name: {@code _source_excludes} *

@@ -335,8 +335,7 @@ public final Builder sourceExcludes(String value, String... values) { } /** - * Default list of fields to extract and return from the _source field, can be - * overridden on each sub-request + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} *

@@ -348,8 +347,7 @@ public final Builder sourceIncludes(List list) { } /** - * Default list of fields to extract and return from the _source field, can be - * overridden on each sub-request + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} *

@@ -361,7 +359,7 @@ public final Builder sourceIncludes(String value, String... values) { } /** - * Default index for items which don't provide one + * Name of the data stream, index, or index alias to perform bulk actions on. *

* API name: {@code index} */ @@ -371,7 +369,11 @@ public final Builder index(@Nullable String value) { } /** - * The pipeline id to preprocess incoming documents with + * ID of the pipeline to use to preprocess incoming documents. If the index has + * a default ingest pipeline specified, then setting the value to + * _none disables the default ingest pipeline for this request. If + * a final pipeline is configured it will always run, regardless of the value of + * this parameter. *

* API name: {@code pipeline} */ @@ -381,10 +383,11 @@ public final Builder pipeline(@Nullable String value) { } /** - * If true then refresh the affected shards to make this operation - * visible to search, if wait_for then wait for a refresh to make - * this operation visible to search, if false (the default) then do - * nothing with refreshes. + * If true, Elasticsearch refreshes the affected shards to make + * this operation visible to search, if wait_for then wait for a + * refresh to make this operation visible to search, if false do + * nothing with refreshes. Valid values: true, false, + * wait_for. *

* API name: {@code refresh} */ @@ -394,7 +397,7 @@ public final Builder refresh(@Nullable Refresh value) { } /** - * Sets require_alias for all incoming documents. Defaults to unset (false) + * If true, the request’s actions must target an index alias. *

* API name: {@code require_alias} */ @@ -404,7 +407,7 @@ public final Builder requireAlias(@Nullable Boolean value) { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -414,7 +417,8 @@ public final Builder routing(@Nullable String value) { } /** - * Explicit operation timeout + * Period each action waits for the following operations: automatic index + * creation, dynamic mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -424,7 +428,8 @@ public final Builder timeout(@Nullable Time value) { } /** - * Explicit operation timeout + * Period each action waits for the following operations: automatic index + * creation, dynamic mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -433,11 +438,9 @@ public final Builder timeout(Function> fn) { } /** - * Sets the number of shard copies that must be active before proceeding with - * the bulk operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total number of + * shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -447,11 +450,9 @@ public final Builder waitForActiveShards(@Nullable WaitForActiveShards value) { } /** - * Sets the number of shard copies that must be active before proceeding with - * the bulk operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total number of + * shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClearScrollRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClearScrollRequest.java index 423d02c83..0de612a5d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClearScrollRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClearScrollRequest.java @@ -46,7 +46,7 @@ // typedef: _global.clear_scroll.Request /** - * Explicitly clears the search context for a scroll. + * Clears the search context and results for a scrolling search. * * @see API * specification @@ -68,6 +68,8 @@ public static ClearScrollRequest of(Function_all. + *

* API name: {@code scroll_id} */ public final List scrollId() { @@ -111,6 +113,8 @@ public static class Builder extends RequestBase.AbstractBuilder private List scrollId; /** + * Scroll IDs to clear. To clear all scroll IDs, use _all. + *

* API name: {@code scroll_id} *

* Adds all elements of list to scrollId. @@ -121,6 +125,8 @@ public final Builder scrollId(List list) { } /** + * Scroll IDs to clear. To clear all scroll IDs, use _all. + *

* API name: {@code scroll_id} *

* Adds one or more values to scrollId. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClosePointInTimeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClosePointInTimeRequest.java index 943f8e18d..ee7cd00e8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClosePointInTimeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClosePointInTimeRequest.java @@ -45,7 +45,7 @@ // typedef: _global.close_point_in_time.Request /** - * Close a point in time + * Closes a point-in-time. * * @see API @@ -68,7 +68,9 @@ public static ClosePointInTimeRequest of(Function + * API name: {@code id} */ public final String id() { return this.id; @@ -102,7 +104,9 @@ public static class Builder extends RequestBase.AbstractBuilder private String id; /** - * Required - API name: {@code id} + * Required - The ID of the point-in-time. + *

+ * API name: {@code id} */ public final Builder id(String value) { this.id = value; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CountRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CountRequest.java index 2c6c92d9d..114364d1f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CountRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CountRequest.java @@ -135,9 +135,10 @@ public static CountRequest of(Function> fn) } /** - * Whether to ignore if a wildcard indices expression resolves into no concrete - * indices. (This includes _all string or when no indices have been - * specified) + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. *

* API name: {@code allow_no_indices} */ @@ -147,8 +148,9 @@ public final Boolean allowNoIndices() { } /** - * Specify whether wildcard and prefix queries should be analyzed (default: - * false) + * If true, wildcard and prefix queries are analyzed. This + * parameter can only be used when the q query string parameter is + * specified. *

* API name: {@code analyze_wildcard} */ @@ -158,7 +160,8 @@ public final Boolean analyzeWildcard() { } /** - * The analyzer to use for the query string + * Analyzer to use for the query string. This parameter can only be used when + * the q query string parameter is specified. *

* API name: {@code analyzer} */ @@ -168,7 +171,9 @@ public final String analyzer() { } /** - * The default operator for query string query (AND or OR) + * The default operator for query string query: AND or + * OR. This parameter can only be used when the q + * query string parameter is specified. *

* API name: {@code default_operator} */ @@ -178,8 +183,9 @@ public final Operator defaultOperator() { } /** - * The field to use as default where no field prefix is given in the query - * string + * Field to use as default where no field prefix is given in the query string. + * This parameter can only be used when the q query string + * parameter is specified. *

* API name: {@code df} */ @@ -189,8 +195,10 @@ public final String df() { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. *

* API name: {@code expand_wildcards} */ @@ -199,8 +207,8 @@ public final List expandWildcards() { } /** - * Whether specified concrete, expanded or aliased indices should be ignored - * when throttled + * If true, concrete, expanded or aliased indices are ignored when + * frozen. *

* API name: {@code ignore_throttled} */ @@ -210,8 +218,8 @@ public final Boolean ignoreThrottled() { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -221,7 +229,9 @@ public final Boolean ignoreUnavailable() { } /** - * A comma-separated list of indices to restrict the results + * Comma-separated list of data streams, indices, and aliases to search. + * Supports wildcards (*). To search all data streams and indices, + * omit this parameter or use * or _all. *

* API name: {@code index} */ @@ -230,8 +240,8 @@ public final List index() { } /** - * Specify whether format-based query failures (such as providing text to a - * numeric field) should be ignored + * If true, format-based query failures (such as providing text to + * a numeric field) in the query string will be ignored. *

* API name: {@code lenient} */ @@ -241,8 +251,8 @@ public final Boolean lenient() { } /** - * Include only documents with a specific _score value in the - * result + * Sets the minimum _score value that documents must have to be + * included in the result. *

* API name: {@code min_score} */ @@ -252,8 +262,8 @@ public final Double minScore() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -263,7 +273,7 @@ public final String preference() { } /** - * Query in the Lucene query string syntax + * Query in the Lucene query string syntax. *

* API name: {@code q} */ @@ -273,6 +283,8 @@ public final String q() { } /** + * Defines the search definition using the Query DSL. + *

* API name: {@code query} */ @Nullable @@ -281,7 +293,7 @@ public final Query query() { } /** - * A comma-separated list of specific routing values + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -291,8 +303,9 @@ public final String routing() { } /** - * The maximum count for each shard, upon reaching which the query execution - * will terminate early + * Maximum number of documents to collect for each shard. If a query reaches + * this limit, Elasticsearch terminates the query early. Elasticsearch collects + * documents before sorting. *

* API name: {@code terminate_after} */ @@ -376,9 +389,10 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private Long terminateAfter; /** - * Whether to ignore if a wildcard indices expression resolves into no concrete - * indices. (This includes _all string or when no indices have been - * specified) + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. *

* API name: {@code allow_no_indices} */ @@ -388,8 +402,9 @@ public final Builder allowNoIndices(@Nullable Boolean value) { } /** - * Specify whether wildcard and prefix queries should be analyzed (default: - * false) + * If true, wildcard and prefix queries are analyzed. This + * parameter can only be used when the q query string parameter is + * specified. *

* API name: {@code analyze_wildcard} */ @@ -399,7 +414,8 @@ public final Builder analyzeWildcard(@Nullable Boolean value) { } /** - * The analyzer to use for the query string + * Analyzer to use for the query string. This parameter can only be used when + * the q query string parameter is specified. *

* API name: {@code analyzer} */ @@ -409,7 +425,9 @@ public final Builder analyzer(@Nullable String value) { } /** - * The default operator for query string query (AND or OR) + * The default operator for query string query: AND or + * OR. This parameter can only be used when the q + * query string parameter is specified. *

* API name: {@code default_operator} */ @@ -419,8 +437,9 @@ public final Builder defaultOperator(@Nullable Operator value) { } /** - * The field to use as default where no field prefix is given in the query - * string + * Field to use as default where no field prefix is given in the query string. + * This parameter can only be used when the q query string + * parameter is specified. *

* API name: {@code df} */ @@ -430,8 +449,10 @@ public final Builder df(@Nullable String value) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. *

* API name: {@code expand_wildcards} *

@@ -443,8 +464,10 @@ public final Builder expandWildcards(List list) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. *

* API name: {@code expand_wildcards} *

@@ -456,8 +479,8 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * Whether specified concrete, expanded or aliased indices should be ignored - * when throttled + * If true, concrete, expanded or aliased indices are ignored when + * frozen. *

* API name: {@code ignore_throttled} */ @@ -467,8 +490,8 @@ public final Builder ignoreThrottled(@Nullable Boolean value) { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -478,7 +501,9 @@ public final Builder ignoreUnavailable(@Nullable Boolean value) { } /** - * A comma-separated list of indices to restrict the results + * Comma-separated list of data streams, indices, and aliases to search. + * Supports wildcards (*). To search all data streams and indices, + * omit this parameter or use * or _all. *

* API name: {@code index} *

@@ -490,7 +515,9 @@ public final Builder index(List list) { } /** - * A comma-separated list of indices to restrict the results + * Comma-separated list of data streams, indices, and aliases to search. + * Supports wildcards (*). To search all data streams and indices, + * omit this parameter or use * or _all. *

* API name: {@code index} *

@@ -502,8 +529,8 @@ public final Builder index(String value, String... values) { } /** - * Specify whether format-based query failures (such as providing text to a - * numeric field) should be ignored + * If true, format-based query failures (such as providing text to + * a numeric field) in the query string will be ignored. *

* API name: {@code lenient} */ @@ -513,8 +540,8 @@ public final Builder lenient(@Nullable Boolean value) { } /** - * Include only documents with a specific _score value in the - * result + * Sets the minimum _score value that documents must have to be + * included in the result. *

* API name: {@code min_score} */ @@ -524,8 +551,8 @@ public final Builder minScore(@Nullable Double value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -535,7 +562,7 @@ public final Builder preference(@Nullable String value) { } /** - * Query in the Lucene query string syntax + * Query in the Lucene query string syntax. *

* API name: {@code q} */ @@ -545,6 +572,8 @@ public final Builder q(@Nullable String value) { } /** + * Defines the search definition using the Query DSL. + *

* API name: {@code query} */ public final Builder query(@Nullable Query value) { @@ -553,6 +582,8 @@ public final Builder query(@Nullable Query value) { } /** + * Defines the search definition using the Query DSL. + *

* API name: {@code query} */ public final Builder query(Function> fn) { @@ -560,7 +591,7 @@ public final Builder query(Function> fn) { } /** - * A comma-separated list of specific routing values + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -570,8 +601,9 @@ public final Builder routing(@Nullable String value) { } /** - * The maximum count for each shard, upon reaching which the query execution - * will terminate early + * Maximum number of documents to collect for each shard. If a query reaches + * this limit, Elasticsearch terminates the query early. Elasticsearch collects + * documents before sorting. *

* API name: {@code terminate_after} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CreateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CreateRequest.java index a985597e4..a67eeb342 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CreateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CreateRequest.java @@ -56,10 +56,9 @@ // typedef: _global.create.Request /** - * Creates a new document in the index. - *

- * Returns a 409 response when a document with a same ID already exists in the - * index. + * Adds a JSON document to the specified data stream or index and makes it + * searchable. If the target is an index and the document already exists, the + * request updates the document and increments its version. * * @see API * specification @@ -120,7 +119,7 @@ public static CreateRequest of( } /** - * Required - Document ID + * Required - Unique identifier for the document. *

* API name: {@code id} */ @@ -129,7 +128,11 @@ public final String id() { } /** - * Required - The name of the index + * Required - Name of the data stream or index to target. If the target doesn’t + * exist and matches the name or wildcard (*) pattern of an index + * template with a data_stream definition, this request creates the + * data stream. If the target doesn’t exist and doesn’t match a data stream + * template, this request creates the index. *

* API name: {@code index} */ @@ -138,7 +141,11 @@ public final String index() { } /** - * The pipeline id to preprocess incoming documents with + * ID of the pipeline to use to preprocess incoming documents. If the index has + * a default ingest pipeline specified, then setting the value to + * _none disables the default ingest pipeline for this request. If + * a final pipeline is configured it will always run, regardless of the value of + * this parameter. *

* API name: {@code pipeline} */ @@ -148,10 +155,11 @@ public final String pipeline() { } /** - * If true then refresh the affected shards to make this operation - * visible to search, if wait_for then wait for a refresh to make - * this operation visible to search, if false (the default) then do - * nothing with refreshes. + * If true, Elasticsearch refreshes the affected shards to make + * this operation visible to search, if wait_for then wait for a + * refresh to make this operation visible to search, if false do + * nothing with refreshes. Valid values: true, false, + * wait_for. *

* API name: {@code refresh} */ @@ -161,7 +169,7 @@ public final Refresh refresh() { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -171,7 +179,8 @@ public final String routing() { } /** - * Explicit operation timeout + * Period the request waits for the following operations: automatic index + * creation, dynamic mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -181,7 +190,8 @@ public final Time timeout() { } /** - * Explicit version number for concurrency control + * Explicit version number for concurrency control. The specified version must + * match the current version of the document for the request to succeed. *

* API name: {@code version} */ @@ -191,7 +201,7 @@ public final Long version() { } /** - * Specific version type + * Specific version type: external, external_gte. *

* API name: {@code version_type} */ @@ -201,11 +211,9 @@ public final VersionType versionType() { } /** - * Sets the number of shard copies that must be active before proceeding with - * the index operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total + * number of shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -269,7 +277,7 @@ public static class Builder extends RequestBase.AbstractBuilder tDocumentSerializer; /** - * Required - Document ID + * Required - Unique identifier for the document. *

* API name: {@code id} */ @@ -279,7 +287,11 @@ public final Builder id(String value) { } /** - * Required - The name of the index + * Required - Name of the data stream or index to target. If the target doesn’t + * exist and matches the name or wildcard (*) pattern of an index + * template with a data_stream definition, this request creates the + * data stream. If the target doesn’t exist and doesn’t match a data stream + * template, this request creates the index. *

* API name: {@code index} */ @@ -289,7 +301,11 @@ public final Builder index(String value) { } /** - * The pipeline id to preprocess incoming documents with + * ID of the pipeline to use to preprocess incoming documents. If the index has + * a default ingest pipeline specified, then setting the value to + * _none disables the default ingest pipeline for this request. If + * a final pipeline is configured it will always run, regardless of the value of + * this parameter. *

* API name: {@code pipeline} */ @@ -299,10 +315,11 @@ public final Builder pipeline(@Nullable String value) { } /** - * If true then refresh the affected shards to make this operation - * visible to search, if wait_for then wait for a refresh to make - * this operation visible to search, if false (the default) then do - * nothing with refreshes. + * If true, Elasticsearch refreshes the affected shards to make + * this operation visible to search, if wait_for then wait for a + * refresh to make this operation visible to search, if false do + * nothing with refreshes. Valid values: true, false, + * wait_for. *

* API name: {@code refresh} */ @@ -312,7 +329,7 @@ public final Builder refresh(@Nullable Refresh value) { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -322,7 +339,8 @@ public final Builder routing(@Nullable String value) { } /** - * Explicit operation timeout + * Period the request waits for the following operations: automatic index + * creation, dynamic mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -332,7 +350,8 @@ public final Builder timeout(@Nullable Time value) { } /** - * Explicit operation timeout + * Period the request waits for the following operations: automatic index + * creation, dynamic mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -341,7 +360,8 @@ public final Builder timeout(Function * API name: {@code version} */ @@ -351,7 +371,7 @@ public final Builder version(@Nullable Long value) { } /** - * Specific version type + * Specific version type: external, external_gte. *

* API name: {@code version_type} */ @@ -361,11 +381,9 @@ public final Builder versionType(@Nullable VersionType value) { } /** - * Sets the number of shard copies that must be active before proceeding with - * the index operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total + * number of shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -375,11 +393,9 @@ public final Builder waitForActiveShards(@Nullable WaitForActiveShard } /** - * Sets the number of shard copies that must be active before proceeding with - * the index operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total + * number of shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java index c6b2b897a..68dcc9b6f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java @@ -60,7 +60,7 @@ // typedef: _global.delete_by_query.Request /** - * Deletes documents matching the provided query. + * Deletes documents that match the specified query. * * @see API * specification @@ -203,9 +203,12 @@ public static DeleteByQueryRequest of(Function_all string or when no indices have been - * specified) + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. For example, a request targeting foo*,bar* returns an + * error if an index starts with foo but no index starts with + * bar. *

* API name: {@code allow_no_indices} */ @@ -215,8 +218,7 @@ public final Boolean allowNoIndices() { } /** - * Specify whether wildcard and prefix queries should be analyzed (default: - * false) + * If true, wildcard and prefix queries are analyzed. *

* API name: {@code analyze_wildcard} */ @@ -226,7 +228,7 @@ public final Boolean analyzeWildcard() { } /** - * The analyzer to use for the query string + * Analyzer to use for the query string. *

* API name: {@code analyzer} */ @@ -236,7 +238,8 @@ public final String analyzer() { } /** - * What to do when the delete by query hits version conflicts? + * What to do if delete by query hits version conflicts: abort or + * proceed. *

* API name: {@code conflicts} */ @@ -246,7 +249,8 @@ public final Conflicts conflicts() { } /** - * The default operator for query string query (AND or OR) + * The default operator for query string query: AND or + * OR. *

* API name: {@code default_operator} */ @@ -256,8 +260,7 @@ public final Operator defaultOperator() { } /** - * The field to use as default where no field prefix is given in the query - * string + * Field to use as default where no field prefix is given in the query string. *

* API name: {@code df} */ @@ -267,8 +270,12 @@ public final String df() { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} */ @@ -287,8 +294,8 @@ public final Long from() { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -298,8 +305,9 @@ public final Boolean ignoreUnavailable() { } /** - * Required - A comma-separated list of index names to search; use - * _all or empty string to perform the operation on all indices + * Required - Comma-separated list of data streams, indices, and aliases to + * search. Supports wildcards (*). To search all data streams or + * indices, omit this parameter or use * or _all. *

* API name: {@code index} */ @@ -308,8 +316,8 @@ public final List index() { } /** - * Specify whether format-based query failures (such as providing text to a - * numeric field) should be ignored + * If true, format-based query failures (such as providing text to + * a numeric field) in the query string will be ignored. *

* API name: {@code lenient} */ @@ -319,6 +327,8 @@ public final Boolean lenient() { } /** + * The maximum number of documents to delete. + *

* API name: {@code max_docs} */ @Nullable @@ -327,8 +337,8 @@ public final Long maxDocs() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -338,7 +348,7 @@ public final String preference() { } /** - * Query in the Lucene query string syntax + * Query in the Lucene query string syntax. *

* API name: {@code q} */ @@ -348,6 +358,8 @@ public final String q() { } /** + * Specifies the documents to delete using the Query DSL. + *

* API name: {@code query} */ @Nullable @@ -356,7 +368,8 @@ public final Query query() { } /** - * Should the affected indexes be refreshed? + * If true, Elasticsearch refreshes all shards involved in the + * delete by query after the request completes. *

* API name: {@code refresh} */ @@ -366,8 +379,8 @@ public final Boolean refresh() { } /** - * Specify if request cache should be used for this request or not, defaults to - * index level setting + * If true, the request cache is used for this request. Defaults to + * the index-level setting. *

* API name: {@code request_cache} */ @@ -377,8 +390,7 @@ public final Boolean requestCache() { } /** - * The throttle for this request in sub-requests per second. -1 means no - * throttle. + * The throttle for this request in sub-requests per second. *

* API name: {@code requests_per_second} */ @@ -388,7 +400,7 @@ public final Float requestsPerSecond() { } /** - * A comma-separated list of specific routing values + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -398,8 +410,7 @@ public final String routing() { } /** - * Specify how long a consistent view of the index should be maintained for - * scrolled search + * Period to retain the search context for scrolling. *

* API name: {@code scroll} */ @@ -409,7 +420,7 @@ public final Time scroll() { } /** - * Size on the scroll request powering the delete by query + * Size of the scroll request that powers the operation. *

* API name: {@code scroll_size} */ @@ -429,7 +440,8 @@ public final Time searchTimeout() { } /** - * Search operation type + * The type of the search operation. Available options: + * query_then_fetch, dfs_query_then_fetch. *

* API name: {@code search_type} */ @@ -439,6 +451,9 @@ public final SearchType searchType() { } /** + * Slice the request manually using the provided slice ID and total number of + * slices. + *

* API name: {@code slice} */ @Nullable @@ -447,8 +462,7 @@ public final SlicedScroll slice() { } /** - * The number of slices this task should be divided into. Defaults to 1, meaning - * the task isn't sliced into subtasks. Can be set to auto. + * The number of slices this task should be divided into. *

* API name: {@code slices} */ @@ -458,7 +472,7 @@ public final Slices slices() { } /** - * A comma-separated list of <field>:<direction> pairs + * A comma-separated list of <field>:<direction> pairs. *

* API name: {@code sort} */ @@ -467,7 +481,8 @@ public final List sort() { } /** - * Specific 'tag' of the request for logging and statistical purposes + * Specific tag of the request for logging and statistical + * purposes. *

* API name: {@code stats} */ @@ -476,8 +491,13 @@ public final List stats() { } /** - * The maximum number of documents to collect for each shard, upon reaching - * which the query execution will terminate early. + * Maximum number of documents to collect for each shard. If a query reaches + * this limit, Elasticsearch terminates the query early. Elasticsearch collects + * documents before sorting. Use with caution. Elasticsearch applies this + * parameter to each shard handling the request. When possible, let + * Elasticsearch perform early termination automatically. Avoid specifying this + * parameter for requests that target data streams with backing indices across + * multiple data tiers. *

* API name: {@code terminate_after} */ @@ -487,8 +507,7 @@ public final Long terminateAfter() { } /** - * Time each individual bulk request should wait for shards that are - * unavailable. + * Period each deletion request waits for active shards. *

* API name: {@code timeout} */ @@ -498,7 +517,7 @@ public final Time timeout() { } /** - * Specify whether to return document version as part of a hit + * If true, returns the document version as part of a hit. *

* API name: {@code version} */ @@ -508,11 +527,9 @@ public final Boolean version() { } /** - * Sets the number of shard copies that must be active before proceeding with - * the delete by query operation. Defaults to 1, meaning the primary shard only. - * Set to all for all shard copies, otherwise set to any - * non-negative value less than or equal to the total number of copies for the - * shard (number of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total number of + * shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -522,7 +539,7 @@ public final WaitForActiveShards waitForActiveShards() { } /** - * Should the request should block until the delete by query is complete. + * If true, the request blocks until the operation is complete. *

* API name: {@code wait_for_completion} */ @@ -665,9 +682,12 @@ public static class Builder extends RequestBase.AbstractBuilder private Boolean waitForCompletion; /** - * Whether to ignore if a wildcard indices expression resolves into no concrete - * indices. (This includes _all string or when no indices have been - * specified) + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. For example, a request targeting foo*,bar* returns an + * error if an index starts with foo but no index starts with + * bar. *

* API name: {@code allow_no_indices} */ @@ -677,8 +697,7 @@ public final Builder allowNoIndices(@Nullable Boolean value) { } /** - * Specify whether wildcard and prefix queries should be analyzed (default: - * false) + * If true, wildcard and prefix queries are analyzed. *

* API name: {@code analyze_wildcard} */ @@ -688,7 +707,7 @@ public final Builder analyzeWildcard(@Nullable Boolean value) { } /** - * The analyzer to use for the query string + * Analyzer to use for the query string. *

* API name: {@code analyzer} */ @@ -698,7 +717,8 @@ public final Builder analyzer(@Nullable String value) { } /** - * What to do when the delete by query hits version conflicts? + * What to do if delete by query hits version conflicts: abort or + * proceed. *

* API name: {@code conflicts} */ @@ -708,7 +728,8 @@ public final Builder conflicts(@Nullable Conflicts value) { } /** - * The default operator for query string query (AND or OR) + * The default operator for query string query: AND or + * OR. *

* API name: {@code default_operator} */ @@ -718,8 +739,7 @@ public final Builder defaultOperator(@Nullable Operator value) { } /** - * The field to use as default where no field prefix is given in the query - * string + * Field to use as default where no field prefix is given in the query string. *

* API name: {@code df} */ @@ -729,8 +749,12 @@ public final Builder df(@Nullable String value) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} *

@@ -742,8 +766,12 @@ public final Builder expandWildcards(List list) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} *

@@ -765,8 +793,8 @@ public final Builder from(@Nullable Long value) { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -776,8 +804,9 @@ public final Builder ignoreUnavailable(@Nullable Boolean value) { } /** - * Required - A comma-separated list of index names to search; use - * _all or empty string to perform the operation on all indices + * Required - Comma-separated list of data streams, indices, and aliases to + * search. Supports wildcards (*). To search all data streams or + * indices, omit this parameter or use * or _all. *

* API name: {@code index} *

@@ -789,8 +818,9 @@ public final Builder index(List list) { } /** - * Required - A comma-separated list of index names to search; use - * _all or empty string to perform the operation on all indices + * Required - Comma-separated list of data streams, indices, and aliases to + * search. Supports wildcards (*). To search all data streams or + * indices, omit this parameter or use * or _all. *

* API name: {@code index} *

@@ -802,8 +832,8 @@ public final Builder index(String value, String... values) { } /** - * Specify whether format-based query failures (such as providing text to a - * numeric field) should be ignored + * If true, format-based query failures (such as providing text to + * a numeric field) in the query string will be ignored. *

* API name: {@code lenient} */ @@ -813,6 +843,8 @@ public final Builder lenient(@Nullable Boolean value) { } /** + * The maximum number of documents to delete. + *

* API name: {@code max_docs} */ public final Builder maxDocs(@Nullable Long value) { @@ -821,8 +853,8 @@ public final Builder maxDocs(@Nullable Long value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -832,7 +864,7 @@ public final Builder preference(@Nullable String value) { } /** - * Query in the Lucene query string syntax + * Query in the Lucene query string syntax. *

* API name: {@code q} */ @@ -842,6 +874,8 @@ public final Builder q(@Nullable String value) { } /** + * Specifies the documents to delete using the Query DSL. + *

* API name: {@code query} */ public final Builder query(@Nullable Query value) { @@ -850,6 +884,8 @@ public final Builder query(@Nullable Query value) { } /** + * Specifies the documents to delete using the Query DSL. + *

* API name: {@code query} */ public final Builder query(Function> fn) { @@ -857,7 +893,8 @@ public final Builder query(Function> fn) { } /** - * Should the affected indexes be refreshed? + * If true, Elasticsearch refreshes all shards involved in the + * delete by query after the request completes. *

* API name: {@code refresh} */ @@ -867,8 +904,8 @@ public final Builder refresh(@Nullable Boolean value) { } /** - * Specify if request cache should be used for this request or not, defaults to - * index level setting + * If true, the request cache is used for this request. Defaults to + * the index-level setting. *

* API name: {@code request_cache} */ @@ -878,8 +915,7 @@ public final Builder requestCache(@Nullable Boolean value) { } /** - * The throttle for this request in sub-requests per second. -1 means no - * throttle. + * The throttle for this request in sub-requests per second. *

* API name: {@code requests_per_second} */ @@ -889,7 +925,7 @@ public final Builder requestsPerSecond(@Nullable Float value) { } /** - * A comma-separated list of specific routing values + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -899,8 +935,7 @@ public final Builder routing(@Nullable String value) { } /** - * Specify how long a consistent view of the index should be maintained for - * scrolled search + * Period to retain the search context for scrolling. *

* API name: {@code scroll} */ @@ -910,8 +945,7 @@ public final Builder scroll(@Nullable Time value) { } /** - * Specify how long a consistent view of the index should be maintained for - * scrolled search + * Period to retain the search context for scrolling. *

* API name: {@code scroll} */ @@ -920,7 +954,7 @@ public final Builder scroll(Function> fn) { } /** - * Size on the scroll request powering the delete by query + * Size of the scroll request that powers the operation. *

* API name: {@code scroll_size} */ @@ -949,7 +983,8 @@ public final Builder searchTimeout(Function> f } /** - * Search operation type + * The type of the search operation. Available options: + * query_then_fetch, dfs_query_then_fetch. *

* API name: {@code search_type} */ @@ -959,6 +994,9 @@ public final Builder searchType(@Nullable SearchType value) { } /** + * Slice the request manually using the provided slice ID and total number of + * slices. + *

* API name: {@code slice} */ public final Builder slice(@Nullable SlicedScroll value) { @@ -967,6 +1005,9 @@ public final Builder slice(@Nullable SlicedScroll value) { } /** + * Slice the request manually using the provided slice ID and total number of + * slices. + *

* API name: {@code slice} */ public final Builder slice(Function> fn) { @@ -974,8 +1015,7 @@ public final Builder slice(Functionauto. + * The number of slices this task should be divided into. *

* API name: {@code slices} */ @@ -985,8 +1025,7 @@ public final Builder slices(@Nullable Slices value) { } /** - * The number of slices this task should be divided into. Defaults to 1, meaning - * the task isn't sliced into subtasks. Can be set to auto. + * The number of slices this task should be divided into. *

* API name: {@code slices} */ @@ -995,7 +1034,7 @@ public final Builder slices(Function> fn) } /** - * A comma-separated list of <field>:<direction> pairs + * A comma-separated list of <field>:<direction> pairs. *

* API name: {@code sort} *

@@ -1007,7 +1046,7 @@ public final Builder sort(List list) { } /** - * A comma-separated list of <field>:<direction> pairs + * A comma-separated list of <field>:<direction> pairs. *

* API name: {@code sort} *

@@ -1019,7 +1058,8 @@ public final Builder sort(String value, String... values) { } /** - * Specific 'tag' of the request for logging and statistical purposes + * Specific tag of the request for logging and statistical + * purposes. *

* API name: {@code stats} *

@@ -1031,7 +1071,8 @@ public final Builder stats(List list) { } /** - * Specific 'tag' of the request for logging and statistical purposes + * Specific tag of the request for logging and statistical + * purposes. *

* API name: {@code stats} *

@@ -1043,8 +1084,13 @@ public final Builder stats(String value, String... values) { } /** - * The maximum number of documents to collect for each shard, upon reaching - * which the query execution will terminate early. + * Maximum number of documents to collect for each shard. If a query reaches + * this limit, Elasticsearch terminates the query early. Elasticsearch collects + * documents before sorting. Use with caution. Elasticsearch applies this + * parameter to each shard handling the request. When possible, let + * Elasticsearch perform early termination automatically. Avoid specifying this + * parameter for requests that target data streams with backing indices across + * multiple data tiers. *

* API name: {@code terminate_after} */ @@ -1054,8 +1100,7 @@ public final Builder terminateAfter(@Nullable Long value) { } /** - * Time each individual bulk request should wait for shards that are - * unavailable. + * Period each deletion request waits for active shards. *

* API name: {@code timeout} */ @@ -1065,8 +1110,7 @@ public final Builder timeout(@Nullable Time value) { } /** - * Time each individual bulk request should wait for shards that are - * unavailable. + * Period each deletion request waits for active shards. *

* API name: {@code timeout} */ @@ -1075,7 +1119,7 @@ public final Builder timeout(Function> fn) { } /** - * Specify whether to return document version as part of a hit + * If true, returns the document version as part of a hit. *

* API name: {@code version} */ @@ -1085,11 +1129,9 @@ public final Builder version(@Nullable Boolean value) { } /** - * Sets the number of shard copies that must be active before proceeding with - * the delete by query operation. Defaults to 1, meaning the primary shard only. - * Set to all for all shard copies, otherwise set to any - * non-negative value less than or equal to the total number of copies for the - * shard (number of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total number of + * shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -1099,11 +1141,9 @@ public final Builder waitForActiveShards(@Nullable WaitForActiveShards value) { } /** - * Sets the number of shard copies that must be active before proceeding with - * the delete by query operation. Defaults to 1, meaning the primary shard only. - * Set to all for all shard copies, otherwise set to any - * non-negative value less than or equal to the total number of copies for the - * shard (number of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total number of + * shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -1113,7 +1153,7 @@ public final Builder waitForActiveShards( } /** - * Should the request should block until the delete by query is complete. + * If true, the request blocks until the operation is complete. *

* API name: {@code wait_for_completion} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java index 6fce6a54f..270a6f0d3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java @@ -74,8 +74,7 @@ public static DeleteByQueryRethrottleRequest of( } /** - * The throttle to set on this request in floating sub-requests per second. -1 - * means set no throttle. + * The throttle for this request in sub-requests per second. *

* API name: {@code requests_per_second} */ @@ -85,7 +84,7 @@ public final Float requestsPerSecond() { } /** - * Required - The task id to rethrottle + * Required - The ID for the task. *

* API name: {@code task_id} */ @@ -108,8 +107,7 @@ public static class Builder extends RequestBase.AbstractBuilder private String taskId; /** - * The throttle to set on this request in floating sub-requests per second. -1 - * means set no throttle. + * The throttle for this request in sub-requests per second. *

* API name: {@code requests_per_second} */ @@ -119,7 +117,7 @@ public final Builder requestsPerSecond(@Nullable Float value) { } /** - * Required - The task id to rethrottle + * Required - The ID for the task. *

* API name: {@code task_id} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteRequest.java index 8cd658a77..f074861c2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteRequest.java @@ -49,7 +49,7 @@ // typedef: _global.delete.Request /** - * Removes a document from the index. + * Removes a JSON document from the specified index. * * @see API * specification @@ -106,7 +106,7 @@ public static DeleteRequest of(Function> f } /** - * Required - The document ID + * Required - Unique identifier for the document. *

* API name: {@code id} */ @@ -115,8 +115,7 @@ public final String id() { } /** - * only perform the delete operation if the last operation that has changed the - * document has the specified primary term + * Only perform the operation if the document has this primary term. *

* API name: {@code if_primary_term} */ @@ -126,8 +125,7 @@ public final Long ifPrimaryTerm() { } /** - * only perform the delete operation if the last operation that has changed the - * document has the specified sequence number + * Only perform the operation if the document has this sequence number. *

* API name: {@code if_seq_no} */ @@ -137,7 +135,7 @@ public final Long ifSeqNo() { } /** - * Required - The name of the index + * Required - Name of the target index. *

* API name: {@code index} */ @@ -146,10 +144,11 @@ public final String index() { } /** - * If true then refresh the affected shards to make this operation - * visible to search, if wait_for then wait for a refresh to make - * this operation visible to search, if false (the default) then do - * nothing with refreshes. + * If true, Elasticsearch refreshes the affected shards to make + * this operation visible to search, if wait_for then wait for a + * refresh to make this operation visible to search, if false do + * nothing with refreshes. Valid values: true, false, + * wait_for. *

* API name: {@code refresh} */ @@ -159,7 +158,7 @@ public final Refresh refresh() { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -169,7 +168,7 @@ public final String routing() { } /** - * Explicit operation timeout + * Period to wait for active shards. *

* API name: {@code timeout} */ @@ -179,7 +178,8 @@ public final Time timeout() { } /** - * Explicit version number for concurrency control + * Explicit version number for concurrency control. The specified version must + * match the current version of the document for the request to succeed. *

* API name: {@code version} */ @@ -189,7 +189,7 @@ public final Long version() { } /** - * Specific version type + * Specific version type: external, external_gte. *

* API name: {@code version_type} */ @@ -199,11 +199,9 @@ public final VersionType versionType() { } /** - * Sets the number of shard copies that must be active before proceeding with - * the delete operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total + * number of shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -248,7 +246,7 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private WaitForActiveShards waitForActiveShards; /** - * Required - The document ID + * Required - Unique identifier for the document. *

* API name: {@code id} */ @@ -258,8 +256,7 @@ public final Builder id(String value) { } /** - * only perform the delete operation if the last operation that has changed the - * document has the specified primary term + * Only perform the operation if the document has this primary term. *

* API name: {@code if_primary_term} */ @@ -269,8 +266,7 @@ public final Builder ifPrimaryTerm(@Nullable Long value) { } /** - * only perform the delete operation if the last operation that has changed the - * document has the specified sequence number + * Only perform the operation if the document has this sequence number. *

* API name: {@code if_seq_no} */ @@ -280,7 +276,7 @@ public final Builder ifSeqNo(@Nullable Long value) { } /** - * Required - The name of the index + * Required - Name of the target index. *

* API name: {@code index} */ @@ -290,10 +286,11 @@ public final Builder index(String value) { } /** - * If true then refresh the affected shards to make this operation - * visible to search, if wait_for then wait for a refresh to make - * this operation visible to search, if false (the default) then do - * nothing with refreshes. + * If true, Elasticsearch refreshes the affected shards to make + * this operation visible to search, if wait_for then wait for a + * refresh to make this operation visible to search, if false do + * nothing with refreshes. Valid values: true, false, + * wait_for. *

* API name: {@code refresh} */ @@ -303,7 +300,7 @@ public final Builder refresh(@Nullable Refresh value) { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -313,7 +310,7 @@ public final Builder routing(@Nullable String value) { } /** - * Explicit operation timeout + * Period to wait for active shards. *

* API name: {@code timeout} */ @@ -323,7 +320,7 @@ public final Builder timeout(@Nullable Time value) { } /** - * Explicit operation timeout + * Period to wait for active shards. *

* API name: {@code timeout} */ @@ -332,7 +329,8 @@ public final Builder timeout(Function> fn) { } /** - * Explicit version number for concurrency control + * Explicit version number for concurrency control. The specified version must + * match the current version of the document for the request to succeed. *

* API name: {@code version} */ @@ -342,7 +340,7 @@ public final Builder version(@Nullable Long value) { } /** - * Specific version type + * Specific version type: external, external_gte. *

* API name: {@code version_type} */ @@ -352,11 +350,9 @@ public final Builder versionType(@Nullable VersionType value) { } /** - * Sets the number of shard copies that must be active before proceeding with - * the delete operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total + * number of shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -366,11 +362,9 @@ public final Builder waitForActiveShards(@Nullable WaitForActiveShards value) { } /** - * Sets the number of shard copies that must be active before proceeding with - * the delete operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total + * number of shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteScriptRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteScriptRequest.java index da3d6c4f1..696492663 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteScriptRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteScriptRequest.java @@ -45,7 +45,7 @@ // typedef: _global.delete_script.Request /** - * Deletes a script. + * Deletes a stored script or search template. * * @see API * specification @@ -75,7 +75,7 @@ public static DeleteScriptRequest of(Function * API name: {@code id} */ @@ -84,7 +84,8 @@ public final String id() { } /** - * Specify timeout for connection to master + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. *

* API name: {@code master_timeout} */ @@ -94,7 +95,8 @@ public final Time masterTimeout() { } /** - * Explicit operation timeout + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. *

* API name: {@code timeout} */ @@ -121,7 +123,7 @@ public static class Builder extends RequestBase.AbstractBuilder private Time timeout; /** - * Required - Script ID + * Required - Identifier for the stored script or search template. *

* API name: {@code id} */ @@ -131,7 +133,8 @@ public final Builder id(String value) { } /** - * Specify timeout for connection to master + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. *

* API name: {@code master_timeout} */ @@ -141,7 +144,8 @@ public final Builder masterTimeout(@Nullable Time value) { } /** - * Specify timeout for connection to master + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. *

* API name: {@code master_timeout} */ @@ -150,7 +154,8 @@ public final Builder masterTimeout(Function> f } /** - * Explicit operation timeout + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. *

* API name: {@code timeout} */ @@ -160,7 +165,8 @@ public final Builder timeout(@Nullable Time value) { } /** - * Explicit operation timeout + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. *

* API name: {@code timeout} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsRequest.java index b86dd3793..ff0b7e4e1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsRequest.java @@ -52,7 +52,7 @@ // typedef: _global.exists.Request /** - * Returns information about whether a document exists in an index. + * Checks if a document in an index exists. * * @see API * specification @@ -114,8 +114,8 @@ public static ExistsRequest of(Function> f } /** - * True or false to return the _source field or not, or a list of fields to - * return + * true or false to return the _source + * field or not, or a list of fields to return. *

* API name: {@code _source} */ @@ -125,7 +125,7 @@ public final SourceConfigParam source() { } /** - * A list of fields to exclude from the returned _source field + * A comma-separated list of source fields to exclude in the response. *

* API name: {@code _source_excludes} */ @@ -134,7 +134,7 @@ public final List sourceExcludes() { } /** - * A list of fields to extract and return from the _source field + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} */ @@ -143,7 +143,7 @@ public final List sourceIncludes() { } /** - * Required - The document ID + * Required - Identifier of the document. *

* API name: {@code id} */ @@ -152,7 +152,8 @@ public final String id() { } /** - * Required - The name of the index + * Required - Comma-separated list of data streams, indices, and aliases. + * Supports wildcards (*). *

* API name: {@code index} */ @@ -161,8 +162,8 @@ public final String index() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -172,7 +173,7 @@ public final String preference() { } /** - * Specify whether to perform the operation in realtime or search mode + * If true, the request is real-time as opposed to near-real-time. *

* API name: {@code realtime} */ @@ -182,7 +183,8 @@ public final Boolean realtime() { } /** - * Refresh the shard containing the document before performing the operation + * If true, Elasticsearch refreshes all shards involved in the + * delete by query after the request completes. *

* API name: {@code refresh} */ @@ -192,7 +194,7 @@ public final Boolean refresh() { } /** - * Specific routing value + * Target the specified primary shard. *

* API name: {@code routing} */ @@ -202,7 +204,9 @@ public final String routing() { } /** - * A comma-separated list of stored fields to return in the response + * List of stored fields to return as part of a hit. If no fields are specified, + * no stored fields are included in the response. If this field is specified, + * the _source parameter defaults to false. *

* API name: {@code stored_fields} */ @@ -211,7 +215,8 @@ public final List storedFields() { } /** - * Explicit version number for concurrency control + * Explicit version number for concurrency control. The specified version must + * match the current version of the document for the request to succeed. *

* API name: {@code version} */ @@ -221,7 +226,7 @@ public final Long version() { } /** - * Specific version type + * Specific version type: external, external_gte. *

* API name: {@code version_type} */ @@ -272,8 +277,8 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private VersionType versionType; /** - * True or false to return the _source field or not, or a list of fields to - * return + * true or false to return the _source + * field or not, or a list of fields to return. *

* API name: {@code _source} */ @@ -283,8 +288,8 @@ public final Builder source(@Nullable SourceConfigParam value) { } /** - * True or false to return the _source field or not, or a list of fields to - * return + * true or false to return the _source + * field or not, or a list of fields to return. *

* API name: {@code _source} */ @@ -293,7 +298,7 @@ public final Builder source(Function * API name: {@code _source_excludes} *

@@ -305,7 +310,7 @@ public final Builder sourceExcludes(List list) { } /** - * A list of fields to exclude from the returned _source field + * A comma-separated list of source fields to exclude in the response. *

* API name: {@code _source_excludes} *

@@ -317,7 +322,7 @@ public final Builder sourceExcludes(String value, String... values) { } /** - * A list of fields to extract and return from the _source field + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} *

@@ -329,7 +334,7 @@ public final Builder sourceIncludes(List list) { } /** - * A list of fields to extract and return from the _source field + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} *

@@ -341,7 +346,7 @@ public final Builder sourceIncludes(String value, String... values) { } /** - * Required - The document ID + * Required - Identifier of the document. *

* API name: {@code id} */ @@ -351,7 +356,8 @@ public final Builder id(String value) { } /** - * Required - The name of the index + * Required - Comma-separated list of data streams, indices, and aliases. + * Supports wildcards (*). *

* API name: {@code index} */ @@ -361,8 +367,8 @@ public final Builder index(String value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -372,7 +378,7 @@ public final Builder preference(@Nullable String value) { } /** - * Specify whether to perform the operation in realtime or search mode + * If true, the request is real-time as opposed to near-real-time. *

* API name: {@code realtime} */ @@ -382,7 +388,8 @@ public final Builder realtime(@Nullable Boolean value) { } /** - * Refresh the shard containing the document before performing the operation + * If true, Elasticsearch refreshes all shards involved in the + * delete by query after the request completes. *

* API name: {@code refresh} */ @@ -392,7 +399,7 @@ public final Builder refresh(@Nullable Boolean value) { } /** - * Specific routing value + * Target the specified primary shard. *

* API name: {@code routing} */ @@ -402,7 +409,9 @@ public final Builder routing(@Nullable String value) { } /** - * A comma-separated list of stored fields to return in the response + * List of stored fields to return as part of a hit. If no fields are specified, + * no stored fields are included in the response. If this field is specified, + * the _source parameter defaults to false. *

* API name: {@code stored_fields} *

@@ -414,7 +423,9 @@ public final Builder storedFields(List list) { } /** - * A comma-separated list of stored fields to return in the response + * List of stored fields to return as part of a hit. If no fields are specified, + * no stored fields are included in the response. If this field is specified, + * the _source parameter defaults to false. *

* API name: {@code stored_fields} *

@@ -426,7 +437,8 @@ public final Builder storedFields(String value, String... values) { } /** - * Explicit version number for concurrency control + * Explicit version number for concurrency control. The specified version must + * match the current version of the document for the request to succeed. *

* API name: {@code version} */ @@ -436,7 +448,7 @@ public final Builder version(@Nullable Long value) { } /** - * Specific version type + * Specific version type: external, external_gte. *

* API name: {@code version_type} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsSourceRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsSourceRequest.java index fef36572e..16d6cf7ca 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsSourceRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsSourceRequest.java @@ -52,7 +52,7 @@ // typedef: _global.exists_source.Request /** - * Returns information about whether a document source exists in an index. + * Checks if a document's _source is stored. * * @see API * specification @@ -111,8 +111,8 @@ public static ExistsSourceRequest of(Functiontrue or false to return the _source + * field or not, or a list of fields to return. *

* API name: {@code _source} */ @@ -122,7 +122,7 @@ public final SourceConfigParam source() { } /** - * A list of fields to exclude from the returned _source field + * A comma-separated list of source fields to exclude in the response. *

* API name: {@code _source_excludes} */ @@ -131,7 +131,7 @@ public final List sourceExcludes() { } /** - * A list of fields to extract and return from the _source field + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} */ @@ -140,7 +140,7 @@ public final List sourceIncludes() { } /** - * Required - The document ID + * Required - Identifier of the document. *

* API name: {@code id} */ @@ -149,7 +149,8 @@ public final String id() { } /** - * Required - The name of the index + * Required - Comma-separated list of data streams, indices, and aliases. + * Supports wildcards (*). *

* API name: {@code index} */ @@ -158,8 +159,8 @@ public final String index() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -169,7 +170,7 @@ public final String preference() { } /** - * Specify whether to perform the operation in realtime or search mode + * If true, the request is real-time as opposed to near-real-time. *

* API name: {@code realtime} */ @@ -179,7 +180,8 @@ public final Boolean realtime() { } /** - * Refresh the shard containing the document before performing the operation + * If true, Elasticsearch refreshes all shards involved in the + * delete by query after the request completes. *

* API name: {@code refresh} */ @@ -189,7 +191,7 @@ public final Boolean refresh() { } /** - * Specific routing value + * Target the specified primary shard. *

* API name: {@code routing} */ @@ -199,7 +201,8 @@ public final String routing() { } /** - * Explicit version number for concurrency control + * Explicit version number for concurrency control. The specified version must + * match the current version of the document for the request to succeed. *

* API name: {@code version} */ @@ -209,7 +212,7 @@ public final Long version() { } /** - * Specific version type + * Specific version type: external, external_gte. *

* API name: {@code version_type} */ @@ -259,8 +262,8 @@ public static class Builder extends RequestBase.AbstractBuilder private VersionType versionType; /** - * True or false to return the _source field or not, or a list of fields to - * return + * true or false to return the _source + * field or not, or a list of fields to return. *

* API name: {@code _source} */ @@ -270,8 +273,8 @@ public final Builder source(@Nullable SourceConfigParam value) { } /** - * True or false to return the _source field or not, or a list of fields to - * return + * true or false to return the _source + * field or not, or a list of fields to return. *

* API name: {@code _source} */ @@ -280,7 +283,7 @@ public final Builder source(Function * API name: {@code _source_excludes} *

@@ -292,7 +295,7 @@ public final Builder sourceExcludes(List list) { } /** - * A list of fields to exclude from the returned _source field + * A comma-separated list of source fields to exclude in the response. *

* API name: {@code _source_excludes} *

@@ -304,7 +307,7 @@ public final Builder sourceExcludes(String value, String... values) { } /** - * A list of fields to extract and return from the _source field + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} *

@@ -316,7 +319,7 @@ public final Builder sourceIncludes(List list) { } /** - * A list of fields to extract and return from the _source field + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} *

@@ -328,7 +331,7 @@ public final Builder sourceIncludes(String value, String... values) { } /** - * Required - The document ID + * Required - Identifier of the document. *

* API name: {@code id} */ @@ -338,7 +341,8 @@ public final Builder id(String value) { } /** - * Required - The name of the index + * Required - Comma-separated list of data streams, indices, and aliases. + * Supports wildcards (*). *

* API name: {@code index} */ @@ -348,8 +352,8 @@ public final Builder index(String value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -359,7 +363,7 @@ public final Builder preference(@Nullable String value) { } /** - * Specify whether to perform the operation in realtime or search mode + * If true, the request is real-time as opposed to near-real-time. *

* API name: {@code realtime} */ @@ -369,7 +373,8 @@ public final Builder realtime(@Nullable Boolean value) { } /** - * Refresh the shard containing the document before performing the operation + * If true, Elasticsearch refreshes all shards involved in the + * delete by query after the request completes. *

* API name: {@code refresh} */ @@ -379,7 +384,7 @@ public final Builder refresh(@Nullable Boolean value) { } /** - * Specific routing value + * Target the specified primary shard. *

* API name: {@code routing} */ @@ -389,7 +394,8 @@ public final Builder routing(@Nullable String value) { } /** - * Explicit version number for concurrency control + * Explicit version number for concurrency control. The specified version must + * match the current version of the document for the request to succeed. *

* API name: {@code version} */ @@ -399,7 +405,7 @@ public final Builder version(@Nullable Long value) { } /** - * Specific version type + * Specific version type: external, external_gte. *

* API name: {@code version_type} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExplainRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExplainRequest.java index a4e54b0c5..ddf8878df 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExplainRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExplainRequest.java @@ -52,7 +52,8 @@ // typedef: _global.explain.Request /** - * Returns information about why a specific matches (or doesn't match) a query. + * Returns information about why a specific document matches (or doesn’t match) + * a query. * * @see API * specification @@ -126,8 +127,8 @@ public static ExplainRequest of(Function> } /** - * True or false to return the _source field or not, or a list of fields to - * return + * True or false to return the _source field or not, or a list of + * fields to return. *

* API name: {@code _source} */ @@ -137,7 +138,7 @@ public final SourceConfigParam source() { } /** - * A list of fields to exclude from the returned _source field + * A comma-separated list of source fields to exclude from the response. *

* API name: {@code _source_excludes} */ @@ -146,7 +147,7 @@ public final List sourceExcludes() { } /** - * A list of fields to extract and return from the _source field + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} */ @@ -155,8 +156,7 @@ public final List sourceIncludes() { } /** - * Specify whether wildcards and prefix queries in the query string query should - * be analyzed (default: false) + * If true, wildcard and prefix queries are analyzed. *

* API name: {@code analyze_wildcard} */ @@ -166,7 +166,8 @@ public final Boolean analyzeWildcard() { } /** - * The analyzer for the query string query + * Analyzer to use for the query string. This parameter can only be used when + * the q query string parameter is specified. *

* API name: {@code analyzer} */ @@ -176,7 +177,8 @@ public final String analyzer() { } /** - * The default operator for query string query (AND or OR) + * The default operator for query string query: AND or + * OR. *

* API name: {@code default_operator} */ @@ -186,7 +188,7 @@ public final Operator defaultOperator() { } /** - * The default field for query string query (default: _all) + * Field to use as default where no field prefix is given in the query string. *

* API name: {@code df} */ @@ -196,7 +198,7 @@ public final String df() { } /** - * Required - The document ID + * Required - Defines the document ID. *

* API name: {@code id} */ @@ -205,7 +207,8 @@ public final String id() { } /** - * Required - The name of the index + * Required - Index names used to limit the request. Only a single index name + * can be provided to this parameter. *

* API name: {@code index} */ @@ -214,8 +217,8 @@ public final String index() { } /** - * Specify whether format-based query failures (such as providing text to a - * numeric field) should be ignored + * If true, format-based query failures (such as providing text to + * a numeric field) in the query string will be ignored. *

* API name: {@code lenient} */ @@ -225,8 +228,8 @@ public final Boolean lenient() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -236,7 +239,7 @@ public final String preference() { } /** - * Query in the Lucene query string syntax + * Query in the Lucene query string syntax. *

* API name: {@code q} */ @@ -246,6 +249,8 @@ public final String q() { } /** + * Defines the search definition using the Query DSL. + *

* API name: {@code query} */ @Nullable @@ -254,7 +259,7 @@ public final Query query() { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -264,7 +269,7 @@ public final String routing() { } /** - * A comma-separated list of stored fields to return in the response + * A comma-separated list of stored fields to return in the response. *

* API name: {@code stored_fields} */ @@ -342,8 +347,8 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private List storedFields; /** - * True or false to return the _source field or not, or a list of fields to - * return + * True or false to return the _source field or not, or a list of + * fields to return. *

* API name: {@code _source} */ @@ -353,8 +358,8 @@ public final Builder source(@Nullable SourceConfigParam value) { } /** - * True or false to return the _source field or not, or a list of fields to - * return + * True or false to return the _source field or not, or a list of + * fields to return. *

* API name: {@code _source} */ @@ -363,7 +368,7 @@ public final Builder source(Function * API name: {@code _source_excludes} *

@@ -375,7 +380,7 @@ public final Builder sourceExcludes(List list) { } /** - * A list of fields to exclude from the returned _source field + * A comma-separated list of source fields to exclude from the response. *

* API name: {@code _source_excludes} *

@@ -387,7 +392,7 @@ public final Builder sourceExcludes(String value, String... values) { } /** - * A list of fields to extract and return from the _source field + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} *

@@ -399,7 +404,7 @@ public final Builder sourceIncludes(List list) { } /** - * A list of fields to extract and return from the _source field + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} *

@@ -411,8 +416,7 @@ public final Builder sourceIncludes(String value, String... values) { } /** - * Specify whether wildcards and prefix queries in the query string query should - * be analyzed (default: false) + * If true, wildcard and prefix queries are analyzed. *

* API name: {@code analyze_wildcard} */ @@ -422,7 +426,8 @@ public final Builder analyzeWildcard(@Nullable Boolean value) { } /** - * The analyzer for the query string query + * Analyzer to use for the query string. This parameter can only be used when + * the q query string parameter is specified. *

* API name: {@code analyzer} */ @@ -432,7 +437,8 @@ public final Builder analyzer(@Nullable String value) { } /** - * The default operator for query string query (AND or OR) + * The default operator for query string query: AND or + * OR. *

* API name: {@code default_operator} */ @@ -442,7 +448,7 @@ public final Builder defaultOperator(@Nullable Operator value) { } /** - * The default field for query string query (default: _all) + * Field to use as default where no field prefix is given in the query string. *

* API name: {@code df} */ @@ -452,7 +458,7 @@ public final Builder df(@Nullable String value) { } /** - * Required - The document ID + * Required - Defines the document ID. *

* API name: {@code id} */ @@ -462,7 +468,8 @@ public final Builder id(String value) { } /** - * Required - The name of the index + * Required - Index names used to limit the request. Only a single index name + * can be provided to this parameter. *

* API name: {@code index} */ @@ -472,8 +479,8 @@ public final Builder index(String value) { } /** - * Specify whether format-based query failures (such as providing text to a - * numeric field) should be ignored + * If true, format-based query failures (such as providing text to + * a numeric field) in the query string will be ignored. *

* API name: {@code lenient} */ @@ -483,8 +490,8 @@ public final Builder lenient(@Nullable Boolean value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -494,7 +501,7 @@ public final Builder preference(@Nullable String value) { } /** - * Query in the Lucene query string syntax + * Query in the Lucene query string syntax. *

* API name: {@code q} */ @@ -504,6 +511,8 @@ public final Builder q(@Nullable String value) { } /** + * Defines the search definition using the Query DSL. + *

* API name: {@code query} */ public final Builder query(@Nullable Query value) { @@ -512,6 +521,8 @@ public final Builder query(@Nullable Query value) { } /** + * Defines the search definition using the Query DSL. + *

* API name: {@code query} */ public final Builder query(Function> fn) { @@ -519,7 +530,7 @@ public final Builder query(Function> fn) { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -529,7 +540,7 @@ public final Builder routing(@Nullable String value) { } /** - * A comma-separated list of stored fields to return in the response + * A comma-separated list of stored fields to return in the response. *

* API name: {@code stored_fields} *

@@ -541,7 +552,7 @@ public final Builder storedFields(List list) { } /** - * A comma-separated list of stored fields to return in the response + * A comma-separated list of stored fields to return in the response. *

* API name: {@code stored_fields} *

diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetRequest.java index 8b40ddae4..afec0bd70 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetRequest.java @@ -170,7 +170,7 @@ public final String preference() { } /** - * Boolean) If true, the request is real-time as opposed to near-real-time. + * If true, the request is real-time as opposed to near-real-time. *

* API name: {@code realtime} */ @@ -201,7 +201,9 @@ public final String routing() { } /** - * A comma-separated list of stored fields to return in the response + * List of stored fields to return as part of a hit. If no fields are specified, + * no stored fields are included in the response. If this field is specified, + * the _source parameter defaults to false. *

* API name: {@code stored_fields} */ @@ -372,7 +374,7 @@ public final Builder preference(@Nullable String value) { } /** - * Boolean) If true, the request is real-time as opposed to near-real-time. + * If true, the request is real-time as opposed to near-real-time. *

* API name: {@code realtime} */ @@ -403,7 +405,9 @@ public final Builder routing(@Nullable String value) { } /** - * A comma-separated list of stored fields to return in the response + * List of stored fields to return as part of a hit. If no fields are specified, + * no stored fields are included in the response. If this field is specified, + * the _source parameter defaults to false. *

* API name: {@code stored_fields} *

@@ -415,7 +419,9 @@ public final Builder storedFields(List list) { } /** - * A comma-separated list of stored fields to return in the response + * List of stored fields to return as part of a hit. If no fields are specified, + * no stored fields are included in the response. If this field is specified, + * the _source parameter defaults to false. *

* API name: {@code stored_fields} *

diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptRequest.java index 65d057ae2..72da3f3bd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptRequest.java @@ -45,7 +45,7 @@ // typedef: _global.get_script.Request /** - * Returns a script. + * Retrieves a stored script or search template. * * @see API * specification @@ -71,7 +71,7 @@ public static GetScriptRequest of(Function * API name: {@code id} */ @@ -104,7 +104,7 @@ public static class Builder extends RequestBase.AbstractBuilder private Time masterTimeout; /** - * Required - Script ID + * Required - Identifier for the stored script or search template. *

* API name: {@code id} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/IndexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/IndexRequest.java index 4ea3ab8f2..1960e402e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/IndexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/IndexRequest.java @@ -58,7 +58,9 @@ // typedef: _global.index.Request /** - * Creates or updates a document in an index. + * Adds a JSON document to the specified data stream or index and makes it + * searchable. If the target is an index and the document already exists, the + * request updates the document and increments its version. * * @see API * specification @@ -136,7 +138,7 @@ public static IndexRequest of( } /** - * Document ID + * Unique identifier for the document. *

* API name: {@code id} */ @@ -146,8 +148,7 @@ public final String id() { } /** - * only perform the index operation if the last operation that has changed the - * document has the specified primary term + * Only perform the operation if the document has this primary term. *

* API name: {@code if_primary_term} */ @@ -157,8 +158,7 @@ public final Long ifPrimaryTerm() { } /** - * only perform the index operation if the last operation that has changed the - * document has the specified sequence number + * Only perform the operation if the document has this sequence number. *

* API name: {@code if_seq_no} */ @@ -168,7 +168,7 @@ public final Long ifSeqNo() { } /** - * Required - The name of the index + * Required - Name of the data stream or index to target. *

* API name: {@code index} */ @@ -177,9 +177,13 @@ public final String index() { } /** - * Explicit operation type. Defaults to index for requests with an - * explicit document ID, and to createfor requests without an - * explicit document ID + * Set to create to only index the document if it does not already exist (put if + * absent). If a document with the specified _id already exists, + * the indexing operation will fail. Same as using the + * <index>/_create endpoint. Valid values: + * index, create. If document id is specified, it + * defaults to index. Otherwise, it defaults to + * create. *

* API name: {@code op_type} */ @@ -189,7 +193,11 @@ public final OpType opType() { } /** - * The pipeline id to preprocess incoming documents with + * ID of the pipeline to use to preprocess incoming documents. If the index has + * a default ingest pipeline specified, then setting the value to + * _none disables the default ingest pipeline for this request. If + * a final pipeline is configured it will always run, regardless of the value of + * this parameter. *

* API name: {@code pipeline} */ @@ -199,10 +207,11 @@ public final String pipeline() { } /** - * If true then refresh the affected shards to make this operation - * visible to search, if wait_for then wait for a refresh to make - * this operation visible to search, if false (the default) then do - * nothing with refreshes. + * If true, Elasticsearch refreshes the affected shards to make + * this operation visible to search, if wait_for then wait for a + * refresh to make this operation visible to search, if false do + * nothing with refreshes. Valid values: true, false, + * wait_for. *

* API name: {@code refresh} */ @@ -212,7 +221,7 @@ public final Refresh refresh() { } /** - * When true, requires destination to be an alias. Default is false + * If true, the destination must be an index alias. *

* API name: {@code require_alias} */ @@ -222,7 +231,7 @@ public final Boolean requireAlias() { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -232,7 +241,8 @@ public final String routing() { } /** - * Explicit operation timeout + * Period the request waits for the following operations: automatic index + * creation, dynamic mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -242,7 +252,8 @@ public final Time timeout() { } /** - * Explicit version number for concurrency control + * Explicit version number for concurrency control. The specified version must + * match the current version of the document for the request to succeed. *

* API name: {@code version} */ @@ -252,7 +263,7 @@ public final Long version() { } /** - * Specific version type + * Specific version type: external, external_gte. *

* API name: {@code version_type} */ @@ -262,11 +273,9 @@ public final VersionType versionType() { } /** - * Sets the number of shard copies that must be active before proceeding with - * the index operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total number of + * shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -343,7 +352,7 @@ public static class Builder extends RequestBase.AbstractBuilder tDocumentSerializer; /** - * Document ID + * Unique identifier for the document. *

* API name: {@code id} */ @@ -353,8 +362,7 @@ public final Builder id(@Nullable String value) { } /** - * only perform the index operation if the last operation that has changed the - * document has the specified primary term + * Only perform the operation if the document has this primary term. *

* API name: {@code if_primary_term} */ @@ -364,8 +372,7 @@ public final Builder ifPrimaryTerm(@Nullable Long value) { } /** - * only perform the index operation if the last operation that has changed the - * document has the specified sequence number + * Only perform the operation if the document has this sequence number. *

* API name: {@code if_seq_no} */ @@ -375,7 +382,7 @@ public final Builder ifSeqNo(@Nullable Long value) { } /** - * Required - The name of the index + * Required - Name of the data stream or index to target. *

* API name: {@code index} */ @@ -385,9 +392,13 @@ public final Builder index(String value) { } /** - * Explicit operation type. Defaults to index for requests with an - * explicit document ID, and to createfor requests without an - * explicit document ID + * Set to create to only index the document if it does not already exist (put if + * absent). If a document with the specified _id already exists, + * the indexing operation will fail. Same as using the + * <index>/_create endpoint. Valid values: + * index, create. If document id is specified, it + * defaults to index. Otherwise, it defaults to + * create. *

* API name: {@code op_type} */ @@ -397,7 +408,11 @@ public final Builder opType(@Nullable OpType value) { } /** - * The pipeline id to preprocess incoming documents with + * ID of the pipeline to use to preprocess incoming documents. If the index has + * a default ingest pipeline specified, then setting the value to + * _none disables the default ingest pipeline for this request. If + * a final pipeline is configured it will always run, regardless of the value of + * this parameter. *

* API name: {@code pipeline} */ @@ -407,10 +422,11 @@ public final Builder pipeline(@Nullable String value) { } /** - * If true then refresh the affected shards to make this operation - * visible to search, if wait_for then wait for a refresh to make - * this operation visible to search, if false (the default) then do - * nothing with refreshes. + * If true, Elasticsearch refreshes the affected shards to make + * this operation visible to search, if wait_for then wait for a + * refresh to make this operation visible to search, if false do + * nothing with refreshes. Valid values: true, false, + * wait_for. *

* API name: {@code refresh} */ @@ -420,7 +436,7 @@ public final Builder refresh(@Nullable Refresh value) { } /** - * When true, requires destination to be an alias. Default is false + * If true, the destination must be an index alias. *

* API name: {@code require_alias} */ @@ -430,7 +446,7 @@ public final Builder requireAlias(@Nullable Boolean value) { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -440,7 +456,8 @@ public final Builder routing(@Nullable String value) { } /** - * Explicit operation timeout + * Period the request waits for the following operations: automatic index + * creation, dynamic mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -450,7 +467,8 @@ public final Builder timeout(@Nullable Time value) { } /** - * Explicit operation timeout + * Period the request waits for the following operations: automatic index + * creation, dynamic mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -459,7 +477,8 @@ public final Builder timeout(Function * API name: {@code version} */ @@ -469,7 +488,7 @@ public final Builder version(@Nullable Long value) { } /** - * Specific version type + * Specific version type: external, external_gte. *

* API name: {@code version_type} */ @@ -479,11 +498,9 @@ public final Builder versionType(@Nullable VersionType value) { } /** - * Sets the number of shard copies that must be active before proceeding with - * the index operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total number of + * shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -493,11 +510,9 @@ public final Builder waitForActiveShards(@Nullable WaitForActiveShard } /** - * Sets the number of shard copies that must be active before proceeding with - * the index operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total number of + * shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchTemplateRequest.java index 722f286c3..b9eddf814 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchTemplateRequest.java @@ -96,8 +96,8 @@ public Iterator _serializables() { return this.searchTemplates.iterator(); } /** - * Indicates whether network round-trips should be minimized as part of - * cross-cluster search requests execution + * If true, network round-trips are minimized for cross-cluster + * search requests. *

* API name: {@code ccs_minimize_roundtrips} */ @@ -107,7 +107,9 @@ public final Boolean ccsMinimizeRoundtrips() { } /** - * A comma-separated list of index names to use as default + * Comma-separated list of data streams, indices, and aliases to search. + * Supports wildcards (*). To search all data streams and indices, + * omit this parameter or use *. *

* API name: {@code index} */ @@ -116,8 +118,7 @@ public final List index() { } /** - * Controls the maximum number of concurrent searches the multi search api will - * execute + * Maximum number of concurrent searches the API can run. *

* API name: {@code max_concurrent_searches} */ @@ -127,7 +128,8 @@ public final Long maxConcurrentSearches() { } /** - * Search operation type + * The type of the search operation. Available options: + * query_then_fetch, dfs_query_then_fetch. *

* API name: {@code search_type} */ @@ -180,8 +182,8 @@ public static class Builder extends RequestBase.AbstractBuilder private List searchTemplates; /** - * Indicates whether network round-trips should be minimized as part of - * cross-cluster search requests execution + * If true, network round-trips are minimized for cross-cluster + * search requests. *

* API name: {@code ccs_minimize_roundtrips} */ @@ -191,7 +193,9 @@ public final Builder ccsMinimizeRoundtrips(@Nullable Boolean value) { } /** - * A comma-separated list of index names to use as default + * Comma-separated list of data streams, indices, and aliases to search. + * Supports wildcards (*). To search all data streams and indices, + * omit this parameter or use *. *

* API name: {@code index} *

@@ -203,7 +207,9 @@ public final Builder index(List list) { } /** - * A comma-separated list of index names to use as default + * Comma-separated list of data streams, indices, and aliases to search. + * Supports wildcards (*). To search all data streams and indices, + * omit this parameter or use *. *

* API name: {@code index} *

@@ -215,8 +221,7 @@ public final Builder index(String value, String... values) { } /** - * Controls the maximum number of concurrent searches the multi search api will - * execute + * Maximum number of concurrent searches the API can run. *

* API name: {@code max_concurrent_searches} */ @@ -226,7 +231,8 @@ public final Builder maxConcurrentSearches(@Nullable Long value) { } /** - * Search operation type + * The type of the search operation. Available options: + * query_then_fetch, dfs_query_then_fetch. *

* API name: {@code search_type} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MtermvectorsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MtermvectorsRequest.java index 6b9a77957..0e2d4e629 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MtermvectorsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MtermvectorsRequest.java @@ -124,6 +124,8 @@ public static MtermvectorsRequest of(Function * API name: {@code docs} */ public final List docs() { @@ -131,9 +133,8 @@ public final List docs() { } /** - * Specifies if document count, sum of document frequencies and sum of total - * term frequencies should be returned. Applies to all returned documents unless - * otherwise specified in body "params" or "docs". + * If true, the response includes the document count, sum of + * document frequencies, and sum of total term frequencies. *

* API name: {@code field_statistics} */ @@ -143,8 +144,10 @@ public final Boolean fieldStatistics() { } /** - * A comma-separated list of fields to return. Applies to all returned documents - * unless otherwise specified in body "params" or "docs". + * Comma-separated list or wildcard expressions of fields to include in the + * statistics. Used as the default list unless a specific field list is provided + * in the completion_fields or fielddata_fields + * parameters. *

* API name: {@code fields} */ @@ -153,6 +156,9 @@ public final List fields() { } /** + * Simplified syntax to specify documents by their ID if they're in the same + * index. + *

* API name: {@code ids} */ public final List ids() { @@ -160,7 +166,7 @@ public final List ids() { } /** - * The index in which the document resides. + * Name of the index that contains the documents. *

* API name: {@code index} */ @@ -170,9 +176,7 @@ public final String index() { } /** - * Specifies if term offsets should be returned. Applies to all returned - * documents unless otherwise specified in body "params" or - * "docs". + * If true, the response includes term offsets. *

* API name: {@code offsets} */ @@ -182,9 +186,7 @@ public final Boolean offsets() { } /** - * Specifies if term payloads should be returned. Applies to all returned - * documents unless otherwise specified in body "params" or - * "docs". + * If true, the response includes term payloads. *

* API name: {@code payloads} */ @@ -194,9 +196,7 @@ public final Boolean payloads() { } /** - * Specifies if term positions should be returned. Applies to all returned - * documents unless otherwise specified in body "params" or - * "docs". + * If true, the response includes term positions. *

* API name: {@code positions} */ @@ -206,9 +206,8 @@ public final Boolean positions() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) .Applies to all returned documents unless otherwise specified in body - * "params" or "docs". + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -218,8 +217,7 @@ public final String preference() { } /** - * Specifies if requests are real-time as opposed to near-real-time (default: - * true). + * If true, the request is real-time as opposed to near-real-time. *

* API name: {@code realtime} */ @@ -229,8 +227,7 @@ public final Boolean realtime() { } /** - * Specific routing value. Applies to all returned documents unless otherwise - * specified in body "params" or "docs". + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -240,9 +237,7 @@ public final String routing() { } /** - * Specifies if total term frequency and document frequency should be returned. - * Applies to all returned documents unless otherwise specified in body - * "params" or "docs". + * If true, the response includes term frequency and document frequency. *

* API name: {@code term_statistics} */ @@ -252,7 +247,7 @@ public final Boolean termStatistics() { } /** - * Explicit version number for concurrency control + * If true, returns the document version as part of a hit. *

* API name: {@code version} */ @@ -262,7 +257,7 @@ public final Long version() { } /** - * Specific version type + * Specific version type. *

* API name: {@code version_type} */ @@ -357,6 +352,8 @@ public static class Builder extends RequestBase.AbstractBuilder private VersionType versionType; /** + * Array of existing or artificial documents. + *

* API name: {@code docs} *

* Adds all elements of list to docs. @@ -367,6 +364,8 @@ public final Builder docs(List list) { } /** + * Array of existing or artificial documents. + *

* API name: {@code docs} *

* Adds one or more values to docs. @@ -377,6 +376,8 @@ public final Builder docs(MultiTermVectorsOperation value, MultiTermVectorsOpera } /** + * Array of existing or artificial documents. + *

* API name: {@code docs} *

* Adds a value to docs using a builder lambda. @@ -387,9 +388,8 @@ public final Builder docs( } /** - * Specifies if document count, sum of document frequencies and sum of total - * term frequencies should be returned. Applies to all returned documents unless - * otherwise specified in body "params" or "docs". + * If true, the response includes the document count, sum of + * document frequencies, and sum of total term frequencies. *

* API name: {@code field_statistics} */ @@ -399,8 +399,10 @@ public final Builder fieldStatistics(@Nullable Boolean value) { } /** - * A comma-separated list of fields to return. Applies to all returned documents - * unless otherwise specified in body "params" or "docs". + * Comma-separated list or wildcard expressions of fields to include in the + * statistics. Used as the default list unless a specific field list is provided + * in the completion_fields or fielddata_fields + * parameters. *

* API name: {@code fields} *

@@ -412,8 +414,10 @@ public final Builder fields(List list) { } /** - * A comma-separated list of fields to return. Applies to all returned documents - * unless otherwise specified in body "params" or "docs". + * Comma-separated list or wildcard expressions of fields to include in the + * statistics. Used as the default list unless a specific field list is provided + * in the completion_fields or fielddata_fields + * parameters. *

* API name: {@code fields} *

@@ -425,6 +429,9 @@ public final Builder fields(String value, String... values) { } /** + * Simplified syntax to specify documents by their ID if they're in the same + * index. + *

* API name: {@code ids} *

* Adds all elements of list to ids. @@ -435,6 +442,9 @@ public final Builder ids(List list) { } /** + * Simplified syntax to specify documents by their ID if they're in the same + * index. + *

* API name: {@code ids} *

* Adds one or more values to ids. @@ -445,7 +455,7 @@ public final Builder ids(String value, String... values) { } /** - * The index in which the document resides. + * Name of the index that contains the documents. *

* API name: {@code index} */ @@ -455,9 +465,7 @@ public final Builder index(@Nullable String value) { } /** - * Specifies if term offsets should be returned. Applies to all returned - * documents unless otherwise specified in body "params" or - * "docs". + * If true, the response includes term offsets. *

* API name: {@code offsets} */ @@ -467,9 +475,7 @@ public final Builder offsets(@Nullable Boolean value) { } /** - * Specifies if term payloads should be returned. Applies to all returned - * documents unless otherwise specified in body "params" or - * "docs". + * If true, the response includes term payloads. *

* API name: {@code payloads} */ @@ -479,9 +485,7 @@ public final Builder payloads(@Nullable Boolean value) { } /** - * Specifies if term positions should be returned. Applies to all returned - * documents unless otherwise specified in body "params" or - * "docs". + * If true, the response includes term positions. *

* API name: {@code positions} */ @@ -491,9 +495,8 @@ public final Builder positions(@Nullable Boolean value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) .Applies to all returned documents unless otherwise specified in body - * "params" or "docs". + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -503,8 +506,7 @@ public final Builder preference(@Nullable String value) { } /** - * Specifies if requests are real-time as opposed to near-real-time (default: - * true). + * If true, the request is real-time as opposed to near-real-time. *

* API name: {@code realtime} */ @@ -514,8 +516,7 @@ public final Builder realtime(@Nullable Boolean value) { } /** - * Specific routing value. Applies to all returned documents unless otherwise - * specified in body "params" or "docs". + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -525,9 +526,7 @@ public final Builder routing(@Nullable String value) { } /** - * Specifies if total term frequency and document frequency should be returned. - * Applies to all returned documents unless otherwise specified in body - * "params" or "docs". + * If true, the response includes term frequency and document frequency. *

* API name: {@code term_statistics} */ @@ -537,7 +536,7 @@ public final Builder termStatistics(@Nullable Boolean value) { } /** - * Explicit version number for concurrency control + * If true, returns the document version as part of a hit. *

* API name: {@code version} */ @@ -547,7 +546,7 @@ public final Builder version(@Nullable Long value) { } /** - * Specific version type + * Specific version type. *

* API name: {@code version_type} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java index 0a60e2767..5d71ac588 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java @@ -97,8 +97,12 @@ public static OpenPointInTimeRequest of(Function

* API name: {@code expand_wildcards} */ @@ -107,8 +111,8 @@ public final List expandWildcards() { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -128,7 +132,7 @@ public final List index() { } /** - * Required - Specific the time to live for the point in time + * Required - Extends the time to live of the corresponding point in time. *

* API name: {@code keep_alive} */ @@ -137,8 +141,8 @@ public final Time keepAlive() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -148,7 +152,7 @@ public final String preference() { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -183,8 +187,12 @@ public static class Builder extends RequestBase.AbstractBuilder private String routing; /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} *

@@ -196,8 +204,12 @@ public final Builder expandWildcards(List list) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} *

@@ -209,8 +221,8 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -246,7 +258,7 @@ public final Builder index(String value, String... values) { } /** - * Required - Specific the time to live for the point in time + * Required - Extends the time to live of the corresponding point in time. *

* API name: {@code keep_alive} */ @@ -256,7 +268,7 @@ public final Builder keepAlive(Time value) { } /** - * Required - Specific the time to live for the point in time + * Required - Extends the time to live of the corresponding point in time. *

* API name: {@code keep_alive} */ @@ -265,8 +277,8 @@ public final Builder keepAlive(Function> fn) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -276,7 +288,7 @@ public final Builder preference(@Nullable String value) { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/PutScriptRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/PutScriptRequest.java index 69998a95d..1ef9c2032 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/PutScriptRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/PutScriptRequest.java @@ -48,7 +48,7 @@ // typedef: _global.put_script.Request /** - * Creates or updates a script. + * Creates or updates a stored script or search template. * * @see API * specification @@ -85,7 +85,8 @@ public static PutScriptRequest of(Function * API name: {@code context} */ @@ -95,7 +96,8 @@ public final String context() { } /** - * Required - Script ID + * Required - Identifier for the stored script or search template. Must be + * unique within the cluster. *

* API name: {@code id} */ @@ -104,7 +106,8 @@ public final String id() { } /** - * Specify timeout for connection to master + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. *

* API name: {@code master_timeout} */ @@ -114,14 +117,18 @@ public final Time masterTimeout() { } /** - * Required - API name: {@code script} + * Required - Contains the script or search template, its parameters, and its + * language. + *

+ * API name: {@code script} */ public final StoredScript script() { return this.script; } /** - * Explicit operation timeout + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. *

* API name: {@code timeout} */ @@ -169,7 +176,8 @@ public static class Builder extends RequestBase.AbstractBuilder private Time timeout; /** - * Script context + * Context in which the script or search template should run. To prevent errors, + * the API immediately compiles the script or template in this context. *

* API name: {@code context} */ @@ -179,7 +187,8 @@ public final Builder context(@Nullable String value) { } /** - * Required - Script ID + * Required - Identifier for the stored script or search template. Must be + * unique within the cluster. *

* API name: {@code id} */ @@ -189,7 +198,8 @@ public final Builder id(String value) { } /** - * Specify timeout for connection to master + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. *

* API name: {@code master_timeout} */ @@ -199,7 +209,8 @@ public final Builder masterTimeout(@Nullable Time value) { } /** - * Specify timeout for connection to master + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. *

* API name: {@code master_timeout} */ @@ -208,7 +219,10 @@ public final Builder masterTimeout(Function> f } /** - * Required - API name: {@code script} + * Required - Contains the script or search template, its parameters, and its + * language. + *

+ * API name: {@code script} */ public final Builder script(StoredScript value) { this.script = value; @@ -216,14 +230,18 @@ public final Builder script(StoredScript value) { } /** - * Required - API name: {@code script} + * Required - Contains the script or search template, its parameters, and its + * language. + *

+ * API name: {@code script} */ public final Builder script(Function> fn) { return this.script(fn.apply(new StoredScript.Builder()).build()); } /** - * Explicit operation timeout + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. *

* API name: {@code timeout} */ @@ -233,7 +251,8 @@ public final Builder timeout(@Nullable Time value) { } /** - * Explicit operation timeout + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. *

* API name: {@code timeout} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java index a957fe1d8..889460b7c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java @@ -45,7 +45,7 @@ // typedef: _global.reindex_rethrottle.Request /** - * Changes the number of requests per second for a particular Reindex operation. + * Copies documents from a source to a destination. * * @see API @@ -72,8 +72,7 @@ public static ReindexRethrottleRequest of(Function * API name: {@code requests_per_second} */ @@ -83,7 +82,7 @@ public final Float requestsPerSecond() { } /** - * Required - The task id to rethrottle + * Required - Identifier for the task. *

* API name: {@code task_id} */ @@ -106,8 +105,7 @@ public static class Builder extends RequestBase.AbstractBuilder private String taskId; /** - * The throttle to set on this request in floating sub-requests per second. -1 - * means set no throttle. + * The throttle for this request in sub-requests per second. *

* API name: {@code requests_per_second} */ @@ -117,7 +115,7 @@ public final Builder requestsPerSecond(@Nullable Float value) { } /** - * Required - The task id to rethrottle + * Required - Identifier for the task. *

* API name: {@code task_id} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RenderSearchTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RenderSearchTemplateRequest.java index b7c559c64..a2cf55031 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RenderSearchTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RenderSearchTemplateRequest.java @@ -48,7 +48,7 @@ // typedef: _global.render_search_template.Request /** - * Allows to use the Mustache language to pre-render a search definition. + * Renders a search template as a search request body. * * @see API @@ -91,7 +91,8 @@ public final String file() { } /** - * The id of the stored search template + * ID of the search template to render. If no source is specified, + * this or the id request body parameter is required. *

* API name: {@code id} */ @@ -101,6 +102,9 @@ public final String id() { } /** + * Key-value pairs used to replace Mustache variables in the template. The key + * is the variable name. The value is the variable value. + *

* API name: {@code params} */ public final Map params() { @@ -108,6 +112,11 @@ public final Map params() { } /** + * An inline search template. Supports the same parameters as the search API's + * request body. These parameters also support Mustache variables. If no + * id or <templated-id> is specified, this + * parameter is required. + *

* API name: {@code source} */ @Nullable @@ -180,7 +189,8 @@ public final Builder file(@Nullable String value) { } /** - * The id of the stored search template + * ID of the search template to render. If no source is specified, + * this or the id request body parameter is required. *

* API name: {@code id} */ @@ -190,6 +200,9 @@ public final Builder id(@Nullable String value) { } /** + * Key-value pairs used to replace Mustache variables in the template. The key + * is the variable name. The value is the variable value. + *

* API name: {@code params} *

* Adds all entries of map to params. @@ -200,6 +213,9 @@ public final Builder params(Map map) { } /** + * Key-value pairs used to replace Mustache variables in the template. The key + * is the variable name. The value is the variable value. + *

* API name: {@code params} *

* Adds an entry to params. @@ -210,6 +226,11 @@ public final Builder params(String key, JsonData value) { } /** + * An inline search template. Supports the same parameters as the search API's + * request body. These parameters also support Mustache variables. If no + * id or <templated-id> is specified, this + * parameter is required. + *

* API name: {@code source} */ public final Builder source(@Nullable String value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScriptsPainlessExecuteRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScriptsPainlessExecuteRequest.java index ddd8f6834..276adfaea 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScriptsPainlessExecuteRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScriptsPainlessExecuteRequest.java @@ -46,7 +46,7 @@ // typedef: _global.scripts_painless_execute.Request /** - * Allows an arbitrary script to be executed and a result to be returned + * Runs a script and returns a result. * * @see API @@ -78,6 +78,8 @@ public static ScriptsPainlessExecuteRequest of(Function * API name: {@code context} */ @Nullable @@ -86,6 +88,8 @@ public final String context() { } /** + * Additional parameters for the context. + *

* API name: {@code context_setup} */ @Nullable @@ -94,6 +98,8 @@ public final PainlessContextSetup contextSetup() { } /** + * The Painless script to execute. + *

* API name: {@code script} */ @Nullable @@ -149,6 +155,8 @@ public static class Builder extends RequestBase.AbstractBuilder private InlineScript script; /** + * The context that the script should run in. + *

* API name: {@code context} */ public final Builder context(@Nullable String value) { @@ -157,6 +165,8 @@ public final Builder context(@Nullable String value) { } /** + * Additional parameters for the context. + *

* API name: {@code context_setup} */ public final Builder contextSetup(@Nullable PainlessContextSetup value) { @@ -165,6 +175,8 @@ public final Builder contextSetup(@Nullable PainlessContextSetup value) { } /** + * Additional parameters for the context. + *

* API name: {@code context_setup} */ public final Builder contextSetup( @@ -173,6 +185,8 @@ public final Builder contextSetup( } /** + * The Painless script to execute. + *

* API name: {@code script} */ public final Builder script(@Nullable InlineScript value) { @@ -181,6 +195,8 @@ public final Builder script(@Nullable InlineScript value) { } /** + * The Painless script to execute. + *

* API name: {@code script} */ public final Builder script(Function> fn) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsRequest.java index bcf0eead0..f16b482cc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsRequest.java @@ -94,9 +94,12 @@ public static SearchShardsRequest of(Function_all string or when no indices have been - * specified) + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. For example, a request targeting foo*,bar* returns an + * error if an index starts with foo but no index starts with + * bar. *

* API name: {@code allow_no_indices} */ @@ -106,8 +109,12 @@ public final Boolean allowNoIndices() { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} */ @@ -116,8 +123,8 @@ public final List expandWildcards() { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -127,8 +134,8 @@ public final Boolean ignoreUnavailable() { } /** - * A comma-separated list of index names to search; use _all or - * empty string to perform the operation on all indices + * Returns the indices and shards that a search request would be executed + * against. *

* API name: {@code index} */ @@ -137,8 +144,8 @@ public final List index() { } /** - * Return local information, do not retrieve the state from master node - * (default: false) + * If true, the request retrieves information from the local node + * only. *

* API name: {@code local} */ @@ -148,8 +155,8 @@ public final Boolean local() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -159,7 +166,7 @@ public final String preference() { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -199,9 +206,12 @@ public static class Builder extends RequestBase.AbstractBuilder private String routing; /** - * Whether to ignore if a wildcard indices expression resolves into no concrete - * indices. (This includes _all string or when no indices have been - * specified) + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. For example, a request targeting foo*,bar* returns an + * error if an index starts with foo but no index starts with + * bar. *

* API name: {@code allow_no_indices} */ @@ -211,8 +221,12 @@ public final Builder allowNoIndices(@Nullable Boolean value) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} *

@@ -224,8 +238,12 @@ public final Builder expandWildcards(List list) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} *

@@ -237,8 +255,8 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -248,8 +266,8 @@ public final Builder ignoreUnavailable(@Nullable Boolean value) { } /** - * A comma-separated list of index names to search; use _all or - * empty string to perform the operation on all indices + * Returns the indices and shards that a search request would be executed + * against. *

* API name: {@code index} *

@@ -261,8 +279,8 @@ public final Builder index(List list) { } /** - * A comma-separated list of index names to search; use _all or - * empty string to perform the operation on all indices + * Returns the indices and shards that a search request would be executed + * against. *

* API name: {@code index} *

@@ -274,8 +292,8 @@ public final Builder index(String value, String... values) { } /** - * Return local information, do not retrieve the state from master node - * (default: false) + * If true, the request retrieves information from the local node + * only. *

* API name: {@code local} */ @@ -285,8 +303,8 @@ public final Builder local(@Nullable Boolean value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -296,7 +314,7 @@ public final Builder preference(@Nullable String value) { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateRequest.java index 4c8f997f2..65941ee11 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateRequest.java @@ -53,7 +53,7 @@ // typedef: _global.search_template.Request /** - * Allows to use the Mustache language to pre-render a search definition. + * Runs a search with a search template. * * @see API * specification @@ -129,9 +129,12 @@ public static SearchTemplateRequest of(Function_all string or when no indices have been - * specified) + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. For example, a request targeting foo*,bar* returns an + * error if an index starts with foo but no index starts with + * bar. *

* API name: {@code allow_no_indices} */ @@ -141,8 +144,8 @@ public final Boolean allowNoIndices() { } /** - * Indicates whether network round-trips should be minimized as part of - * cross-cluster search requests execution + * If true, network round-trips are minimized for cross-cluster + * search requests. *

* API name: {@code ccs_minimize_roundtrips} */ @@ -152,8 +155,12 @@ public final Boolean ccsMinimizeRoundtrips() { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} */ @@ -162,6 +169,9 @@ public final List expandWildcards() { } /** + * If true, returns detailed information about score calculation as + * part of each hit. + *

* API name: {@code explain} */ @Nullable @@ -181,8 +191,8 @@ public final String id() { } /** - * Whether specified concrete, expanded or aliased indices should be ignored - * when throttled + * If true, specified concrete, expanded, or aliased indices are + * not included in the response when throttled. *

* API name: {@code ignore_throttled} */ @@ -192,8 +202,8 @@ public final Boolean ignoreThrottled() { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -213,6 +223,9 @@ public final List index() { } /** + * Key-value pairs used to replace Mustache variables in the template. The key + * is the variable name. The value is the variable value. + *

* API name: {@code params} */ public final Map params() { @@ -220,8 +233,8 @@ public final Map params() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -231,6 +244,8 @@ public final String preference() { } /** + * If true, the query execution is profiled. + *

* API name: {@code profile} */ @Nullable @@ -381,9 +396,12 @@ public static class Builder extends RequestBase.AbstractBuilder private String source; /** - * Whether to ignore if a wildcard indices expression resolves into no concrete - * indices. (This includes _all string or when no indices have been - * specified) + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. For example, a request targeting foo*,bar* returns an + * error if an index starts with foo but no index starts with + * bar. *

* API name: {@code allow_no_indices} */ @@ -393,8 +411,8 @@ public final Builder allowNoIndices(@Nullable Boolean value) { } /** - * Indicates whether network round-trips should be minimized as part of - * cross-cluster search requests execution + * If true, network round-trips are minimized for cross-cluster + * search requests. *

* API name: {@code ccs_minimize_roundtrips} */ @@ -404,8 +422,12 @@ public final Builder ccsMinimizeRoundtrips(@Nullable Boolean value) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} *

@@ -417,8 +439,12 @@ public final Builder expandWildcards(List list) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} *

@@ -430,6 +456,9 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** + * If true, returns detailed information about score calculation as + * part of each hit. + *

* API name: {@code explain} */ public final Builder explain(@Nullable Boolean value) { @@ -449,8 +478,8 @@ public final Builder id(@Nullable String value) { } /** - * Whether specified concrete, expanded or aliased indices should be ignored - * when throttled + * If true, specified concrete, expanded, or aliased indices are + * not included in the response when throttled. *

* API name: {@code ignore_throttled} */ @@ -460,8 +489,8 @@ public final Builder ignoreThrottled(@Nullable Boolean value) { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -497,6 +526,9 @@ public final Builder index(String value, String... values) { } /** + * Key-value pairs used to replace Mustache variables in the template. The key + * is the variable name. The value is the variable value. + *

* API name: {@code params} *

* Adds all entries of map to params. @@ -507,6 +539,9 @@ public final Builder params(Map map) { } /** + * Key-value pairs used to replace Mustache variables in the template. The key + * is the variable name. The value is the variable value. + *

* API name: {@code params} *

* Adds an entry to params. @@ -517,8 +552,8 @@ public final Builder params(String key, JsonData value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -528,6 +563,8 @@ public final Builder preference(@Nullable String value) { } /** + * If true, the query execution is profiled. + *

* API name: {@code profile} */ public final Builder profile(@Nullable Boolean value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsRequest.java index 2e9cc837e..457629028 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsRequest.java @@ -142,6 +142,9 @@ public static TermvectorsRequest of( } /** + * An artificial document (a document not present in the index) for which you + * want to retrieve term vectors. + *

* API name: {@code doc} */ @Nullable @@ -150,8 +153,8 @@ public final TDocument doc() { } /** - * Specifies if document count, sum of document frequencies and sum of total - * term frequencies should be returned. + * If true, the response includes the document count, sum of + * document frequencies, and sum of total term frequencies. *

* API name: {@code field_statistics} */ @@ -161,7 +164,10 @@ public final Boolean fieldStatistics() { } /** - * A comma-separated list of fields to return. + * Comma-separated list or wildcard expressions of fields to include in the + * statistics. Used as the default list unless a specific field list is provided + * in the completion_fields or fielddata_fields + * parameters. *

* API name: {@code fields} */ @@ -170,6 +176,8 @@ public final List fields() { } /** + * Filter terms based on their tf-idf scores. + *

* API name: {@code filter} */ @Nullable @@ -178,7 +186,7 @@ public final Filter filter() { } /** - * The id of the document, when not specified a doc param should be supplied. + * Unique identifier of the document. *

* API name: {@code id} */ @@ -188,7 +196,7 @@ public final String id() { } /** - * Required - The index in which the document resides. + * Required - Name of the index that contains the document. *

* API name: {@code index} */ @@ -197,7 +205,7 @@ public final String index() { } /** - * Specifies if term offsets should be returned. + * If true, the response includes term offsets. *

* API name: {@code offsets} */ @@ -207,7 +215,7 @@ public final Boolean offsets() { } /** - * Specifies if term payloads should be returned. + * If true, the response includes term payloads. *

* API name: {@code payloads} */ @@ -217,6 +225,8 @@ public final Boolean payloads() { } /** + * Overrides the default per-field analyzer. + *

* API name: {@code per_field_analyzer} */ public final Map perFieldAnalyzer() { @@ -224,7 +234,7 @@ public final Map perFieldAnalyzer() { } /** - * Specifies if term positions should be returned. + * If true, the response includes term positions. *

* API name: {@code positions} */ @@ -234,8 +244,8 @@ public final Boolean positions() { } /** - * Specify the node or shard the operation should be performed on (default: - * random). + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -245,8 +255,7 @@ public final String preference() { } /** - * Specifies if request is real-time as opposed to near-real-time (default: - * true). + * If true, the request is real-time as opposed to near-real-time. *

* API name: {@code realtime} */ @@ -256,7 +265,7 @@ public final Boolean realtime() { } /** - * Specific routing value. + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -266,7 +275,8 @@ public final String routing() { } /** - * Specifies if total term frequency and document frequency should be returned. + * If true, the response includes term frequency and document + * frequency. *

* API name: {@code term_statistics} */ @@ -276,7 +286,7 @@ public final Boolean termStatistics() { } /** - * Explicit version number for concurrency control + * If true, returns the document version as part of a hit. *

* API name: {@code version} */ @@ -286,7 +296,7 @@ public final Long version() { } /** - * Specific version type + * Specific version type. *

* API name: {@code version_type} */ @@ -390,6 +400,9 @@ public static class Builder extends RequestBase.AbstractBuilder tDocumentSerializer; /** + * An artificial document (a document not present in the index) for which you + * want to retrieve term vectors. + *

* API name: {@code doc} */ public final Builder doc(@Nullable TDocument value) { @@ -398,8 +411,8 @@ public final Builder doc(@Nullable TDocument value) { } /** - * Specifies if document count, sum of document frequencies and sum of total - * term frequencies should be returned. + * If true, the response includes the document count, sum of + * document frequencies, and sum of total term frequencies. *

* API name: {@code field_statistics} */ @@ -409,7 +422,10 @@ public final Builder fieldStatistics(@Nullable Boolean value) { } /** - * A comma-separated list of fields to return. + * Comma-separated list or wildcard expressions of fields to include in the + * statistics. Used as the default list unless a specific field list is provided + * in the completion_fields or fielddata_fields + * parameters. *

* API name: {@code fields} *

@@ -421,7 +437,10 @@ public final Builder fields(List list) { } /** - * A comma-separated list of fields to return. + * Comma-separated list or wildcard expressions of fields to include in the + * statistics. Used as the default list unless a specific field list is provided + * in the completion_fields or fielddata_fields + * parameters. *

* API name: {@code fields} *

@@ -433,6 +452,8 @@ public final Builder fields(String value, String... values) { } /** + * Filter terms based on their tf-idf scores. + *

* API name: {@code filter} */ public final Builder filter(@Nullable Filter value) { @@ -441,6 +462,8 @@ public final Builder filter(@Nullable Filter value) { } /** + * Filter terms based on their tf-idf scores. + *

* API name: {@code filter} */ public final Builder filter(Function> fn) { @@ -448,7 +471,7 @@ public final Builder filter(Function * API name: {@code id} */ @@ -458,7 +481,7 @@ public final Builder id(@Nullable String value) { } /** - * Required - The index in which the document resides. + * Required - Name of the index that contains the document. *

* API name: {@code index} */ @@ -468,7 +491,7 @@ public final Builder index(String value) { } /** - * Specifies if term offsets should be returned. + * If true, the response includes term offsets. *

* API name: {@code offsets} */ @@ -478,7 +501,7 @@ public final Builder offsets(@Nullable Boolean value) { } /** - * Specifies if term payloads should be returned. + * If true, the response includes term payloads. *

* API name: {@code payloads} */ @@ -488,6 +511,8 @@ public final Builder payloads(@Nullable Boolean value) { } /** + * Overrides the default per-field analyzer. + *

* API name: {@code per_field_analyzer} *

* Adds all entries of map to perFieldAnalyzer. @@ -498,6 +523,8 @@ public final Builder perFieldAnalyzer(Map map) { } /** + * Overrides the default per-field analyzer. + *

* API name: {@code per_field_analyzer} *

* Adds an entry to perFieldAnalyzer. @@ -508,7 +535,7 @@ public final Builder perFieldAnalyzer(String key, String value) { } /** - * Specifies if term positions should be returned. + * If true, the response includes term positions. *

* API name: {@code positions} */ @@ -518,8 +545,8 @@ public final Builder positions(@Nullable Boolean value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random). + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -529,8 +556,7 @@ public final Builder preference(@Nullable String value) { } /** - * Specifies if request is real-time as opposed to near-real-time (default: - * true). + * If true, the request is real-time as opposed to near-real-time. *

* API name: {@code realtime} */ @@ -540,7 +566,7 @@ public final Builder realtime(@Nullable Boolean value) { } /** - * Specific routing value. + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -550,7 +576,8 @@ public final Builder routing(@Nullable String value) { } /** - * Specifies if total term frequency and document frequency should be returned. + * If true, the response includes term frequency and document + * frequency. *

* API name: {@code term_statistics} */ @@ -560,7 +587,7 @@ public final Builder termStatistics(@Nullable Boolean value) { } /** - * Explicit version number for concurrency control + * If true, returns the document version as part of a hit. *

* API name: {@code version} */ @@ -570,7 +597,7 @@ public final Builder version(@Nullable Long value) { } /** - * Specific version type + * Specific version type. *

* API name: {@code version_type} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java index a9ee3638f..12b4817a7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java @@ -61,8 +61,9 @@ // typedef: _global.update_by_query.Request /** - * Performs an update on every document in the index without changing the - * source, for example to pick up a mapping change. + * Updates documents that match the specified query. If no query is specified, + * performs an update on every document in the data stream or index without + * modifying the source, which is useful for picking up mapping changes. * * @see API * specification @@ -213,9 +214,12 @@ public static UpdateByQueryRequest of(Function_all string or when no indices have been - * specified) + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. For example, a request targeting foo*,bar* returns an + * error if an index starts with foo but no index starts with + * bar. *

* API name: {@code allow_no_indices} */ @@ -225,8 +229,7 @@ public final Boolean allowNoIndices() { } /** - * Specify whether wildcard and prefix queries should be analyzed (default: - * false) + * If true, wildcard and prefix queries are analyzed. *

* API name: {@code analyze_wildcard} */ @@ -236,7 +239,7 @@ public final Boolean analyzeWildcard() { } /** - * The analyzer to use for the query string + * Analyzer to use for the query string. *

* API name: {@code analyzer} */ @@ -246,6 +249,9 @@ public final String analyzer() { } /** + * What to do if update by query hits version conflicts: abort or + * proceed. + *

* API name: {@code conflicts} */ @Nullable @@ -254,7 +260,8 @@ public final Conflicts conflicts() { } /** - * The default operator for query string query (AND or OR) + * The default operator for query string query: AND or + * OR. *

* API name: {@code default_operator} */ @@ -264,8 +271,7 @@ public final Operator defaultOperator() { } /** - * The field to use as default where no field prefix is given in the query - * string + * Field to use as default where no field prefix is given in the query string. *

* API name: {@code df} */ @@ -275,8 +281,12 @@ public final String df() { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} */ @@ -295,8 +305,8 @@ public final Long from() { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -306,8 +316,9 @@ public final Boolean ignoreUnavailable() { } /** - * Required - A comma-separated list of index names to search; use - * _all or empty string to perform the operation on all indices + * Required - Comma-separated list of data streams, indices, and aliases to + * search. Supports wildcards (*). To search all data streams or + * indices, omit this parameter or use * or _all. *

* API name: {@code index} */ @@ -316,8 +327,8 @@ public final List index() { } /** - * Specify whether format-based query failures (such as providing text to a - * numeric field) should be ignored + * If true, format-based query failures (such as providing text to + * a numeric field) in the query string will be ignored. *

* API name: {@code lenient} */ @@ -327,6 +338,8 @@ public final Boolean lenient() { } /** + * The maximum number of documents to update. + *

* API name: {@code max_docs} */ @Nullable @@ -335,7 +348,11 @@ public final Long maxDocs() { } /** - * Ingest pipeline to set on index requests made by this action. (default: none) + * ID of the pipeline to use to preprocess incoming documents. If the index has + * a default ingest pipeline specified, then setting the value to + * _none disables the default ingest pipeline for this request. If + * a final pipeline is configured it will always run, regardless of the value of + * this parameter. *

* API name: {@code pipeline} */ @@ -345,8 +362,8 @@ public final String pipeline() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -356,6 +373,8 @@ public final String preference() { } /** + * Specifies the documents to update using the Query DSL. + *

* API name: {@code query} */ @Nullable @@ -364,7 +383,8 @@ public final Query query() { } /** - * Should the affected indexes be refreshed? + * If true, Elasticsearch refreshes affected shards to make the + * operation visible to search. *

* API name: {@code refresh} */ @@ -374,8 +394,7 @@ public final Boolean refresh() { } /** - * Specify if request cache should be used for this request or not, defaults to - * index level setting + * If true, the request cache is used for this request. *

* API name: {@code request_cache} */ @@ -385,8 +404,7 @@ public final Boolean requestCache() { } /** - * The throttle to set on this request in sub-requests per second. -1 means no - * throttle. + * The throttle for this request in sub-requests per second. *

* API name: {@code requests_per_second} */ @@ -396,7 +414,7 @@ public final Float requestsPerSecond() { } /** - * A comma-separated list of specific routing values + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -406,6 +424,8 @@ public final String routing() { } /** + * The script to run to update the document source or metadata when updating. + *

* API name: {@code script} */ @Nullable @@ -414,8 +434,7 @@ public final Script script() { } /** - * Specify how long a consistent view of the index should be maintained for - * scrolled search + * Period to retain the search context for scrolling. *

* API name: {@code scroll} */ @@ -425,7 +444,7 @@ public final Time scroll() { } /** - * Size on the scroll request powering the update by query + * Size of the scroll request that powers the operation. *

* API name: {@code scroll_size} */ @@ -435,7 +454,7 @@ public final Long scrollSize() { } /** - * Explicit timeout for each search request. Defaults to no timeout. + * Explicit timeout for each search request. *

* API name: {@code search_timeout} */ @@ -445,7 +464,8 @@ public final Time searchTimeout() { } /** - * Search operation type + * The type of the search operation. Available options: + * query_then_fetch, dfs_query_then_fetch. *

* API name: {@code search_type} */ @@ -455,6 +475,9 @@ public final SearchType searchType() { } /** + * Slice the request manually using the provided slice ID and total number of + * slices. + *

* API name: {@code slice} */ @Nullable @@ -463,8 +486,7 @@ public final SlicedScroll slice() { } /** - * The number of slices this task should be divided into. Defaults to 1, meaning - * the task isn't sliced into subtasks. Can be set to auto. + * The number of slices this task should be divided into. *

* API name: {@code slices} */ @@ -474,7 +496,7 @@ public final Slices slices() { } /** - * A comma-separated list of <field>:<direction> pairs + * A comma-separated list of <field>:<direction> pairs. *

* API name: {@code sort} */ @@ -483,7 +505,8 @@ public final List sort() { } /** - * Specific 'tag' of the request for logging and statistical purposes + * Specific tag of the request for logging and statistical + * purposes. *

* API name: {@code stats} */ @@ -492,8 +515,13 @@ public final List stats() { } /** - * The maximum number of documents to collect for each shard, upon reaching - * which the query execution will terminate early. + * Maximum number of documents to collect for each shard. If a query reaches + * this limit, Elasticsearch terminates the query early. Elasticsearch collects + * documents before sorting. Use with caution. Elasticsearch applies this + * parameter to each shard handling the request. When possible, let + * Elasticsearch perform early termination automatically. Avoid specifying this + * parameter for requests that target data streams with backing indices across + * multiple data tiers. *

* API name: {@code terminate_after} */ @@ -503,8 +531,8 @@ public final Long terminateAfter() { } /** - * Time each individual bulk request should wait for shards that are - * unavailable. + * Period each update request waits for the following operations: dynamic + * mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -514,7 +542,7 @@ public final Time timeout() { } /** - * Specify whether to return document version as part of a hit + * If true, returns the document version as part of a hit. *

* API name: {@code version} */ @@ -535,11 +563,9 @@ public final Boolean versionType() { } /** - * Sets the number of shard copies that must be active before proceeding with - * the update by query operation. Defaults to 1, meaning the primary shard only. - * Set to all for all shard copies, otherwise set to any - * non-negative value less than or equal to the total number of copies for the - * shard (number of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total + * number of shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -549,8 +575,7 @@ public final WaitForActiveShards waitForActiveShards() { } /** - * Should the request should block until the update by query operation is - * complete. + * If true, the request blocks until the operation is complete. *

* API name: {@code wait_for_completion} */ @@ -708,9 +733,12 @@ public static class Builder extends RequestBase.AbstractBuilder private Boolean waitForCompletion; /** - * Whether to ignore if a wildcard indices expression resolves into no concrete - * indices. (This includes _all string or when no indices have been - * specified) + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. For example, a request targeting foo*,bar* returns an + * error if an index starts with foo but no index starts with + * bar. *

* API name: {@code allow_no_indices} */ @@ -720,8 +748,7 @@ public final Builder allowNoIndices(@Nullable Boolean value) { } /** - * Specify whether wildcard and prefix queries should be analyzed (default: - * false) + * If true, wildcard and prefix queries are analyzed. *

* API name: {@code analyze_wildcard} */ @@ -731,7 +758,7 @@ public final Builder analyzeWildcard(@Nullable Boolean value) { } /** - * The analyzer to use for the query string + * Analyzer to use for the query string. *

* API name: {@code analyzer} */ @@ -741,6 +768,9 @@ public final Builder analyzer(@Nullable String value) { } /** + * What to do if update by query hits version conflicts: abort or + * proceed. + *

* API name: {@code conflicts} */ public final Builder conflicts(@Nullable Conflicts value) { @@ -749,7 +779,8 @@ public final Builder conflicts(@Nullable Conflicts value) { } /** - * The default operator for query string query (AND or OR) + * The default operator for query string query: AND or + * OR. *

* API name: {@code default_operator} */ @@ -759,8 +790,7 @@ public final Builder defaultOperator(@Nullable Operator value) { } /** - * The field to use as default where no field prefix is given in the query - * string + * Field to use as default where no field prefix is given in the query string. *

* API name: {@code df} */ @@ -770,8 +800,12 @@ public final Builder df(@Nullable String value) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} *

@@ -783,8 +817,12 @@ public final Builder expandWildcards(List list) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} *

@@ -806,8 +844,8 @@ public final Builder from(@Nullable Long value) { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -817,8 +855,9 @@ public final Builder ignoreUnavailable(@Nullable Boolean value) { } /** - * Required - A comma-separated list of index names to search; use - * _all or empty string to perform the operation on all indices + * Required - Comma-separated list of data streams, indices, and aliases to + * search. Supports wildcards (*). To search all data streams or + * indices, omit this parameter or use * or _all. *

* API name: {@code index} *

@@ -830,8 +869,9 @@ public final Builder index(List list) { } /** - * Required - A comma-separated list of index names to search; use - * _all or empty string to perform the operation on all indices + * Required - Comma-separated list of data streams, indices, and aliases to + * search. Supports wildcards (*). To search all data streams or + * indices, omit this parameter or use * or _all. *

* API name: {@code index} *

@@ -843,8 +883,8 @@ public final Builder index(String value, String... values) { } /** - * Specify whether format-based query failures (such as providing text to a - * numeric field) should be ignored + * If true, format-based query failures (such as providing text to + * a numeric field) in the query string will be ignored. *

* API name: {@code lenient} */ @@ -854,6 +894,8 @@ public final Builder lenient(@Nullable Boolean value) { } /** + * The maximum number of documents to update. + *

* API name: {@code max_docs} */ public final Builder maxDocs(@Nullable Long value) { @@ -862,7 +904,11 @@ public final Builder maxDocs(@Nullable Long value) { } /** - * Ingest pipeline to set on index requests made by this action. (default: none) + * ID of the pipeline to use to preprocess incoming documents. If the index has + * a default ingest pipeline specified, then setting the value to + * _none disables the default ingest pipeline for this request. If + * a final pipeline is configured it will always run, regardless of the value of + * this parameter. *

* API name: {@code pipeline} */ @@ -872,8 +918,8 @@ public final Builder pipeline(@Nullable String value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -883,6 +929,8 @@ public final Builder preference(@Nullable String value) { } /** + * Specifies the documents to update using the Query DSL. + *

* API name: {@code query} */ public final Builder query(@Nullable Query value) { @@ -891,6 +939,8 @@ public final Builder query(@Nullable Query value) { } /** + * Specifies the documents to update using the Query DSL. + *

* API name: {@code query} */ public final Builder query(Function> fn) { @@ -898,7 +948,8 @@ public final Builder query(Function> fn) { } /** - * Should the affected indexes be refreshed? + * If true, Elasticsearch refreshes affected shards to make the + * operation visible to search. *

* API name: {@code refresh} */ @@ -908,8 +959,7 @@ public final Builder refresh(@Nullable Boolean value) { } /** - * Specify if request cache should be used for this request or not, defaults to - * index level setting + * If true, the request cache is used for this request. *

* API name: {@code request_cache} */ @@ -919,8 +969,7 @@ public final Builder requestCache(@Nullable Boolean value) { } /** - * The throttle to set on this request in sub-requests per second. -1 means no - * throttle. + * The throttle for this request in sub-requests per second. *

* API name: {@code requests_per_second} */ @@ -930,7 +979,7 @@ public final Builder requestsPerSecond(@Nullable Float value) { } /** - * A comma-separated list of specific routing values + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -940,6 +989,8 @@ public final Builder routing(@Nullable String value) { } /** + * The script to run to update the document source or metadata when updating. + *

* API name: {@code script} */ public final Builder script(@Nullable Script value) { @@ -948,6 +999,8 @@ public final Builder script(@Nullable Script value) { } /** + * The script to run to update the document source or metadata when updating. + *

* API name: {@code script} */ public final Builder script(Function> fn) { @@ -955,8 +1008,7 @@ public final Builder script(Function> fn) } /** - * Specify how long a consistent view of the index should be maintained for - * scrolled search + * Period to retain the search context for scrolling. *

* API name: {@code scroll} */ @@ -966,8 +1018,7 @@ public final Builder scroll(@Nullable Time value) { } /** - * Specify how long a consistent view of the index should be maintained for - * scrolled search + * Period to retain the search context for scrolling. *

* API name: {@code scroll} */ @@ -976,7 +1027,7 @@ public final Builder scroll(Function> fn) { } /** - * Size on the scroll request powering the update by query + * Size of the scroll request that powers the operation. *

* API name: {@code scroll_size} */ @@ -986,7 +1037,7 @@ public final Builder scrollSize(@Nullable Long value) { } /** - * Explicit timeout for each search request. Defaults to no timeout. + * Explicit timeout for each search request. *

* API name: {@code search_timeout} */ @@ -996,7 +1047,7 @@ public final Builder searchTimeout(@Nullable Time value) { } /** - * Explicit timeout for each search request. Defaults to no timeout. + * Explicit timeout for each search request. *

* API name: {@code search_timeout} */ @@ -1005,7 +1056,8 @@ public final Builder searchTimeout(Function> f } /** - * Search operation type + * The type of the search operation. Available options: + * query_then_fetch, dfs_query_then_fetch. *

* API name: {@code search_type} */ @@ -1015,6 +1067,9 @@ public final Builder searchType(@Nullable SearchType value) { } /** + * Slice the request manually using the provided slice ID and total number of + * slices. + *

* API name: {@code slice} */ public final Builder slice(@Nullable SlicedScroll value) { @@ -1023,6 +1078,9 @@ public final Builder slice(@Nullable SlicedScroll value) { } /** + * Slice the request manually using the provided slice ID and total number of + * slices. + *

* API name: {@code slice} */ public final Builder slice(Function> fn) { @@ -1030,8 +1088,7 @@ public final Builder slice(Functionauto. + * The number of slices this task should be divided into. *

* API name: {@code slices} */ @@ -1041,8 +1098,7 @@ public final Builder slices(@Nullable Slices value) { } /** - * The number of slices this task should be divided into. Defaults to 1, meaning - * the task isn't sliced into subtasks. Can be set to auto. + * The number of slices this task should be divided into. *

* API name: {@code slices} */ @@ -1051,7 +1107,7 @@ public final Builder slices(Function> fn) } /** - * A comma-separated list of <field>:<direction> pairs + * A comma-separated list of <field>:<direction> pairs. *

* API name: {@code sort} *

@@ -1063,7 +1119,7 @@ public final Builder sort(List list) { } /** - * A comma-separated list of <field>:<direction> pairs + * A comma-separated list of <field>:<direction> pairs. *

* API name: {@code sort} *

@@ -1075,7 +1131,8 @@ public final Builder sort(String value, String... values) { } /** - * Specific 'tag' of the request for logging and statistical purposes + * Specific tag of the request for logging and statistical + * purposes. *

* API name: {@code stats} *

@@ -1087,7 +1144,8 @@ public final Builder stats(List list) { } /** - * Specific 'tag' of the request for logging and statistical purposes + * Specific tag of the request for logging and statistical + * purposes. *

* API name: {@code stats} *

@@ -1099,8 +1157,13 @@ public final Builder stats(String value, String... values) { } /** - * The maximum number of documents to collect for each shard, upon reaching - * which the query execution will terminate early. + * Maximum number of documents to collect for each shard. If a query reaches + * this limit, Elasticsearch terminates the query early. Elasticsearch collects + * documents before sorting. Use with caution. Elasticsearch applies this + * parameter to each shard handling the request. When possible, let + * Elasticsearch perform early termination automatically. Avoid specifying this + * parameter for requests that target data streams with backing indices across + * multiple data tiers. *

* API name: {@code terminate_after} */ @@ -1110,8 +1173,8 @@ public final Builder terminateAfter(@Nullable Long value) { } /** - * Time each individual bulk request should wait for shards that are - * unavailable. + * Period each update request waits for the following operations: dynamic + * mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -1121,8 +1184,8 @@ public final Builder timeout(@Nullable Time value) { } /** - * Time each individual bulk request should wait for shards that are - * unavailable. + * Period each update request waits for the following operations: dynamic + * mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -1131,7 +1194,7 @@ public final Builder timeout(Function> fn) { } /** - * Specify whether to return document version as part of a hit + * If true, returns the document version as part of a hit. *

* API name: {@code version} */ @@ -1152,11 +1215,9 @@ public final Builder versionType(@Nullable Boolean value) { } /** - * Sets the number of shard copies that must be active before proceeding with - * the update by query operation. Defaults to 1, meaning the primary shard only. - * Set to all for all shard copies, otherwise set to any - * non-negative value less than or equal to the total number of copies for the - * shard (number of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total + * number of shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -1166,11 +1227,9 @@ public final Builder waitForActiveShards(@Nullable WaitForActiveShards value) { } /** - * Sets the number of shard copies that must be active before proceeding with - * the update by query operation. Defaults to 1, meaning the primary shard only. - * Set to all for all shard copies, otherwise set to any - * non-negative value less than or equal to the total number of copies for the - * shard (number of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total + * number of shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -1180,8 +1239,7 @@ public final Builder waitForActiveShards( } /** - * Should the request should block until the update by query operation is - * complete. + * If true, the request blocks until the operation is complete. *

* API name: {@code wait_for_completion} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java index dce0a8722..29fb50045 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java @@ -74,8 +74,7 @@ public static UpdateByQueryRethrottleRequest of( } /** - * The throttle to set on this request in floating sub-requests per second. -1 - * means set no throttle. + * The throttle for this request in sub-requests per second. *

* API name: {@code requests_per_second} */ @@ -85,7 +84,7 @@ public final Float requestsPerSecond() { } /** - * Required - The task id to rethrottle + * Required - The ID for the task. *

* API name: {@code task_id} */ @@ -108,8 +107,7 @@ public static class Builder extends RequestBase.AbstractBuilder private String taskId; /** - * The throttle to set on this request in floating sub-requests per second. -1 - * means set no throttle. + * The throttle for this request in sub-requests per second. *

* API name: {@code requests_per_second} */ @@ -119,7 +117,7 @@ public final Builder requestsPerSecond(@Nullable Float value) { } /** - * Required - The task id to rethrottle + * Required - The ID for the task. *

* API name: {@code task_id} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkOperationBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkOperationBase.java index 3fb805975..e2f2da686 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkOperationBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkOperationBase.java @@ -84,6 +84,8 @@ protected BulkOperationBase(AbstractBuilder builder) { } /** + * The document ID. + *

* API name: {@code _id} */ @Nullable @@ -92,6 +94,8 @@ public final String id() { } /** + * Name of the index or index alias to perform the action on. + *

* API name: {@code _index} */ @Nullable @@ -100,6 +104,8 @@ public final String index() { } /** + * Custom value used to route operations to a specific shard. + *

* API name: {@code routing} */ @Nullable @@ -217,6 +223,8 @@ public abstract static class AbstractBuilder * API name: {@code _id} */ public final BuilderT id(@Nullable String value) { @@ -225,6 +233,8 @@ public final BuilderT id(@Nullable String value) { } /** + * Name of the index or index alias to perform the action on. + *

* API name: {@code _index} */ public final BuilderT index(@Nullable String value) { @@ -233,6 +243,8 @@ public final BuilderT index(@Nullable String value) { } /** + * Custom value used to route operations to a specific shard. + *

* API name: {@code routing} */ public final BuilderT routing(@Nullable String value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkResponseItem.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkResponseItem.java index c1be6b1b5..2ac67ec8e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkResponseItem.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkResponseItem.java @@ -122,6 +122,8 @@ public final OperationType operationType() { } /** + * The document ID associated with the operation. + *

* API name: {@code _id} */ @Nullable @@ -130,20 +132,29 @@ public final String id() { } /** - * Required - API name: {@code _index} + * Required - Name of the index associated with the operation. If the operation + * targeted a data stream, this is the backing index into which the document was + * written. + *

+ * API name: {@code _index} */ public final String index() { return this.index; } /** - * Required - API name: {@code status} + * Required - HTTP status code returned for the operation. + *

+ * API name: {@code status} */ public final int status() { return this.status; } /** + * Contains additional information about the failed operation. The parameter is + * only returned for failed operations. + *

* API name: {@code error} */ @Nullable @@ -152,6 +163,8 @@ public final ErrorCause error() { } /** + * The primary term assigned to the document for the operation. + *

* API name: {@code _primary_term} */ @Nullable @@ -160,6 +173,9 @@ public final Long primaryTerm() { } /** + * Result of the operation. Successful values are created, + * deleted, and updated. + *

* API name: {@code result} */ @Nullable @@ -168,6 +184,10 @@ public final String result() { } /** + * The sequence number assigned to the document for the operation. Sequence + * numbers are used to ensure an older version of a document doesn’t overwrite a + * newer version. + *

* API name: {@code _seq_no} */ @Nullable @@ -176,6 +196,8 @@ public final Long seqNo() { } /** + * Contains shard information for the operation. + *

* API name: {@code _shards} */ @Nullable @@ -184,6 +206,9 @@ public final ShardStatistics shards() { } /** + * The document version associated with the operation. The document version is + * incremented each time the document is updated. + *

* API name: {@code _version} */ @Nullable @@ -329,6 +354,8 @@ public final Builder operationType(OperationType value) { private InlineGet> get; /** + * The document ID associated with the operation. + *

* API name: {@code _id} */ public final Builder id(@Nullable String value) { @@ -337,7 +364,11 @@ public final Builder id(@Nullable String value) { } /** - * Required - API name: {@code _index} + * Required - Name of the index associated with the operation. If the operation + * targeted a data stream, this is the backing index into which the document was + * written. + *

+ * API name: {@code _index} */ public final Builder index(String value) { this.index = value; @@ -345,7 +376,9 @@ public final Builder index(String value) { } /** - * Required - API name: {@code status} + * Required - HTTP status code returned for the operation. + *

+ * API name: {@code status} */ public final Builder status(int value) { this.status = value; @@ -353,6 +386,9 @@ public final Builder status(int value) { } /** + * Contains additional information about the failed operation. The parameter is + * only returned for failed operations. + *

* API name: {@code error} */ public final Builder error(@Nullable ErrorCause value) { @@ -361,6 +397,9 @@ public final Builder error(@Nullable ErrorCause value) { } /** + * Contains additional information about the failed operation. The parameter is + * only returned for failed operations. + *

* API name: {@code error} */ public final Builder error(Function> fn) { @@ -368,6 +407,8 @@ public final Builder error(Function * API name: {@code _primary_term} */ public final Builder primaryTerm(@Nullable Long value) { @@ -376,6 +417,9 @@ public final Builder primaryTerm(@Nullable Long value) { } /** + * Result of the operation. Successful values are created, + * deleted, and updated. + *

* API name: {@code result} */ public final Builder result(@Nullable String value) { @@ -384,6 +428,10 @@ public final Builder result(@Nullable String value) { } /** + * The sequence number assigned to the document for the operation. Sequence + * numbers are used to ensure an older version of a document doesn’t overwrite a + * newer version. + *

* API name: {@code _seq_no} */ public final Builder seqNo(@Nullable Long value) { @@ -392,6 +440,8 @@ public final Builder seqNo(@Nullable Long value) { } /** + * Contains shard information for the operation. + *

* API name: {@code _shards} */ public final Builder shards(@Nullable ShardStatistics value) { @@ -400,6 +450,8 @@ public final Builder shards(@Nullable ShardStatistics value) { } /** + * Contains shard information for the operation. + *

* API name: {@code _shards} */ public final Builder shards(Function> fn) { @@ -407,6 +459,9 @@ public final Builder shards(Function * API name: {@code _version} */ public final Builder version(@Nullable Long value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/UpdateOperation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/UpdateOperation.java index 425f9757d..160834c67 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/UpdateOperation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/UpdateOperation.java @@ -126,6 +126,8 @@ public Iterator _serializables() { } /** + * If true, the request’s actions must target an index alias. + *

* API name: {@code require_alias} */ @Nullable @@ -220,6 +222,8 @@ public final Builder binaryAction(@Nullable BinaryD private JsonpSerializer tPartialDocumentSerializer; /** + * If true, the request’s actions must target an index alias. + *

* API name: {@code require_alias} */ public final Builder requireAlias(@Nullable Boolean value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/WriteOperation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/WriteOperation.java index 00e98102f..454df8920 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/WriteOperation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/WriteOperation.java @@ -67,6 +67,12 @@ protected WriteOperation(AbstractBuilder builder) { } /** + * A map from the full name of fields to the name of dynamic templates. Defaults + * to an empty map. If a name matches a dynamic template, then that template + * will be applied regardless of other match predicates defined in the template. + * If a field is already defined in the mapping, then this parameter won’t be + * used. + *

* API name: {@code dynamic_templates} */ public final Map dynamicTemplates() { @@ -74,6 +80,12 @@ public final Map dynamicTemplates() { } /** + * ID of the pipeline to use to preprocess incoming documents. If the index has + * a default ingest pipeline specified, then setting the value to + * _none disables the default ingest pipeline for this request. If + * a final pipeline is configured it will always run, regardless of the value of + * this parameter. + *

* API name: {@code pipeline} */ @Nullable @@ -82,6 +94,8 @@ public final String pipeline() { } /** + * If true, the request’s actions must target an index alias. + *

* API name: {@code require_alias} */ @Nullable @@ -129,6 +143,12 @@ public abstract static class AbstractBuilder * API name: {@code dynamic_templates} *

* Adds all entries of map to dynamicTemplates. @@ -139,6 +159,12 @@ public final BuilderT dynamicTemplates(Map map) { } /** + * A map from the full name of fields to the name of dynamic templates. Defaults + * to an empty map. If a name matches a dynamic template, then that template + * will be applied regardless of other match predicates defined in the template. + * If a field is already defined in the mapping, then this parameter won’t be + * used. + *

* API name: {@code dynamic_templates} *

* Adds an entry to dynamicTemplates. @@ -149,6 +175,12 @@ public final BuilderT dynamicTemplates(String key, String value) { } /** + * ID of the pipeline to use to preprocess incoming documents. If the index has + * a default ingest pipeline specified, then setting the value to + * _none disables the default ingest pipeline for this request. If + * a final pipeline is configured it will always run, regardless of the value of + * this parameter. + *

* API name: {@code pipeline} */ public final BuilderT pipeline(@Nullable String value) { @@ -157,6 +189,8 @@ public final BuilderT pipeline(@Nullable String value) { } /** + * If true, the request’s actions must target an index alias. + *

* API name: {@code require_alias} */ public final BuilderT requireAlias(@Nullable Boolean value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch_template/TemplateConfig.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch_template/TemplateConfig.java index 389cabb37..d5048c2b4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch_template/TemplateConfig.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch_template/TemplateConfig.java @@ -83,6 +83,9 @@ public static TemplateConfig of(Function> } /** + * If true, returns detailed information about score calculation as + * part of each hit. + *

* API name: {@code explain} */ @Nullable @@ -102,6 +105,9 @@ public final String id() { } /** + * Key-value pairs used to replace Mustache variables in the template. The key + * is the variable name. The value is the variable value. + *

* API name: {@code params} */ public final Map params() { @@ -109,6 +115,8 @@ public final Map params() { } /** + * If true, the query execution is profiled. + *

* API name: {@code profile} */ @Nullable @@ -201,6 +209,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement private String source; /** + * If true, returns detailed information about score calculation as + * part of each hit. + *

* API name: {@code explain} */ public final Builder explain(@Nullable Boolean value) { @@ -220,6 +231,9 @@ public final Builder id(@Nullable String value) { } /** + * Key-value pairs used to replace Mustache variables in the template. The key + * is the variable name. The value is the variable value. + *

* API name: {@code params} *

* Adds all entries of map to params. @@ -230,6 +244,9 @@ public final Builder params(Map map) { } /** + * Key-value pairs used to replace Mustache variables in the template. The key + * is the variable name. The value is the variable value. + *

* API name: {@code params} *

* Adds an entry to params. @@ -240,6 +257,8 @@ public final Builder params(String key, JsonData value) { } /** + * If true, the query execution is profiled. + *

* API name: {@code profile} */ public final Builder profile(@Nullable Boolean value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mtermvectors/MultiTermVectorsOperation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mtermvectors/MultiTermVectorsOperation.java index c558e85e7..92f8abe3d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mtermvectors/MultiTermVectorsOperation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mtermvectors/MultiTermVectorsOperation.java @@ -117,13 +117,17 @@ public static MultiTermVectorsOperation of(Function + * API name: {@code _id} */ public final String id() { return this.id; } /** + * The index of the document. + *

* API name: {@code _index} */ @Nullable @@ -132,6 +136,9 @@ public final String index() { } /** + * An artificial document (a document not present in the index) for which you + * want to retrieve term vectors. + *

* API name: {@code doc} */ @Nullable @@ -140,6 +147,11 @@ public final JsonData doc() { } /** + * Comma-separated list or wildcard expressions of fields to include in the + * statistics. Used as the default list unless a specific field list is provided + * in the completion_fields or fielddata_fields + * parameters. + *

* API name: {@code fields} */ public final List fields() { @@ -147,6 +159,9 @@ public final List fields() { } /** + * If true, the response includes the document count, sum of + * document frequencies, and sum of total term frequencies. + *

* API name: {@code field_statistics} */ @Nullable @@ -155,6 +170,8 @@ public final Boolean fieldStatistics() { } /** + * Filter terms based on their tf-idf scores. + *

* API name: {@code filter} */ @Nullable @@ -163,6 +180,8 @@ public final Filter filter() { } /** + * If true, the response includes term offsets. + *

* API name: {@code offsets} */ @Nullable @@ -171,6 +190,8 @@ public final Boolean offsets() { } /** + * If true, the response includes term payloads. + *

* API name: {@code payloads} */ @Nullable @@ -179,6 +200,8 @@ public final Boolean payloads() { } /** + * If true, the response includes term positions. + *

* API name: {@code positions} */ @Nullable @@ -187,6 +210,8 @@ public final Boolean positions() { } /** + * Custom value used to route operations to a specific shard. + *

* API name: {@code routing} */ @Nullable @@ -195,6 +220,8 @@ public final String routing() { } /** + * If true, the response includes term frequency and document frequency. + *

* API name: {@code term_statistics} */ @Nullable @@ -203,6 +230,8 @@ public final Boolean termStatistics() { } /** + * If true, returns the document version as part of a hit. + *

* API name: {@code version} */ @Nullable @@ -211,6 +240,8 @@ public final Long version() { } /** + * Specific version type. + *

* API name: {@code version_type} */ @Nullable @@ -352,7 +383,9 @@ public static class Builder extends WithJsonObjectBuilderBase private VersionType versionType; /** - * Required - API name: {@code _id} + * Required - The ID of the document. + *

+ * API name: {@code _id} */ public final Builder id(String value) { this.id = value; @@ -360,6 +393,8 @@ public final Builder id(String value) { } /** + * The index of the document. + *

* API name: {@code _index} */ public final Builder index(@Nullable String value) { @@ -368,6 +403,9 @@ public final Builder index(@Nullable String value) { } /** + * An artificial document (a document not present in the index) for which you + * want to retrieve term vectors. + *

* API name: {@code doc} */ public final Builder doc(@Nullable JsonData value) { @@ -376,6 +414,11 @@ public final Builder doc(@Nullable JsonData value) { } /** + * Comma-separated list or wildcard expressions of fields to include in the + * statistics. Used as the default list unless a specific field list is provided + * in the completion_fields or fielddata_fields + * parameters. + *

* API name: {@code fields} *

* Adds all elements of list to fields. @@ -386,6 +429,11 @@ public final Builder fields(List list) { } /** + * Comma-separated list or wildcard expressions of fields to include in the + * statistics. Used as the default list unless a specific field list is provided + * in the completion_fields or fielddata_fields + * parameters. + *

* API name: {@code fields} *

* Adds one or more values to fields. @@ -396,6 +444,9 @@ public final Builder fields(String value, String... values) { } /** + * If true, the response includes the document count, sum of + * document frequencies, and sum of total term frequencies. + *

* API name: {@code field_statistics} */ public final Builder fieldStatistics(@Nullable Boolean value) { @@ -404,6 +455,8 @@ public final Builder fieldStatistics(@Nullable Boolean value) { } /** + * Filter terms based on their tf-idf scores. + *

* API name: {@code filter} */ public final Builder filter(@Nullable Filter value) { @@ -412,6 +465,8 @@ public final Builder filter(@Nullable Filter value) { } /** + * Filter terms based on their tf-idf scores. + *

* API name: {@code filter} */ public final Builder filter(Function> fn) { @@ -419,6 +474,8 @@ public final Builder filter(Function> fn) } /** + * If true, the response includes term offsets. + *

* API name: {@code offsets} */ public final Builder offsets(@Nullable Boolean value) { @@ -427,6 +484,8 @@ public final Builder offsets(@Nullable Boolean value) { } /** + * If true, the response includes term payloads. + *

* API name: {@code payloads} */ public final Builder payloads(@Nullable Boolean value) { @@ -435,6 +494,8 @@ public final Builder payloads(@Nullable Boolean value) { } /** + * If true, the response includes term positions. + *

* API name: {@code positions} */ public final Builder positions(@Nullable Boolean value) { @@ -443,6 +504,8 @@ public final Builder positions(@Nullable Boolean value) { } /** + * Custom value used to route operations to a specific shard. + *

* API name: {@code routing} */ public final Builder routing(@Nullable String value) { @@ -451,6 +514,8 @@ public final Builder routing(@Nullable String value) { } /** + * If true, the response includes term frequency and document frequency. + *

* API name: {@code term_statistics} */ public final Builder termStatistics(@Nullable Boolean value) { @@ -459,6 +524,8 @@ public final Builder termStatistics(@Nullable Boolean value) { } /** + * If true, returns the document version as part of a hit. + *

* API name: {@code version} */ public final Builder version(@Nullable Long value) { @@ -467,6 +534,8 @@ public final Builder version(@Nullable Long value) { } /** + * Specific version type. + *

* API name: {@code version_type} */ public final Builder versionType(@Nullable VersionType value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricDiscountedCumulativeGain.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricDiscountedCumulativeGain.java index 2d8781773..e7780de25 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricDiscountedCumulativeGain.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricDiscountedCumulativeGain.java @@ -41,7 +41,7 @@ * Discounted cumulative gain (DCG) * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/search-rank-eval.html#_discounted_cumulative_gain_dcg">Documentation * on elastic.co * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricExpectedReciprocalRank.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricExpectedReciprocalRank.java index 1bcef2597..840539eb7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricExpectedReciprocalRank.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricExpectedReciprocalRank.java @@ -41,7 +41,7 @@ * Expected Reciprocal Rank (ERR) * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/search-rank-eval.html#_expected_reciprocal_rank_err">Documentation * on elastic.co * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricMeanReciprocalRank.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricMeanReciprocalRank.java index ee5833698..c34e35155 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricMeanReciprocalRank.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricMeanReciprocalRank.java @@ -38,7 +38,7 @@ * Mean Reciprocal Rank * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/search-rank-eval.html#_mean_reciprocal_rank">Documentation * on elastic.co * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricPrecision.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricPrecision.java index 28a3748fd..89fa9f39b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricPrecision.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricPrecision.java @@ -41,7 +41,7 @@ * Precision at K (P@k) * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/search-rank-eval.html#k-precision">Documentation * on elastic.co * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricRecall.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricRecall.java index 93a49f50f..dbecdb77b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricRecall.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricRecall.java @@ -38,7 +38,7 @@ * Recall at K (R@k) * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/search-rank-eval.html#k-recall">Documentation * on elastic.co * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexStatus.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexStatus.java index a29eece28..65310c56e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexStatus.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexStatus.java @@ -106,42 +106,58 @@ public static ReindexStatus of(Function> f } /** - * Required - API name: {@code batches} + * Required - The number of scroll responses pulled back by the reindex. + *

+ * API name: {@code batches} */ public final long batches() { return this.batches; } /** - * Required - API name: {@code created} + * Required - The number of documents that were successfully created. + *

+ * API name: {@code created} */ public final long created() { return this.created; } /** - * Required - API name: {@code deleted} + * Required - The number of documents that were successfully deleted. + *

+ * API name: {@code deleted} */ public final long deleted() { return this.deleted; } /** - * Required - API name: {@code noops} + * Required - The number of documents that were ignored because the script used + * for the reindex returned a noop value for ctx.op. + *

+ * API name: {@code noops} */ public final long noops() { return this.noops; } /** - * Required - API name: {@code requests_per_second} + * Required - The number of requests per second effectively executed during the + * reindex. + *

+ * API name: {@code requests_per_second} */ public final float requestsPerSecond() { return this.requestsPerSecond; } /** - * Required - API name: {@code retries} + * Required - The number of retries attempted by reindex. bulk is + * the number of bulk actions retried and search is the number of + * search actions retried. + *

+ * API name: {@code retries} */ public final Retries retries() { return this.retries; @@ -156,7 +172,10 @@ public final Time throttled() { } /** - * Required - API name: {@code throttled_millis} + * Required - Number of milliseconds the request slept to conform to + * requests_per_second. + *

+ * API name: {@code throttled_millis} */ public final long throttledMillis() { return this.throttledMillis; @@ -171,28 +190,42 @@ public final Time throttledUntil() { } /** - * Required - API name: {@code throttled_until_millis} + * Required - This field should always be equal to zero in a + * _reindex response. It only has meaning when using the Task API, + * where it indicates the next time (in milliseconds since epoch) a throttled + * request will be executed again in order to conform to + * requests_per_second. + *

+ * API name: {@code throttled_until_millis} */ public final long throttledUntilMillis() { return this.throttledUntilMillis; } /** - * Required - API name: {@code total} + * Required - The number of documents that were successfully processed. + *

+ * API name: {@code total} */ public final long total() { return this.total; } /** - * Required - API name: {@code updated} + * Required - The number of documents that were successfully updated, for + * example, a document with same ID already existed prior to reindex updating + * it. + *

+ * API name: {@code updated} */ public final long updated() { return this.updated; } /** - * Required - API name: {@code version_conflicts} + * Required - The number of version conflicts that reindex hits. + *

+ * API name: {@code version_conflicts} */ public final long versionConflicts() { return this.versionConflicts; @@ -295,7 +328,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement private Long versionConflicts; /** - * Required - API name: {@code batches} + * Required - The number of scroll responses pulled back by the reindex. + *

+ * API name: {@code batches} */ public final Builder batches(long value) { this.batches = value; @@ -303,7 +338,9 @@ public final Builder batches(long value) { } /** - * Required - API name: {@code created} + * Required - The number of documents that were successfully created. + *

+ * API name: {@code created} */ public final Builder created(long value) { this.created = value; @@ -311,7 +348,9 @@ public final Builder created(long value) { } /** - * Required - API name: {@code deleted} + * Required - The number of documents that were successfully deleted. + *

+ * API name: {@code deleted} */ public final Builder deleted(long value) { this.deleted = value; @@ -319,7 +358,10 @@ public final Builder deleted(long value) { } /** - * Required - API name: {@code noops} + * Required - The number of documents that were ignored because the script used + * for the reindex returned a noop value for ctx.op. + *

+ * API name: {@code noops} */ public final Builder noops(long value) { this.noops = value; @@ -327,7 +369,10 @@ public final Builder noops(long value) { } /** - * Required - API name: {@code requests_per_second} + * Required - The number of requests per second effectively executed during the + * reindex. + *

+ * API name: {@code requests_per_second} */ public final Builder requestsPerSecond(float value) { this.requestsPerSecond = value; @@ -335,7 +380,11 @@ public final Builder requestsPerSecond(float value) { } /** - * Required - API name: {@code retries} + * Required - The number of retries attempted by reindex. bulk is + * the number of bulk actions retried and search is the number of + * search actions retried. + *

+ * API name: {@code retries} */ public final Builder retries(Retries value) { this.retries = value; @@ -343,7 +392,11 @@ public final Builder retries(Retries value) { } /** - * Required - API name: {@code retries} + * Required - The number of retries attempted by reindex. bulk is + * the number of bulk actions retried and search is the number of + * search actions retried. + *

+ * API name: {@code retries} */ public final Builder retries(Function> fn) { return this.retries(fn.apply(new Retries.Builder()).build()); @@ -365,7 +418,10 @@ public final Builder throttled(Function> fn) { } /** - * Required - API name: {@code throttled_millis} + * Required - Number of milliseconds the request slept to conform to + * requests_per_second. + *

+ * API name: {@code throttled_millis} */ public final Builder throttledMillis(long value) { this.throttledMillis = value; @@ -388,7 +444,13 @@ public final Builder throttledUntil(Function> } /** - * Required - API name: {@code throttled_until_millis} + * Required - This field should always be equal to zero in a + * _reindex response. It only has meaning when using the Task API, + * where it indicates the next time (in milliseconds since epoch) a throttled + * request will be executed again in order to conform to + * requests_per_second. + *

+ * API name: {@code throttled_until_millis} */ public final Builder throttledUntilMillis(long value) { this.throttledUntilMillis = value; @@ -396,7 +458,9 @@ public final Builder throttledUntilMillis(long value) { } /** - * Required - API name: {@code total} + * Required - The number of documents that were successfully processed. + *

+ * API name: {@code total} */ public final Builder total(long value) { this.total = value; @@ -404,7 +468,11 @@ public final Builder total(long value) { } /** - * Required - API name: {@code updated} + * Required - The number of documents that were successfully updated, for + * example, a document with same ID already existed prior to reindex updating + * it. + *

+ * API name: {@code updated} */ public final Builder updated(long value) { this.updated = value; @@ -412,7 +480,9 @@ public final Builder updated(long value) { } /** - * Required - API name: {@code version_conflicts} + * Required - The number of version conflicts that reindex hits. + *

+ * API name: {@code version_conflicts} */ public final Builder versionConflicts(long value) { this.versionConflicts = value; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/scripts_painless_execute/PainlessContextSetup.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/scripts_painless_execute/PainlessContextSetup.java index c02e4904c..dfeb83ae9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/scripts_painless_execute/PainlessContextSetup.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/scripts_painless_execute/PainlessContextSetup.java @@ -72,21 +72,30 @@ public static PainlessContextSetup of(Function + * API name: {@code document} */ public final JsonData document() { return this.document; } /** - * Required - API name: {@code index} + * Required - Index containing a mapping that’s compatible with the indexed + * document. You may specify a remote index by prefixing the index with the + * remote cluster alias. + *

+ * API name: {@code index} */ public final String index() { return this.index; } /** - * Required - API name: {@code query} + * Required - Use this parameter to specify a query for computing a score. + *

+ * API name: {@code query} */ public final Query query() { return this.query; @@ -135,7 +144,10 @@ public static class Builder extends WithJsonObjectBuilderBase private Query query; /** - * Required - API name: {@code document} + * Required - Document that’s temporarily indexed in-memory and accessible from + * the script. + *

+ * API name: {@code document} */ public final Builder document(JsonData value) { this.document = value; @@ -143,7 +155,11 @@ public final Builder document(JsonData value) { } /** - * Required - API name: {@code index} + * Required - Index containing a mapping that’s compatible with the indexed + * document. You may specify a remote index by prefixing the index with the + * remote cluster alias. + *

+ * API name: {@code index} */ public final Builder index(String value) { this.index = value; @@ -151,7 +167,9 @@ public final Builder index(String value) { } /** - * Required - API name: {@code query} + * Required - Use this parameter to specify a query for computing a score. + *

+ * API name: {@code query} */ public final Builder query(Query value) { this.query = value; @@ -159,7 +177,9 @@ public final Builder query(Query value) { } /** - * Required - API name: {@code query} + * Required - Use this parameter to specify a query for computing a score. + *

+ * API name: {@code query} */ public final Builder query(Function> fn) { return this.query(fn.apply(new Query.Builder()).build()); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/Context.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/Context.java index 474498451..d0ba3c7c5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/Context.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/Context.java @@ -51,7 +51,7 @@ * document's field for the text. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/query-dsl-mlt-query.html#_document_input_parameters">Documentation * on elastic.co * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/Filter.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/Filter.java index 812e16bfc..a153ad790 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/Filter.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/Filter.java @@ -87,6 +87,8 @@ public static Filter of(Function> fn) { } /** + * Ignore words which occur in more than this many docs. Defaults to unbounded. + *

* API name: {@code max_doc_freq} */ @Nullable @@ -95,6 +97,8 @@ public final Integer maxDocFreq() { } /** + * Maximum number of terms that must be returned per field. + *

* API name: {@code max_num_terms} */ @Nullable @@ -103,6 +107,9 @@ public final Integer maxNumTerms() { } /** + * Ignore words with more than this frequency in the source doc. Defaults to + * unbounded. + *

* API name: {@code max_term_freq} */ @Nullable @@ -111,6 +118,9 @@ public final Integer maxTermFreq() { } /** + * The maximum word length above which words will be ignored. Defaults to + * unbounded. + *

* API name: {@code max_word_length} */ @Nullable @@ -119,6 +129,8 @@ public final Integer maxWordLength() { } /** + * Ignore terms which do not occur in at least this many docs. + *

* API name: {@code min_doc_freq} */ @Nullable @@ -127,6 +139,8 @@ public final Integer minDocFreq() { } /** + * Ignore words with less than this frequency in the source doc. + *

* API name: {@code min_term_freq} */ @Nullable @@ -135,6 +149,8 @@ public final Integer minTermFreq() { } /** + * The minimum word length below which words will be ignored. + *

* API name: {@code min_word_length} */ @Nullable @@ -225,6 +241,8 @@ public static class Builder extends WithJsonObjectBuilderBase implement private Integer minWordLength; /** + * Ignore words which occur in more than this many docs. Defaults to unbounded. + *

* API name: {@code max_doc_freq} */ public final Builder maxDocFreq(@Nullable Integer value) { @@ -233,6 +251,8 @@ public final Builder maxDocFreq(@Nullable Integer value) { } /** + * Maximum number of terms that must be returned per field. + *

* API name: {@code max_num_terms} */ public final Builder maxNumTerms(@Nullable Integer value) { @@ -241,6 +261,9 @@ public final Builder maxNumTerms(@Nullable Integer value) { } /** + * Ignore words with more than this frequency in the source doc. Defaults to + * unbounded. + *

* API name: {@code max_term_freq} */ public final Builder maxTermFreq(@Nullable Integer value) { @@ -249,6 +272,9 @@ public final Builder maxTermFreq(@Nullable Integer value) { } /** + * The maximum word length above which words will be ignored. Defaults to + * unbounded. + *

* API name: {@code max_word_length} */ public final Builder maxWordLength(@Nullable Integer value) { @@ -257,6 +283,8 @@ public final Builder maxWordLength(@Nullable Integer value) { } /** + * Ignore terms which do not occur in at least this many docs. + *

* API name: {@code min_doc_freq} */ public final Builder minDocFreq(@Nullable Integer value) { @@ -265,6 +293,8 @@ public final Builder minDocFreq(@Nullable Integer value) { } /** + * Ignore words with less than this frequency in the source doc. + *

* API name: {@code min_term_freq} */ public final Builder minTermFreq(@Nullable Integer value) { @@ -273,6 +303,8 @@ public final Builder minTermFreq(@Nullable Integer value) { } /** + * The minimum word length below which words will be ignored. + *

* API name: {@code min_word_length} */ public final Builder minWordLength(@Nullable Integer value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html b/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html index f9da24a2b..4390f9d8e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html @@ -4,47 +4,47 @@ Elasticsearch API specification - Please see the Elasticsearch API specification. + Please see the Elasticsearch API specification. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichAsyncClient.java index f0c1e46f5..f011d2ac2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichAsyncClient.java @@ -93,7 +93,7 @@ public final CompletableFuture deletePolicy( * Creates the enrich index for an existing enrich policy. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/execute-enrich-policy-api.html">Documentation * on elastic.co */ @@ -111,7 +111,7 @@ public CompletableFuture executePolicy(ExecutePolicyReque * a function that initializes a builder to create the * {@link ExecutePolicyRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/execute-enrich-policy-api.html">Documentation * on elastic.co */ @@ -172,7 +172,7 @@ public CompletableFuture getPolicy() { * Creates a new enrich policy. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/put-enrich-policy-api.html">Documentation * on elastic.co */ @@ -190,7 +190,7 @@ public CompletableFuture putPolicy(PutPolicyRequest request) * a function that initializes a builder to create the * {@link PutPolicyRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/put-enrich-policy-api.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichClient.java index b9a094353..1f1e707a3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichClient.java @@ -94,7 +94,7 @@ public final DeletePolicyResponse deletePolicy( * Creates the enrich index for an existing enrich policy. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/execute-enrich-policy-api.html">Documentation * on elastic.co */ @@ -113,7 +113,7 @@ public ExecutePolicyResponse executePolicy(ExecutePolicyRequest request) * a function that initializes a builder to create the * {@link ExecutePolicyRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/execute-enrich-policy-api.html">Documentation * on elastic.co */ @@ -175,7 +175,7 @@ public GetPolicyResponse getPolicy() throws IOException, ElasticsearchException * Creates a new enrich policy. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/put-enrich-policy-api.html">Documentation * on elastic.co */ @@ -193,7 +193,7 @@ public PutPolicyResponse putPolicy(PutPolicyRequest request) throws IOException, * a function that initializes a builder to create the * {@link PutPolicyRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/put-enrich-policy-api.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/ElasticsearchEqlAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/ElasticsearchEqlAsyncClient.java index c19bd7630..29b14d490 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/ElasticsearchEqlAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/ElasticsearchEqlAsyncClient.java @@ -96,10 +96,9 @@ public final CompletableFuture delete( * Returns async results from previously executed Event Query Language (EQL) * search * - * @see [Documentation on - * elastic.co](https://www.elastic.co - * https://www.elastic.co/guide/en/elasticsearch/reference/8.11/get-async-eql-search-api.html) + * @see Documentation + * on elastic.co */ public CompletableFuture> get(EqlGetRequest request, Class tEventClass) { @@ -118,10 +117,9 @@ public CompletableFuture> get(EqlGetRequest requ * @param fn * a function that initializes a builder to create the * {@link EqlGetRequest} - * @see [Documentation on - * elastic.co](https://www.elastic.co - * https://www.elastic.co/guide/en/elasticsearch/reference/8.11/get-async-eql-search-api.html) + * @see Documentation + * on elastic.co */ public final CompletableFuture> get( @@ -133,10 +131,9 @@ public final CompletableFuture> get( * Returns async results from previously executed Event Query Language (EQL) * search * - * @see [Documentation on - * elastic.co](https://www.elastic.co - * https://www.elastic.co/guide/en/elasticsearch/reference/8.11/get-async-eql-search-api.html) + * @see Documentation + * on elastic.co */ public CompletableFuture> get(EqlGetRequest request, Type tEventType) { @@ -155,10 +152,9 @@ public CompletableFuture> get(EqlGetRequest requ * @param fn * a function that initializes a builder to create the * {@link EqlGetRequest} - * @see [Documentation on - * elastic.co](https://www.elastic.co - * https://www.elastic.co/guide/en/elasticsearch/reference/8.11/get-async-eql-search-api.html) + * @see Documentation + * on elastic.co */ public final CompletableFuture> get( @@ -172,10 +168,9 @@ public final CompletableFuture> get( * Returns the status of a previously submitted async or stored Event Query * Language (EQL) search * - * @see [Documentation on - * elastic.co](https://www.elastic.co - * https://www.elastic.co/guide/en/elasticsearch/reference/8.11/get-async-eql-status-api.html) + * @see Documentation + * on elastic.co */ public CompletableFuture getStatus(GetEqlStatusRequest request) { @@ -192,10 +187,9 @@ public CompletableFuture getStatus(GetEqlStatusRequest req * @param fn * a function that initializes a builder to create the * {@link GetEqlStatusRequest} - * @see [Documentation on - * elastic.co](https://www.elastic.co - * https://www.elastic.co/guide/en/elasticsearch/reference/8.11/get-async-eql-status-api.html) + * @see Documentation + * on elastic.co */ public final CompletableFuture getStatus( diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/ElasticsearchEqlClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/ElasticsearchEqlClient.java index 258382fb9..65c27fa69 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/ElasticsearchEqlClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/ElasticsearchEqlClient.java @@ -97,10 +97,9 @@ public final EqlDeleteResponse delete(Functionhttps://www.elastic.co - * https://www.elastic.co/guide/en/elasticsearch/reference/8.11/get-async-eql-search-api.html) + * @see Documentation + * on elastic.co */ public EqlGetResponse get(EqlGetRequest request, Class tEventClass) @@ -120,10 +119,9 @@ public EqlGetResponse get(EqlGetRequest request, Class * @param fn * a function that initializes a builder to create the * {@link EqlGetRequest} - * @see [Documentation on - * elastic.co](https://www.elastic.co - * https://www.elastic.co/guide/en/elasticsearch/reference/8.11/get-async-eql-search-api.html) + * @see Documentation + * on elastic.co */ public final EqlGetResponse get(Function> fn, @@ -135,10 +133,9 @@ public final EqlGetResponse get(Functionhttps://www.elastic.co - * https://www.elastic.co/guide/en/elasticsearch/reference/8.11/get-async-eql-search-api.html) + * @see Documentation + * on elastic.co */ public EqlGetResponse get(EqlGetRequest request, Type tEventType) @@ -158,10 +155,9 @@ public EqlGetResponse get(EqlGetRequest request, Type tEventTyp * @param fn * a function that initializes a builder to create the * {@link EqlGetRequest} - * @see [Documentation on - * elastic.co](https://www.elastic.co - * https://www.elastic.co/guide/en/elasticsearch/reference/8.11/get-async-eql-search-api.html) + * @see Documentation + * on elastic.co */ public final EqlGetResponse get(Function> fn, @@ -175,10 +171,9 @@ public final EqlGetResponse get(Functionhttps://www.elastic.co - * https://www.elastic.co/guide/en/elasticsearch/reference/8.11/get-async-eql-status-api.html) + * @see Documentation + * on elastic.co */ public GetEqlStatusResponse getStatus(GetEqlStatusRequest request) throws IOException, ElasticsearchException { @@ -195,10 +190,9 @@ public GetEqlStatusResponse getStatus(GetEqlStatusRequest request) throws IOExce * @param fn * a function that initializes a builder to create the * {@link GetEqlStatusRequest} - * @see [Documentation on - * elastic.co](https://www.elastic.co - * https://www.elastic.co/guide/en/elasticsearch/reference/8.11/get-async-eql-status-api.html) + * @see Documentation + * on elastic.co */ public final GetEqlStatusResponse getStatus( diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/ElasticsearchEsqlAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/ElasticsearchEsqlAsyncClient.java new file mode 100644 index 000000000..8d6caa5ba --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/ElasticsearchEsqlAsyncClient.java @@ -0,0 +1,90 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch.esql; + +import co.elastic.clients.ApiClient; +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.transport.ElasticsearchTransport; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.JsonEndpoint; +import co.elastic.clients.transport.Transport; +import co.elastic.clients.transport.TransportOptions; +import co.elastic.clients.transport.endpoints.BinaryResponse; +import co.elastic.clients.util.ObjectBuilder; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import javax.annotation.Nullable; + +/** + * Client for the esql namespace. + */ +public class ElasticsearchEsqlAsyncClient extends ApiClient { + + public ElasticsearchEsqlAsyncClient(ElasticsearchTransport transport) { + super(transport, null); + } + + public ElasticsearchEsqlAsyncClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions) { + super(transport, transportOptions); + } + + @Override + public ElasticsearchEsqlAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) { + return new ElasticsearchEsqlAsyncClient(this.transport, transportOptions); + } + + // ----- Endpoint: esql.query + + /** + * Executes an ESQL request + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture query(QueryRequest request) { + @SuppressWarnings("unchecked") + Endpoint endpoint = (Endpoint) QueryRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Executes an ESQL request + * + * @param fn + * a function that initializes a builder to create the + * {@link QueryRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture query( + Function> fn) { + return query(fn.apply(new QueryRequest.Builder()).build()); + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/ElasticsearchEsqlClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/ElasticsearchEsqlClient.java new file mode 100644 index 000000000..cd2d108df --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/ElasticsearchEsqlClient.java @@ -0,0 +1,91 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch.esql; + +import co.elastic.clients.ApiClient; +import co.elastic.clients.elasticsearch._types.ElasticsearchException; +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.transport.ElasticsearchTransport; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.JsonEndpoint; +import co.elastic.clients.transport.Transport; +import co.elastic.clients.transport.TransportOptions; +import co.elastic.clients.transport.endpoints.BinaryResponse; +import co.elastic.clients.util.ObjectBuilder; +import java.io.IOException; +import java.util.function.Function; +import javax.annotation.Nullable; + +/** + * Client for the esql namespace. + */ +public class ElasticsearchEsqlClient extends ApiClient { + + public ElasticsearchEsqlClient(ElasticsearchTransport transport) { + super(transport, null); + } + + public ElasticsearchEsqlClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions) { + super(transport, transportOptions); + } + + @Override + public ElasticsearchEsqlClient withTransportOptions(@Nullable TransportOptions transportOptions) { + return new ElasticsearchEsqlClient(this.transport, transportOptions); + } + + // ----- Endpoint: esql.query + + /** + * Executes an ESQL request + * + * @see Documentation + * on elastic.co + */ + + public BinaryResponse query(QueryRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + Endpoint endpoint = (Endpoint) QueryRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Executes an ESQL request + * + * @param fn + * a function that initializes a builder to create the + * {@link QueryRequest} + * @see Documentation + * on elastic.co + */ + + public final BinaryResponse query(Function> fn) + throws IOException, ElasticsearchException { + return query(fn.apply(new QueryRequest.Builder()).build()); + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/QueryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/QueryRequest.java new file mode 100644 index 000000000..04ba096a1 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/QueryRequest.java @@ -0,0 +1,430 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch.esql; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.FieldValue; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.elasticsearch._types.query_dsl.Query; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.BinaryEndpoint; +import co.elastic.clients.transport.endpoints.BinaryResponse; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +// typedef: esql.query.Request + +/** + * Executes an ES|QL request + * + * @see API + * specification + */ +@JsonpDeserializable +public class QueryRequest extends RequestBase implements JsonpSerializable { + @Nullable + private final Boolean columnar; + + @Nullable + private final String delimiter; + + @Nullable + private final Query filter; + + @Nullable + private final String format; + + @Nullable + private final String locale; + + private final List params; + + private final String query; + + // --------------------------------------------------------------------------------------------- + + private QueryRequest(Builder builder) { + + this.columnar = builder.columnar; + this.delimiter = builder.delimiter; + this.filter = builder.filter; + this.format = builder.format; + this.locale = builder.locale; + this.params = ApiTypeHelper.unmodifiable(builder.params); + this.query = ApiTypeHelper.requireNonNull(builder.query, this, "query"); + + } + + public static QueryRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * By default, ES|QL returns results as rows. For example, FROM returns each + * individual document as one row. For the JSON, YAML, CBOR and smile formats, + * ES|QL can return the results in a columnar fashion where one row represents + * all the values of a certain column in the results. + *

+ * API name: {@code columnar} + */ + @Nullable + public final Boolean columnar() { + return this.columnar; + } + + /** + * The character to use between values within a CSV row. Only valid for the CSV + * format. + *

+ * API name: {@code delimiter} + */ + @Nullable + public final String delimiter() { + return this.delimiter; + } + + /** + * Specify a Query DSL query in the filter parameter to filter the set of + * documents that an ES|QL query runs on. + *

+ * API name: {@code filter} + */ + @Nullable + public final Query filter() { + return this.filter; + } + + /** + * A short version of the Accept header, e.g. json, yaml. + *

+ * API name: {@code format} + */ + @Nullable + public final String format() { + return this.format; + } + + /** + * API name: {@code locale} + */ + @Nullable + public final String locale() { + return this.locale; + } + + /** + * To avoid any attempts of hacking or code injection, extract the values in a + * separate list of parameters. Use question mark placeholders (?) in the query + * string for each of the parameters. + *

+ * API name: {@code params} + */ + public final List params() { + return this.params; + } + + /** + * Required - The ES|QL query API accepts an ES|QL query string in the query + * parameter, runs it, and returns the results. + *

+ * API name: {@code query} + */ + public final String query() { + return this.query; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.columnar != null) { + generator.writeKey("columnar"); + generator.write(this.columnar); + + } + if (this.filter != null) { + generator.writeKey("filter"); + this.filter.serialize(generator, mapper); + + } + if (this.locale != null) { + generator.writeKey("locale"); + generator.write(this.locale); + + } + if (ApiTypeHelper.isDefined(this.params)) { + generator.writeKey("params"); + generator.writeStartArray(); + for (FieldValue item0 : this.params) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + generator.writeKey("query"); + generator.write(this.query); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link QueryRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Boolean columnar; + + @Nullable + private String delimiter; + + @Nullable + private Query filter; + + @Nullable + private String format; + + @Nullable + private String locale; + + @Nullable + private List params; + + private String query; + + /** + * By default, ES|QL returns results as rows. For example, FROM returns each + * individual document as one row. For the JSON, YAML, CBOR and smile formats, + * ES|QL can return the results in a columnar fashion where one row represents + * all the values of a certain column in the results. + *

+ * API name: {@code columnar} + */ + public final Builder columnar(@Nullable Boolean value) { + this.columnar = value; + return this; + } + + /** + * The character to use between values within a CSV row. Only valid for the CSV + * format. + *

+ * API name: {@code delimiter} + */ + public final Builder delimiter(@Nullable String value) { + this.delimiter = value; + return this; + } + + /** + * Specify a Query DSL query in the filter parameter to filter the set of + * documents that an ES|QL query runs on. + *

+ * API name: {@code filter} + */ + public final Builder filter(@Nullable Query value) { + this.filter = value; + return this; + } + + /** + * Specify a Query DSL query in the filter parameter to filter the set of + * documents that an ES|QL query runs on. + *

+ * API name: {@code filter} + */ + public final Builder filter(Function> fn) { + return this.filter(fn.apply(new Query.Builder()).build()); + } + + /** + * A short version of the Accept header, e.g. json, yaml. + *

+ * API name: {@code format} + */ + public final Builder format(@Nullable String value) { + this.format = value; + return this; + } + + /** + * API name: {@code locale} + */ + public final Builder locale(@Nullable String value) { + this.locale = value; + return this; + } + + /** + * To avoid any attempts of hacking or code injection, extract the values in a + * separate list of parameters. Use question mark placeholders (?) in the query + * string for each of the parameters. + *

+ * API name: {@code params} + *

+ * Adds all elements of list to params. + */ + public final Builder params(List list) { + this.params = _listAddAll(this.params, list); + return this; + } + + /** + * To avoid any attempts of hacking or code injection, extract the values in a + * separate list of parameters. Use question mark placeholders (?) in the query + * string for each of the parameters. + *

+ * API name: {@code params} + *

+ * Adds one or more values to params. + */ + public final Builder params(FieldValue value, FieldValue... values) { + this.params = _listAdd(this.params, value, values); + return this; + } + + /** + * To avoid any attempts of hacking or code injection, extract the values in a + * separate list of parameters. Use question mark placeholders (?) in the query + * string for each of the parameters. + *

+ * API name: {@code params} + *

+ * Adds a value to params using a builder lambda. + */ + public final Builder params(Function> fn) { + return params(fn.apply(new FieldValue.Builder()).build()); + } + + /** + * Required - The ES|QL query API accepts an ES|QL query string in the query + * parameter, runs it, and returns the results. + *

+ * API name: {@code query} + */ + public final Builder query(String value) { + this.query = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link QueryRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public QueryRequest build() { + _checkSingleUse(); + + return new QueryRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link QueryRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + QueryRequest::setupQueryRequestDeserializer); + + protected static void setupQueryRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::columnar, JsonpDeserializer.booleanDeserializer(), "columnar"); + op.add(Builder::filter, Query._DESERIALIZER, "filter"); + op.add(Builder::locale, JsonpDeserializer.stringDeserializer(), "locale"); + op.add(Builder::params, JsonpDeserializer.arrayDeserializer(FieldValue._DESERIALIZER), "params"); + op.add(Builder::query, JsonpDeserializer.stringDeserializer(), "query"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code esql.query}". + */ + public static final Endpoint _ENDPOINT = new BinaryEndpoint<>( + "es/esql.query", + + // Request method + request -> { + return "POST"; + + }, + + // Request path + request -> { + return "/_query"; + + }, + + // Path parameters + request -> { + return Collections.emptyMap(); + }, + + // Request parameters + request -> { + Map params = new HashMap<>(); + if (request.delimiter != null) { + params.put("delimiter", request.delimiter); + } + if (request.format != null) { + params.put("format", request.format); + } + return params; + + }, SimpleEndpoint.emptyMap(), true, null); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ElasticsearchGraphAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ElasticsearchGraphAsyncClient.java index a3b50e33a..846ddda5d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ElasticsearchGraphAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ElasticsearchGraphAsyncClient.java @@ -61,7 +61,7 @@ public ElasticsearchGraphAsyncClient withTransportOptions(@Nullable TransportOpt * an index. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/graph-explore-api.html">Documentation * on elastic.co */ @@ -80,7 +80,7 @@ public CompletableFuture explore(ExploreRequest request) { * a function that initializes a builder to create the * {@link ExploreRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/graph-explore-api.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ElasticsearchGraphClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ElasticsearchGraphClient.java index 3fec3e6d2..357b886a7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ElasticsearchGraphClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ElasticsearchGraphClient.java @@ -61,7 +61,7 @@ public ElasticsearchGraphClient withTransportOptions(@Nullable TransportOptions * an index. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/graph-explore-api.html">Documentation * on elastic.co */ @@ -80,7 +80,7 @@ public ExploreResponse explore(ExploreRequest request) throws IOException, Elast * a function that initializes a builder to create the * {@link ExploreRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/graph-explore-api.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataLifecycleWithRollover.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataLifecycleWithRollover.java deleted file mode 100644 index b7ada17fb..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataLifecycleWithRollover.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - -package co.elastic.clients.elasticsearch.indices; - -import co.elastic.clients.elasticsearch._types.Time; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -// typedef: indices._types.DataLifecycleWithRollover - -/** - * Data lifecycle with rollover can be used to display the configuration - * including the default rollover conditions, if asked. - * - * @see API - * specification - */ -@JsonpDeserializable -public class DataLifecycleWithRollover implements JsonpSerializable { - @Nullable - private final Time dataRetention; - - @Nullable - private final DlmRolloverConditions rollover; - - // --------------------------------------------------------------------------------------------- - - private DataLifecycleWithRollover(Builder builder) { - - this.dataRetention = builder.dataRetention; - this.rollover = builder.rollover; - - } - - public static DataLifecycleWithRollover of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * If defined, every document added to this data stream will be stored at least - * for this time frame. Any time after this duration the document could be - * deleted. When empty, every document in this data stream will be stored - * indefinitely. - *

- * API name: {@code data_retention} - */ - @Nullable - public final Time dataRetention() { - return this.dataRetention; - } - - /** - * The conditions which will trigger the rollover of a backing index as - * configured by the cluster setting - * cluster.lifecycle.default.rollover. This property is an - * implementation detail and it will only be retrieved when the query param - * include_defaults is set to true. The contents of this field are - * subject to change. - *

- * API name: {@code rollover} - */ - @Nullable - public final DlmRolloverConditions rollover() { - return this.rollover; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.dataRetention != null) { - generator.writeKey("data_retention"); - this.dataRetention.serialize(generator, mapper); - - } - if (this.rollover != null) { - generator.writeKey("rollover"); - this.rollover.serialize(generator, mapper); - - } - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link DataLifecycleWithRollover}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - @Nullable - private Time dataRetention; - - @Nullable - private DlmRolloverConditions rollover; - - /** - * If defined, every document added to this data stream will be stored at least - * for this time frame. Any time after this duration the document could be - * deleted. When empty, every document in this data stream will be stored - * indefinitely. - *

- * API name: {@code data_retention} - */ - public final Builder dataRetention(@Nullable Time value) { - this.dataRetention = value; - return this; - } - - /** - * If defined, every document added to this data stream will be stored at least - * for this time frame. Any time after this duration the document could be - * deleted. When empty, every document in this data stream will be stored - * indefinitely. - *

- * API name: {@code data_retention} - */ - public final Builder dataRetention(Function> fn) { - return this.dataRetention(fn.apply(new Time.Builder()).build()); - } - - /** - * The conditions which will trigger the rollover of a backing index as - * configured by the cluster setting - * cluster.lifecycle.default.rollover. This property is an - * implementation detail and it will only be retrieved when the query param - * include_defaults is set to true. The contents of this field are - * subject to change. - *

- * API name: {@code rollover} - */ - public final Builder rollover(@Nullable DlmRolloverConditions value) { - this.rollover = value; - return this; - } - - /** - * The conditions which will trigger the rollover of a backing index as - * configured by the cluster setting - * cluster.lifecycle.default.rollover. This property is an - * implementation detail and it will only be retrieved when the query param - * include_defaults is set to true. The contents of this field are - * subject to change. - *

- * API name: {@code rollover} - */ - public final Builder rollover( - Function> fn) { - return this.rollover(fn.apply(new DlmRolloverConditions.Builder()).build()); - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link DataLifecycleWithRollover}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public DataLifecycleWithRollover build() { - _checkSingleUse(); - - return new DataLifecycleWithRollover(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link DataLifecycleWithRollover} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, DataLifecycleWithRollover::setupDataLifecycleWithRolloverDeserializer); - - protected static void setupDataLifecycleWithRolloverDeserializer( - ObjectDeserializer op) { - - op.add(Builder::dataRetention, Time._DESERIALIZER, "data_retention"); - op.add(Builder::rollover, DlmRolloverConditions._DESERIALIZER, "rollover"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataStream.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataStream.java index fd84a51a7..0b906d999 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataStream.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataStream.java @@ -66,6 +66,10 @@ public class DataStream implements JsonpSerializable { @Nullable private final String ilmPolicy; + private final ManagedBy nextGenerationManagedBy; + + private final boolean preferIlm; + private final List indices; @Nullable @@ -94,6 +98,9 @@ private DataStream(Builder builder) { this.generation = ApiTypeHelper.requireNonNull(builder.generation, this, "generation"); this.hidden = ApiTypeHelper.requireNonNull(builder.hidden, this, "hidden"); this.ilmPolicy = builder.ilmPolicy; + this.nextGenerationManagedBy = ApiTypeHelper.requireNonNull(builder.nextGenerationManagedBy, this, + "nextGenerationManagedBy"); + this.preferIlm = ApiTypeHelper.requireNonNull(builder.preferIlm, this, "preferIlm"); this.indices = ApiTypeHelper.unmodifiableRequired(builder.indices, this, "indices"); this.lifecycle = builder.lifecycle; this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); @@ -165,6 +172,26 @@ public final String ilmPolicy() { return this.ilmPolicy; } + /** + * Required - Name of the lifecycle system that'll manage the next generation of + * the data stream. + *

+ * API name: {@code next_generation_managed_by} + */ + public final ManagedBy nextGenerationManagedBy() { + return this.nextGenerationManagedBy; + } + + /** + * Required - Indicates if ILM should take precedence over DSL in case both are + * configured to managed this data stream. + *

+ * API name: {@code prefer_ilm} + */ + public final boolean preferIlm() { + return this.preferIlm; + } + /** * Required - Array of objects containing information about the data stream’s * backing indices. The last item in this array contains information about the @@ -288,6 +315,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.ilmPolicy); } + generator.writeKey("next_generation_managed_by"); + this.nextGenerationManagedBy.serialize(generator, mapper); + generator.writeKey("prefer_ilm"); + generator.write(this.preferIlm); + if (ApiTypeHelper.isDefined(this.indices)) { generator.writeKey("indices"); generator.writeStartArray(); @@ -351,6 +383,10 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private String ilmPolicy; + private ManagedBy nextGenerationManagedBy; + + private Boolean preferIlm; + private List indices; @Nullable @@ -445,6 +481,28 @@ public final Builder ilmPolicy(@Nullable String value) { return this; } + /** + * Required - Name of the lifecycle system that'll manage the next generation of + * the data stream. + *

+ * API name: {@code next_generation_managed_by} + */ + public final Builder nextGenerationManagedBy(ManagedBy value) { + this.nextGenerationManagedBy = value; + return this; + } + + /** + * Required - Indicates if ILM should take precedence over DSL in case both are + * configured to managed this data stream. + *

+ * API name: {@code prefer_ilm} + */ + public final Builder preferIlm(boolean value) { + this.preferIlm = value; + return this; + } + /** * Required - Array of objects containing information about the data stream’s * backing indices. The last item in this array contains information about the @@ -619,6 +677,8 @@ protected static void setupDataStreamDeserializer(ObjectDeserializer + * API name: {@code ilm_policy} + */ + @Nullable + public final String ilmPolicy() { + return this.ilmPolicy; + } + + /** + * Required - Name of the lifecycle system that's currently managing this + * backing index. + *

+ * API name: {@code managed_by} + */ + public final ManagedBy managedBy() { + return this.managedBy; + } + + /** + * Required - Indicates if ILM should take precedence over DSL in case both are + * configured to manage this index. + *

+ * API name: {@code prefer_ilm} + */ + public final boolean preferIlm() { + return this.preferIlm; + } + /** * Serialize this object to JSON. */ @@ -100,6 +141,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("index_uuid"); generator.write(this.indexUuid); + if (this.ilmPolicy != null) { + generator.writeKey("ilm_policy"); + generator.write(this.ilmPolicy); + + } + generator.writeKey("managed_by"); + this.managedBy.serialize(generator, mapper); + generator.writeKey("prefer_ilm"); + generator.write(this.preferIlm); + } @Override @@ -118,6 +169,13 @@ public static class Builder extends WithJsonObjectBuilderBase implement private String indexUuid; + @Nullable + private String ilmPolicy; + + private ManagedBy managedBy; + + private Boolean preferIlm; + /** * Required - Name of the backing index. *

@@ -138,6 +196,38 @@ public final Builder indexUuid(String value) { return this; } + /** + * Name of the current ILM lifecycle policy configured for this backing index. + *

+ * API name: {@code ilm_policy} + */ + public final Builder ilmPolicy(@Nullable String value) { + this.ilmPolicy = value; + return this; + } + + /** + * Required - Name of the lifecycle system that's currently managing this + * backing index. + *

+ * API name: {@code managed_by} + */ + public final Builder managedBy(ManagedBy value) { + this.managedBy = value; + return this; + } + + /** + * Required - Indicates if ILM should take precedence over DSL in case both are + * configured to manage this index. + *

+ * API name: {@code prefer_ilm} + */ + public final Builder preferIlm(boolean value) { + this.preferIlm = value; + return this; + } + @Override protected Builder self() { return this; @@ -168,6 +258,9 @@ protected static void setupDataStreamIndexDeserializer(ObjectDeserializerAPI - * specification - */ -@JsonpDeserializable -public class DlmRolloverConditions implements JsonpSerializable { - @Nullable - private final Time minAge; - - @Nullable - private final String maxAge; - - @Nullable - private final Long minDocs; - - @Nullable - private final Long maxDocs; - - @Nullable - private final String minSize; - - @Nullable - private final String maxSize; - - @Nullable - private final String minPrimaryShardSize; - - @Nullable - private final String maxPrimaryShardSize; - - @Nullable - private final Long minPrimaryShardDocs; - - @Nullable - private final Long maxPrimaryShardDocs; - - // --------------------------------------------------------------------------------------------- - - private DlmRolloverConditions(Builder builder) { - - this.minAge = builder.minAge; - this.maxAge = builder.maxAge; - this.minDocs = builder.minDocs; - this.maxDocs = builder.maxDocs; - this.minSize = builder.minSize; - this.maxSize = builder.maxSize; - this.minPrimaryShardSize = builder.minPrimaryShardSize; - this.maxPrimaryShardSize = builder.maxPrimaryShardSize; - this.minPrimaryShardDocs = builder.minPrimaryShardDocs; - this.maxPrimaryShardDocs = builder.maxPrimaryShardDocs; - - } - - public static DlmRolloverConditions of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code min_age} - */ - @Nullable - public final Time minAge() { - return this.minAge; - } - - /** - * API name: {@code max_age} - */ - @Nullable - public final String maxAge() { - return this.maxAge; - } - - /** - * API name: {@code min_docs} - */ - @Nullable - public final Long minDocs() { - return this.minDocs; - } - - /** - * API name: {@code max_docs} - */ - @Nullable - public final Long maxDocs() { - return this.maxDocs; - } - - /** - * API name: {@code min_size} - */ - @Nullable - public final String minSize() { - return this.minSize; - } - - /** - * API name: {@code max_size} - */ - @Nullable - public final String maxSize() { - return this.maxSize; - } - - /** - * API name: {@code min_primary_shard_size} - */ - @Nullable - public final String minPrimaryShardSize() { - return this.minPrimaryShardSize; - } - - /** - * API name: {@code max_primary_shard_size} - */ - @Nullable - public final String maxPrimaryShardSize() { - return this.maxPrimaryShardSize; - } - - /** - * API name: {@code min_primary_shard_docs} - */ - @Nullable - public final Long minPrimaryShardDocs() { - return this.minPrimaryShardDocs; - } - - /** - * API name: {@code max_primary_shard_docs} - */ - @Nullable - public final Long maxPrimaryShardDocs() { - return this.maxPrimaryShardDocs; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.minAge != null) { - generator.writeKey("min_age"); - this.minAge.serialize(generator, mapper); - - } - if (this.maxAge != null) { - generator.writeKey("max_age"); - generator.write(this.maxAge); - - } - if (this.minDocs != null) { - generator.writeKey("min_docs"); - generator.write(this.minDocs); - - } - if (this.maxDocs != null) { - generator.writeKey("max_docs"); - generator.write(this.maxDocs); - - } - if (this.minSize != null) { - generator.writeKey("min_size"); - generator.write(this.minSize); - - } - if (this.maxSize != null) { - generator.writeKey("max_size"); - generator.write(this.maxSize); - - } - if (this.minPrimaryShardSize != null) { - generator.writeKey("min_primary_shard_size"); - generator.write(this.minPrimaryShardSize); - - } - if (this.maxPrimaryShardSize != null) { - generator.writeKey("max_primary_shard_size"); - generator.write(this.maxPrimaryShardSize); - - } - if (this.minPrimaryShardDocs != null) { - generator.writeKey("min_primary_shard_docs"); - generator.write(this.minPrimaryShardDocs); - - } - if (this.maxPrimaryShardDocs != null) { - generator.writeKey("max_primary_shard_docs"); - generator.write(this.maxPrimaryShardDocs); - - } - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link DlmRolloverConditions}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - @Nullable - private Time minAge; - - @Nullable - private String maxAge; - - @Nullable - private Long minDocs; - - @Nullable - private Long maxDocs; - - @Nullable - private String minSize; - - @Nullable - private String maxSize; - - @Nullable - private String minPrimaryShardSize; - - @Nullable - private String maxPrimaryShardSize; - - @Nullable - private Long minPrimaryShardDocs; - - @Nullable - private Long maxPrimaryShardDocs; - - /** - * API name: {@code min_age} - */ - public final Builder minAge(@Nullable Time value) { - this.minAge = value; - return this; - } - - /** - * API name: {@code min_age} - */ - public final Builder minAge(Function> fn) { - return this.minAge(fn.apply(new Time.Builder()).build()); - } - - /** - * API name: {@code max_age} - */ - public final Builder maxAge(@Nullable String value) { - this.maxAge = value; - return this; - } - - /** - * API name: {@code min_docs} - */ - public final Builder minDocs(@Nullable Long value) { - this.minDocs = value; - return this; - } - - /** - * API name: {@code max_docs} - */ - public final Builder maxDocs(@Nullable Long value) { - this.maxDocs = value; - return this; - } - - /** - * API name: {@code min_size} - */ - public final Builder minSize(@Nullable String value) { - this.minSize = value; - return this; - } - - /** - * API name: {@code max_size} - */ - public final Builder maxSize(@Nullable String value) { - this.maxSize = value; - return this; - } - - /** - * API name: {@code min_primary_shard_size} - */ - public final Builder minPrimaryShardSize(@Nullable String value) { - this.minPrimaryShardSize = value; - return this; - } - - /** - * API name: {@code max_primary_shard_size} - */ - public final Builder maxPrimaryShardSize(@Nullable String value) { - this.maxPrimaryShardSize = value; - return this; - } - - /** - * API name: {@code min_primary_shard_docs} - */ - public final Builder minPrimaryShardDocs(@Nullable Long value) { - this.minPrimaryShardDocs = value; - return this; - } - - /** - * API name: {@code max_primary_shard_docs} - */ - public final Builder maxPrimaryShardDocs(@Nullable Long value) { - this.maxPrimaryShardDocs = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link DlmRolloverConditions}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public DlmRolloverConditions build() { - _checkSingleUse(); - - return new DlmRolloverConditions(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link DlmRolloverConditions} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, DlmRolloverConditions::setupDlmRolloverConditionsDeserializer); - - protected static void setupDlmRolloverConditionsDeserializer(ObjectDeserializer op) { - - op.add(Builder::minAge, Time._DESERIALIZER, "min_age"); - op.add(Builder::maxAge, JsonpDeserializer.stringDeserializer(), "max_age"); - op.add(Builder::minDocs, JsonpDeserializer.longDeserializer(), "min_docs"); - op.add(Builder::maxDocs, JsonpDeserializer.longDeserializer(), "max_docs"); - op.add(Builder::minSize, JsonpDeserializer.stringDeserializer(), "min_size"); - op.add(Builder::maxSize, JsonpDeserializer.stringDeserializer(), "max_size"); - op.add(Builder::minPrimaryShardSize, JsonpDeserializer.stringDeserializer(), "min_primary_shard_size"); - op.add(Builder::maxPrimaryShardSize, JsonpDeserializer.stringDeserializer(), "max_primary_shard_size"); - op.add(Builder::minPrimaryShardDocs, JsonpDeserializer.longDeserializer(), "min_primary_shard_docs"); - op.add(Builder::maxPrimaryShardDocs, JsonpDeserializer.longDeserializer(), "max_primary_shard_docs"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java index c13d61a2d..763aedb74 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java @@ -97,7 +97,7 @@ public final CompletableFuture addBlock( * the text. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-analyze.html">Documentation * on elastic.co */ @@ -116,7 +116,7 @@ public CompletableFuture analyze(AnalyzeRequest request) { * a function that initializes a builder to create the * {@link AnalyzeRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-analyze.html">Documentation * on elastic.co */ @@ -130,7 +130,7 @@ public final CompletableFuture analyze( * the text. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-analyze.html">Documentation * on elastic.co */ @@ -224,7 +224,7 @@ public final CompletableFuture clone( * Closes an index. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-close.html">Documentation * on elastic.co */ @@ -242,7 +242,7 @@ public CompletableFuture close(CloseIndexRequest request) { * a function that initializes a builder to create the * {@link CloseIndexRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-close.html">Documentation * on elastic.co */ @@ -257,7 +257,7 @@ public final CompletableFuture close( * Creates an index with optional settings and mappings. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-create-index.html">Documentation * on elastic.co */ @@ -275,7 +275,7 @@ public CompletableFuture create(CreateIndexRequest request) * a function that initializes a builder to create the * {@link CreateIndexRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-create-index.html">Documentation * on elastic.co */ @@ -501,7 +501,7 @@ public final CompletableFuture deleteDataStream( * Deletes an index template. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-template.html">Documentation * on elastic.co */ @@ -519,7 +519,7 @@ public CompletableFuture deleteIndexTemplate(Delete * a function that initializes a builder to create the * {@link DeleteIndexTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-template.html">Documentation * on elastic.co */ @@ -534,7 +534,7 @@ public final CompletableFuture deleteIndexTemplate( * Deletes an index template. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-template-v1.html">Documentation * on elastic.co */ @@ -552,7 +552,7 @@ public CompletableFuture deleteTemplate(DeleteTemplateRe * a function that initializes a builder to create the * {@link DeleteTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-template-v1.html">Documentation * on elastic.co */ @@ -567,7 +567,7 @@ public final CompletableFuture deleteTemplate( * Analyzes the disk usage of each field of an index or data stream * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-disk-usage.html">Documentation * on elastic.co */ @@ -585,7 +585,7 @@ public CompletableFuture diskUsage(DiskUsageRequest request) * a function that initializes a builder to create the * {@link DiskUsageRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-disk-usage.html">Documentation * on elastic.co */ @@ -600,7 +600,7 @@ public final CompletableFuture diskUsage( * Downsample an index * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-downsample-data-stream.html">Documentation * on elastic.co */ @@ -618,7 +618,7 @@ public CompletableFuture downsample(DownsampleRequest reques * a function that initializes a builder to create the * {@link DownsampleRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-downsample-data-stream.html">Documentation * on elastic.co */ @@ -699,7 +699,7 @@ public final CompletableFuture existsAlias( * Returns information about whether a particular index template exists. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/index-templates.html">Documentation * on elastic.co */ @@ -717,7 +717,7 @@ public CompletableFuture existsIndexTemplate(ExistsIndexTemplat * a function that initializes a builder to create the * {@link ExistsIndexTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/index-templates.html">Documentation * on elastic.co */ @@ -732,7 +732,7 @@ public final CompletableFuture existsIndexTemplate( * Returns information about whether a particular index template exists. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-template-exists-v1.html">Documentation * on elastic.co */ @@ -750,7 +750,7 @@ public CompletableFuture existsTemplate(ExistsTemplateRequest r * a function that initializes a builder to create the * {@link ExistsTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-template-exists-v1.html">Documentation * on elastic.co */ @@ -833,7 +833,7 @@ public final CompletableFuture fieldUsageStats( * Performs the flush operation on one or more indices. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-flush.html">Documentation * on elastic.co */ @@ -851,7 +851,7 @@ public CompletableFuture flush(FlushRequest request) { * a function that initializes a builder to create the * {@link FlushRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-flush.html">Documentation * on elastic.co */ @@ -864,7 +864,7 @@ public final CompletableFuture flush( * Performs the flush operation on one or more indices. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-flush.html">Documentation * on elastic.co */ @@ -1116,7 +1116,7 @@ public final CompletableFuture getFieldMapping( * Returns an index template. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template.html">Documentation * on elastic.co */ @@ -1134,7 +1134,7 @@ public CompletableFuture getIndexTemplate(GetIndexTemp * a function that initializes a builder to create the * {@link GetIndexTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template.html">Documentation * on elastic.co */ @@ -1147,7 +1147,7 @@ public final CompletableFuture getIndexTemplate( * Returns an index template. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template.html">Documentation * on elastic.co */ @@ -1254,7 +1254,7 @@ public CompletableFuture getSettings() { * Returns an index template. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template-v1.html">Documentation * on elastic.co */ @@ -1272,7 +1272,7 @@ public CompletableFuture getTemplate(GetTemplateRequest req * a function that initializes a builder to create the * {@link GetTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template-v1.html">Documentation * on elastic.co */ @@ -1285,7 +1285,7 @@ public final CompletableFuture getTemplate( * Returns an index template. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template-v1.html">Documentation * on elastic.co */ @@ -1499,7 +1499,7 @@ public final CompletableFuture putDataLifecycle( * Creates or updates an index template. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-template.html">Documentation * on elastic.co */ @@ -1517,7 +1517,7 @@ public CompletableFuture putIndexTemplate(PutIndexTemp * a function that initializes a builder to create the * {@link PutIndexTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-template.html">Documentation * on elastic.co */ @@ -1611,7 +1611,7 @@ public CompletableFuture putSettings() { * Creates or updates an index template. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates-v1.html">Documentation * on elastic.co */ @@ -1629,7 +1629,7 @@ public CompletableFuture putTemplate(PutTemplateRequest req * a function that initializes a builder to create the * {@link PutTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates-v1.html">Documentation * on elastic.co */ @@ -1804,7 +1804,7 @@ public final CompletableFuture resolveIndex( * considered to be too large or too old. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-rollover-index.html">Documentation * on elastic.co */ @@ -1823,7 +1823,7 @@ public CompletableFuture rollover(RolloverRequest request) { * a function that initializes a builder to create the * {@link RolloverRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-rollover-index.html">Documentation * on elastic.co */ @@ -1930,7 +1930,7 @@ public CompletableFuture shardStores() { * Allow to shrink an existing index into a new index with fewer primary shards. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-shrink-index.html">Documentation * on elastic.co */ @@ -1948,7 +1948,7 @@ public CompletableFuture shrink(ShrinkRequest request) { * a function that initializes a builder to create the * {@link ShrinkRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-shrink-index.html">Documentation * on elastic.co */ @@ -1964,7 +1964,7 @@ public final CompletableFuture shrink( * system * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-index.html">Documentation * on elastic.co */ @@ -1984,7 +1984,7 @@ public CompletableFuture simulateIndexTemplate( * a function that initializes a builder to create the * {@link SimulateIndexTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-index.html">Documentation * on elastic.co */ @@ -1999,7 +1999,7 @@ public final CompletableFuture simulateIndexTempl * Simulate resolving the given template name or body * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-template.html">Documentation * on elastic.co */ @@ -2017,7 +2017,7 @@ public CompletableFuture simulateTemplate(SimulateTemp * a function that initializes a builder to create the * {@link SimulateTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-template.html">Documentation * on elastic.co */ @@ -2030,7 +2030,7 @@ public final CompletableFuture simulateTemplate( * Simulate resolving the given template name or body * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-template.html">Documentation * on elastic.co */ @@ -2046,7 +2046,7 @@ public CompletableFuture simulateTemplate() { * shards. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-split-index.html">Documentation * on elastic.co */ @@ -2065,7 +2065,7 @@ public CompletableFuture split(SplitRequest request) { * a function that initializes a builder to create the * {@link SplitRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-split-index.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java index b0c1b7b0a..50afbe284 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java @@ -95,7 +95,7 @@ public final AddBlockResponse addBlock(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-analyze.html">Documentation * on elastic.co */ @@ -114,7 +114,7 @@ public AnalyzeResponse analyze(AnalyzeRequest request) throws IOException, Elast * a function that initializes a builder to create the * {@link AnalyzeRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-analyze.html">Documentation * on elastic.co */ @@ -128,7 +128,7 @@ public final AnalyzeResponse analyze(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-analyze.html">Documentation * on elastic.co */ @@ -222,7 +222,7 @@ public final CloneIndexResponse clone(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-close.html">Documentation * on elastic.co */ @@ -240,7 +240,7 @@ public CloseIndexResponse close(CloseIndexRequest request) throws IOException, E * a function that initializes a builder to create the * {@link CloseIndexRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-close.html">Documentation * on elastic.co */ @@ -255,7 +255,7 @@ public final CloseIndexResponse close(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-create-index.html">Documentation * on elastic.co */ @@ -273,7 +273,7 @@ public CreateIndexResponse create(CreateIndexRequest request) throws IOException * a function that initializes a builder to create the * {@link CreateIndexRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-create-index.html">Documentation * on elastic.co */ @@ -508,7 +508,7 @@ public final DeleteDataStreamResponse deleteDataStream( * Deletes an index template. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-template.html">Documentation * on elastic.co */ @@ -527,7 +527,7 @@ public DeleteIndexTemplateResponse deleteIndexTemplate(DeleteIndexTemplateReques * a function that initializes a builder to create the * {@link DeleteIndexTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-template.html">Documentation * on elastic.co */ @@ -543,7 +543,7 @@ public final DeleteIndexTemplateResponse deleteIndexTemplate( * Deletes an index template. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-template-v1.html">Documentation * on elastic.co */ @@ -562,7 +562,7 @@ public DeleteTemplateResponse deleteTemplate(DeleteTemplateRequest request) * a function that initializes a builder to create the * {@link DeleteTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-template-v1.html">Documentation * on elastic.co */ @@ -578,7 +578,7 @@ public final DeleteTemplateResponse deleteTemplate( * Analyzes the disk usage of each field of an index or data stream * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-disk-usage.html">Documentation * on elastic.co */ @@ -596,7 +596,7 @@ public DiskUsageResponse diskUsage(DiskUsageRequest request) throws IOException, * a function that initializes a builder to create the * {@link DiskUsageRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-disk-usage.html">Documentation * on elastic.co */ @@ -611,7 +611,7 @@ public final DiskUsageResponse diskUsage(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-downsample-data-stream.html">Documentation * on elastic.co */ @@ -629,7 +629,7 @@ public DownsampleResponse downsample(DownsampleRequest request) throws IOExcepti * a function that initializes a builder to create the * {@link DownsampleRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-downsample-data-stream.html">Documentation * on elastic.co */ @@ -710,7 +710,7 @@ public final BooleanResponse existsAlias(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/index-templates.html">Documentation * on elastic.co */ @@ -729,7 +729,7 @@ public BooleanResponse existsIndexTemplate(ExistsIndexTemplateRequest request) * a function that initializes a builder to create the * {@link ExistsIndexTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/index-templates.html">Documentation * on elastic.co */ @@ -745,7 +745,7 @@ public final BooleanResponse existsIndexTemplate( * Returns information about whether a particular index template exists. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-template-exists-v1.html">Documentation * on elastic.co */ @@ -763,7 +763,7 @@ public BooleanResponse existsTemplate(ExistsTemplateRequest request) throws IOEx * a function that initializes a builder to create the * {@link ExistsTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-template-exists-v1.html">Documentation * on elastic.co */ @@ -851,7 +851,7 @@ public final FieldUsageStatsResponse fieldUsageStats( * Performs the flush operation on one or more indices. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-flush.html">Documentation * on elastic.co */ @@ -869,7 +869,7 @@ public FlushResponse flush(FlushRequest request) throws IOException, Elasticsear * a function that initializes a builder to create the * {@link FlushRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-flush.html">Documentation * on elastic.co */ @@ -882,7 +882,7 @@ public final FlushResponse flush(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-flush.html">Documentation * on elastic.co */ @@ -1140,7 +1140,7 @@ public final GetFieldMappingResponse getFieldMapping( * Returns an index template. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template.html">Documentation * on elastic.co */ @@ -1159,7 +1159,7 @@ public GetIndexTemplateResponse getIndexTemplate(GetIndexTemplateRequest request * a function that initializes a builder to create the * {@link GetIndexTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template.html">Documentation * on elastic.co */ @@ -1173,7 +1173,7 @@ public final GetIndexTemplateResponse getIndexTemplate( * Returns an index template. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template.html">Documentation * on elastic.co */ @@ -1282,7 +1282,7 @@ public GetIndicesSettingsResponse getSettings() throws IOException, Elasticsearc * Returns an index template. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template-v1.html">Documentation * on elastic.co */ @@ -1300,7 +1300,7 @@ public GetTemplateResponse getTemplate(GetTemplateRequest request) throws IOExce * a function that initializes a builder to create the * {@link GetTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template-v1.html">Documentation * on elastic.co */ @@ -1314,7 +1314,7 @@ public final GetTemplateResponse getTemplate( * Returns an index template. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template-v1.html">Documentation * on elastic.co */ @@ -1537,7 +1537,7 @@ public final PutDataLifecycleResponse putDataLifecycle( * Creates or updates an index template. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-template.html">Documentation * on elastic.co */ @@ -1556,7 +1556,7 @@ public PutIndexTemplateResponse putIndexTemplate(PutIndexTemplateRequest request * a function that initializes a builder to create the * {@link PutIndexTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-template.html">Documentation * on elastic.co */ @@ -1653,7 +1653,7 @@ public PutIndicesSettingsResponse putSettings() throws IOException, Elasticsearc * Creates or updates an index template. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates-v1.html">Documentation * on elastic.co */ @@ -1671,7 +1671,7 @@ public PutTemplateResponse putTemplate(PutTemplateRequest request) throws IOExce * a function that initializes a builder to create the * {@link PutTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates-v1.html">Documentation * on elastic.co */ @@ -1849,7 +1849,7 @@ public final ResolveIndexResponse resolveIndex( * considered to be too large or too old. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-rollover-index.html">Documentation * on elastic.co */ @@ -1868,7 +1868,7 @@ public RolloverResponse rollover(RolloverRequest request) throws IOException, El * a function that initializes a builder to create the * {@link RolloverRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-rollover-index.html">Documentation * on elastic.co */ @@ -1976,7 +1976,7 @@ public ShardStoresResponse shardStores() throws IOException, ElasticsearchExcept * Allow to shrink an existing index into a new index with fewer primary shards. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-shrink-index.html">Documentation * on elastic.co */ @@ -1994,7 +1994,7 @@ public ShrinkResponse shrink(ShrinkRequest request) throws IOException, Elastics * a function that initializes a builder to create the * {@link ShrinkRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-shrink-index.html">Documentation * on elastic.co */ @@ -2010,7 +2010,7 @@ public final ShrinkResponse shrink(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-index.html">Documentation * on elastic.co */ @@ -2030,7 +2030,7 @@ public SimulateIndexTemplateResponse simulateIndexTemplate(SimulateIndexTemplate * a function that initializes a builder to create the * {@link SimulateIndexTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-index.html">Documentation * on elastic.co */ @@ -2046,7 +2046,7 @@ public final SimulateIndexTemplateResponse simulateIndexTemplate( * Simulate resolving the given template name or body * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-template.html">Documentation * on elastic.co */ @@ -2065,7 +2065,7 @@ public SimulateTemplateResponse simulateTemplate(SimulateTemplateRequest request * a function that initializes a builder to create the * {@link SimulateTemplateRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-template.html">Documentation * on elastic.co */ @@ -2079,7 +2079,7 @@ public final SimulateTemplateResponse simulateTemplate( * Simulate resolving the given template name or body * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-template.html">Documentation * on elastic.co */ @@ -2095,7 +2095,7 @@ public SimulateTemplateResponse simulateTemplate() throws IOException, Elasticse * shards. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-split-index.html">Documentation * on elastic.co */ @@ -2114,7 +2114,7 @@ public SplitResponse split(SplitRequest request) throws IOException, Elasticsear * a function that initializes a builder to create the * {@link SplitRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/indices-split-index.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexSettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexSettings.java index 98884fc98..564c7c648 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexSettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexSettings.java @@ -53,7 +53,7 @@ /** * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/index-modules.html#index-modules-settings">Documentation * on elastic.co * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ManagedBy.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ManagedBy.java new file mode 100644 index 000000000..ab441b8a8 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ManagedBy.java @@ -0,0 +1,57 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch.indices; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum ManagedBy implements JsonEnum { + Ilm("Index Lifecycle Management"), + + Datastream("Data stream lifecycle"), + + Unmanaged("Unmanaged"), + + ; + + private final String jsonValue; + + ManagedBy(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + ManagedBy.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/MappingLimitSettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/MappingLimitSettings.java index 72b04ff98..d076f5ec1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/MappingLimitSettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/MappingLimitSettings.java @@ -44,7 +44,7 @@ * Mapping Limit Settings * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/mapping-settings-limit.html">Documentation * on elastic.co * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/MappingLimitSettingsDimensionFields.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/MappingLimitSettingsDimensionFields.java index 2015ec80c..e261fd4f0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/MappingLimitSettingsDimensionFields.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/MappingLimitSettingsDimensionFields.java @@ -66,9 +66,9 @@ public static MappingLimitSettingsDimensionFields of( /** * [preview] This functionality is in technical preview and may be changed or - * removed in a future release. Elastic will apply best effort to fix any - * issues, but features in technical preview are not subject to the support SLA - * of official GA features. + * removed in a future release. Elastic will work to fix any issues, but + * features in technical preview are not subject to the support SLA of official + * GA features. *

* API name: {@code limit} */ @@ -115,9 +115,9 @@ public static class Builder extends WithJsonObjectBuilderBase /** * [preview] This functionality is in technical preview and may be changed or - * removed in a future release. Elastic will apply best effort to fix any - * issues, but features in technical preview are not subject to the support SLA - * of official GA features. + * removed in a future release. Elastic will work to fix any issues, but + * features in technical preview are not subject to the support SLA of official + * GA features. *

* API name: {@code limit} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/explain_data_lifecycle/DataLifecycleExplain.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/explain_data_lifecycle/DataLifecycleExplain.java deleted file mode 100644 index 013169b6e..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/explain_data_lifecycle/DataLifecycleExplain.java +++ /dev/null @@ -1,406 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - -package co.elastic.clients.elasticsearch.indices.explain_data_lifecycle; - -import co.elastic.clients.elasticsearch._types.Time; -import co.elastic.clients.elasticsearch.indices.DataLifecycleWithRollover; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.Boolean; -import java.lang.Long; -import java.lang.String; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -// typedef: indices.explain_data_lifecycle.DataLifecycleExplain - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class DataLifecycleExplain implements JsonpSerializable { - private final String index; - - private final boolean managedByDlm; - - @Nullable - private final Long indexCreationDateMillis; - - @Nullable - private final Time timeSinceIndexCreation; - - @Nullable - private final Long rolloverDateMillis; - - @Nullable - private final Time timeSinceRollover; - - @Nullable - private final DataLifecycleWithRollover lifecycle; - - @Nullable - private final Time generationTime; - - @Nullable - private final String error; - - // --------------------------------------------------------------------------------------------- - - private DataLifecycleExplain(Builder builder) { - - this.index = ApiTypeHelper.requireNonNull(builder.index, this, "index"); - this.managedByDlm = ApiTypeHelper.requireNonNull(builder.managedByDlm, this, "managedByDlm"); - this.indexCreationDateMillis = builder.indexCreationDateMillis; - this.timeSinceIndexCreation = builder.timeSinceIndexCreation; - this.rolloverDateMillis = builder.rolloverDateMillis; - this.timeSinceRollover = builder.timeSinceRollover; - this.lifecycle = builder.lifecycle; - this.generationTime = builder.generationTime; - this.error = builder.error; - - } - - public static DataLifecycleExplain of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code index} - */ - public final String index() { - return this.index; - } - - /** - * Required - API name: {@code managed_by_dlm} - */ - public final boolean managedByDlm() { - return this.managedByDlm; - } - - /** - * API name: {@code index_creation_date_millis} - */ - @Nullable - public final Long indexCreationDateMillis() { - return this.indexCreationDateMillis; - } - - /** - * API name: {@code time_since_index_creation} - */ - @Nullable - public final Time timeSinceIndexCreation() { - return this.timeSinceIndexCreation; - } - - /** - * API name: {@code rollover_date_millis} - */ - @Nullable - public final Long rolloverDateMillis() { - return this.rolloverDateMillis; - } - - /** - * API name: {@code time_since_rollover} - */ - @Nullable - public final Time timeSinceRollover() { - return this.timeSinceRollover; - } - - /** - * API name: {@code lifecycle} - */ - @Nullable - public final DataLifecycleWithRollover lifecycle() { - return this.lifecycle; - } - - /** - * API name: {@code generation_time} - */ - @Nullable - public final Time generationTime() { - return this.generationTime; - } - - /** - * API name: {@code error} - */ - @Nullable - public final String error() { - return this.error; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("index"); - generator.write(this.index); - - generator.writeKey("managed_by_dlm"); - generator.write(this.managedByDlm); - - if (this.indexCreationDateMillis != null) { - generator.writeKey("index_creation_date_millis"); - generator.write(this.indexCreationDateMillis); - - } - if (this.timeSinceIndexCreation != null) { - generator.writeKey("time_since_index_creation"); - this.timeSinceIndexCreation.serialize(generator, mapper); - - } - if (this.rolloverDateMillis != null) { - generator.writeKey("rollover_date_millis"); - generator.write(this.rolloverDateMillis); - - } - if (this.timeSinceRollover != null) { - generator.writeKey("time_since_rollover"); - this.timeSinceRollover.serialize(generator, mapper); - - } - if (this.lifecycle != null) { - generator.writeKey("lifecycle"); - this.lifecycle.serialize(generator, mapper); - - } - if (this.generationTime != null) { - generator.writeKey("generation_time"); - this.generationTime.serialize(generator, mapper); - - } - if (this.error != null) { - generator.writeKey("error"); - generator.write(this.error); - - } - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link DataLifecycleExplain}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private String index; - - private Boolean managedByDlm; - - @Nullable - private Long indexCreationDateMillis; - - @Nullable - private Time timeSinceIndexCreation; - - @Nullable - private Long rolloverDateMillis; - - @Nullable - private Time timeSinceRollover; - - @Nullable - private DataLifecycleWithRollover lifecycle; - - @Nullable - private Time generationTime; - - @Nullable - private String error; - - /** - * Required - API name: {@code index} - */ - public final Builder index(String value) { - this.index = value; - return this; - } - - /** - * Required - API name: {@code managed_by_dlm} - */ - public final Builder managedByDlm(boolean value) { - this.managedByDlm = value; - return this; - } - - /** - * API name: {@code index_creation_date_millis} - */ - public final Builder indexCreationDateMillis(@Nullable Long value) { - this.indexCreationDateMillis = value; - return this; - } - - /** - * API name: {@code time_since_index_creation} - */ - public final Builder timeSinceIndexCreation(@Nullable Time value) { - this.timeSinceIndexCreation = value; - return this; - } - - /** - * API name: {@code time_since_index_creation} - */ - public final Builder timeSinceIndexCreation(Function> fn) { - return this.timeSinceIndexCreation(fn.apply(new Time.Builder()).build()); - } - - /** - * API name: {@code rollover_date_millis} - */ - public final Builder rolloverDateMillis(@Nullable Long value) { - this.rolloverDateMillis = value; - return this; - } - - /** - * API name: {@code time_since_rollover} - */ - public final Builder timeSinceRollover(@Nullable Time value) { - this.timeSinceRollover = value; - return this; - } - - /** - * API name: {@code time_since_rollover} - */ - public final Builder timeSinceRollover(Function> fn) { - return this.timeSinceRollover(fn.apply(new Time.Builder()).build()); - } - - /** - * API name: {@code lifecycle} - */ - public final Builder lifecycle(@Nullable DataLifecycleWithRollover value) { - this.lifecycle = value; - return this; - } - - /** - * API name: {@code lifecycle} - */ - public final Builder lifecycle( - Function> fn) { - return this.lifecycle(fn.apply(new DataLifecycleWithRollover.Builder()).build()); - } - - /** - * API name: {@code generation_time} - */ - public final Builder generationTime(@Nullable Time value) { - this.generationTime = value; - return this; - } - - /** - * API name: {@code generation_time} - */ - public final Builder generationTime(Function> fn) { - return this.generationTime(fn.apply(new Time.Builder()).build()); - } - - /** - * API name: {@code error} - */ - public final Builder error(@Nullable String value) { - this.error = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link DataLifecycleExplain}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public DataLifecycleExplain build() { - _checkSingleUse(); - - return new DataLifecycleExplain(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link DataLifecycleExplain} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, DataLifecycleExplain::setupDataLifecycleExplainDeserializer); - - protected static void setupDataLifecycleExplainDeserializer(ObjectDeserializer op) { - - op.add(Builder::index, JsonpDeserializer.stringDeserializer(), "index"); - op.add(Builder::managedByDlm, JsonpDeserializer.booleanDeserializer(), "managed_by_dlm"); - op.add(Builder::indexCreationDateMillis, JsonpDeserializer.longDeserializer(), "index_creation_date_millis"); - op.add(Builder::timeSinceIndexCreation, Time._DESERIALIZER, "time_since_index_creation"); - op.add(Builder::rolloverDateMillis, JsonpDeserializer.longDeserializer(), "rollover_date_millis"); - op.add(Builder::timeSinceRollover, Time._DESERIALIZER, "time_since_rollover"); - op.add(Builder::lifecycle, DataLifecycleWithRollover._DESERIALIZER, "lifecycle"); - op.add(Builder::generationTime, Time._DESERIALIZER, "generation_time"); - op.add(Builder::error, JsonpDeserializer.stringDeserializer(), "error"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/DeleteModelRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/DeleteModelRequest.java new file mode 100644 index 000000000..652a43839 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/DeleteModelRequest.java @@ -0,0 +1,201 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch.inference; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +// typedef: inference.delete_model.Request + +/** + * Delete an inference service model + * + * @see API + * specification + */ + +public class DeleteModelRequest extends RequestBase { + private final String modelId; + + private final TaskType taskType; + + // --------------------------------------------------------------------------------------------- + + private DeleteModelRequest(Builder builder) { + + this.modelId = ApiTypeHelper.requireNonNull(builder.modelId, this, "modelId"); + this.taskType = ApiTypeHelper.requireNonNull(builder.taskType, this, "taskType"); + + } + + public static DeleteModelRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the inference model. + *

+ * API name: {@code model_id} + */ + public final String modelId() { + return this.modelId; + } + + /** + * Required - The model task type + *

+ * API name: {@code task_type} + */ + public final TaskType taskType() { + return this.taskType; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DeleteModelRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String modelId; + + private TaskType taskType; + + /** + * Required - The unique identifier of the inference model. + *

+ * API name: {@code model_id} + */ + public final Builder modelId(String value) { + this.modelId = value; + return this; + } + + /** + * Required - The model task type + *

+ * API name: {@code task_type} + */ + public final Builder taskType(TaskType value) { + this.taskType = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link DeleteModelRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public DeleteModelRequest build() { + _checkSingleUse(); + + return new DeleteModelRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code inference.delete_model}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/inference.delete_model", + + // Request method + request -> { + return "DELETE"; + + }, + + // Request path + request -> { + final int _modelId = 1 << 0; + final int _taskType = 1 << 1; + + int propsSet = 0; + + propsSet |= _modelId; + propsSet |= _taskType; + + if (propsSet == (_taskType | _modelId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_inference"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.taskType.jsonValue(), buf); + buf.append("/"); + SimpleEndpoint.pathEncode(request.modelId, buf); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _modelId = 1 << 0; + final int _taskType = 1 << 1; + + int propsSet = 0; + + propsSet |= _modelId; + propsSet |= _taskType; + + if (propsSet == (_taskType | _modelId)) { + params.put("taskType", request.taskType.jsonValue()); + params.put("modelId", request.modelId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), false, DeleteModelResponse._DESERIALIZER); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/DeleteModelResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/DeleteModelResponse.java new file mode 100644 index 000000000..b3247a183 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/DeleteModelResponse.java @@ -0,0 +1,96 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch.inference; + +import co.elastic.clients.elasticsearch._types.AcknowledgedResponseBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +// typedef: inference.delete_model.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class DeleteModelResponse extends AcknowledgedResponseBase { + // --------------------------------------------------------------------------------------------- + + private DeleteModelResponse(Builder builder) { + super(builder); + + } + + public static DeleteModelResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DeleteModelResponse}. + */ + + public static class Builder extends AcknowledgedResponseBase.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link DeleteModelResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public DeleteModelResponse build() { + _checkSingleUse(); + + return new DeleteModelResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link DeleteModelResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, DeleteModelResponse::setupDeleteModelResponseDeserializer); + + protected static void setupDeleteModelResponseDeserializer(ObjectDeserializer op) { + AcknowledgedResponseBase.setupAcknowledgedResponseBaseDeserializer(op); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceAsyncClient.java new file mode 100644 index 000000000..ecfeb23fc --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceAsyncClient.java @@ -0,0 +1,191 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch.inference; + +import co.elastic.clients.ApiClient; +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.transport.ElasticsearchTransport; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.JsonEndpoint; +import co.elastic.clients.transport.Transport; +import co.elastic.clients.transport.TransportOptions; +import co.elastic.clients.util.ObjectBuilder; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import javax.annotation.Nullable; + +/** + * Client for the inference namespace. + */ +public class ElasticsearchInferenceAsyncClient + extends + ApiClient { + + public ElasticsearchInferenceAsyncClient(ElasticsearchTransport transport) { + super(transport, null); + } + + public ElasticsearchInferenceAsyncClient(ElasticsearchTransport transport, + @Nullable TransportOptions transportOptions) { + super(transport, transportOptions); + } + + @Override + public ElasticsearchInferenceAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) { + return new ElasticsearchInferenceAsyncClient(this.transport, transportOptions); + } + + // ----- Endpoint: inference.delete_model + + /** + * Delete model in the Inference API + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture deleteModel(DeleteModelRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) DeleteModelRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Delete model in the Inference API + * + * @param fn + * a function that initializes a builder to create the + * {@link DeleteModelRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture deleteModel( + Function> fn) { + return deleteModel(fn.apply(new DeleteModelRequest.Builder()).build()); + } + + // ----- Endpoint: inference.get_model + + /** + * Get a model in the Inference API + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture getModel(GetModelRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) GetModelRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Get a model in the Inference API + * + * @param fn + * a function that initializes a builder to create the + * {@link GetModelRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture getModel( + Function> fn) { + return getModel(fn.apply(new GetModelRequest.Builder()).build()); + } + + // ----- Endpoint: inference.inference + + /** + * Perform inference on a model + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture inference(InferenceRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) InferenceRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Perform inference on a model + * + * @param fn + * a function that initializes a builder to create the + * {@link InferenceRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture inference( + Function> fn) { + return inference(fn.apply(new InferenceRequest.Builder()).build()); + } + + // ----- Endpoint: inference.put_model + + /** + * Configure a model for use in the Inference API + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture putModel(PutModelRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) PutModelRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Configure a model for use in the Inference API + * + * @param fn + * a function that initializes a builder to create the + * {@link PutModelRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture putModel( + Function> fn) { + return putModel(fn.apply(new PutModelRequest.Builder()).build()); + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceClient.java new file mode 100644 index 000000000..7dfde0770 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceClient.java @@ -0,0 +1,190 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch.inference; + +import co.elastic.clients.ApiClient; +import co.elastic.clients.elasticsearch._types.ElasticsearchException; +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.transport.ElasticsearchTransport; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.JsonEndpoint; +import co.elastic.clients.transport.Transport; +import co.elastic.clients.transport.TransportOptions; +import co.elastic.clients.util.ObjectBuilder; +import java.io.IOException; +import java.util.function.Function; +import javax.annotation.Nullable; + +/** + * Client for the inference namespace. + */ +public class ElasticsearchInferenceClient extends ApiClient { + + public ElasticsearchInferenceClient(ElasticsearchTransport transport) { + super(transport, null); + } + + public ElasticsearchInferenceClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions) { + super(transport, transportOptions); + } + + @Override + public ElasticsearchInferenceClient withTransportOptions(@Nullable TransportOptions transportOptions) { + return new ElasticsearchInferenceClient(this.transport, transportOptions); + } + + // ----- Endpoint: inference.delete_model + + /** + * Delete model in the Inference API + * + * @see Documentation + * on elastic.co + */ + + public DeleteModelResponse deleteModel(DeleteModelRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) DeleteModelRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Delete model in the Inference API + * + * @param fn + * a function that initializes a builder to create the + * {@link DeleteModelRequest} + * @see Documentation + * on elastic.co + */ + + public final DeleteModelResponse deleteModel( + Function> fn) + throws IOException, ElasticsearchException { + return deleteModel(fn.apply(new DeleteModelRequest.Builder()).build()); + } + + // ----- Endpoint: inference.get_model + + /** + * Get a model in the Inference API + * + * @see Documentation + * on elastic.co + */ + + public GetModelResponse getModel(GetModelRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) GetModelRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Get a model in the Inference API + * + * @param fn + * a function that initializes a builder to create the + * {@link GetModelRequest} + * @see Documentation + * on elastic.co + */ + + public final GetModelResponse getModel(Function> fn) + throws IOException, ElasticsearchException { + return getModel(fn.apply(new GetModelRequest.Builder()).build()); + } + + // ----- Endpoint: inference.inference + + /** + * Perform inference on a model + * + * @see Documentation + * on elastic.co + */ + + public InferenceResponse inference(InferenceRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) InferenceRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Perform inference on a model + * + * @param fn + * a function that initializes a builder to create the + * {@link InferenceRequest} + * @see Documentation + * on elastic.co + */ + + public final InferenceResponse inference(Function> fn) + throws IOException, ElasticsearchException { + return inference(fn.apply(new InferenceRequest.Builder()).build()); + } + + // ----- Endpoint: inference.put_model + + /** + * Configure a model for use in the Inference API + * + * @see Documentation + * on elastic.co + */ + + public PutModelResponse putModel(PutModelRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) PutModelRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Configure a model for use in the Inference API + * + * @param fn + * a function that initializes a builder to create the + * {@link PutModelRequest} + * @see Documentation + * on elastic.co + */ + + public final PutModelResponse putModel(Function> fn) + throws IOException, ElasticsearchException { + return putModel(fn.apply(new PutModelRequest.Builder()).build()); + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/GetModelRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/GetModelRequest.java new file mode 100644 index 000000000..df40f23d9 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/GetModelRequest.java @@ -0,0 +1,199 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch.inference; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +// typedef: inference.get_model.Request + +/** + * Get an inference service model + * + * @see API + * specification + */ + +public class GetModelRequest extends RequestBase { + private final String modelId; + + private final TaskType taskType; + + // --------------------------------------------------------------------------------------------- + + private GetModelRequest(Builder builder) { + + this.modelId = ApiTypeHelper.requireNonNull(builder.modelId, this, "modelId"); + this.taskType = ApiTypeHelper.requireNonNull(builder.taskType, this, "taskType"); + + } + + public static GetModelRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the inference model. + *

+ * API name: {@code model_id} + */ + public final String modelId() { + return this.modelId; + } + + /** + * Required - The model task type + *

+ * API name: {@code task_type} + */ + public final TaskType taskType() { + return this.taskType; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GetModelRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + private String modelId; + + private TaskType taskType; + + /** + * Required - The unique identifier of the inference model. + *

+ * API name: {@code model_id} + */ + public final Builder modelId(String value) { + this.modelId = value; + return this; + } + + /** + * Required - The model task type + *

+ * API name: {@code task_type} + */ + public final Builder taskType(TaskType value) { + this.taskType = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link GetModelRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GetModelRequest build() { + _checkSingleUse(); + + return new GetModelRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code inference.get_model}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/inference.get_model", + + // Request method + request -> { + return "GET"; + + }, + + // Request path + request -> { + final int _modelId = 1 << 0; + final int _taskType = 1 << 1; + + int propsSet = 0; + + propsSet |= _modelId; + propsSet |= _taskType; + + if (propsSet == (_taskType | _modelId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_inference"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.taskType.jsonValue(), buf); + buf.append("/"); + SimpleEndpoint.pathEncode(request.modelId, buf); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _modelId = 1 << 0; + final int _taskType = 1 << 1; + + int propsSet = 0; + + propsSet |= _modelId; + propsSet |= _taskType; + + if (propsSet == (_taskType | _modelId)) { + params.put("taskType", request.taskType.jsonValue()); + params.put("modelId", request.modelId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), false, GetModelResponse._DESERIALIZER); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/GetModelResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/GetModelResponse.java new file mode 100644 index 000000000..df94e6610 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/GetModelResponse.java @@ -0,0 +1,171 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch.inference; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +// typedef: inference.get_model.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class GetModelResponse implements JsonpSerializable { + private final List models; + + // --------------------------------------------------------------------------------------------- + + private GetModelResponse(Builder builder) { + + this.models = ApiTypeHelper.unmodifiableRequired(builder.models, this, "models"); + + } + + public static GetModelResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code models} + */ + public final List models() { + return this.models; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (ApiTypeHelper.isDefined(this.models)) { + generator.writeKey("models"); + generator.writeStartArray(); + for (ModelConfigContainer item0 : this.models) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GetModelResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private List models; + + /** + * Required - API name: {@code models} + *

+ * Adds all elements of list to models. + */ + public final Builder models(List list) { + this.models = _listAddAll(this.models, list); + return this; + } + + /** + * Required - API name: {@code models} + *

+ * Adds one or more values to models. + */ + public final Builder models(ModelConfigContainer value, ModelConfigContainer... values) { + this.models = _listAdd(this.models, value, values); + return this; + } + + /** + * Required - API name: {@code models} + *

+ * Adds a value to models using a builder lambda. + */ + public final Builder models(Function> fn) { + return models(fn.apply(new ModelConfigContainer.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link GetModelResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GetModelResponse build() { + _checkSingleUse(); + + return new GetModelResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link GetModelResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + GetModelResponse::setupGetModelResponseDeserializer); + + protected static void setupGetModelResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::models, JsonpDeserializer.arrayDeserializer(ModelConfigContainer._DESERIALIZER), "models"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceRequest.java new file mode 100644 index 000000000..9e180dc0c --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceRequest.java @@ -0,0 +1,314 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch.inference; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonData; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +// typedef: inference.inference.Request + +/** + * Perform inference on the service + * + * @see API + * specification + */ +@JsonpDeserializable +public class InferenceRequest extends RequestBase implements JsonpSerializable { + private final List input; + + private final String modelId; + + @Nullable + private final JsonData taskSettings; + + private final TaskType taskType; + + // --------------------------------------------------------------------------------------------- + + private InferenceRequest(Builder builder) { + + this.input = ApiTypeHelper.unmodifiableRequired(builder.input, this, "input"); + this.modelId = ApiTypeHelper.requireNonNull(builder.modelId, this, "modelId"); + this.taskSettings = builder.taskSettings; + this.taskType = ApiTypeHelper.requireNonNull(builder.taskType, this, "taskType"); + + } + + public static InferenceRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - Text input to the model. Either a string or an array of strings. + *

+ * API name: {@code input} + */ + public final List input() { + return this.input; + } + + /** + * Required - The unique identifier of the inference model. + *

+ * API name: {@code model_id} + */ + public final String modelId() { + return this.modelId; + } + + /** + * Optional task settings + *

+ * API name: {@code task_settings} + */ + @Nullable + public final JsonData taskSettings() { + return this.taskSettings; + } + + /** + * Required - The model task type + *

+ * API name: {@code task_type} + */ + public final TaskType taskType() { + return this.taskType; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (ApiTypeHelper.isDefined(this.input)) { + generator.writeKey("input"); + generator.writeStartArray(); + for (String item0 : this.input) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.taskSettings != null) { + generator.writeKey("task_settings"); + this.taskSettings.serialize(generator, mapper); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link InferenceRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private List input; + + private String modelId; + + @Nullable + private JsonData taskSettings; + + private TaskType taskType; + + /** + * Required - Text input to the model. Either a string or an array of strings. + *

+ * API name: {@code input} + *

+ * Adds all elements of list to input. + */ + public final Builder input(List list) { + this.input = _listAddAll(this.input, list); + return this; + } + + /** + * Required - Text input to the model. Either a string or an array of strings. + *

+ * API name: {@code input} + *

+ * Adds one or more values to input. + */ + public final Builder input(String value, String... values) { + this.input = _listAdd(this.input, value, values); + return this; + } + + /** + * Required - The unique identifier of the inference model. + *

+ * API name: {@code model_id} + */ + public final Builder modelId(String value) { + this.modelId = value; + return this; + } + + /** + * Optional task settings + *

+ * API name: {@code task_settings} + */ + public final Builder taskSettings(@Nullable JsonData value) { + this.taskSettings = value; + return this; + } + + /** + * Required - The model task type + *

+ * API name: {@code task_type} + */ + public final Builder taskType(TaskType value) { + this.taskType = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link InferenceRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public InferenceRequest build() { + _checkSingleUse(); + + return new InferenceRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link InferenceRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + InferenceRequest::setupInferenceRequestDeserializer); + + protected static void setupInferenceRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::input, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "input"); + op.add(Builder::taskSettings, JsonData._DESERIALIZER, "task_settings"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code inference.inference}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/inference.inference", + + // Request method + request -> { + return "POST"; + + }, + + // Request path + request -> { + final int _modelId = 1 << 0; + final int _taskType = 1 << 1; + + int propsSet = 0; + + propsSet |= _modelId; + propsSet |= _taskType; + + if (propsSet == (_taskType | _modelId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_inference"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.taskType.jsonValue(), buf); + buf.append("/"); + SimpleEndpoint.pathEncode(request.modelId, buf); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _modelId = 1 << 0; + final int _taskType = 1 << 1; + + int propsSet = 0; + + propsSet |= _modelId; + propsSet |= _taskType; + + if (propsSet == (_taskType | _modelId)) { + params.put("taskType", request.taskType.jsonValue()); + params.put("modelId", request.modelId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, InferenceResponse._DESERIALIZER); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceResponse.java new file mode 100644 index 000000000..2ae52a37c --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceResponse.java @@ -0,0 +1,144 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch.inference; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +// typedef: inference.inference.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class InferenceResponse implements JsonpSerializable { + private final InferenceResult valueBody; + + // --------------------------------------------------------------------------------------------- + + private InferenceResponse(Builder builder) { + + this.valueBody = ApiTypeHelper.requireNonNull(builder.valueBody, this, "valueBody"); + + } + + public static InferenceResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - Response value. + */ + public final InferenceResult valueBody() { + return this.valueBody; + } + + /** + * Serialize this value to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + this.valueBody.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link InferenceResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private InferenceResult valueBody; + + /** + * Required - Response value. + */ + public final Builder valueBody(InferenceResult value) { + this.valueBody = value; + return this; + } + + /** + * Required - Response value. + */ + public final Builder valueBody(Function> fn) { + return this.valueBody(fn.apply(new InferenceResult.Builder()).build()); + } + + @Override + public Builder withJson(JsonParser parser, JsonpMapper mapper) { + + @SuppressWarnings("unchecked") + InferenceResult value = (InferenceResult) InferenceResult._DESERIALIZER.deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link InferenceResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public InferenceResponse build() { + _checkSingleUse(); + + return new InferenceResponse(this); + } + } + + public static final JsonpDeserializer _DESERIALIZER = createInferenceResponseDeserializer(); + protected static JsonpDeserializer createInferenceResponseDeserializer() { + + JsonpDeserializer valueDeserializer = InferenceResult._DESERIALIZER; + + return JsonpDeserializer.of(valueDeserializer.acceptedEvents(), (parser, mapper, event) -> new Builder() + .valueBody(valueDeserializer.deserialize(parser, mapper, event)).build()); + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceResult.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceResult.java new file mode 100644 index 000000000..a98baf8e0 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceResult.java @@ -0,0 +1,230 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch.inference; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.TaggedUnion; +import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Object; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +// typedef: inference._types.InferenceResult + +/** + * InferenceResult is an aggregation of mutually exclusive variants + * + * @see API + * specification + */ +@JsonpDeserializable +public class InferenceResult implements TaggedUnion, JsonpSerializable { + + /** + * {@link InferenceResult} variant kinds. + * + * @see API + * specification + */ + + public enum Kind implements JsonEnum { + TextEmbedding("text_embedding"), + + SparseEmbedding("sparse_embedding"), + + ; + + private final String jsonValue; + + Kind(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + } + + private final Kind _kind; + private final Object _value; + + @Override + public final Kind _kind() { + return _kind; + } + + @Override + public final Object _get() { + return _value; + } + + public InferenceResult(InferenceResultVariant value) { + + this._kind = ApiTypeHelper.requireNonNull(value._inferenceResultKind(), this, ""); + this._value = ApiTypeHelper.requireNonNull(value, this, ""); + + } + + private InferenceResult(Builder builder) { + + this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); + this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); + + } + + public static InferenceResult of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Is this variant instance of kind {@code text_embedding}? + */ + public boolean isTextEmbedding() { + return _kind == Kind.TextEmbedding; + } + + /** + * Get the {@code text_embedding} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code text_embedding} kind. + */ + public List textEmbedding() { + return TaggedUnionUtils.get(this, Kind.TextEmbedding); + } + + /** + * Is this variant instance of kind {@code sparse_embedding}? + */ + public boolean isSparseEmbedding() { + return _kind == Kind.SparseEmbedding; + } + + /** + * Get the {@code sparse_embedding} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code sparse_embedding} + * kind. + */ + public List sparseEmbedding() { + return TaggedUnionUtils.get(this, Kind.SparseEmbedding); + } + + @Override + @SuppressWarnings("unchecked") + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeStartObject(); + + generator.writeKey(_kind.jsonValue()); + if (_value instanceof JsonpSerializable) { + ((JsonpSerializable) _value).serialize(generator, mapper); + } else { + switch (_kind) { + case TextEmbedding : + generator.writeStartArray(); + for (TextEmbeddingResult item0 : ((List) this._value)) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + break; + case SparseEmbedding : + generator.writeStartArray(); + for (SparseEmbeddingResult item0 : ((List) this._value)) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + break; + } + } + + generator.writeEnd(); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Kind _kind; + private Object _value; + + @Override + protected Builder self() { + return this; + } + public ObjectBuilder textEmbedding(List v) { + this._kind = Kind.TextEmbedding; + this._value = v; + return this; + } + + public ObjectBuilder sparseEmbedding(List v) { + this._kind = Kind.SparseEmbedding; + this._value = v; + return this; + } + + public InferenceResult build() { + _checkSingleUse(); + return new InferenceResult(this); + } + + } + + protected static void setupInferenceResultDeserializer(ObjectDeserializer op) { + + op.add(Builder::textEmbedding, JsonpDeserializer.arrayDeserializer(TextEmbeddingResult._DESERIALIZER), + "text_embedding"); + op.add(Builder::sparseEmbedding, JsonpDeserializer.arrayDeserializer(SparseEmbeddingResult._DESERIALIZER), + "sparse_embedding"); + + } + + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + InferenceResult::setupInferenceResultDeserializer, Builder::build); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/SimpleQueryStringFlagsBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceResultBuilders.java similarity index 73% rename from java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/SimpleQueryStringFlagsBuilders.java rename to java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceResultBuilders.java index 00ae85425..0ccf41cd1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/SimpleQueryStringFlagsBuilders.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceResultBuilders.java @@ -21,21 +21,21 @@ // THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. //---------------------------------------------------- -package co.elastic.clients.elasticsearch._types.query_dsl; +package co.elastic.clients.elasticsearch.inference; import co.elastic.clients.util.ObjectBuilder; import java.util.function.Function; /** - * Builders for {@link SimpleQueryStringFlags} variants. + * Builders for {@link InferenceResult} variants. *

- * Variants single, multiple are not available here as - * they don't have a dedicated class. Use {@link SimpleQueryStringFlags}'s - * builder for these. + * Variants text_embedding, sparse_embedding are not + * available here as they don't have a dedicated class. Use + * {@link InferenceResult}'s builder for these. * */ -public class SimpleQueryStringFlagsBuilders { - private SimpleQueryStringFlagsBuilders() { +public class InferenceResultBuilders { + private InferenceResultBuilders() { } } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceResultVariant.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceResultVariant.java new file mode 100644 index 000000000..460ec8d0d --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceResultVariant.java @@ -0,0 +1,37 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch.inference; + +/** + * Base interface for {@link InferenceResult} variants. + */ +public interface InferenceResultVariant { + + InferenceResult.Kind _inferenceResultKind(); + + default InferenceResult _toInferenceResult() { + return new InferenceResult(this); + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ModelConfig.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ModelConfig.java new file mode 100644 index 000000000..b7a99febc --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ModelConfig.java @@ -0,0 +1,212 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch.inference; + +import co.elastic.clients.json.JsonData; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +// typedef: inference._types.ModelConfig + +/** + * Configuration options when storing the model config + * + * @see API + * specification + */ +@JsonpDeserializable +public class ModelConfig implements JsonpSerializable { + private final String service; + + private final JsonData serviceSettings; + + private final JsonData taskSettings; + + // --------------------------------------------------------------------------------------------- + + protected ModelConfig(AbstractBuilder builder) { + + this.service = ApiTypeHelper.requireNonNull(builder.service, this, "service"); + this.serviceSettings = ApiTypeHelper.requireNonNull(builder.serviceSettings, this, "serviceSettings"); + this.taskSettings = ApiTypeHelper.requireNonNull(builder.taskSettings, this, "taskSettings"); + + } + + public static ModelConfig modelConfigOf(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The service type + *

+ * API name: {@code service} + */ + public final String service() { + return this.service; + } + + /** + * Required - Settings specific to the service + *

+ * API name: {@code service_settings} + */ + public final JsonData serviceSettings() { + return this.serviceSettings; + } + + /** + * Required - Task settings specific to the service and model + *

+ * API name: {@code task_settings} + */ + public final JsonData taskSettings() { + return this.taskSettings; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("service"); + generator.write(this.service); + + generator.writeKey("service_settings"); + this.serviceSettings.serialize(generator, mapper); + + generator.writeKey("task_settings"); + this.taskSettings.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ModelConfig}. + */ + + public static class Builder extends ModelConfig.AbstractBuilder implements ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ModelConfig}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ModelConfig build() { + _checkSingleUse(); + + return new ModelConfig(this); + } + } + + public abstract static class AbstractBuilder> + extends + WithJsonObjectBuilderBase { + private String service; + + private JsonData serviceSettings; + + private JsonData taskSettings; + + /** + * Required - The service type + *

+ * API name: {@code service} + */ + public final BuilderT service(String value) { + this.service = value; + return self(); + } + + /** + * Required - Settings specific to the service + *

+ * API name: {@code service_settings} + */ + public final BuilderT serviceSettings(JsonData value) { + this.serviceSettings = value; + return self(); + } + + /** + * Required - Task settings specific to the service and model + *

+ * API name: {@code task_settings} + */ + public final BuilderT taskSettings(JsonData value) { + this.taskSettings = value; + return self(); + } + + protected abstract BuilderT self(); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ModelConfig} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + ModelConfig::setupModelConfigDeserializer); + + protected static > void setupModelConfigDeserializer( + ObjectDeserializer op) { + + op.add(AbstractBuilder::service, JsonpDeserializer.stringDeserializer(), "service"); + op.add(AbstractBuilder::serviceSettings, JsonData._DESERIALIZER, "service_settings"); + op.add(AbstractBuilder::taskSettings, JsonData._DESERIALIZER, "task_settings"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ModelConfigContainer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ModelConfigContainer.java new file mode 100644 index 000000000..4422ed1d9 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ModelConfigContainer.java @@ -0,0 +1,171 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch.inference; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +// typedef: inference._types.ModelConfigContainer + +/** + * Represents a model as returned by the GET API + * + * @see API + * specification + */ +@JsonpDeserializable +public class ModelConfigContainer extends ModelConfig { + private final String modelId; + + private final TaskType taskType; + + // --------------------------------------------------------------------------------------------- + + protected ModelConfigContainer(AbstractBuilder builder) { + super(builder); + + this.modelId = ApiTypeHelper.requireNonNull(builder.modelId, this, "modelId"); + this.taskType = ApiTypeHelper.requireNonNull(builder.taskType, this, "taskType"); + + } + + public static ModelConfigContainer modelConfigContainerOf( + Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The model Id + *

+ * API name: {@code model_id} + */ + public final String modelId() { + return this.modelId; + } + + /** + * Required - The model's task type + *

+ * API name: {@code task_type} + */ + public final TaskType taskType() { + return this.taskType; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + super.serializeInternal(generator, mapper); + generator.writeKey("model_id"); + generator.write(this.modelId); + + generator.writeKey("task_type"); + this.taskType.serialize(generator, mapper); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ModelConfigContainer}. + */ + + public static class Builder extends ModelConfigContainer.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ModelConfigContainer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ModelConfigContainer build() { + _checkSingleUse(); + + return new ModelConfigContainer(this); + } + } + + public abstract static class AbstractBuilder> + extends + ModelConfig.AbstractBuilder { + private String modelId; + + private TaskType taskType; + + /** + * Required - The model Id + *

+ * API name: {@code model_id} + */ + public final BuilderT modelId(String value) { + this.modelId = value; + return self(); + } + + /** + * Required - The model's task type + *

+ * API name: {@code task_type} + */ + public final BuilderT taskType(TaskType value) { + this.taskType = value; + return self(); + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ModelConfigContainer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, ModelConfigContainer::setupModelConfigContainerDeserializer); + + protected static > void setupModelConfigContainerDeserializer( + ObjectDeserializer op) { + ModelConfig.setupModelConfigDeserializer(op); + op.add(AbstractBuilder::modelId, JsonpDeserializer.stringDeserializer(), "model_id"); + op.add(AbstractBuilder::taskType, TaskType._DESERIALIZER, "task_type"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutModelRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutModelRequest.java new file mode 100644 index 000000000..83b167027 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutModelRequest.java @@ -0,0 +1,254 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch.inference; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +// typedef: inference.put_model.Request + +/** + * Create an inference service model + * + * @see API + * specification + */ +@JsonpDeserializable +public class PutModelRequest extends RequestBase implements JsonpSerializable { + private final String modelId; + + private final TaskType taskType; + + private final ModelConfig modelConfig; + + // --------------------------------------------------------------------------------------------- + + private PutModelRequest(Builder builder) { + + this.modelId = ApiTypeHelper.requireNonNull(builder.modelId, this, "modelId"); + this.taskType = ApiTypeHelper.requireNonNull(builder.taskType, this, "taskType"); + this.modelConfig = ApiTypeHelper.requireNonNull(builder.modelConfig, this, "modelConfig"); + + } + + public static PutModelRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the inference model. + *

+ * API name: {@code model_id} + */ + public final String modelId() { + return this.modelId; + } + + /** + * Required - The model task type + *

+ * API name: {@code task_type} + */ + public final TaskType taskType() { + return this.taskType; + } + + /** + * Required - Request body. + */ + public final ModelConfig modelConfig() { + return this.modelConfig; + } + + /** + * Serialize this value to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + this.modelConfig.serialize(generator, mapper); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link PutModelRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + private String modelId; + + private TaskType taskType; + + private ModelConfig modelConfig; + + /** + * Required - The unique identifier of the inference model. + *

+ * API name: {@code model_id} + */ + public final Builder modelId(String value) { + this.modelId = value; + return this; + } + + /** + * Required - The model task type + *

+ * API name: {@code task_type} + */ + public final Builder taskType(TaskType value) { + this.taskType = value; + return this; + } + + /** + * Required - Request body. + */ + public final Builder modelConfig(ModelConfig value) { + this.modelConfig = value; + return this; + } + + /** + * Required - Request body. + */ + public final Builder modelConfig(Function> fn) { + return this.modelConfig(fn.apply(new ModelConfig.Builder()).build()); + } + + @Override + public Builder withJson(JsonParser parser, JsonpMapper mapper) { + + @SuppressWarnings("unchecked") + ModelConfig value = (ModelConfig) ModelConfig._DESERIALIZER.deserialize(parser, mapper); + return this.modelConfig(value); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link PutModelRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public PutModelRequest build() { + _checkSingleUse(); + + return new PutModelRequest(this); + } + } + + public static final JsonpDeserializer _DESERIALIZER = createPutModelRequestDeserializer(); + protected static JsonpDeserializer createPutModelRequestDeserializer() { + + JsonpDeserializer valueDeserializer = ModelConfig._DESERIALIZER; + + return JsonpDeserializer.of(valueDeserializer.acceptedEvents(), (parser, mapper, event) -> new Builder() + .modelConfig(valueDeserializer.deserialize(parser, mapper, event)).build()); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code inference.put_model}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/inference.put_model", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _modelId = 1 << 0; + final int _taskType = 1 << 1; + + int propsSet = 0; + + propsSet |= _modelId; + propsSet |= _taskType; + + if (propsSet == (_taskType | _modelId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_inference"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.taskType.jsonValue(), buf); + buf.append("/"); + SimpleEndpoint.pathEncode(request.modelId, buf); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _modelId = 1 << 0; + final int _taskType = 1 << 1; + + int propsSet = 0; + + propsSet |= _modelId; + propsSet |= _taskType; + + if (propsSet == (_taskType | _modelId)) { + params.put("taskType", request.taskType.jsonValue()); + params.put("modelId", request.modelId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, PutModelResponse._DESERIALIZER); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutModelResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutModelResponse.java new file mode 100644 index 000000000..a22a61773 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutModelResponse.java @@ -0,0 +1,95 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch.inference; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +// typedef: inference.put_model.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class PutModelResponse extends ModelConfigContainer { + // --------------------------------------------------------------------------------------------- + + private PutModelResponse(Builder builder) { + super(builder); + + } + + public static PutModelResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link PutModelResponse}. + */ + + public static class Builder extends ModelConfigContainer.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link PutModelResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public PutModelResponse build() { + _checkSingleUse(); + + return new PutModelResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link PutModelResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + PutModelResponse::setupPutModelResponseDeserializer); + + protected static void setupPutModelResponseDeserializer(ObjectDeserializer op) { + ModelConfigContainer.setupModelConfigContainerDeserializer(op); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataLifecycle.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/SparseEmbeddingResult.java similarity index 53% rename from java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataLifecycle.java rename to java-client/src/main/java/co/elastic/clients/elasticsearch/inference/SparseEmbeddingResult.java index 25ac7f4ae..aa52cc71d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataLifecycle.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/SparseEmbeddingResult.java @@ -21,9 +21,8 @@ // THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. //---------------------------------------------------- -package co.elastic.clients.elasticsearch.indices; +package co.elastic.clients.elasticsearch.inference; -import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; @@ -31,45 +30,46 @@ import co.elastic.clients.json.JsonpUtils; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import java.lang.Float; +import java.lang.String; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; -// typedef: indices._types.DataLifecycle +// typedef: inference._types.SparseEmbeddingResult /** - * Data lifecycle denotes that a data stream is managed by DLM and contains the - * configuration. - * - * @see API + * + * @see API * specification */ @JsonpDeserializable -public class DataLifecycle implements JsonpSerializable { - @Nullable - private final Time dataRetention; +public class SparseEmbeddingResult implements JsonpSerializable { + private final Map embedding; // --------------------------------------------------------------------------------------------- - private DataLifecycle(Builder builder) { + private SparseEmbeddingResult(Builder builder) { - this.dataRetention = builder.dataRetention; + this.embedding = ApiTypeHelper.unmodifiableRequired(builder.embedding, this, "embedding"); } - public static DataLifecycle of(Function> fn) { + public static SparseEmbeddingResult of(Function> fn) { return fn.apply(new Builder()).build(); } /** - * API name: {@code data_retention} + * Required - API name: {@code embedding} */ - @Nullable - public final Time dataRetention() { - return this.dataRetention; + public final Map embedding() { + return this.embedding; } /** @@ -83,9 +83,15 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - if (this.dataRetention != null) { - generator.writeKey("data_retention"); - this.dataRetention.serialize(generator, mapper); + if (ApiTypeHelper.isDefined(this.embedding)) { + generator.writeKey("embedding"); + generator.writeStartObject(); + for (Map.Entry item0 : this.embedding.entrySet()) { + generator.writeKey(item0.getKey()); + generator.write(item0.getValue()); + + } + generator.writeEnd(); } @@ -99,26 +105,32 @@ public String toString() { // --------------------------------------------------------------------------------------------- /** - * Builder for {@link DataLifecycle}. + * Builder for {@link SparseEmbeddingResult}. */ - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - @Nullable - private Time dataRetention; + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Map embedding; /** - * API name: {@code data_retention} + * Required - API name: {@code embedding} + *

+ * Adds all entries of map to embedding. */ - public final Builder dataRetention(@Nullable Time value) { - this.dataRetention = value; + public final Builder embedding(Map map) { + this.embedding = _mapPutAll(this.embedding, map); return this; } /** - * API name: {@code data_retention} + * Required - API name: {@code embedding} + *

+ * Adds an entry to embedding. */ - public final Builder dataRetention(Function> fn) { - return this.dataRetention(fn.apply(new Time.Builder()).build()); + public final Builder embedding(String key, Float value) { + this.embedding = _mapPut(this.embedding, key, value); + return this; } @Override @@ -127,29 +139,30 @@ protected Builder self() { } /** - * Builds a {@link DataLifecycle}. + * Builds a {@link SparseEmbeddingResult}. * * @throws NullPointerException * if some of the required fields are null. */ - public DataLifecycle build() { + public SparseEmbeddingResult build() { _checkSingleUse(); - return new DataLifecycle(this); + return new SparseEmbeddingResult(this); } } // --------------------------------------------------------------------------------------------- /** - * Json deserializer for {@link DataLifecycle} + * Json deserializer for {@link SparseEmbeddingResult} */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - DataLifecycle::setupDataLifecycleDeserializer); + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SparseEmbeddingResult::setupSparseEmbeddingResultDeserializer); - protected static void setupDataLifecycleDeserializer(ObjectDeserializer op) { + protected static void setupSparseEmbeddingResultDeserializer(ObjectDeserializer op) { - op.add(Builder::dataRetention, Time._DESERIALIZER, "data_retention"); + op.add(Builder::embedding, JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.floatDeserializer()), + "embedding"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TaskType.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TaskType.java new file mode 100644 index 000000000..48cf6e2b3 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TaskType.java @@ -0,0 +1,54 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package co.elastic.clients.elasticsearch.inference; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum TaskType implements JsonEnum { + SparseEmbedding("sparse_embedding"), + + TextEmbedding("text_embedding"), + + ; + + private final String jsonValue; + + TaskType(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(TaskType.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_data_lifecycle/DataStreamLifecycle.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TextEmbeddingResult.java similarity index 55% rename from java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_data_lifecycle/DataStreamLifecycle.java rename to java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TextEmbeddingResult.java index 3abac00cc..82fa63beb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_data_lifecycle/DataStreamLifecycle.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TextEmbeddingResult.java @@ -21,9 +21,8 @@ // THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. //---------------------------------------------------- -package co.elastic.clients.elasticsearch.indices.get_data_lifecycle; +package co.elastic.clients.elasticsearch.inference; -import co.elastic.clients.elasticsearch.indices.DataLifecycle; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; @@ -35,52 +34,42 @@ import co.elastic.clients.util.ObjectBuilder; import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; -import java.lang.String; +import java.lang.Float; +import java.util.List; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; -// typedef: indices.get_data_lifecycle.DataStreamLifecycle +// typedef: inference._types.TextEmbeddingResult /** - * + * The text embedding result object + * * @see API + * "../doc-files/api-spec.html#inference._types.TextEmbeddingResult">API * specification */ @JsonpDeserializable -public class DataStreamLifecycle implements JsonpSerializable { - private final String name; - - @Nullable - private final DataLifecycle lifecycle; +public class TextEmbeddingResult implements JsonpSerializable { + private final List embedding; // --------------------------------------------------------------------------------------------- - private DataStreamLifecycle(Builder builder) { + private TextEmbeddingResult(Builder builder) { - this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); - this.lifecycle = builder.lifecycle; + this.embedding = ApiTypeHelper.unmodifiableRequired(builder.embedding, this, "embedding"); } - public static DataStreamLifecycle of(Function> fn) { + public static TextEmbeddingResult of(Function> fn) { return fn.apply(new Builder()).build(); } /** - * Required - API name: {@code name} - */ - public final String name() { - return this.name; - } - - /** - * API name: {@code lifecycle} + * Required - API name: {@code embedding} */ - @Nullable - public final DataLifecycle lifecycle() { - return this.lifecycle; + public final List embedding() { + return this.embedding; } /** @@ -94,12 +83,14 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeKey("name"); - generator.write(this.name); + if (ApiTypeHelper.isDefined(this.embedding)) { + generator.writeKey("embedding"); + generator.writeStartArray(); + for (Float item0 : this.embedding) { + generator.write(item0); - if (this.lifecycle != null) { - generator.writeKey("lifecycle"); - this.lifecycle.serialize(generator, mapper); + } + generator.writeEnd(); } @@ -113,70 +104,64 @@ public String toString() { // --------------------------------------------------------------------------------------------- /** - * Builder for {@link DataStreamLifecycle}. + * Builder for {@link TextEmbeddingResult}. */ public static class Builder extends WithJsonObjectBuilderBase implements - ObjectBuilder { - private String name; - - @Nullable - private DataLifecycle lifecycle; + ObjectBuilder { + private List embedding; /** - * Required - API name: {@code name} + * Required - API name: {@code embedding} + *

+ * Adds all elements of list to embedding. */ - public final Builder name(String value) { - this.name = value; + public final Builder embedding(List list) { + this.embedding = _listAddAll(this.embedding, list); return this; } /** - * API name: {@code lifecycle} + * Required - API name: {@code embedding} + *

+ * Adds one or more values to embedding. */ - public final Builder lifecycle(@Nullable DataLifecycle value) { - this.lifecycle = value; + public final Builder embedding(Float value, Float... values) { + this.embedding = _listAdd(this.embedding, value, values); return this; } - /** - * API name: {@code lifecycle} - */ - public final Builder lifecycle(Function> fn) { - return this.lifecycle(fn.apply(new DataLifecycle.Builder()).build()); - } - @Override protected Builder self() { return this; } /** - * Builds a {@link DataStreamLifecycle}. + * Builds a {@link TextEmbeddingResult}. * * @throws NullPointerException * if some of the required fields are null. */ - public DataStreamLifecycle build() { + public TextEmbeddingResult build() { _checkSingleUse(); - return new DataStreamLifecycle(this); + return new TextEmbeddingResult(this); } } // --------------------------------------------------------------------------------------------- /** - * Json deserializer for {@link DataStreamLifecycle} + * Json deserializer for {@link TextEmbeddingResult} */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, DataStreamLifecycle::setupDataStreamLifecycleDeserializer); + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, TextEmbeddingResult::setupTextEmbeddingResultDeserializer); - protected static void setupDataStreamLifecycleDeserializer(ObjectDeserializer op) { + protected static void setupTextEmbeddingResultDeserializer(ObjectDeserializer op) { - op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); - op.add(Builder::lifecycle, DataLifecycle._DESERIALIZER, "lifecycle"); + op.add(Builder::embedding, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.floatDeserializer()), + "embedding"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestAsyncClient.java index 0774fb97e..1905c188d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestAsyncClient.java @@ -93,7 +93,7 @@ public final CompletableFuture deletePipeline( * Returns statistical information about geoip databases * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/geoip-processor.html">Documentation * on elastic.co */ public CompletableFuture geoIpStats() { @@ -153,7 +153,7 @@ public CompletableFuture getPipeline() { * Returns a list of the built-in patterns. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/grok-processor.html">Documentation * on elastic.co */ public CompletableFuture processorGrok() { @@ -167,7 +167,7 @@ public CompletableFuture processorGrok() { * Creates or updates a pipeline. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ingest.html">Documentation * on elastic.co */ @@ -185,7 +185,7 @@ public CompletableFuture putPipeline(PutPipelineRequest req * a function that initializes a builder to create the * {@link PutPipelineRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ingest.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestClient.java index 14c88aa60..0504409d8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestClient.java @@ -95,7 +95,7 @@ public final DeletePipelineResponse deletePipeline( * Returns statistical information about geoip databases * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/geoip-processor.html">Documentation * on elastic.co */ public GeoIpStatsResponse geoIpStats() throws IOException, ElasticsearchException { @@ -156,7 +156,7 @@ public GetPipelineResponse getPipeline() throws IOException, ElasticsearchExcept * Returns a list of the built-in patterns. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/grok-processor.html">Documentation * on elastic.co */ public ProcessorGrokResponse processorGrok() throws IOException, ElasticsearchException { @@ -170,7 +170,7 @@ public ProcessorGrokResponse processorGrok() throws IOException, ElasticsearchEx * Creates or updates a pipeline. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ingest.html">Documentation * on elastic.co */ @@ -188,7 +188,7 @@ public PutPipelineResponse putPipeline(PutPipelineRequest request) throws IOExce * a function that initializes a builder to create the * {@link PutPipelineRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ingest.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/Pipeline.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/Pipeline.java index fe250f09a..86a34c953 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/Pipeline.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/Pipeline.java @@ -23,6 +23,7 @@ package co.elastic.clients.elasticsearch.ingest; +import co.elastic.clients.json.JsonData; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; @@ -37,6 +38,7 @@ import java.lang.Long; import java.lang.String; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -60,6 +62,8 @@ public class Pipeline implements JsonpSerializable { @Nullable private final Long version; + private final Map meta; + // --------------------------------------------------------------------------------------------- private Pipeline(Builder builder) { @@ -68,6 +72,7 @@ private Pipeline(Builder builder) { this.onFailure = ApiTypeHelper.unmodifiable(builder.onFailure); this.processors = ApiTypeHelper.unmodifiable(builder.processors); this.version = builder.version; + this.meta = ApiTypeHelper.unmodifiableRequired(builder.meta, this, "meta"); } @@ -114,6 +119,16 @@ public final Long version() { return this.version; } + /** + * Required - Arbitrary metadata about the ingest pipeline. This map is not + * automatically generated by Elasticsearch. + *

+ * API name: {@code _meta} + */ + public final Map meta() { + return this.meta; + } + /** * Serialize this object to JSON. */ @@ -155,6 +170,17 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.version); } + if (ApiTypeHelper.isDefined(this.meta)) { + generator.writeKey("_meta"); + generator.writeStartObject(); + for (Map.Entry item0 : this.meta.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } } @@ -182,6 +208,8 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private Long version; + private Map meta; + /** * Description of the ingest pipeline. *

@@ -275,6 +303,32 @@ public final Builder version(@Nullable Long value) { return this; } + /** + * Required - Arbitrary metadata about the ingest pipeline. This map is not + * automatically generated by Elasticsearch. + *

+ * API name: {@code _meta} + *

+ * Adds all entries of map to meta. + */ + public final Builder meta(Map map) { + this.meta = _mapPutAll(this.meta, map); + return this; + } + + /** + * Required - Arbitrary metadata about the ingest pipeline. This map is not + * automatically generated by Elasticsearch. + *

+ * API name: {@code _meta} + *

+ * Adds an entry to meta. + */ + public final Builder meta(String key, JsonData value) { + this.meta = _mapPut(this.meta, key, value); + return this; + } + @Override protected Builder self() { return this; @@ -307,6 +361,7 @@ protected static void setupPipelineDeserializer(ObjectDeserializer getPipeline( return getPipeline(fn.apply(new GetPipelineRequest.Builder()).build()); } + /** + * Retrieves Logstash Pipelines used by Central Management + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture getPipeline() { + return this.transport.performRequestAsync(new GetPipelineRequest.Builder().build(), + GetPipelineRequest._ENDPOINT, this.transportOptions); + } + // ----- Endpoint: logstash.put_pipeline /** diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/ElasticsearchLogstashClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/ElasticsearchLogstashClient.java index 4503ba4bb..a8f9652e7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/ElasticsearchLogstashClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/ElasticsearchLogstashClient.java @@ -123,6 +123,19 @@ public final GetPipelineResponse getPipeline( return getPipeline(fn.apply(new GetPipelineRequest.Builder()).build()); } + /** + * Retrieves Logstash Pipelines used by Central Management + * + * @see Documentation + * on elastic.co + */ + + public GetPipelineResponse getPipeline() throws IOException, ElasticsearchException { + return this.transport.performRequest(new GetPipelineRequest.Builder().build(), GetPipelineRequest._ENDPOINT, + this.transportOptions); + } + // ----- Endpoint: logstash.put_pipeline /** diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/GetPipelineRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/GetPipelineRequest.java index 2f19bfd8c..cfc0d361c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/GetPipelineRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/GetPipelineRequest.java @@ -60,7 +60,7 @@ public class GetPipelineRequest extends RequestBase { private GetPipelineRequest(Builder builder) { - this.id = ApiTypeHelper.unmodifiableRequired(builder.id, this, "id"); + this.id = ApiTypeHelper.unmodifiable(builder.id); } @@ -69,7 +69,7 @@ public static GetPipelineRequest of(Function * API name: {@code id} */ @@ -86,10 +86,11 @@ public final List id() { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable private List id; /** - * Required - Comma-separated list of pipeline identifiers. + * Comma-separated list of pipeline identifiers. *

* API name: {@code id} *

@@ -101,7 +102,7 @@ public final Builder id(List list) { } /** - * Required - Comma-separated list of pipeline identifiers. + * Comma-separated list of pipeline identifiers. *

* API name: {@code id} *

@@ -150,7 +151,8 @@ public GetPipelineRequest build() { int propsSet = 0; - propsSet |= _id; + if (ApiTypeHelper.isDefined(request.id())) + propsSet |= _id; if (propsSet == 0) { StringBuilder buf = new StringBuilder(); @@ -177,7 +179,8 @@ public GetPipelineRequest build() { int propsSet = 0; - propsSet |= _id; + if (ApiTypeHelper.isDefined(request.id())) + propsSet |= _id; if (propsSet == 0) { } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlAsyncClient.java index 635babb47..66d9dda53 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlAsyncClient.java @@ -97,7 +97,7 @@ public final CompletableFuture clearTr * multiple times throughout its lifecycle. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ml-close-job.html">Documentation * on elastic.co */ @@ -116,7 +116,7 @@ public CompletableFuture closeJob(CloseJobRequest request) { * a function that initializes a builder to create the * {@link CloseJobRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ml-close-job.html">Documentation * on elastic.co */ @@ -131,7 +131,7 @@ public final CompletableFuture closeJob( * Deletes a calendar. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ml-delete-calendar.html">Documentation * on elastic.co */ @@ -149,7 +149,7 @@ public CompletableFuture deleteCalendar(DeleteCalendarRe * a function that initializes a builder to create the * {@link DeleteCalendarRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ml-delete-calendar.html">Documentation * on elastic.co */ @@ -164,7 +164,7 @@ public final CompletableFuture deleteCalendar( * Deletes scheduled events from a calendar. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ml-delete-calendar-event.html">Documentation * on elastic.co */ @@ -182,7 +182,7 @@ public CompletableFuture deleteCalendarEvent(Delete * a function that initializes a builder to create the * {@link DeleteCalendarEventRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ml-delete-calendar-event.html">Documentation * on elastic.co */ @@ -197,7 +197,7 @@ public final CompletableFuture deleteCalendarEvent( * Deletes anomaly detection jobs from a calendar. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ml-delete-calendar-job.html">Documentation * on elastic.co */ @@ -215,7 +215,7 @@ public CompletableFuture deleteCalendarJob(DeleteCale * a function that initializes a builder to create the * {@link DeleteCalendarJobRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ml-delete-calendar-job.html">Documentation * on elastic.co */ @@ -230,7 +230,7 @@ public final CompletableFuture deleteCalendarJob( * Deletes an existing data frame analytics job. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/delete-dfanalytics.html">Documentation * on elastic.co */ @@ -249,7 +249,7 @@ public CompletableFuture deleteDataFrameAnalyt * a function that initializes a builder to create the * {@link DeleteDataFrameAnalyticsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/delete-dfanalytics.html">Documentation * on elastic.co */ @@ -264,7 +264,7 @@ public final CompletableFuture deleteDataFrame * Deletes an existing datafeed. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ml-delete-datafeed.html">Documentation * on elastic.co */ @@ -282,7 +282,7 @@ public CompletableFuture deleteDatafeed(DeleteDatafeedRe * a function that initializes a builder to create the * {@link DeleteDatafeedRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ml-delete-datafeed.html">Documentation * on elastic.co */ @@ -1846,7 +1846,7 @@ public final CompletableFuture putCalendarJob( * Instantiates a data frame analytics job. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/put-dfanalytics.html">Documentation * on elastic.co */ @@ -1865,7 +1865,7 @@ public CompletableFuture putDataFrameAnalytics( * a function that initializes a builder to create the * {@link PutDataFrameAnalyticsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/put-dfanalytics.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlClient.java index 0495131bd..d889066c0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlClient.java @@ -99,7 +99,7 @@ public final ClearTrainedModelDeploymentCacheResponse clearTrainedModelDeploymen * multiple times throughout its lifecycle. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ml-close-job.html">Documentation * on elastic.co */ @@ -118,7 +118,7 @@ public CloseJobResponse closeJob(CloseJobRequest request) throws IOException, El * a function that initializes a builder to create the * {@link CloseJobRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ml-close-job.html">Documentation * on elastic.co */ @@ -133,7 +133,7 @@ public final CloseJobResponse closeJob(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ml-delete-calendar.html">Documentation * on elastic.co */ @@ -152,7 +152,7 @@ public DeleteCalendarResponse deleteCalendar(DeleteCalendarRequest request) * a function that initializes a builder to create the * {@link DeleteCalendarRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ml-delete-calendar.html">Documentation * on elastic.co */ @@ -168,7 +168,7 @@ public final DeleteCalendarResponse deleteCalendar( * Deletes scheduled events from a calendar. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ml-delete-calendar-event.html">Documentation * on elastic.co */ @@ -187,7 +187,7 @@ public DeleteCalendarEventResponse deleteCalendarEvent(DeleteCalendarEventReques * a function that initializes a builder to create the * {@link DeleteCalendarEventRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ml-delete-calendar-event.html">Documentation * on elastic.co */ @@ -203,7 +203,7 @@ public final DeleteCalendarEventResponse deleteCalendarEvent( * Deletes anomaly detection jobs from a calendar. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ml-delete-calendar-job.html">Documentation * on elastic.co */ @@ -222,7 +222,7 @@ public DeleteCalendarJobResponse deleteCalendarJob(DeleteCalendarJobRequest requ * a function that initializes a builder to create the * {@link DeleteCalendarJobRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ml-delete-calendar-job.html">Documentation * on elastic.co */ @@ -238,7 +238,7 @@ public final DeleteCalendarJobResponse deleteCalendarJob( * Deletes an existing data frame analytics job. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/delete-dfanalytics.html">Documentation * on elastic.co */ @@ -257,7 +257,7 @@ public DeleteDataFrameAnalyticsResponse deleteDataFrameAnalytics(DeleteDataFrame * a function that initializes a builder to create the * {@link DeleteDataFrameAnalyticsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/delete-dfanalytics.html">Documentation * on elastic.co */ @@ -273,7 +273,7 @@ public final DeleteDataFrameAnalyticsResponse deleteDataFrameAnalytics( * Deletes an existing datafeed. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ml-delete-datafeed.html">Documentation * on elastic.co */ @@ -292,7 +292,7 @@ public DeleteDatafeedResponse deleteDatafeed(DeleteDatafeedRequest request) * a function that initializes a builder to create the * {@link DeleteDatafeedRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ml-delete-datafeed.html">Documentation * on elastic.co */ @@ -1905,7 +1905,7 @@ public final PutCalendarJobResponse putCalendarJob( * Instantiates a data frame analytics job. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/put-dfanalytics.html">Documentation * on elastic.co */ @@ -1924,7 +1924,7 @@ public PutDataFrameAnalyticsResponse putDataFrameAnalytics(PutDataFrameAnalytics * a function that initializes a builder to create the * {@link PutDataFrameAnalyticsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/put-dfanalytics.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java index 392cb7db9..5b421462d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java @@ -89,6 +89,9 @@ public class PutTrainedModelRequest extends RequestBase implements JsonpSerializ @Nullable private final TrainedModelType modelType; + @Nullable + private final String platformArchitecture; + private final List tags; // --------------------------------------------------------------------------------------------- @@ -105,6 +108,7 @@ private PutTrainedModelRequest(Builder builder) { this.modelId = ApiTypeHelper.requireNonNull(builder.modelId, this, "modelId"); this.modelSizeBytes = builder.modelSizeBytes; this.modelType = builder.modelType; + this.platformArchitecture = builder.platformArchitecture; this.tags = ApiTypeHelper.unmodifiable(builder.tags); } @@ -222,6 +226,24 @@ public final TrainedModelType modelType() { return this.modelType; } + /** + * The platform architecture (if applicable) of the trained mode. If the model + * only works on one platform, because it is heavily optimized for a particular + * processor architecture and OS combination, then this field specifies which. + * The format of the string must match the platform identifiers used by + * Elasticsearch, so one of, linux-x86_64, + * linux-aarch64, darwin-x86_64, + * darwin-aarch64, or windows-x86_64. For portable + * models (those that work independent of processor architecture or OS + * features), leave this field unset. + *

+ * API name: {@code platform_architecture} + */ + @Nullable + public final String platformArchitecture() { + return this.platformArchitecture; + } + /** * An array of tags to organize the model. *

@@ -281,6 +303,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("model_type"); this.modelType.serialize(generator, mapper); } + if (this.platformArchitecture != null) { + generator.writeKey("platform_architecture"); + generator.write(this.platformArchitecture); + + } if (ApiTypeHelper.isDefined(this.tags)) { generator.writeKey("tags"); generator.writeStartArray(); @@ -332,6 +359,9 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private TrainedModelType modelType; + @Nullable + private String platformArchitecture; + @Nullable private List tags; @@ -477,6 +507,24 @@ public final Builder modelType(@Nullable TrainedModelType value) { return this; } + /** + * The platform architecture (if applicable) of the trained mode. If the model + * only works on one platform, because it is heavily optimized for a particular + * processor architecture and OS combination, then this field specifies which. + * The format of the string must match the platform identifiers used by + * Elasticsearch, so one of, linux-x86_64, + * linux-aarch64, darwin-x86_64, + * darwin-aarch64, or windows-x86_64. For portable + * models (those that work independent of processor architecture or OS + * features), leave this field unset. + *

+ * API name: {@code platform_architecture} + */ + public final Builder platformArchitecture(@Nullable String value) { + this.platformArchitecture = value; + return this; + } + /** * An array of tags to organize the model. *

@@ -538,6 +586,7 @@ protected static void setupPutTrainedModelRequestDeserializer( op.add(Builder::metadata, JsonData._DESERIALIZER, "metadata"); op.add(Builder::modelSizeBytes, JsonpDeserializer.longDeserializer(), "model_size_bytes"); op.add(Builder::modelType, TrainedModelType._DESERIALIZER, "model_type"); + op.add(Builder::platformArchitecture, JsonpDeserializer.stringDeserializer(), "platform_architecture"); op.add(Builder::tags, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "tags"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelVocabularyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelVocabularyRequest.java index 437abb717..777f0e51a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelVocabularyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelVocabularyRequest.java @@ -36,6 +36,7 @@ import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.lang.Double; import java.lang.String; import java.util.Collections; import java.util.HashMap; @@ -63,6 +64,8 @@ public class PutTrainedModelVocabularyRequest extends RequestBase implements Jso private final String modelId; + private final List scores; + private final List vocabulary; // --------------------------------------------------------------------------------------------- @@ -71,6 +74,7 @@ private PutTrainedModelVocabularyRequest(Builder builder) { this.merges = ApiTypeHelper.unmodifiable(builder.merges); this.modelId = ApiTypeHelper.requireNonNull(builder.modelId, this, "modelId"); + this.scores = ApiTypeHelper.unmodifiable(builder.scores); this.vocabulary = ApiTypeHelper.unmodifiableRequired(builder.vocabulary, this, "vocabulary"); } @@ -98,6 +102,15 @@ public final String modelId() { return this.modelId; } + /** + * The optional vocabulary value scores if required by the tokenizer. + *

+ * API name: {@code scores} + */ + public final List scores() { + return this.scores; + } + /** * Required - The model vocabulary, which must not be empty. *

@@ -127,6 +140,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } generator.writeEnd(); + } + if (ApiTypeHelper.isDefined(this.scores)) { + generator.writeKey("scores"); + generator.writeStartArray(); + for (Double item0 : this.scores) { + generator.write(item0); + + } + generator.writeEnd(); + } if (ApiTypeHelper.isDefined(this.vocabulary)) { generator.writeKey("vocabulary"); @@ -155,6 +178,9 @@ public static class Builder extends RequestBase.AbstractBuilder private String modelId; + @Nullable + private List scores; + private List vocabulary; /** @@ -191,6 +217,30 @@ public final Builder modelId(String value) { return this; } + /** + * The optional vocabulary value scores if required by the tokenizer. + *

+ * API name: {@code scores} + *

+ * Adds all elements of list to scores. + */ + public final Builder scores(List list) { + this.scores = _listAddAll(this.scores, list); + return this; + } + + /** + * The optional vocabulary value scores if required by the tokenizer. + *

+ * API name: {@code scores} + *

+ * Adds one or more values to scores. + */ + public final Builder scores(Double value, Double... values) { + this.scores = _listAdd(this.scores, value, values); + return this; + } + /** * Required - The model vocabulary, which must not be empty. *

@@ -245,6 +295,7 @@ protected static void setupPutTrainedModelVocabularyRequestDeserializer( ObjectDeserializer op) { op.add(Builder::merges, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "merges"); + op.add(Builder::scores, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.doubleDeserializer()), "scores"); op.add(Builder::vocabulary, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "vocabulary"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StartTrainedModelDeploymentRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StartTrainedModelDeploymentRequest.java index fea7d41ac..a6e0d28f7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StartTrainedModelDeploymentRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StartTrainedModelDeploymentRequest.java @@ -58,6 +58,9 @@ public class StartTrainedModelDeploymentRequest extends RequestBase { @Nullable private final String cacheSize; + @Nullable + private final String deploymentId; + private final String modelId; @Nullable @@ -83,6 +86,7 @@ public class StartTrainedModelDeploymentRequest extends RequestBase { private StartTrainedModelDeploymentRequest(Builder builder) { this.cacheSize = builder.cacheSize; + this.deploymentId = builder.deploymentId; this.modelId = ApiTypeHelper.requireNonNull(builder.modelId, this, "modelId"); this.numberOfAllocations = builder.numberOfAllocations; this.priority = builder.priority; @@ -111,6 +115,16 @@ public final String cacheSize() { return this.cacheSize; } + /** + * A unique identifier for the deployment of the model. + *

+ * API name: {@code deployment_id} + */ + @Nullable + public final String deploymentId() { + return this.deploymentId; + } + /** * Required - The unique identifier of the trained model. Currently, only * PyTorch models are supported. @@ -205,6 +219,9 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private String cacheSize; + @Nullable + private String deploymentId; + private String modelId; @Nullable @@ -238,6 +255,16 @@ public final Builder cacheSize(@Nullable String value) { return this; } + /** + * A unique identifier for the deployment of the model. + *

+ * API name: {@code deployment_id} + */ + public final Builder deploymentId(@Nullable String value) { + this.deploymentId = value; + return this; + } + /** * Required - The unique identifier of the trained model. Currently, only * PyTorch models are supported. @@ -408,6 +435,9 @@ public StartTrainedModelDeploymentRequest build() { if (request.threadsPerAllocation != null) { params.put("threads_per_allocation", String.valueOf(request.threadsPerAllocation)); } + if (request.deploymentId != null) { + params.put("deployment_id", request.deploymentId); + } if (request.waitFor != null) { params.put("wait_for", request.waitFor.jsonValue()); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/ElasticsearchNodesAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/ElasticsearchNodesAsyncClient.java index be852f87b..2491072a4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/ElasticsearchNodesAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/ElasticsearchNodesAsyncClient.java @@ -131,7 +131,7 @@ public final CompletableFuture getRepositor * Returns information about hot threads on each node in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-hot-threads.html">Documentation * on elastic.co */ @@ -149,7 +149,7 @@ public CompletableFuture hotThreads(HotThreadsRequest reques * a function that initializes a builder to create the * {@link HotThreadsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-hot-threads.html">Documentation * on elastic.co */ @@ -162,7 +162,7 @@ public final CompletableFuture hotThreads( * Returns information about hot threads on each node in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-hot-threads.html">Documentation * on elastic.co */ @@ -177,7 +177,7 @@ public CompletableFuture hotThreads() { * Returns information about nodes in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-info.html">Documentation * on elastic.co */ @@ -195,7 +195,7 @@ public CompletableFuture info(NodesInfoRequest request) { * a function that initializes a builder to create the * {@link NodesInfoRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-info.html">Documentation * on elastic.co */ @@ -208,7 +208,7 @@ public final CompletableFuture info( * Returns information about nodes in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-info.html">Documentation * on elastic.co */ @@ -269,7 +269,7 @@ public CompletableFuture reloadSecureSettings() { * Returns statistical information about nodes in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-stats.html">Documentation * on elastic.co */ @@ -287,7 +287,7 @@ public CompletableFuture stats(NodesStatsRequest request) { * a function that initializes a builder to create the * {@link NodesStatsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-stats.html">Documentation * on elastic.co */ @@ -300,7 +300,7 @@ public final CompletableFuture stats( * Returns statistical information about nodes in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-stats.html">Documentation * on elastic.co */ @@ -315,7 +315,7 @@ public CompletableFuture stats() { * Returns low-level information about REST actions usage on nodes. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-usage.html">Documentation * on elastic.co */ @@ -333,7 +333,7 @@ public CompletableFuture usage(NodesUsageRequest request) { * a function that initializes a builder to create the * {@link NodesUsageRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-usage.html">Documentation * on elastic.co */ @@ -346,7 +346,7 @@ public final CompletableFuture usage( * Returns low-level information about REST actions usage on nodes. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-usage.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/ElasticsearchNodesClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/ElasticsearchNodesClient.java index 3b7f696d4..8c0f4f2da 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/ElasticsearchNodesClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/ElasticsearchNodesClient.java @@ -133,7 +133,7 @@ public final GetRepositoriesMeteringInfoResponse getRepositoriesMeteringInfo( * Returns information about hot threads on each node in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-hot-threads.html">Documentation * on elastic.co */ @@ -151,7 +151,7 @@ public HotThreadsResponse hotThreads(HotThreadsRequest request) throws IOExcepti * a function that initializes a builder to create the * {@link HotThreadsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-hot-threads.html">Documentation * on elastic.co */ @@ -164,7 +164,7 @@ public final HotThreadsResponse hotThreads(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-hot-threads.html">Documentation * on elastic.co */ @@ -179,7 +179,7 @@ public HotThreadsResponse hotThreads() throws IOException, ElasticsearchExceptio * Returns information about nodes in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-info.html">Documentation * on elastic.co */ @@ -197,7 +197,7 @@ public NodesInfoResponse info(NodesInfoRequest request) throws IOException, Elas * a function that initializes a builder to create the * {@link NodesInfoRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-info.html">Documentation * on elastic.co */ @@ -210,7 +210,7 @@ public final NodesInfoResponse info(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-info.html">Documentation * on elastic.co */ @@ -273,7 +273,7 @@ public ReloadSecureSettingsResponse reloadSecureSettings() throws IOException, E * Returns statistical information about nodes in the cluster. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-stats.html">Documentation * on elastic.co */ @@ -291,7 +291,7 @@ public NodesStatsResponse stats(NodesStatsRequest request) throws IOException, E * a function that initializes a builder to create the * {@link NodesStatsRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-stats.html">Documentation * on elastic.co */ @@ -304,7 +304,7 @@ public final NodesStatsResponse stats(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-stats.html">Documentation * on elastic.co */ @@ -319,7 +319,7 @@ public NodesStatsResponse stats() throws IOException, ElasticsearchException { * Returns low-level information about REST actions usage on nodes. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-usage.html">Documentation * on elastic.co */ @@ -337,7 +337,7 @@ public NodesUsageResponse usage(NodesUsageRequest request) throws IOException, E * a function that initializes a builder to create the * {@link NodesUsageRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-usage.html">Documentation * on elastic.co */ @@ -350,7 +350,7 @@ public final NodesUsageResponse usage(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-usage.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/PutRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/PutRequest.java index 9925d24b2..2a352bfdc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/PutRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/PutRequest.java @@ -36,10 +36,10 @@ import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; -import jakarta.json.stream.JsonParser; import java.lang.String; import java.util.Collections; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Objects; import java.util.function.Function; @@ -55,16 +55,16 @@ */ @JsonpDeserializable public class PutRequest extends RequestBase implements JsonpSerializable { - private final String rulesetId; + private final List rules; - private final QueryRuleset queryRuleset; + private final String rulesetId; // --------------------------------------------------------------------------------------------- private PutRequest(Builder builder) { + this.rules = ApiTypeHelper.unmodifiableRequired(builder.rules, this, "rules"); this.rulesetId = ApiTypeHelper.requireNonNull(builder.rulesetId, this, "rulesetId"); - this.queryRuleset = ApiTypeHelper.requireNonNull(builder.queryRuleset, this, "queryRuleset"); } @@ -72,6 +72,13 @@ public static PutRequest of(Function> fn) { return fn.apply(new Builder()).build(); } + /** + * Required - API name: {@code rules} + */ + public final List rules() { + return this.rules; + } + /** * Required - The unique identifier of the query ruleset to be created or * updated @@ -83,17 +90,26 @@ public final String rulesetId() { } /** - * Required - Request body. + * Serialize this object to JSON. */ - public final QueryRuleset queryRuleset() { - return this.queryRuleset; + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); } - /** - * Serialize this value to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - this.queryRuleset.serialize(generator, mapper); + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (ApiTypeHelper.isDefined(this.rules)) { + generator.writeKey("rules"); + generator.writeStartArray(); + for (QueryRule item0 : this.rules) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } } @@ -104,42 +120,48 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { */ public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { - private String rulesetId; + private List rules; - private QueryRuleset queryRuleset; + private String rulesetId; /** - * Required - The unique identifier of the query ruleset to be created or - * updated + * Required - API name: {@code rules} *

- * API name: {@code ruleset_id} + * Adds all elements of list to rules. */ - public final Builder rulesetId(String value) { - this.rulesetId = value; + public final Builder rules(List list) { + this.rules = _listAddAll(this.rules, list); return this; } /** - * Required - Request body. + * Required - API name: {@code rules} + *

+ * Adds one or more values to rules. */ - public final Builder queryRuleset(QueryRuleset value) { - this.queryRuleset = value; + public final Builder rules(QueryRule value, QueryRule... values) { + this.rules = _listAdd(this.rules, value, values); return this; } /** - * Required - Request body. + * Required - API name: {@code rules} + *

+ * Adds a value to rules using a builder lambda. */ - public final Builder queryRuleset(Function> fn) { - return this.queryRuleset(fn.apply(new QueryRuleset.Builder()).build()); + public final Builder rules(Function> fn) { + return rules(fn.apply(new QueryRule.Builder()).build()); } - @Override - public Builder withJson(JsonParser parser, JsonpMapper mapper) { - - @SuppressWarnings("unchecked") - QueryRuleset value = (QueryRuleset) QueryRuleset._DESERIALIZER.deserialize(parser, mapper); - return this.queryRuleset(value); + /** + * Required - The unique identifier of the query ruleset to be created or + * updated + *

+ * API name: {@code ruleset_id} + */ + public final Builder rulesetId(String value) { + this.rulesetId = value; + return this; } @Override @@ -160,13 +182,18 @@ public PutRequest build() { } } - public static final JsonpDeserializer _DESERIALIZER = createPutRequestDeserializer(); - protected static JsonpDeserializer createPutRequestDeserializer() { + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link PutRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + PutRequest::setupPutRequestDeserializer); + + protected static void setupPutRequestDeserializer(ObjectDeserializer op) { - JsonpDeserializer valueDeserializer = QueryRuleset._DESERIALIZER; + op.add(Builder::rules, JsonpDeserializer.arrayDeserializer(QueryRule._DESERIALIZER), "rules"); - return JsonpDeserializer.of(valueDeserializer.acceptedEvents(), (parser, mapper, event) -> new Builder() - .queryRuleset(valueDeserializer.deserialize(parser, mapper, event)).build()); } // --------------------------------------------------------------------------------------------- diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/QueryRuleset.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/QueryRuleset.java index 7162e5a12..9e2bf508d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/QueryRuleset.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/QueryRuleset.java @@ -48,8 +48,8 @@ * "../doc-files/api-spec.html#query_ruleset._types.QueryRuleset">API * specification */ -@JsonpDeserializable -public class QueryRuleset implements JsonpSerializable { + +public abstract class QueryRuleset implements JsonpSerializable { private final String rulesetId; private final List rules; @@ -63,10 +63,6 @@ protected QueryRuleset(AbstractBuilder builder) { } - public static QueryRuleset queryRulesetOf(Function> fn) { - return fn.apply(new Builder()).build(); - } - /** * Required - Query Ruleset unique identifier *

@@ -117,31 +113,6 @@ public String toString() { return JsonpUtils.toString(this); } - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link QueryRuleset}. - */ - - public static class Builder extends QueryRuleset.AbstractBuilder implements ObjectBuilder { - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link QueryRuleset}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public QueryRuleset build() { - _checkSingleUse(); - - return new QueryRuleset(this); - } - } - public abstract static class AbstractBuilder> extends WithJsonObjectBuilderBase { @@ -199,13 +170,6 @@ public final BuilderT rules(Function } // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link QueryRuleset} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - QueryRuleset::setupQueryRulesetDeserializer); - protected static > void setupQueryRulesetDeserializer( ObjectDeserializer op) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/AnalyticsCollection.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/AnalyticsCollection.java index 5e9ed8b9a..bddf4ff7b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/AnalyticsCollection.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/AnalyticsCollection.java @@ -63,7 +63,7 @@ public static AnalyticsCollection of(Function * API name: {@code event_data_stream} */ @@ -104,7 +104,7 @@ public static class Builder extends WithJsonObjectBuilderBase private EventDataStream eventDataStream; /** - * Required - Data stream for the collection + * Required - Data stream for the collection. *

* API name: {@code event_data_stream} */ @@ -114,7 +114,7 @@ public final Builder eventDataStream(EventDataStream value) { } /** - * Required - Data stream for the collection + * Required - Data stream for the collection. *

* API name: {@code event_data_stream} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/ElasticsearchSearchApplicationAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/ElasticsearchSearchApplicationAsyncClient.java index 4fe85dd95..d8e30a11b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/ElasticsearchSearchApplicationAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/ElasticsearchSearchApplicationAsyncClient.java @@ -64,7 +64,7 @@ public ElasticsearchSearchApplicationAsyncClient withTransportOptions(@Nullable * Deletes a search application. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html">Documentation * on elastic.co */ @@ -82,7 +82,7 @@ public CompletableFuture delete(DeleteSearchApp * a function that initializes a builder to create the * {@link DeleteSearchApplicationRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/ElasticsearchSearchApplicationClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/ElasticsearchSearchApplicationClient.java index 39f4cd916..9ce72e161 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/ElasticsearchSearchApplicationClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/ElasticsearchSearchApplicationClient.java @@ -65,7 +65,7 @@ public ElasticsearchSearchApplicationClient withTransportOptions(@Nullable Trans * Deletes a search application. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html">Documentation * on elastic.co */ @@ -84,7 +84,7 @@ public DeleteSearchApplicationResponse delete(DeleteSearchApplicationRequest req * a function that initializes a builder to create the * {@link DeleteSearchApplicationRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/ListRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/ListRequest.java index 13f63afca..48eeb11a2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/ListRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/ListRequest.java @@ -76,7 +76,7 @@ public static ListRequest of(Function> fn) { } /** - * Starting offset (default: 0) + * Starting offset. *

* API name: {@code from} */ @@ -86,7 +86,7 @@ public final Integer from() { } /** - * Query in the Lucene query string syntax" + * Query in the Lucene query string syntax. *

* API name: {@code q} */ @@ -96,7 +96,7 @@ public final String q() { } /** - * specifies a max number of results to get + * Specifies a max number of results to get. *

* API name: {@code size} */ @@ -122,7 +122,7 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private Integer size; /** - * Starting offset (default: 0) + * Starting offset. *

* API name: {@code from} */ @@ -132,7 +132,7 @@ public final Builder from(@Nullable Integer value) { } /** - * Query in the Lucene query string syntax" + * Query in the Lucene query string syntax. *

* API name: {@code q} */ @@ -142,7 +142,7 @@ public final Builder q(@Nullable String value) { } /** - * specifies a max number of results to get + * Specifies a max number of results to get. *

* API name: {@code size} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutBehavioralAnalyticsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutBehavioralAnalyticsRequest.java index 08f2ff35b..31e16253d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutBehavioralAnalyticsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutBehavioralAnalyticsRequest.java @@ -45,7 +45,7 @@ // typedef: search_application.put_behavioral_analytics.Request /** - * Creates a behavioral analytics collection + * Creates a behavioral analytics collection. * * @see API @@ -68,7 +68,7 @@ public static PutBehavioralAnalyticsRequest of(Function * API name: {@code name} */ @@ -88,7 +88,7 @@ public static class Builder extends RequestBase.AbstractBuilder private String name; /** - * Required - The name of the analytics collection to be created or updated + * Required - The name of the analytics collection to be created or updated. *

* API name: {@code name} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutRequest.java index 9f89595fa..0f69e5734 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutRequest.java @@ -77,8 +77,8 @@ public static PutRequest of(Function> fn) { } /** - * If true, requires that a search application with the specified resource_id - * does not already exist. (default: false) + * If true, this request cannot replace or update existing Search + * Applications. *

* API name: {@code create} */ @@ -88,7 +88,7 @@ public final Boolean create() { } /** - * Required - The name of the search application to be created or updated + * Required - The name of the search application to be created or updated. *

* API name: {@code name} */ @@ -126,8 +126,8 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private SearchApplication searchApplication; /** - * If true, requires that a search application with the specified resource_id - * does not already exist. (default: false) + * If true, this request cannot replace or update existing Search + * Applications. *

* API name: {@code create} */ @@ -137,7 +137,7 @@ public final Builder create(@Nullable Boolean value) { } /** - * Required - The name of the search application to be created or updated + * Required - The name of the search application to be created or updated. *

* API name: {@code name} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplication.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplication.java index fe8664b8f..4afca4f0b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplication.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplication.java @@ -80,7 +80,7 @@ public static SearchApplication searchApplicationOf(Function * API name: {@code name} */ @@ -89,7 +89,7 @@ public final String name() { } /** - * Required - Indices that are part of the Search Application + * Required - Indices that are part of the Search Application. *

* API name: {@code indices} */ @@ -98,7 +98,7 @@ public final List indices() { } /** - * Required - Last time the Search Application was updated + * Required - Last time the Search Application was updated. *

* API name: {@code updated_at_millis} */ @@ -107,7 +107,7 @@ public final long updatedAtMillis() { } /** - * Analytics collection associated to the Search Application + * Analytics collection associated to the Search Application. *

* API name: {@code analytics_collection_name} */ @@ -117,7 +117,7 @@ public final String analyticsCollectionName() { } /** - * Search template to use on search operations + * Search template to use on search operations. *

* API name: {@code template} */ @@ -214,7 +214,7 @@ public abstract static class AbstractBuilder * API name: {@code name} */ @@ -224,7 +224,7 @@ public final BuilderT name(String value) { } /** - * Required - Indices that are part of the Search Application + * Required - Indices that are part of the Search Application. *

* API name: {@code indices} *

@@ -236,7 +236,7 @@ public final BuilderT indices(List list) { } /** - * Required - Indices that are part of the Search Application + * Required - Indices that are part of the Search Application. *

* API name: {@code indices} *

@@ -248,7 +248,7 @@ public final BuilderT indices(String value, String... values) { } /** - * Required - Last time the Search Application was updated + * Required - Last time the Search Application was updated. *

* API name: {@code updated_at_millis} */ @@ -258,7 +258,7 @@ public final BuilderT updatedAtMillis(long value) { } /** - * Analytics collection associated to the Search Application + * Analytics collection associated to the Search Application. *

* API name: {@code analytics_collection_name} */ @@ -268,7 +268,7 @@ public final BuilderT analyticsCollectionName(@Nullable String value) { } /** - * Search template to use on search operations + * Search template to use on search operations. *

* API name: {@code template} */ @@ -278,7 +278,7 @@ public final BuilderT template(@Nullable SearchApplicationTemplate value) { } /** - * Search template to use on search operations + * Search template to use on search operations. *

* API name: {@code template} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplicationSearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplicationSearchRequest.java index 17923d133..76c879464 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplicationSearchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplicationSearchRequest.java @@ -48,7 +48,7 @@ // typedef: search_application.search.Request /** - * Perform a search against a search application + * Perform a search against a search application. * * @see API @@ -75,7 +75,7 @@ public static SearchApplicationSearchRequest of( } /** - * Required - The name of the search application to be searched + * Required - The name of the search application to be searched. *

* API name: {@code name} */ @@ -84,6 +84,9 @@ public final String name() { } /** + * Query parameters specific to this request, which will override any defaults + * specified in the template. + *

* API name: {@code params} */ public final Map params() { @@ -130,7 +133,7 @@ public static class Builder extends RequestBase.AbstractBuilder private Map params; /** - * Required - The name of the search application to be searched + * Required - The name of the search application to be searched. *

* API name: {@code name} */ @@ -140,6 +143,9 @@ public final Builder name(String value) { } /** + * Query parameters specific to this request, which will override any defaults + * specified in the template. + *

* API name: {@code params} *

* Adds all entries of map to params. @@ -150,6 +156,9 @@ public final Builder params(Map map) { } /** + * Query parameters specific to this request, which will override any defaults + * specified in the template. + *

* API name: {@code params} *

* Adds an entry to params. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplicationTemplate.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplicationTemplate.java index 42c886117..b3211c1cb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplicationTemplate.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplicationTemplate.java @@ -64,7 +64,9 @@ public static SearchApplicationTemplate of(Function + * API name: {@code script} */ public final InlineScript script() { return this.script; @@ -103,7 +105,9 @@ public static class Builder extends WithJsonObjectBuilderBase private InlineScript script; /** - * Required - API name: {@code script} + * Required - The associated mustache template. + *

+ * API name: {@code script} */ public final Builder script(InlineScript value) { this.script = value; @@ -111,7 +115,9 @@ public final Builder script(InlineScript value) { } /** - * Required - API name: {@code script} + * Required - The associated mustache template. + *

+ * API name: {@code script} */ public final Builder script(Function> fn) { return this.script(fn.apply(new InlineScript.Builder()).build()); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetApiKeyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetApiKeyRequest.java index 56e60e2d4..a31b65210 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetApiKeyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetApiKeyRequest.java @@ -57,6 +57,9 @@ */ public class GetApiKeyRequest extends RequestBase { + @Nullable + private final Boolean activeOnly; + @Nullable private final String id; @@ -79,6 +82,7 @@ public class GetApiKeyRequest extends RequestBase { private GetApiKeyRequest(Builder builder) { + this.activeOnly = builder.activeOnly; this.id = builder.id; this.name = builder.name; this.owner = builder.owner; @@ -92,6 +96,21 @@ public static GetApiKeyRequest of(Functionowner or name. If active_only is + * false, the response will include both active and inactive (expired or + * invalidated) keys. + *

+ * API name: {@code active_only} + */ + @Nullable + public final Boolean activeOnly() { + return this.activeOnly; + } + /** * An API key id. This parameter cannot be used with any of name, * realm_name or username. @@ -173,6 +192,9 @@ public final Boolean withLimitedBy() { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Boolean activeOnly; + @Nullable private String id; @@ -191,6 +213,21 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private Boolean withLimitedBy; + /** + * A boolean flag that can be used to query API keys that are currently active. + * An API key is considered active if it is neither invalidated, nor expired at + * query time. You can specify this together with other parameters such as + * owner or name. If active_only is + * false, the response will include both active and inactive (expired or + * invalidated) keys. + *

+ * API name: {@code active_only} + */ + public final Builder activeOnly(@Nullable Boolean value) { + this.activeOnly = value; + return this; + } + /** * An API key id. This parameter cannot be used with any of name, * realm_name or username. @@ -312,6 +349,9 @@ public GetApiKeyRequest build() { if (request.owner != null) { params.put("owner", String.valueOf(request.owner)); } + if (request.activeOnly != null) { + params.put("active_only", String.valueOf(request.activeOnly)); + } if (request.name != null) { params.put("name", request.name); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutRoleMappingRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutRoleMappingRequest.java index 290277e03..ca6c6abc0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutRoleMappingRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutRoleMappingRequest.java @@ -68,6 +68,8 @@ public class PutRoleMappingRequest extends RequestBase implements JsonpSerializa @Nullable private final Refresh refresh; + private final List roleTemplates; + private final List roles; @Nullable @@ -83,6 +85,7 @@ private PutRoleMappingRequest(Builder builder) { this.metadata = ApiTypeHelper.unmodifiable(builder.metadata); this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); this.refresh = builder.refresh; + this.roleTemplates = ApiTypeHelper.unmodifiable(builder.roleTemplates); this.roles = ApiTypeHelper.unmodifiable(builder.roles); this.rules = builder.rules; this.runAs = ApiTypeHelper.unmodifiable(builder.runAs); @@ -130,6 +133,13 @@ public final Refresh refresh() { return this.refresh; } + /** + * API name: {@code role_templates} + */ + public final List roleTemplates() { + return this.roleTemplates; + } + /** * API name: {@code roles} */ @@ -178,6 +188,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } generator.writeEnd(); + } + if (ApiTypeHelper.isDefined(this.roleTemplates)) { + generator.writeKey("role_templates"); + generator.writeStartArray(); + for (RoleTemplate item0 : this.roleTemplates) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + } if (ApiTypeHelper.isDefined(this.roles)) { generator.writeKey("roles"); @@ -227,6 +247,9 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private Refresh refresh; + @Nullable + private List roleTemplates; + @Nullable private List roles; @@ -287,6 +310,35 @@ public final Builder refresh(@Nullable Refresh value) { return this; } + /** + * API name: {@code role_templates} + *

+ * Adds all elements of list to roleTemplates. + */ + public final Builder roleTemplates(List list) { + this.roleTemplates = _listAddAll(this.roleTemplates, list); + return this; + } + + /** + * API name: {@code role_templates} + *

+ * Adds one or more values to roleTemplates. + */ + public final Builder roleTemplates(RoleTemplate value, RoleTemplate... values) { + this.roleTemplates = _listAdd(this.roleTemplates, value, values); + return this; + } + + /** + * API name: {@code role_templates} + *

+ * Adds a value to roleTemplates using a builder lambda. + */ + public final Builder roleTemplates(Function> fn) { + return roleTemplates(fn.apply(new RoleTemplate.Builder()).build()); + } + /** * API name: {@code roles} *

@@ -372,6 +424,8 @@ protected static void setupPutRoleMappingRequestDeserializer(ObjectDeserializer< op.add(Builder::enabled, JsonpDeserializer.booleanDeserializer(), "enabled"); op.add(Builder::metadata, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "metadata"); + op.add(Builder::roleTemplates, JsonpDeserializer.arrayDeserializer(RoleTemplate._DESERIALIZER), + "role_templates"); op.add(Builder::roles, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "roles"); op.add(Builder::rules, RoleMappingRule._DESERIALIZER, "rules"); op.add(Builder::runAs, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "run_as"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RoleMapping.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RoleMapping.java index 2d08419e6..b73d39130 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RoleMapping.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RoleMapping.java @@ -23,7 +23,6 @@ package co.elastic.clients.elasticsearch.security; -import co.elastic.clients.elasticsearch.security.get_role.RoleTemplate; import co.elastic.clients.json.JsonData; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/get_role/RoleTemplate.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RoleTemplate.java similarity index 96% rename from java-client/src/main/java/co/elastic/clients/elasticsearch/security/get_role/RoleTemplate.java rename to java-client/src/main/java/co/elastic/clients/elasticsearch/security/RoleTemplate.java index 1e616c0c5..131c1e51e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/get_role/RoleTemplate.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RoleTemplate.java @@ -21,7 +21,7 @@ // THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. //---------------------------------------------------- -package co.elastic.clients.elasticsearch.security.get_role; +package co.elastic.clients.elasticsearch.security; import co.elastic.clients.elasticsearch._types.Script; import co.elastic.clients.json.JsonpDeserializable; @@ -39,12 +39,11 @@ import java.util.function.Function; import javax.annotation.Nullable; -// typedef: security.get_role.RoleTemplate +// typedef: security._types.RoleTemplate /** * - * @see API + * @see API * specification */ @JsonpDeserializable diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/get_role/TemplateFormat.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/TemplateFormat.java similarity index 90% rename from java-client/src/main/java/co/elastic/clients/elasticsearch/security/get_role/TemplateFormat.java rename to java-client/src/main/java/co/elastic/clients/elasticsearch/security/TemplateFormat.java index 21e76f879..5037809d0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/get_role/TemplateFormat.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/TemplateFormat.java @@ -21,7 +21,7 @@ // THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. //---------------------------------------------------- -package co.elastic.clients.elasticsearch.security.get_role; +package co.elastic.clients.elasticsearch.security; import co.elastic.clients.json.JsonEnum; import co.elastic.clients.json.JsonpDeserializable; @@ -29,8 +29,7 @@ /** * - * @see API + * @see API * specification */ @JsonpDeserializable diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/get_role/Role.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/get_role/Role.java index 16fbdf06a..44983e264 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/get_role/Role.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/get_role/Role.java @@ -25,6 +25,7 @@ import co.elastic.clients.elasticsearch.security.ApplicationPrivileges; import co.elastic.clients.elasticsearch.security.IndicesPrivileges; +import co.elastic.clients.elasticsearch.security.RoleTemplate; import co.elastic.clients.elasticsearch.security.TransientMetadataConfig; import co.elastic.clients.json.JsonData; import co.elastic.clients.json.JsonpDeserializable; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ClearCursorRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ClearCursorRequest.java index 4063ceeb5..e7e992bb2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ClearCursorRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ClearCursorRequest.java @@ -67,7 +67,9 @@ public static ClearCursorRequest of(Function + * API name: {@code cursor} */ public final String cursor() { return this.cursor; @@ -101,7 +103,9 @@ public static class Builder extends RequestBase.AbstractBuilder private String cursor; /** - * Required - API name: {@code cursor} + * Required - Cursor to clear. + *

+ * API name: {@code cursor} */ public final Builder cursor(String value) { this.cursor = value; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/DeleteAsyncRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/DeleteAsyncRequest.java index 44ed8cfcb..ab0bba51c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/DeleteAsyncRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/DeleteAsyncRequest.java @@ -68,7 +68,7 @@ public static DeleteAsyncRequest of(Function * API name: {@code id} */ @@ -88,7 +88,7 @@ public static class Builder extends RequestBase.AbstractBuilder private String id; /** - * Required - The async search ID + * Required - Identifier for the search. *

* API name: {@code id} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncRequest.java index c77995ef4..417e81860 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncRequest.java @@ -106,7 +106,7 @@ public final String format() { } /** - * Required - The async search ID + * Required - Identifier for the search. *

* API name: {@code id} */ @@ -180,7 +180,7 @@ public final Builder format(@Nullable String value) { } /** - * Required - The async search ID + * Required - Identifier for the search. *

* API name: {@code id} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncStatusRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncStatusRequest.java index 751783f75..2d1ac49c3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncStatusRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncStatusRequest.java @@ -68,7 +68,7 @@ public static GetAsyncStatusRequest of(Function * API name: {@code id} */ @@ -88,7 +88,7 @@ public static class Builder extends RequestBase.AbstractBuilder private String id; /** - * Required - The async search ID + * Required - Identifier for the search. *

* API name: {@code id} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/QueryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/QueryRequest.java index 72e567ebe..3f652dec8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/QueryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/QueryRequest.java @@ -160,6 +160,10 @@ public final Boolean columnar() { } /** + * Cursor used to retrieve a set of paginated results. If you specify a cursor, + * the API only uses the columnar and time_zone + * request body parameters. It ignores other request body parameters. + *

* API name: {@code cursor} */ @Nullable @@ -190,7 +194,7 @@ public final Boolean fieldMultiValueLeniency() { } /** - * Optional Elasticsearch query DSL for additional filtering. + * Elasticsearch query DSL for additional filtering. *

* API name: {@code filter} */ @@ -200,7 +204,7 @@ public final Query filter() { } /** - * a short version of the Accept header, e.g. json, yaml + * Format for the response. *

* API name: {@code format} */ @@ -261,7 +265,7 @@ public final Map params() { } /** - * SQL query to execute + * SQL query to run. *

* API name: {@code query} */ @@ -291,8 +295,7 @@ public final Map runtimeMappings() { } /** - * Time-zone in ISO 8601 used for executing the query on the server. More - * information available here. + * ISO-8601 time zone ID for the search. *

* API name: {@code time_zone} */ @@ -500,6 +503,10 @@ public final Builder columnar(@Nullable Boolean value) { } /** + * Cursor used to retrieve a set of paginated results. If you specify a cursor, + * the API only uses the columnar and time_zone + * request body parameters. It ignores other request body parameters. + *

* API name: {@code cursor} */ public final Builder cursor(@Nullable String value) { @@ -530,7 +537,7 @@ public final Builder fieldMultiValueLeniency(@Nullable Boolean value) { } /** - * Optional Elasticsearch query DSL for additional filtering. + * Elasticsearch query DSL for additional filtering. *

* API name: {@code filter} */ @@ -540,7 +547,7 @@ public final Builder filter(@Nullable Query value) { } /** - * Optional Elasticsearch query DSL for additional filtering. + * Elasticsearch query DSL for additional filtering. *

* API name: {@code filter} */ @@ -549,7 +556,7 @@ public final Builder filter(Function> fn) { } /** - * a short version of the Accept header, e.g. json, yaml + * Format for the response. *

* API name: {@code format} */ @@ -643,7 +650,7 @@ public final Builder params(String key, JsonData value) { } /** - * SQL query to execute + * SQL query to run. *

* API name: {@code query} */ @@ -711,8 +718,7 @@ public final Builder runtimeMappings(String key, } /** - * Time-zone in ISO 8601 used for executing the query on the server. More - * information available here. + * ISO-8601 time zone ID for the search. *

* API name: {@code time_zone} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/TranslateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/TranslateRequest.java index 23d1c0d17..ef254bdf6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/TranslateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/TranslateRequest.java @@ -81,6 +81,8 @@ public static TranslateRequest of(Function * API name: {@code fetch_size} */ @Nullable @@ -89,6 +91,8 @@ public final Integer fetchSize() { } /** + * Elasticsearch query DSL for additional filtering. + *

* API name: {@code filter} */ @Nullable @@ -97,13 +101,17 @@ public final Query filter() { } /** - * Required - API name: {@code query} + * Required - SQL query to run. + *

+ * API name: {@code query} */ public final String query() { return this.query; } /** + * ISO-8601 time zone ID for the search. + *

* API name: {@code time_zone} */ @Nullable @@ -164,6 +172,8 @@ public static class Builder extends RequestBase.AbstractBuilder private String timeZone; /** + * The maximum number of rows (or entries) to return in one response. + *

* API name: {@code fetch_size} */ public final Builder fetchSize(@Nullable Integer value) { @@ -172,6 +182,8 @@ public final Builder fetchSize(@Nullable Integer value) { } /** + * Elasticsearch query DSL for additional filtering. + *

* API name: {@code filter} */ public final Builder filter(@Nullable Query value) { @@ -180,6 +192,8 @@ public final Builder filter(@Nullable Query value) { } /** + * Elasticsearch query DSL for additional filtering. + *

* API name: {@code filter} */ public final Builder filter(Function> fn) { @@ -187,7 +201,9 @@ public final Builder filter(Function> fn) { } /** - * Required - API name: {@code query} + * Required - SQL query to run. + *

+ * API name: {@code query} */ public final Builder query(String value) { this.query = value; @@ -195,6 +211,8 @@ public final Builder query(String value) { } /** + * ISO-8601 time zone ID for the search. + *

* API name: {@code time_zone} */ public final Builder timeZone(@Nullable String value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/CancelRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/CancelRequest.java index 007779343..68a17a507 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/CancelRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/CancelRequest.java @@ -84,8 +84,8 @@ public static CancelRequest of(Function> f } /** - * A comma-separated list of actions that should be cancelled. Leave empty to - * cancel all. + * Comma-separated list or wildcard expression of actions used to limit the + * request. *

* API name: {@code actions} */ @@ -94,9 +94,7 @@ public final List actions() { } /** - * A comma-separated list of node IDs or names to limit the returned - * information; use _local to return information from the node - * you're connecting to, leave empty to get information from all nodes + * Comma-separated list of node IDs or names used to limit the request. *

* API name: {@code nodes} */ @@ -105,8 +103,7 @@ public final List nodes() { } /** - * Cancel tasks with specified parent task id (node_id:task_number). Set to -1 - * to cancel all. + * Parent task ID used to limit the tasks. *

* API name: {@code parent_task_id} */ @@ -116,7 +113,7 @@ public final String parentTaskId() { } /** - * Cancel the task with specified task id (node_id:task_number) + * ID of the task. *

* API name: {@code task_id} */ @@ -159,8 +156,8 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private Boolean waitForCompletion; /** - * A comma-separated list of actions that should be cancelled. Leave empty to - * cancel all. + * Comma-separated list or wildcard expression of actions used to limit the + * request. *

* API name: {@code actions} *

@@ -172,8 +169,8 @@ public final Builder actions(List list) { } /** - * A comma-separated list of actions that should be cancelled. Leave empty to - * cancel all. + * Comma-separated list or wildcard expression of actions used to limit the + * request. *

* API name: {@code actions} *

@@ -185,9 +182,7 @@ public final Builder actions(String value, String... values) { } /** - * A comma-separated list of node IDs or names to limit the returned - * information; use _local to return information from the node - * you're connecting to, leave empty to get information from all nodes + * Comma-separated list of node IDs or names used to limit the request. *

* API name: {@code nodes} *

@@ -199,9 +194,7 @@ public final Builder nodes(List list) { } /** - * A comma-separated list of node IDs or names to limit the returned - * information; use _local to return information from the node - * you're connecting to, leave empty to get information from all nodes + * Comma-separated list of node IDs or names used to limit the request. *

* API name: {@code nodes} *

@@ -213,8 +206,7 @@ public final Builder nodes(String value, String... values) { } /** - * Cancel tasks with specified parent task id (node_id:task_number). Set to -1 - * to cancel all. + * Parent task ID used to limit the tasks. *

* API name: {@code parent_task_id} */ @@ -224,7 +216,7 @@ public final Builder parentTaskId(@Nullable String value) { } /** - * Cancel the task with specified task id (node_id:task_number) + * ID of the task. *

* API name: {@code task_id} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ElasticsearchTasksAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ElasticsearchTasksAsyncClient.java index 2a20f802c..2ed779cea 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ElasticsearchTasksAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ElasticsearchTasksAsyncClient.java @@ -60,7 +60,7 @@ public ElasticsearchTasksAsyncClient withTransportOptions(@Nullable TransportOpt * Cancels a task, if it can be cancelled through an API. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ @@ -78,7 +78,7 @@ public CompletableFuture cancel(CancelRequest request) { * a function that initializes a builder to create the * {@link CancelRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ @@ -91,7 +91,7 @@ public final CompletableFuture cancel( * Cancels a task, if it can be cancelled through an API. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ @@ -106,7 +106,7 @@ public CompletableFuture cancel() { * Returns information about a task. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ @@ -124,7 +124,7 @@ public CompletableFuture get(GetTasksRequest request) { * a function that initializes a builder to create the * {@link GetTasksRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ @@ -139,7 +139,7 @@ public final CompletableFuture get( * Returns a list of tasks. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ @@ -157,7 +157,7 @@ public CompletableFuture list(ListRequest request) { * a function that initializes a builder to create the * {@link ListRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ @@ -169,7 +169,7 @@ public final CompletableFuture list(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ElasticsearchTasksClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ElasticsearchTasksClient.java index e10fd7c22..1344a533f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ElasticsearchTasksClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ElasticsearchTasksClient.java @@ -60,7 +60,7 @@ public ElasticsearchTasksClient withTransportOptions(@Nullable TransportOptions * Cancels a task, if it can be cancelled through an API. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ @@ -78,7 +78,7 @@ public CancelResponse cancel(CancelRequest request) throws IOException, Elastics * a function that initializes a builder to create the * {@link CancelRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ @@ -91,7 +91,7 @@ public final CancelResponse cancel(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ @@ -106,7 +106,7 @@ public CancelResponse cancel() throws IOException, ElasticsearchException { * Returns information about a task. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ @@ -124,7 +124,7 @@ public GetTasksResponse get(GetTasksRequest request) throws IOException, Elastic * a function that initializes a builder to create the * {@link GetTasksRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ @@ -139,7 +139,7 @@ public final GetTasksResponse get(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ @@ -157,7 +157,7 @@ public ListResponse list(ListRequest request) throws IOException, ElasticsearchE * a function that initializes a builder to create the * {@link ListRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ @@ -170,7 +170,7 @@ public final ListResponse list(FunctionDocumentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/GetTasksRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/GetTasksRequest.java index 11c0556f0..325342cc3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/GetTasksRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/GetTasksRequest.java @@ -76,7 +76,7 @@ public static GetTasksRequest of(Function * API name: {@code task_id} */ @@ -85,7 +85,8 @@ public final String taskId() { } /** - * Explicit operation timeout + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. *

* API name: {@code timeout} */ @@ -95,7 +96,7 @@ public final Time timeout() { } /** - * Wait for the matching tasks to complete (default: false) + * If true, the request blocks until the task has completed. *

* API name: {@code wait_for_completion} */ @@ -120,7 +121,7 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private Boolean waitForCompletion; /** - * Required - Return the task with specified id (node_id:task_number) + * Required - ID of the task. *

* API name: {@code task_id} */ @@ -130,7 +131,8 @@ public final Builder taskId(String value) { } /** - * Explicit operation timeout + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. *

* API name: {@code timeout} */ @@ -140,7 +142,8 @@ public final Builder timeout(@Nullable Time value) { } /** - * Explicit operation timeout + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. *

* API name: {@code timeout} */ @@ -149,7 +152,7 @@ public final Builder timeout(Function> fn) { } /** - * Wait for the matching tasks to complete (default: false) + * If true, the request blocks until the task has completed. *

* API name: {@code wait_for_completion} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/TaskStatus.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/TaskStatus.java deleted file mode 100644 index b63c341f6..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/TaskStatus.java +++ /dev/null @@ -1,600 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - -package co.elastic.clients.elasticsearch.tasks; - -import co.elastic.clients.elasticsearch._types.Retries; -import co.elastic.clients.elasticsearch._types.Time; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.lang.Boolean; -import java.lang.Float; -import java.lang.Long; -import java.lang.String; -import java.util.List; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -// typedef: tasks._types.TaskStatus - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class TaskStatus implements JsonpSerializable { - private final long batches; - - @Nullable - private final String canceled; - - private final long created; - - private final long deleted; - - private final long noops; - - private final List failures; - - private final float requestsPerSecond; - - private final Retries retries; - - @Nullable - private final Time throttled; - - private final long throttledMillis; - - @Nullable - private final Time throttledUntil; - - private final long throttledUntilMillis; - - @Nullable - private final Boolean timedOut; - - @Nullable - private final Long took; - - private final long total; - - private final long updated; - - private final long versionConflicts; - - // --------------------------------------------------------------------------------------------- - - private TaskStatus(Builder builder) { - - this.batches = ApiTypeHelper.requireNonNull(builder.batches, this, "batches"); - this.canceled = builder.canceled; - this.created = ApiTypeHelper.requireNonNull(builder.created, this, "created"); - this.deleted = ApiTypeHelper.requireNonNull(builder.deleted, this, "deleted"); - this.noops = ApiTypeHelper.requireNonNull(builder.noops, this, "noops"); - this.failures = ApiTypeHelper.unmodifiable(builder.failures); - this.requestsPerSecond = ApiTypeHelper.requireNonNull(builder.requestsPerSecond, this, "requestsPerSecond"); - this.retries = ApiTypeHelper.requireNonNull(builder.retries, this, "retries"); - this.throttled = builder.throttled; - this.throttledMillis = ApiTypeHelper.requireNonNull(builder.throttledMillis, this, "throttledMillis"); - this.throttledUntil = builder.throttledUntil; - this.throttledUntilMillis = ApiTypeHelper.requireNonNull(builder.throttledUntilMillis, this, - "throttledUntilMillis"); - this.timedOut = builder.timedOut; - this.took = builder.took; - this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total"); - this.updated = ApiTypeHelper.requireNonNull(builder.updated, this, "updated"); - this.versionConflicts = ApiTypeHelper.requireNonNull(builder.versionConflicts, this, "versionConflicts"); - - } - - public static TaskStatus of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code batches} - */ - public final long batches() { - return this.batches; - } - - /** - * API name: {@code canceled} - */ - @Nullable - public final String canceled() { - return this.canceled; - } - - /** - * Required - API name: {@code created} - */ - public final long created() { - return this.created; - } - - /** - * Required - API name: {@code deleted} - */ - public final long deleted() { - return this.deleted; - } - - /** - * Required - API name: {@code noops} - */ - public final long noops() { - return this.noops; - } - - /** - * API name: {@code failures} - */ - public final List failures() { - return this.failures; - } - - /** - * Required - API name: {@code requests_per_second} - */ - public final float requestsPerSecond() { - return this.requestsPerSecond; - } - - /** - * Required - API name: {@code retries} - */ - public final Retries retries() { - return this.retries; - } - - /** - * API name: {@code throttled} - */ - @Nullable - public final Time throttled() { - return this.throttled; - } - - /** - * Required - API name: {@code throttled_millis} - */ - public final long throttledMillis() { - return this.throttledMillis; - } - - /** - * API name: {@code throttled_until} - */ - @Nullable - public final Time throttledUntil() { - return this.throttledUntil; - } - - /** - * Required - API name: {@code throttled_until_millis} - */ - public final long throttledUntilMillis() { - return this.throttledUntilMillis; - } - - /** - * API name: {@code timed_out} - */ - @Nullable - public final Boolean timedOut() { - return this.timedOut; - } - - /** - * API name: {@code took} - */ - @Nullable - public final Long took() { - return this.took; - } - - /** - * Required - API name: {@code total} - */ - public final long total() { - return this.total; - } - - /** - * Required - API name: {@code updated} - */ - public final long updated() { - return this.updated; - } - - /** - * Required - API name: {@code version_conflicts} - */ - public final long versionConflicts() { - return this.versionConflicts; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("batches"); - generator.write(this.batches); - - if (this.canceled != null) { - generator.writeKey("canceled"); - generator.write(this.canceled); - - } - generator.writeKey("created"); - generator.write(this.created); - - generator.writeKey("deleted"); - generator.write(this.deleted); - - generator.writeKey("noops"); - generator.write(this.noops); - - if (ApiTypeHelper.isDefined(this.failures)) { - generator.writeKey("failures"); - generator.writeStartArray(); - for (String item0 : this.failures) { - generator.write(item0); - - } - generator.writeEnd(); - - } - generator.writeKey("requests_per_second"); - generator.write(this.requestsPerSecond); - - generator.writeKey("retries"); - this.retries.serialize(generator, mapper); - - if (this.throttled != null) { - generator.writeKey("throttled"); - this.throttled.serialize(generator, mapper); - - } - generator.writeKey("throttled_millis"); - generator.write(this.throttledMillis); - - if (this.throttledUntil != null) { - generator.writeKey("throttled_until"); - this.throttledUntil.serialize(generator, mapper); - - } - generator.writeKey("throttled_until_millis"); - generator.write(this.throttledUntilMillis); - - if (this.timedOut != null) { - generator.writeKey("timed_out"); - generator.write(this.timedOut); - - } - if (this.took != null) { - generator.writeKey("took"); - generator.write(this.took); - - } - generator.writeKey("total"); - generator.write(this.total); - - generator.writeKey("updated"); - generator.write(this.updated); - - generator.writeKey("version_conflicts"); - generator.write(this.versionConflicts); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link TaskStatus}. - */ - - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private Long batches; - - @Nullable - private String canceled; - - private Long created; - - private Long deleted; - - private Long noops; - - @Nullable - private List failures; - - private Float requestsPerSecond; - - private Retries retries; - - @Nullable - private Time throttled; - - private Long throttledMillis; - - @Nullable - private Time throttledUntil; - - private Long throttledUntilMillis; - - @Nullable - private Boolean timedOut; - - @Nullable - private Long took; - - private Long total; - - private Long updated; - - private Long versionConflicts; - - /** - * Required - API name: {@code batches} - */ - public final Builder batches(long value) { - this.batches = value; - return this; - } - - /** - * API name: {@code canceled} - */ - public final Builder canceled(@Nullable String value) { - this.canceled = value; - return this; - } - - /** - * Required - API name: {@code created} - */ - public final Builder created(long value) { - this.created = value; - return this; - } - - /** - * Required - API name: {@code deleted} - */ - public final Builder deleted(long value) { - this.deleted = value; - return this; - } - - /** - * Required - API name: {@code noops} - */ - public final Builder noops(long value) { - this.noops = value; - return this; - } - - /** - * API name: {@code failures} - *

- * Adds all elements of list to failures. - */ - public final Builder failures(List list) { - this.failures = _listAddAll(this.failures, list); - return this; - } - - /** - * API name: {@code failures} - *

- * Adds one or more values to failures. - */ - public final Builder failures(String value, String... values) { - this.failures = _listAdd(this.failures, value, values); - return this; - } - - /** - * Required - API name: {@code requests_per_second} - */ - public final Builder requestsPerSecond(float value) { - this.requestsPerSecond = value; - return this; - } - - /** - * Required - API name: {@code retries} - */ - public final Builder retries(Retries value) { - this.retries = value; - return this; - } - - /** - * Required - API name: {@code retries} - */ - public final Builder retries(Function> fn) { - return this.retries(fn.apply(new Retries.Builder()).build()); - } - - /** - * API name: {@code throttled} - */ - public final Builder throttled(@Nullable Time value) { - this.throttled = value; - return this; - } - - /** - * API name: {@code throttled} - */ - public final Builder throttled(Function> fn) { - return this.throttled(fn.apply(new Time.Builder()).build()); - } - - /** - * Required - API name: {@code throttled_millis} - */ - public final Builder throttledMillis(long value) { - this.throttledMillis = value; - return this; - } - - /** - * API name: {@code throttled_until} - */ - public final Builder throttledUntil(@Nullable Time value) { - this.throttledUntil = value; - return this; - } - - /** - * API name: {@code throttled_until} - */ - public final Builder throttledUntil(Function> fn) { - return this.throttledUntil(fn.apply(new Time.Builder()).build()); - } - - /** - * Required - API name: {@code throttled_until_millis} - */ - public final Builder throttledUntilMillis(long value) { - this.throttledUntilMillis = value; - return this; - } - - /** - * API name: {@code timed_out} - */ - public final Builder timedOut(@Nullable Boolean value) { - this.timedOut = value; - return this; - } - - /** - * API name: {@code took} - */ - public final Builder took(@Nullable Long value) { - this.took = value; - return this; - } - - /** - * Required - API name: {@code total} - */ - public final Builder total(long value) { - this.total = value; - return this; - } - - /** - * Required - API name: {@code updated} - */ - public final Builder updated(long value) { - this.updated = value; - return this; - } - - /** - * Required - API name: {@code version_conflicts} - */ - public final Builder versionConflicts(long value) { - this.versionConflicts = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link TaskStatus}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public TaskStatus build() { - _checkSingleUse(); - - return new TaskStatus(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link TaskStatus} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - TaskStatus::setupTaskStatusDeserializer); - - protected static void setupTaskStatusDeserializer(ObjectDeserializer op) { - - op.add(Builder::batches, JsonpDeserializer.longDeserializer(), "batches"); - op.add(Builder::canceled, JsonpDeserializer.stringDeserializer(), "canceled"); - op.add(Builder::created, JsonpDeserializer.longDeserializer(), "created"); - op.add(Builder::deleted, JsonpDeserializer.longDeserializer(), "deleted"); - op.add(Builder::noops, JsonpDeserializer.longDeserializer(), "noops"); - op.add(Builder::failures, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), - "failures"); - op.add(Builder::requestsPerSecond, JsonpDeserializer.floatDeserializer(), "requests_per_second"); - op.add(Builder::retries, Retries._DESERIALIZER, "retries"); - op.add(Builder::throttled, Time._DESERIALIZER, "throttled"); - op.add(Builder::throttledMillis, JsonpDeserializer.longDeserializer(), "throttled_millis"); - op.add(Builder::throttledUntil, Time._DESERIALIZER, "throttled_until"); - op.add(Builder::throttledUntilMillis, JsonpDeserializer.longDeserializer(), "throttled_until_millis"); - op.add(Builder::timedOut, JsonpDeserializer.booleanDeserializer(), "timed_out"); - op.add(Builder::took, JsonpDeserializer.longDeserializer(), "took"); - op.add(Builder::total, JsonpDeserializer.longDeserializer(), "total"); - op.add(Builder::updated, JsonpDeserializer.longDeserializer(), "updated"); - op.add(Builder::versionConflicts, JsonpDeserializer.longDeserializer(), "version_conflicts"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/DeleteTransformRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/DeleteTransformRequest.java index 5ce014a31..544168e10 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/DeleteTransformRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/DeleteTransformRequest.java @@ -54,6 +54,9 @@ */ public class DeleteTransformRequest extends RequestBase { + @Nullable + private final Boolean deleteDestIndex; + @Nullable private final Boolean force; @@ -66,6 +69,7 @@ public class DeleteTransformRequest extends RequestBase { private DeleteTransformRequest(Builder builder) { + this.deleteDestIndex = builder.deleteDestIndex; this.force = builder.force; this.timeout = builder.timeout; this.transformId = ApiTypeHelper.requireNonNull(builder.transformId, this, "transformId"); @@ -76,6 +80,17 @@ public static DeleteTransformRequest of(Function + * API name: {@code delete_dest_index} + */ + @Nullable + public final Boolean deleteDestIndex() { + return this.deleteDestIndex; + } + /** * If this value is false, the transform must be stopped before it can be * deleted. If true, the transform is deleted regardless of its current state. @@ -116,6 +131,9 @@ public final String transformId() { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Boolean deleteDestIndex; + @Nullable private Boolean force; @@ -124,6 +142,17 @@ public static class Builder extends RequestBase.AbstractBuilder private String transformId; + /** + * If this value is true, the destination index is deleted together with the + * transform. If false, the destination index will not be deleted + *

+ * API name: {@code delete_dest_index} + */ + public final Builder deleteDestIndex(@Nullable Boolean value) { + this.deleteDestIndex = value; + return this; + } + /** * If this value is false, the transform must be stopped before it can be * deleted. If true, the transform is deleted regardless of its current state. @@ -235,6 +264,9 @@ public DeleteTransformRequest build() { // Request parameters request -> { Map params = new HashMap<>(); + if (request.deleteDestIndex != null) { + params.put("delete_dest_index", String.valueOf(request.deleteDestIndex)); + } if (request.force != null) { params.put("force", String.valueOf(request.force)); } diff --git a/java-client/src/test/java/co/elastic/clients/elasticsearch/ElasticsearchTestServer.java b/java-client/src/test/java/co/elastic/clients/elasticsearch/ElasticsearchTestServer.java index 037fc028d..d25cb49e0 100644 --- a/java-client/src/test/java/co/elastic/clients/elasticsearch/ElasticsearchTestServer.java +++ b/java-client/src/test/java/co/elastic/clients/elasticsearch/ElasticsearchTestServer.java @@ -29,6 +29,7 @@ import co.elastic.clients.transport.Version; import co.elastic.clients.transport.endpoints.DelegatingJsonEndpoint; import co.elastic.clients.transport.rest_client.RestClientTransport; +import org.apache.commons.io.IOUtils; import org.apache.http.HttpHost; import org.apache.http.auth.AuthScope; import org.apache.http.auth.UsernamePasswordCredentials; @@ -40,6 +41,9 @@ import javax.net.ssl.SSLContext; import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.nio.charset.StandardCharsets; import java.time.Duration; public class ElasticsearchTestServer implements AutoCloseable { @@ -55,9 +59,14 @@ public class ElasticsearchTestServer implements AutoCloseable { public static synchronized ElasticsearchTestServer global() { if (global == null) { - System.out.println("Starting global ES test server."); - global = new ElasticsearchTestServer(); - global.start(); + global = tryLocalServer(); + + if (global == null) { + System.out.println("Starting global ES test server."); + global = new ElasticsearchTestServer(); + global.start(); + } + Runtime.getRuntime().addShutdownHook(new Thread(() -> { System.out.println("Stopping global ES test server."); global.close(); @@ -70,6 +79,31 @@ public ElasticsearchTestServer(String... plugins) { this.plugins = plugins; } + /** + * Try contacting an Elasticsearch server running on http://localhost:9200 and use it if available + */ + private static ElasticsearchTestServer tryLocalServer() { + + try { + String url = "http://localhost:9200"; + try (InputStream in = new URL(url).openConnection().getInputStream()) { + if (!IOUtils.toString(in, StandardCharsets.UTF_8).contains("You Know, for Search")) { + return null; + } + } + + ElasticsearchTestServer localServer = new ElasticsearchTestServer(); + localServer.restClient = RestClient.builder(HttpHost.create(url)).build(); + localServer.transport = new RestClientTransport(localServer.restClient, localServer.mapper); + localServer.client = new ElasticsearchClient(localServer.transport); + System.out.println("Using locally running Elasticsearch server as global ES test server."); + return localServer; + + } catch (Exception e) { + return null; + } + } + public synchronized ElasticsearchTestServer start() { Version version = Version.VERSION.major() < 8 ? new Version(7,17,5,false) : new Version(8,3,3,false); diff --git a/java-client/src/test/java/co/elastic/clients/elasticsearch/model/UnionTests.java b/java-client/src/test/java/co/elastic/clients/elasticsearch/model/UnionTests.java index 71807dd73..1e1b299b9 100644 --- a/java-client/src/test/java/co/elastic/clients/elasticsearch/model/UnionTests.java +++ b/java-client/src/test/java/co/elastic/clients/elasticsearch/model/UnionTests.java @@ -23,8 +23,6 @@ import co.elastic.clients.elasticsearch._types.aggregations.Aggregate; import co.elastic.clients.elasticsearch._types.mapping.Property; import co.elastic.clients.elasticsearch._types.query_dsl.Query; -import co.elastic.clients.elasticsearch._types.query_dsl.SimpleQueryStringFlag; -import co.elastic.clients.elasticsearch._types.query_dsl.SimpleQueryStringFlags; import co.elastic.clients.elasticsearch.core.SearchResponse; import co.elastic.clients.testkit.ModelTestCase; import jakarta.json.Json; @@ -66,19 +64,6 @@ public void testScriptDeserializer() { } } - @Test - public void testSimpleQueryStringFlag() { - // Ambiguous union on strings - - SimpleQueryStringFlags f; - - f= fromJson("\"OR\"", SimpleQueryStringFlags.class); - assertEquals(SimpleQueryStringFlag.Or, f.single()); - - f = fromJson("\"OR|AND\"", SimpleQueryStringFlags.class); - assertEquals("OR|AND", f.multiple()); - } - @Test public void testOpenContainer() { String json = "{\"foo\":{\"bar\":42}}";