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 2d5fe918ef..a6bbc122f8 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
@@ -383,10 +383,11 @@ public ElasticsearchXpackAsyncClient xpack() {
// ----- Endpoint: bulk
/**
- * Bulk index or delete documents. Perform multiple index,
- * create, delete, and update actions in
- * a single request. This reduces overhead and can greatly increase indexing
- * speed.
+ * Bulk index or delete documents.
+ *
+ * Perform multiple index, create,
+ * delete, and update actions in a single request.
+ * This reduces overhead and can greatly increase indexing speed.
*
* If the Elasticsearch security features are enabled, you must have the
* following index privileges for the target data stream, index, or index alias:
@@ -483,6 +484,8 @@ public ElasticsearchXpackAsyncClient xpack() {
* Search::Elasticsearch::Client::5_0::Scroll
*
elasticsearch.helpers.*client.helpers.*co.elastic.clients.elasticsearch._helpers.bulk.BulkIngesterBulkAllObservableElasticsearch::Helpers::BulkHelperindex,
- * create, delete, and update actions in
- * a single request. This reduces overhead and can greatly increase indexing
- * speed.
+ * Bulk index or delete documents.
+ *
+ * Perform multiple index, create,
+ * delete, and update actions in a single request.
+ * This reduces overhead and can greatly increase indexing speed.
*
* If the Elasticsearch security features are enabled, you must have the
* following index privileges for the target data stream, index, or index alias:
@@ -662,6 +666,8 @@ public CompletableFuture
+ * Perform multiple
* If the Elasticsearch security features are enabled, you must have the
* following index privileges for the target data stream, index, or index alias:
@@ -841,6 +848,8 @@ public final CompletableFuture
+ * Clear the search context and results for a scrolling search.
*
* @see Documentation
@@ -936,8 +946,9 @@ public CompletableFuture
+ * Clear the search context and results for a scrolling search.
*
* @param fn
* a function that initializes a builder to create the
@@ -953,8 +964,9 @@ public final CompletableFuture
+ * Clear the search context and results for a scrolling search.
*
* @see Documentation
@@ -969,12 +981,14 @@ public CompletableFuture
+ * A point in time must be opened explicitly before being used in search
+ * requests. The
+ * A point in time must be opened explicitly before being used in search
+ * requests. The
+ * Get the number of documents matching a query.
*
* The query can be provided either by using a simple query string as a
* parameter, or by defining Query DSL within the request body. The query is
@@ -1039,7 +1057,9 @@ public CompletableFuture
+ * Get the number of documents matching a query.
*
* The query can be provided either by using a simple query string as a
* parameter, or by defining Query DSL within the request body. The query is
@@ -1067,7 +1087,9 @@ public final CompletableFuture
+ * Get the number of documents matching a query.
*
* The query can be provided either by using a simple query string as a
* parameter, or by defining Query DSL within the request body. The query is
@@ -1839,8 +1861,9 @@ public final CompletableFuture
+ * Deletes a stored script or search template.
*
* @see Documentation
@@ -1855,8 +1878,9 @@ public CompletableFuture
+ * Deletes a stored script or search template.
*
* @param fn
* a function that initializes a builder to create the
@@ -2002,9 +2026,10 @@ public final CompletableFuture
+ * Get information about why a specific document matches, or doesn't match, a
+ * query. It computes a score explanation for a query and a specific document.
*
* @see Documentation
@@ -2022,9 +2047,10 @@ public
+ * Get information about why a specific document matches, or doesn't match, a
+ * query. It computes a score explanation for a query and a specific document.
*
* @param fn
* a function that initializes a builder to create the
@@ -2061,9 +2087,10 @@ public final CompletableFuture
+ * Get information about why a specific document matches, or doesn't match, a
+ * query. It computes a score explanation for a query and a specific document.
*
* @see Documentation
@@ -2081,9 +2108,10 @@ public
+ * Get information about why a specific document matches, or doesn't match, a
+ * query. It computes a score explanation for a query and a specific document.
*
* @param fn
* a function that initializes a builder to create the
@@ -2541,8 +2569,9 @@ public final
+ * Retrieves a stored script or search template.
*
* @see Documentation
@@ -2557,8 +2586,9 @@ public CompletableFuture
+ * Retrieves a stored script or search template.
*
* @param fn
* a function that initializes a builder to create the
@@ -2761,9 +2791,10 @@ public final
+ * Get a report with the health status of an Elasticsearch cluster. The report
+ * contains a list of indicators that compose Elasticsearch functionality.
*
* Each indicator has a health status of: green, unknown, yellow or red. The
* indicator will provide an explanation and metadata describing the reason for
@@ -2803,9 +2834,10 @@ public CompletableFuture
+ * Get a report with the health status of an Elasticsearch cluster. The report
+ * contains a list of indicators that compose Elasticsearch functionality.
*
* Each indicator has a health status of: green, unknown, yellow or red. The
* indicator will provide an explanation and metadata describing the reason for
@@ -2846,9 +2878,10 @@ public final CompletableFuture
+ * Get a report with the health status of an Elasticsearch cluster. The report
+ * contains a list of indicators that compose Elasticsearch functionality.
*
* Each indicator has a health status of: green, unknown, yellow or red. The
* indicator will provide an explanation and metadata describing the reason for
@@ -3069,15 +3102,21 @@ public CompletableFuture
+ * In this example, the operation will succeed since the supplied version of 2
+ * is higher than the current document version of 1. If the document was already
+ * updated and its version was set to 2 or higher, the indexing command will
+ * fail and result in a conflict (409 HTTP status code).
+ *
+ * A nice side effect is that there is no need to maintain strict ordering of
+ * async indexing operations run as a result of changes to a source database, as
+ * long as version numbers from the source database are used. Even the simple
+ * case of updating the Elasticsearch index using data from a database is
+ * simplified if external versioning is used, as only the latest version will be
+ * used if the index operations arrive out of order.
+ *
* @see Documentation
* on elastic.co
@@ -3272,15 +3311,21 @@ public
+ * In this example, the operation will succeed since the supplied version of 2
+ * is higher than the current document version of 1. If the document was already
+ * updated and its version was set to 2 or higher, the indexing command will
+ * fail and result in a conflict (409 HTTP status code).
+ *
+ * A nice side effect is that there is no need to maintain strict ordering of
+ * async indexing operations run as a result of changes to a source database, as
+ * long as version numbers from the source database are used. Even the simple
+ * case of updating the Elasticsearch index using data from a database is
+ * simplified if external versioning is used, as only the latest version will be
+ * used if the index operations arrive out of order.
+ *
* @param fn
* a function that initializes a builder to create the
* {@link IndexRequest}
@@ -3297,9 +3342,11 @@ public final
+ * Get basic build, version, and cluster information. ::: In Serverless, this
+ * API is retained for backward compatibility only. Some response fields, such
+ * as the version number, should be ignored.
*
* @see Documentation
@@ -4048,7 +4095,9 @@ public final CompletableFuture
+ * Get information about whether the cluster is running.
*
* @see Documentation
@@ -4061,8 +4110,9 @@ public CompletableFuture
+ * Creates or updates a stored script or search template.
*
* @see Documentation
@@ -4077,8 +4127,9 @@ public CompletableFuture
+ * Creates or updates a stored script or search template.
*
* @param fn
* a function that initializes a builder to create the
@@ -4165,9 +4216,13 @@ public final CompletableFuture
- * If reindexing from a remote cluster, you must explicitly allow the remote
- * host in the
* The
- * If reindexing from a remote cluster, you must explicitly allow the remote
- * host in the
* The
* If the Elasticsearch security features are enabled, you must have the
* following index privileges for the target data stream, index, or alias:
@@ -6301,10 +6361,11 @@ public CompletableFuture
+ * 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.
*
* If the Elasticsearch security features are enabled, you must have the
* following index privileges for the target data stream, index, or alias:
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 fa0bc36ac5..ee5860cd36 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
@@ -383,10 +383,11 @@ public ElasticsearchXpackClient xpack() {
// ----- Endpoint: bulk
/**
- * Bulk index or delete documents. Perform multiple
+ * Perform multiple
* If the Elasticsearch security features are enabled, you must have the
* following index privileges for the target data stream, index, or index alias:
@@ -483,6 +484,8 @@ public ElasticsearchXpackClient xpack() {
*
+ * Perform multiple
* If the Elasticsearch security features are enabled, you must have the
* following index privileges for the target data stream, index, or index alias:
@@ -662,6 +666,8 @@ public BulkResponse bulk(BulkRequest request) throws IOException, ElasticsearchE
*
+ * Perform multiple
* If the Elasticsearch security features are enabled, you must have the
* following index privileges for the target data stream, index, or index alias:
@@ -842,6 +849,8 @@ public final BulkResponse bulk(Function
+ * Clear the search context and results for a scrolling search.
*
* @see Documentation
@@ -937,8 +947,9 @@ public ClearScrollResponse clearScroll(ClearScrollRequest request) throws IOExce
}
/**
- * Clear a scrolling search. Clear the search context and results for a
- * scrolling search.
+ * Clear a scrolling search.
+ *
+ * Clear the search context and results for a scrolling search.
*
* @param fn
* a function that initializes a builder to create the
@@ -955,8 +966,9 @@ public final ClearScrollResponse clearScroll(
}
/**
- * Clear a scrolling search. Clear the search context and results for a
- * scrolling search.
+ * Clear a scrolling search.
+ *
+ * Clear the search context and results for a scrolling search.
*
* @see Documentation
@@ -971,12 +983,14 @@ public ClearScrollResponse clearScroll() throws IOException, ElasticsearchExcept
// ----- Endpoint: close_point_in_time
/**
- * Close a point in time. A point in time must be opened explicitly before being
- * used in search requests. The
+ * A point in time must be opened explicitly before being used in search
+ * requests. The
+ * A point in time must be opened explicitly before being used in search
+ * requests. The
+ * Get the number of documents matching a query.
*
* The query can be provided either by using a simple query string as a
* parameter, or by defining Query DSL within the request body. The query is
@@ -1043,7 +1061,9 @@ public CountResponse count(CountRequest request) throws IOException, Elasticsear
}
/**
- * Count search results. Get the number of documents matching a query.
+ * Count search results.
+ *
+ * Get the number of documents matching a query.
*
* The query can be provided either by using a simple query string as a
* parameter, or by defining Query DSL within the request body. The query is
@@ -1071,7 +1091,9 @@ public final CountResponse count(Function
* The query can be provided either by using a simple query string as a
* parameter, or by defining Query DSL within the request body. The query is
@@ -1848,8 +1870,9 @@ public final DeleteByQueryRethrottleResponse deleteByQueryRethrottle(
// ----- Endpoint: delete_script
/**
- * Delete a script or search template. Deletes a stored script or search
- * template.
+ * Delete a script or search template.
+ *
+ * Deletes a stored script or search template.
*
* @see Documentation
@@ -1864,8 +1887,9 @@ public DeleteScriptResponse deleteScript(DeleteScriptRequest request) throws IOE
}
/**
- * Delete a script or search template. Deletes a stored script or search
- * template.
+ * Delete a script or search template.
+ *
+ * Deletes a stored script or search template.
*
* @param fn
* a function that initializes a builder to create the
@@ -2013,9 +2037,10 @@ public final BooleanResponse existsSource(
// ----- Endpoint: explain
/**
- * Explain a document match result. Get information about why a specific
- * document matches, or doesn't match, a query. It computes a score explanation
- * for a query and a specific document.
+ * Explain a document match result.
+ *
+ * Get information about why a specific document matches, or doesn't match, a
+ * query. It computes a score explanation for a query and a specific document.
*
* @see Documentation
@@ -2033,9 +2058,10 @@ public
+ * Get information about why a specific document matches, or doesn't match, a
+ * query. It computes a score explanation for a query and a specific document.
*
* @param fn
* a function that initializes a builder to create the
@@ -2073,9 +2099,10 @@ public final ExplainResponse
+ * Get information about why a specific document matches, or doesn't match, a
+ * query. It computes a score explanation for a query and a specific document.
*
* @param fn
* a function that initializes a builder to create the
@@ -2556,8 +2584,9 @@ public final
+ * Retrieves a stored script or search template.
*
* @param fn
* a function that initializes a builder to create the
@@ -2779,9 +2809,10 @@ public final
+ * Get a report with the health status of an Elasticsearch cluster. The report
+ * contains a list of indicators that compose Elasticsearch functionality.
*
* Each indicator has a health status of: green, unknown, yellow or red. The
* indicator will provide an explanation and metadata describing the reason for
@@ -2821,9 +2852,10 @@ public HealthReportResponse healthReport(HealthReportRequest request) throws IOE
}
/**
- * Get the cluster health. Get a report with the health status of an
- * Elasticsearch cluster. The report contains a list of indicators that compose
- * Elasticsearch functionality.
+ * Get the cluster health.
+ *
+ * Get a report with the health status of an Elasticsearch cluster. The report
+ * contains a list of indicators that compose Elasticsearch functionality.
*
* Each indicator has a health status of: green, unknown, yellow or red. The
* indicator will provide an explanation and metadata describing the reason for
@@ -2865,9 +2897,10 @@ public final HealthReportResponse healthReport(
}
/**
- * Get the cluster health. Get a report with the health status of an
- * Elasticsearch cluster. The report contains a list of indicators that compose
- * Elasticsearch functionality.
+ * Get the cluster health.
+ *
+ * Get a report with the health status of an Elasticsearch cluster. The report
+ * contains a list of indicators that compose Elasticsearch functionality.
*
* Each indicator has a health status of: green, unknown, yellow or red. The
* indicator will provide an explanation and metadata describing the reason for
@@ -3088,15 +3121,21 @@ public HealthReportResponse healthReport() throws IOException, ElasticsearchExce
* "id": "elkbee"
* }
* }
- *
- * In this example, the operation will succeed since the supplied version of 2 is higher than the current document version of 1.
- * If the document was already updated and its version was set to 2 or higher, the indexing command will fail and result in a conflict (409 HTTP status code).
- *
- * A nice side effect is that there is no need to maintain strict ordering of async indexing operations run as a result of changes to a source database, as long as version numbers from the source database are used.
- * Even the simple case of updating the Elasticsearch index using data from a database is simplified if external versioning is used, as only the latest version will be used if the index operations arrive out of order.
*
*
- *
+ *
+ * In this example, the operation will succeed since the supplied version of 2
+ * is higher than the current document version of 1. If the document was already
+ * updated and its version was set to 2 or higher, the indexing command will
+ * fail and result in a conflict (409 HTTP status code).
+ *
+ * A nice side effect is that there is no need to maintain strict ordering of
+ * async indexing operations run as a result of changes to a source database, as
+ * long as version numbers from the source database are used. Even the simple
+ * case of updating the Elasticsearch index using data from a database is
+ * simplified if external versioning is used, as only the latest version will be
+ * used if the index operations arrive out of order.
+ *
* @see Documentation
* on elastic.co
@@ -3291,15 +3330,21 @@ public
+ * In this example, the operation will succeed since the supplied version of 2
+ * is higher than the current document version of 1. If the document was already
+ * updated and its version was set to 2 or higher, the indexing command will
+ * fail and result in a conflict (409 HTTP status code).
+ *
+ * A nice side effect is that there is no need to maintain strict ordering of
+ * async indexing operations run as a result of changes to a source database, as
+ * long as version numbers from the source database are used. Even the simple
+ * case of updating the Elasticsearch index using data from a database is
+ * simplified if external versioning is used, as only the latest version will be
+ * used if the index operations arrive out of order.
+ *
* @param fn
* a function that initializes a builder to create the
* {@link IndexRequest}
@@ -3317,9 +3362,11 @@ public final
+ * Get basic build, version, and cluster information. ::: In Serverless, this
+ * API is retained for backward compatibility only. Some response fields, such
+ * as the version number, should be ignored.
*
* @see Documentation
@@ -4077,7 +4124,9 @@ public final OpenPointInTimeResponse openPointInTime(
// ----- Endpoint: ping
/**
- * Ping the cluster. Get information about whether the cluster is running.
+ * Ping the cluster.
+ *
+ * Get information about whether the cluster is running.
*
* @see Documentation
@@ -4090,8 +4139,9 @@ public BooleanResponse ping() throws IOException, ElasticsearchException {
// ----- Endpoint: put_script
/**
- * Create or update a script or search template. Creates or updates a stored
- * script or search template.
+ * Create or update a script or search template.
+ *
+ * Creates or updates a stored script or search template.
*
* @see Documentation
@@ -4106,8 +4156,9 @@ public PutScriptResponse putScript(PutScriptRequest request) throws IOException,
}
/**
- * Create or update a script or search template. Creates or updates a stored
- * script or search template.
+ * Create or update a script or search template.
+ *
+ * Creates or updates a stored script or search template.
*
* @param fn
* a function that initializes a builder to create the
@@ -4194,9 +4245,13 @@ public final RankEvalResponse rankEval(Function
- * If reindexing from a remote cluster, you must explicitly allow the remote
- * host in the
* The
- * If reindexing from a remote cluster, you must explicitly allow the remote
- * host in the
* The
+ * 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.
*
* If the Elasticsearch security features are enabled, you must have the
* following index privileges for the target data stream, index, or alias:
@@ -6351,10 +6411,11 @@ public UpdateByQueryResponse updateByQuery(UpdateByQueryRequest request)
}
/**
- * Update documents. 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.
+ * Update documents.
+ *
+ * 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.
*
* If the Elasticsearch security features are enabled, you must have the
* following index privileges for the target data stream, index, or alias:
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_helpers/bulk/IngesterOperation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_helpers/bulk/IngesterOperation.java
index b8cd7ac2c1..5467cc1124 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_helpers/bulk/IngesterOperation.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_helpers/bulk/IngesterOperation.java
@@ -30,6 +30,7 @@
import co.elastic.clients.util.BinaryData;
import javax.annotation.Nullable;
+import java.util.List;
/**
* A bulk operation whose size has been calculated and content turned to a binary blob (to compute its size).
@@ -212,6 +213,23 @@ private static int size(String name, @Nullable JsonEnum value) {
}
}
+ private static int size(String name, @Nullable List
@@ -188,6 +195,12 @@ public ChunkRescorer build() {
}
}
+ /**
+ * @return New {@link Builder} initialized with field values of this instance
+ */
+ public Builder rebuild() {
+ return new Builder(this);
+ }
// ---------------------------------------------------------------------------------------------
/**
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
index ae618f3530..c3fffa049e 100644
--- 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
@@ -206,6 +206,17 @@ public static class Builder extends WithJsonObjectBuilderBase
+ * API name: {@code type}
+ */
+ public final DiversifyRetrieverTypes type() {
+ return this.type;
+ }
+
+ /**
+ * Required - The document field on which to diversify results on.
+ *
+ * API name: {@code field}
+ */
+ public final String field() {
+ return this.field;
+ }
+
+ /**
+ * Required - The nested retriever whose results will be diversified.
+ *
+ * API name: {@code retriever}
+ */
+ public final Retriever retriever() {
+ return this.retriever;
+ }
+
+ /**
+ * The number of top documents to return after diversification.
+ *
+ * API name: {@code size}
+ */
+ @Nullable
+ public final Integer size() {
+ return this.size;
+ }
+
+ /**
+ * The number of top documents from the nested retriever to consider for
+ * diversification.
+ *
+ * API name: {@code rank_window_size}
+ */
+ @Nullable
+ public final Integer rankWindowSize() {
+ return this.rankWindowSize;
+ }
+
+ /**
+ * The query vector used for diversification.
+ *
+ * API name: {@code query_vector}
+ */
+ public final List
+ * API name: {@code query_vector_builder}
+ */
+ @Nullable
+ public final QueryVectorBuilder queryVectorBuilder() {
+ return this.queryVectorBuilder;
+ }
+
+ /**
+ * Controls the trade-off between relevance and diversity for MMR. A value of
+ * 0.0 focuses solely on diversity, while a value of 1.0 focuses solely on
+ * relevance. Required for MMR
+ *
+ * API name: {@code lambda}
+ */
+ @Nullable
+ public final Float lambda() {
+ return this.lambda;
+ }
+
+ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
+
+ super.serializeInternal(generator, mapper);
+ generator.writeKey("type");
+ this.type.serialize(generator, mapper);
+ generator.writeKey("field");
+ generator.write(this.field);
+
+ generator.writeKey("retriever");
+ this.retriever.serialize(generator, mapper);
+
+ if (this.size != null) {
+ generator.writeKey("size");
+ generator.write(this.size);
+
+ }
+ if (this.rankWindowSize != null) {
+ generator.writeKey("rank_window_size");
+ generator.write(this.rankWindowSize);
+
+ }
+ if (ApiTypeHelper.isDefined(this.queryVector)) {
+ generator.writeKey("query_vector");
+ generator.writeStartArray();
+ for (Float item0 : this.queryVector) {
+ generator.write(item0);
+
+ }
+ generator.writeEnd();
+
+ }
+ if (this.queryVectorBuilder != null) {
+ generator.writeKey("query_vector_builder");
+ this.queryVectorBuilder.serialize(generator, mapper);
+
+ }
+ if (this.lambda != null) {
+ generator.writeKey("lambda");
+ generator.write(this.lambda);
+
+ }
+
+ }
+
+ // ---------------------------------------------------------------------------------------------
+
+ /**
+ * Builder for {@link DiversifyRetriever}.
+ */
+
+ public static class Builder extends RetrieverBase.AbstractBuilder
+ * API name: {@code type}
+ */
+ public final Builder type(DiversifyRetrieverTypes value) {
+ this.type = value;
+ return this;
+ }
+
+ /**
+ * Required - The document field on which to diversify results on.
+ *
+ * API name: {@code field}
+ */
+ public final Builder field(String value) {
+ this.field = value;
+ return this;
+ }
+
+ /**
+ * Required - The nested retriever whose results will be diversified.
+ *
+ * API name: {@code retriever}
+ */
+ public final Builder retriever(Retriever value) {
+ this.retriever = value;
+ return this;
+ }
+
+ /**
+ * Required - The nested retriever whose results will be diversified.
+ *
+ * API name: {@code retriever}
+ */
+ public final Builder retriever(Function
+ * API name: {@code retriever}
+ */
+ public final Builder retriever(RetrieverVariant value) {
+ this.retriever = value._toRetriever();
+ return this;
+ }
+
+ /**
+ * The number of top documents to return after diversification.
+ *
+ * API name: {@code size}
+ */
+ public final Builder size(@Nullable Integer value) {
+ this.size = value;
+ return this;
+ }
+
+ /**
+ * The number of top documents from the nested retriever to consider for
+ * diversification.
+ *
+ * API name: {@code rank_window_size}
+ */
+ public final Builder rankWindowSize(@Nullable Integer value) {
+ this.rankWindowSize = value;
+ return this;
+ }
+
+ /**
+ * The query vector used for diversification.
+ *
+ * API name: {@code query_vector}
+ *
+ * Adds all elements of
+ * API name: {@code query_vector}
+ *
+ * Adds one or more values to
+ * API name: {@code query_vector_builder}
+ */
+ public final Builder queryVectorBuilder(@Nullable QueryVectorBuilder value) {
+ this.queryVectorBuilder = value;
+ return this;
+ }
+
+ /**
+ * a dense vector query vector builder to use instead of a static query_vector
+ *
+ * API name: {@code query_vector_builder}
+ */
+ public final Builder queryVectorBuilder(
+ Function
+ * API name: {@code query_vector_builder}
+ */
+ public final Builder queryVectorBuilder(QueryVectorBuilderVariant value) {
+ this.queryVectorBuilder = value._toQueryVectorBuilder();
+ return this;
+ }
+
+ /**
+ * Controls the trade-off between relevance and diversity for MMR. A value of
+ * 0.0 focuses solely on diversity, while a value of 1.0 focuses solely on
+ * relevance. Required for MMR
+ *
+ * API name: {@code lambda}
+ */
+ public final Builder lambda(@Nullable Float value) {
+ this.lambda = value;
+ return this;
+ }
+
+ @Override
+ protected Builder self() {
+ return this;
+ }
+
+ /**
+ * Builds a {@link DiversifyRetriever}.
+ *
+ * @throws NullPointerException
+ * if some of the required fields are null.
+ */
+ public DiversifyRetriever build() {
+ _checkSingleUse();
+
+ return new DiversifyRetriever(this);
+ }
+ }
+
+ /**
+ * @return New {@link Builder} initialized with field values of this instance
+ */
+ public Builder rebuild() {
+ return new Builder(this);
+ }
+ // ---------------------------------------------------------------------------------------------
+
+ /**
+ * Json deserializer for {@link DiversifyRetriever}
+ */
+ public static final JsonpDeserializer
@@ -381,6 +395,12 @@ public ElasticsearchVersionInfo build() {
}
}
+ /**
+ * @return New {@link Builder} initialized with field values of this instance
+ */
+ public Builder rebuild() {
+ return new Builder(this);
+ }
// ---------------------------------------------------------------------------------------------
/**
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ElasticsearchVersionMinInfo.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ElasticsearchVersionMinInfo.java
index 8b4f7ece47..90f2d515fb 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ElasticsearchVersionMinInfo.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ElasticsearchVersionMinInfo.java
@@ -161,6 +161,15 @@ public static class Builder extends WithJsonObjectBuilderBase
@@ -398,6 +409,12 @@ public ErrorCause build() {
}
}
+ /**
+ * @return New {@link Builder} initialized with field values of this instance
+ */
+ public Builder rebuild() {
+ return new Builder(this);
+ }
// ---------------------------------------------------------------------------------------------
/**
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ErrorResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ErrorResponse.java
index 64d6a8e68b..36be6cdd19 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ErrorResponse.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ErrorResponse.java
@@ -127,6 +127,13 @@ public static class Builder extends WithJsonObjectBuilderBase
@@ -199,6 +206,12 @@ public GeoLine build() {
}
}
+ /**
+ * @return New {@link Builder} initialized with field values of this instance
+ */
+ public Builder rebuild() {
+ return new Builder(this);
+ }
// ---------------------------------------------------------------------------------------------
/**
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GetStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GetStats.java
index f286105007..bba8341dc0 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GetStats.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GetStats.java
@@ -262,6 +262,21 @@ public static class Builder extends WithJsonObjectBuilderBase
@@ -319,9 +334,21 @@ public final Builder
+ * Adds all elements of
+ * Adds one or more values to
+ * API name: {@code visit_percentage}
+ */
+ @Nullable
+ public final Float visitPercentage() {
+ return this.visitPercentage;
+ }
+
/**
* The final number of nearest neighbors to return as top hits
*
@@ -214,6 +229,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.writeKey("num_candidates");
generator.write(this.numCandidates);
+ }
+ if (this.visitPercentage != null) {
+ generator.writeKey("visit_percentage");
+ generator.write(this.visitPercentage);
+
}
if (this.k != null) {
generator.writeKey("k");
@@ -261,6 +281,9 @@ public static class Builder extends QueryBase.AbstractBuilder
@@ -350,6 +387,17 @@ public final Builder numCandidates(@Nullable Integer value) {
return this;
}
+ /**
+ * The percentage of vectors to explore per shard while doing knn search with
+ * bbq_disk
+ *
+ * API name: {@code visit_percentage}
+ */
+ public final Builder visitPercentage(@Nullable Float value) {
+ this.visitPercentage = value;
+ return this;
+ }
+
/**
* The final number of nearest neighbors to return as top hits
*
@@ -457,6 +505,12 @@ public KnnQuery build() {
}
}
+ /**
+ * @return New {@link Builder} initialized with field values of this instance
+ */
+ public Builder rebuild() {
+ return new Builder(this);
+ }
// ---------------------------------------------------------------------------------------------
/**
@@ -472,6 +526,7 @@ protected static void setupKnnQueryDeserializer(ObjectDeserializer
@@ -198,6 +213,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.writeKey("num_candidates");
generator.write(this.numCandidates);
+ if (this.visitPercentage != null) {
+ generator.writeKey("visit_percentage");
+ generator.write(this.visitPercentage);
+
+ }
if (this.similarity != null) {
generator.writeKey("similarity");
generator.write(this.similarity);
@@ -230,12 +250,28 @@ public static class Builder extends RetrieverBase.AbstractBuilder
@@ -324,6 +360,17 @@ public final Builder numCandidates(int value) {
return this;
}
+ /**
+ * The percentage of vectors to explore per shard while doing knn search with
+ * bbq_disk
+ *
+ * API name: {@code visit_percentage}
+ */
+ public final Builder visitPercentage(@Nullable Float value) {
+ this.visitPercentage = value;
+ return this;
+ }
+
/**
* The minimum similarity required for a document to be considered a match.
*
@@ -371,6 +418,12 @@ public KnnRetriever build() {
}
}
+ /**
+ * @return New {@link Builder} initialized with field values of this instance
+ */
+ public Builder rebuild() {
+ return new Builder(this);
+ }
// ---------------------------------------------------------------------------------------------
/**
@@ -387,6 +440,7 @@ protected static void setupKnnRetrieverDeserializer(ObjectDeserializer
@@ -249,6 +264,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.writeKey("num_candidates");
generator.write(this.numCandidates);
+ }
+ if (this.visitPercentage != null) {
+ generator.writeKey("visit_percentage");
+ generator.write(this.visitPercentage);
+
}
if (this.boost != null) {
generator.writeKey("boost");
@@ -309,6 +329,9 @@ public static class Builder extends WithJsonObjectBuilderBase
@@ -411,6 +450,17 @@ public final Builder numCandidates(@Nullable Integer value) {
return this;
}
+ /**
+ * The percentage of vectors to explore per shard while doing knn search with
+ * bbq_disk
+ *
+ * API name: {@code visit_percentage}
+ */
+ public final Builder visitPercentage(@Nullable Float value) {
+ this.visitPercentage = value;
+ return this;
+ }
+
/**
* Boost value to apply to kNN scores
*
@@ -537,6 +587,12 @@ public KnnSearch build() {
}
}
+ /**
+ * @return New {@link Builder} initialized with field values of this instance
+ */
+ public Builder rebuild() {
+ return new Builder(this);
+ }
// ---------------------------------------------------------------------------------------------
/**
@@ -553,6 +609,7 @@ protected static void setupKnnSearchDeserializer(ObjectDeserializer
@@ -166,6 +173,12 @@ public LatLonGeoLocation build() {
}
}
+ /**
+ * @return New {@link Builder} initialized with field values of this instance
+ */
+ public Builder rebuild() {
+ return new Builder(this);
+ }
// ---------------------------------------------------------------------------------------------
/**
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/LinearRetriever.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/LinearRetriever.java
index b4cf0541fb..d729ff4a36 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/LinearRetriever.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/LinearRetriever.java
@@ -200,6 +200,16 @@ public static class Builder extends RetrieverBase.AbstractBuilder
@@ -297,6 +307,12 @@ public LinearRetriever build() {
}
}
+ /**
+ * @return New {@link Builder} initialized with field values of this instance
+ */
+ public Builder rebuild() {
+ return new Builder(this);
+ }
// ---------------------------------------------------------------------------------------------
/**
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/MergesStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/MergesStats.java
index c5bb85a697..422b84de86 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/MergesStats.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/MergesStats.java
@@ -370,6 +370,27 @@ public static class Builder extends WithJsonObjectBuilderBase
@@ -276,6 +286,12 @@ public NodeAttributes build() {
}
}
+ /**
+ * @return New {@link Builder} initialized with field values of this instance
+ */
+ public Builder rebuild() {
+ return new Builder(this);
+ }
// ---------------------------------------------------------------------------------------------
/**
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/NodeShard.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/NodeShard.java
index 5572444166..e0e9e51db0 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/NodeShard.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/NodeShard.java
@@ -288,6 +288,21 @@ public static class Builder extends WithJsonObjectBuilderBase
@@ -252,6 +261,12 @@ public NodeStatistics build() {
}
}
+ /**
+ * @return New {@link Builder} initialized with field values of this instance
+ */
+ public Builder rebuild() {
+ return new Builder(this);
+ }
// ---------------------------------------------------------------------------------------------
/**
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/PinnedRetriever.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/PinnedRetriever.java
index e792585364..edaa45242f 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/PinnedRetriever.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/PinnedRetriever.java
@@ -176,6 +176,15 @@ public static class Builder extends RetrieverBase.AbstractBuilder
@@ -280,6 +289,12 @@ public PinnedRetriever build() {
}
}
+ /**
+ * @return New {@link Builder} initialized with field values of this instance
+ */
+ public Builder rebuild() {
+ return new Builder(this);
+ }
// ---------------------------------------------------------------------------------------------
/**
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/PluginStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/PluginStats.java
index 723a7dac6e..27f5e1d058 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/PluginStats.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/PluginStats.java
@@ -241,6 +241,20 @@ public static class Builder extends WithJsonObjectBuilderBase
* API name: {@code retrievers}
*/
- public final List
* API name: {@code retrievers}
*
* Adds all elements of
* API name: {@code retrievers}
*
* Adds one or more values to
- * API name: {@code retrievers}
- *
- * Adds one or more values to
* API name: {@code retrievers}
*
* Adds a value to Search::Elasticsearch::Client::5_0::Scroll
* elasticsearch.helpers.*client.helpers.*co.elastic.clients.elasticsearch._helpers.bulk.BulkIngesterBulkAllObservableElasticsearch::Helpers::BulkHelpercreate, delete, and update actions in
- * a single request. This reduces overhead and can greatly increase indexing
- * speed.
+ * Bulk index or delete documents.
+ * index, create,
+ * delete, and update actions in a single request.
+ * This reduces overhead and can greatly increase indexing speed.
* elasticsearch.helpers.*client.helpers.*co.elastic.clients.elasticsearch._helpers.bulk.BulkIngesterBulkAllObservableElasticsearch::Helpers::BulkHelperkeep_alive parameter tells
- * Elasticsearch how long it should persist. A point in time is automatically
- * closed when the keep_alive period has elapsed. However, keeping
- * points in time has a cost; close them as soon as they are no longer required
- * for search requests.
+ * Close a point in time.
+ * keep_alive parameter tells Elasticsearch how long
+ * it should persist. A point in time is automatically closed when the
+ * keep_alive period has elapsed. However, keeping points in time
+ * has a cost; close them as soon as they are no longer required for search
+ * requests.
*
* @see Documentation
@@ -989,12 +1003,14 @@ public CompletableFuturekeep_alive parameter tells
- * Elasticsearch how long it should persist. A point in time is automatically
- * closed when the keep_alive period has elapsed. However, keeping
- * points in time has a cost; close them as soon as they are no longer required
- * for search requests.
+ * Close a point in time.
+ * keep_alive parameter tells Elasticsearch how long
+ * it should persist. A point in time is automatically closed when the
+ * keep_alive period has elapsed. However, keeping points in time
+ * has a cost; close them as soon as they are no longer required for search
+ * requests.
*
* @param fn
* a function that initializes a builder to create the
@@ -1012,7 +1028,9 @@ public final CompletableFuturereindex.remote.whitelist setting. Automatic data
- * stream creation requires a matching index template with data stream enabled.
+ * If reindexing from a remote cluster into a cluster using Elastic Stack, you
+ * must explicitly allow the remote host using the
+ * reindex.remote.whitelist node setting on the destination
+ * cluster. If reindexing from a remote cluster into an Elastic Cloud Serverless
+ * project, only remote hosts from Elastic Cloud Hosted are allowed. Automatic
+ * data stream creation requires a matching index template with data stream
+ * enabled.
* dest element can be configured like the index API to control
* optimistic concurrency control. Omitting version_type or setting
@@ -4257,9 +4312,13 @@ public CompletableFuturereindex.remote.whitelist setting. Automatic data
- * stream creation requires a matching index template with data stream enabled.
+ * If reindexing from a remote cluster into a cluster using Elastic Stack, you
+ * must explicitly allow the remote host using the
+ * reindex.remote.whitelist node setting on the destination
+ * cluster. If reindexing from a remote cluster into an Elastic Cloud Serverless
+ * project, only remote hosts from Elastic Cloud Hosted are allowed. Automatic
+ * data stream creation requires a matching index template with data stream
+ * enabled.
* dest element can be configured like the index API to control
* optimistic concurrency control. Omitting version_type or setting
@@ -6140,10 +6199,11 @@ public final index,
- * create, delete, and update actions in
- * a single request. This reduces overhead and can greatly increase indexing
- * speed.
+ * Bulk index or delete documents.
+ * index, create,
+ * delete, and update actions in a single request.
+ * This reduces overhead and can greatly increase indexing speed.
* Search::Elasticsearch::Client::5_0::Scroll
* elasticsearch.helpers.*client.helpers.*co.elastic.clients.elasticsearch._helpers.bulk.BulkIngesterBulkAllObservableElasticsearch::Helpers::BulkHelperindex,
- * create, delete, and update actions in
- * a single request. This reduces overhead and can greatly increase indexing
- * speed.
+ * Bulk index or delete documents.
+ * index, create,
+ * delete, and update actions in a single request.
+ * This reduces overhead and can greatly increase indexing speed.
* Search::Elasticsearch::Client::5_0::Scroll
* elasticsearch.helpers.*client.helpers.*co.elastic.clients.elasticsearch._helpers.bulk.BulkIngesterBulkAllObservableElasticsearch::Helpers::BulkHelpercreate, delete, and update actions in
- * a single request. This reduces overhead and can greatly increase indexing
- * speed.
+ * Bulk index or delete documents.
+ * index, create,
+ * delete, and update actions in a single request.
+ * This reduces overhead and can greatly increase indexing speed.
* elasticsearch.helpers.*client.helpers.*co.elastic.clients.elasticsearch._helpers.bulk.BulkIngesterBulkAllObservableElasticsearch::Helpers::BulkHelperkeep_alive parameter tells
- * Elasticsearch how long it should persist. A point in time is automatically
- * closed when the keep_alive period has elapsed. However, keeping
- * points in time has a cost; close them as soon as they are no longer required
- * for search requests.
+ * Close a point in time.
+ * keep_alive parameter tells Elasticsearch how long
+ * it should persist. A point in time is automatically closed when the
+ * keep_alive period has elapsed. However, keeping points in time
+ * has a cost; close them as soon as they are no longer required for search
+ * requests.
*
* @see Documentation
@@ -992,12 +1006,14 @@ public ClosePointInTimeResponse closePointInTime(ClosePointInTimeRequest request
}
/**
- * Close a point in time. A point in time must be opened explicitly before being
- * used in search requests. The keep_alive parameter tells
- * Elasticsearch how long it should persist. A point in time is automatically
- * closed when the keep_alive period has elapsed. However, keeping
- * points in time has a cost; close them as soon as they are no longer required
- * for search requests.
+ * Close a point in time.
+ * keep_alive parameter tells Elasticsearch how long
+ * it should persist. A point in time is automatically closed when the
+ * keep_alive period has elapsed. However, keeping points in time
+ * has a cost; close them as soon as they are no longer required for search
+ * requests.
*
* @param fn
* a function that initializes a builder to create the
@@ -1016,7 +1032,9 @@ public final ClosePointInTimeResponse closePointInTime(
// ----- Endpoint: count
/**
- * Count search results. Get the number of documents matching a query.
+ * Count search results.
+ * reindex.remote.whitelist setting. Automatic data
- * stream creation requires a matching index template with data stream enabled.
+ * If reindexing from a remote cluster into a cluster using Elastic Stack, you
+ * must explicitly allow the remote host using the
+ * reindex.remote.whitelist node setting on the destination
+ * cluster. If reindexing from a remote cluster into an Elastic Cloud Serverless
+ * project, only remote hosts from Elastic Cloud Hosted are allowed. Automatic
+ * data stream creation requires a matching index template with data stream
+ * enabled.
* dest element can be configured like the index API to control
* optimistic concurrency control. Omitting version_type or setting
@@ -4286,9 +4341,13 @@ public ReindexResponse reindex(ReindexRequest request) throws IOException, Elast
* alias.
*
* reindex.remote.whitelist setting. Automatic data
- * stream creation requires a matching index template with data stream enabled.
+ * If reindexing from a remote cluster into a cluster using Elastic Stack, you
+ * must explicitly allow the remote host using the
+ * reindex.remote.whitelist node setting on the destination
+ * cluster. If reindexing from a remote cluster into an Elastic Cloud Serverless
+ * project, only remote hosts from Elastic Cloud Hosted are allowed. Automatic
+ * data stream creation requires a matching index template with data stream
+ * enabled.
* dest element can be configured like the index API to control
* optimistic concurrency control. Omitting version_type or setting
@@ -6189,10 +6248,11 @@ public final list to queryVector.
+ */
+ public final Builder queryVector(ListqueryVector.
+ */
+ public final Builder queryVector(Float value, Float... values) {
+ this.queryVector = _listAdd(this.queryVector, value, values);
+ return this;
+ }
+
+ /**
+ * a dense vector query vector builder to use instead of a static query_vector
+ * > coordinates;
+ public Builder() {
+ }
+ private Builder(GeoLine instance) {
+ this.type = instance.type;
+ this.coordinates = instance.coordinates;
+
+ }
/**
* Required - Always
"LineString"
* _all value targets only missing or closed indices.
@@ -280,6 +289,12 @@ public IndicesOptions build() {
}
}
+ /**
+ * @return New {@link Builder} initialized with field values of this instance
+ */
+ public Builder rebuild() {
+ return new Builder(this);
+ }
// ---------------------------------------------------------------------------------------------
/**
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/InlineGet.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/InlineGet.java
index 55d6531c79..26b38cff4c 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/InlineGet.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/InlineGet.java
@@ -37,6 +37,7 @@
import java.lang.Long;
import java.lang.String;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;
@@ -79,8 +80,7 @@ public class InlineGetlist to routing.
*/
- public final Builderrouting.
+ */
+ public final Builderlist to retrievers.
*/
- public final Builder retrievers(Listretrievers.
*/
- public final Builder retrievers(Retriever value, Retriever... values) {
+ public final Builder retrievers(RRFRetrieverEntry value, RRFRetrieverEntry... values) {
this.retrievers = _listAdd(this.retrievers, value, values);
return this;
}
/**
* Required - A list of child retrievers to specify which sets of returned top
- * documents will have the RRF formula applied to them.
- * retrievers.
- */
- public final Builder retrievers(RetrieverVariant value, RetrieverVariant... values) {
- this.retrievers = _listAdd(this.retrievers, value._toRetriever());
- for (RetrieverVariant v : values) {
- _listAdd(this.retrievers, v._toRetriever());
- }
- return this;
- }
-
- /**
- * Required - A list of child retrievers to specify which sets of returned top
- * documents will have the RRF formula applied to them.
+ * documents will have the RRF formula applied to them. Each retriever can
+ * optionally include a weight parameter.
* retrievers using a builder lambda.
*/
- public final Builder retrievers(Function