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 *

  • Python: Check out elasticsearch.helpers.*
  • *
  • JavaScript: Check out client.helpers.*
  • + *
  • Java: Check out + * co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester
  • *
  • .NET: Check out BulkAllObservable
  • *
  • PHP: Check out bulk indexing.
  • *
  • Ruby: Check out Elasticsearch::Helpers::BulkHelper
  • @@ -562,10 +565,11 @@ public CompletableFuture bulk(BulkRequest request) { } /** - * 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: @@ -662,6 +666,8 @@ public CompletableFuture bulk(BulkRequest request) { * Search::Elasticsearch::Client::5_0::Scroll *

  • Python: Check out elasticsearch.helpers.*
  • *
  • JavaScript: Check out client.helpers.*
  • + *
  • Java: Check out + * co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester
  • *
  • .NET: Check out BulkAllObservable
  • *
  • PHP: Check out bulk indexing.
  • *
  • Ruby: Check out Elasticsearch::Helpers::BulkHelper
  • @@ -741,10 +747,11 @@ public final CompletableFuture bulk(Functionindex, - * 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: @@ -841,6 +848,8 @@ public final CompletableFuture bulk(FunctionSearch::Elasticsearch::Client::5_0::Scroll *

  • Python: Check out elasticsearch.helpers.*
  • *
  • JavaScript: Check out client.helpers.*
  • + *
  • Java: Check out + * co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester
  • *
  • .NET: Check out BulkAllObservable
  • *
  • PHP: Check out bulk indexing.
  • *
  • Ruby: Check out Elasticsearch::Helpers::BulkHelper
  • @@ -920,8 +929,9 @@ public CompletableFuture bulk() { // ----- Endpoint: clear_scroll /** - * 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 @@ -936,8 +946,9 @@ public CompletableFuture clearScroll(ClearScrollRequest req } /** - * 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 @@ -953,8 +964,9 @@ public final CompletableFuture 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 @@ -969,12 +981,14 @@ public CompletableFuture clearScroll() { // ----- 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 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. + *

    + * 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. * * @see Documentation @@ -989,12 +1003,14 @@ public CompletableFuture closePointInTime(ClosePointIn } /** - * 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. + *

    + * 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. * * @param fn * a function that initializes a builder to create the @@ -1012,7 +1028,9 @@ public final CompletableFuture closePointInTime( // ----- Endpoint: count /** - * 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 @@ -1039,7 +1057,9 @@ public CompletableFuture count(CountRequest request) { } /** - * 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 @@ -1067,7 +1087,9 @@ public final CompletableFuture count( } /** - * 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 @@ -1839,8 +1861,9 @@ public final CompletableFuture deleteByQueryRet // ----- 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 @@ -1855,8 +1878,9 @@ public CompletableFuture deleteScript(DeleteScriptRequest } /** - * 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 @@ -2002,9 +2026,10 @@ public final CompletableFuture 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 @@ -2022,9 +2047,10 @@ public CompletableFuture> explain(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. * * @param fn * a function that initializes a builder to create the @@ -2061,9 +2087,10 @@ public final CompletableFuture> 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 @@ -2081,9 +2108,10 @@ public CompletableFuture> explain(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. * * @param fn * a function that initializes a builder to create the @@ -2541,8 +2569,9 @@ public final CompletableFuture> get( // ----- Endpoint: get_script /** - * Get a script or search template. Retrieves a stored script or search - * template. + * Get a script or search template. + *

    + * Retrieves a stored script or search template. * * @see Documentation @@ -2557,8 +2586,9 @@ public CompletableFuture getScript(GetScriptRequest request) } /** - * Get a script or search template. Retrieves a stored script or search - * template. + * Get a script or search template. + *

    + * Retrieves a stored script or search template. * * @param fn * a function that initializes a builder to create the @@ -2761,9 +2791,10 @@ public final CompletableFuture> getSour // ----- Endpoint: health_report /** - * 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 @@ -2803,9 +2834,10 @@ public CompletableFuture healthReport(HealthReportRequest } /** - * 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 @@ -2846,9 +2878,10 @@ public final CompletableFuture 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 @@ -3069,15 +3102,21 @@ public CompletableFuture healthReport() { * "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 @@ -3272,15 +3311,21 @@ public CompletableFuture index(IndexRequest * - * + *

    + * 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 CompletableFuture index( // ----- Endpoint: info /** - * Get cluster info. 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. + * Get cluster info. + *

    + * 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 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 @@ -4061,8 +4110,9 @@ public CompletableFuture ping() { // ----- 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 @@ -4077,8 +4127,9 @@ public CompletableFuture putScript(PutScriptRequest request) } /** - * 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 @@ -4165,9 +4216,13 @@ public final CompletableFuture rankEval( * alias. * *

    - * If reindexing from a remote cluster, you must explicitly allow the remote - * host in the 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. *

    * The dest element can be configured like the index API to control * optimistic concurrency control. Omitting version_type or setting @@ -4257,9 +4312,13 @@ public CompletableFuture reindex(ReindexRequest request) { * alias. * *

    - * If reindexing from a remote cluster, you must explicitly allow the remote - * host in the 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. *

    * The 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 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: @@ -6301,10 +6361,11 @@ public CompletableFuture updateByQuery(UpdateByQueryReque } /** - * 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/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 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 ElasticsearchXpackClient xpack() { * Search::Elasticsearch::Client::5_0::Scroll *

  • Python: Check out elasticsearch.helpers.*
  • *
  • JavaScript: Check out client.helpers.*
  • + *
  • Java: Check out + * co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester
  • *
  • .NET: Check out BulkAllObservable
  • *
  • PHP: Check out bulk indexing.
  • *
  • Ruby: Check out Elasticsearch::Helpers::BulkHelper
  • @@ -562,10 +565,11 @@ public BulkResponse bulk(BulkRequest request) throws IOException, ElasticsearchE } /** - * 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: @@ -662,6 +666,8 @@ public BulkResponse bulk(BulkRequest request) throws IOException, ElasticsearchE * Search::Elasticsearch::Client::5_0::Scroll *

  • Python: Check out elasticsearch.helpers.*
  • *
  • JavaScript: Check out client.helpers.*
  • + *
  • Java: Check out + * co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester
  • *
  • .NET: Check out BulkAllObservable
  • *
  • PHP: Check out bulk indexing.
  • *
  • Ruby: Check out Elasticsearch::Helpers::BulkHelper
  • @@ -742,10 +748,11 @@ public final BulkResponse bulk(Functionindex, - * 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: @@ -842,6 +849,8 @@ public final BulkResponse bulk(FunctionSearch::Elasticsearch::Client::5_0::Scroll *

  • Python: Check out elasticsearch.helpers.*
  • *
  • JavaScript: Check out client.helpers.*
  • + *
  • Java: Check out + * co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester
  • *
  • .NET: Check out BulkAllObservable
  • *
  • PHP: Check out bulk indexing.
  • *
  • Ruby: Check out Elasticsearch::Helpers::BulkHelper
  • @@ -921,8 +930,9 @@ public BulkResponse bulk() throws IOException, ElasticsearchException { // ----- Endpoint: clear_scroll /** - * 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 @@ -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 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. + *

    + * 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. * * @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. + *

    + * 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. * * @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. + *

    + * 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 + * 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 @@ -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 ExplainResponse explain(ExplainRequest request, Cl } /** - * 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. * * @param fn * a function that initializes a builder to create the @@ -2073,9 +2099,10 @@ public final ExplainResponse explain(Function + * 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 @@ -2093,9 +2120,10 @@ public ExplainResponse explain(ExplainRequest request, Ty } /** - * 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. * * @param fn * a function that initializes a builder to create the @@ -2556,8 +2584,9 @@ public final GetResponse get(Function + * Retrieves a stored script or search template. * * @see Documentation @@ -2572,8 +2601,9 @@ public GetScriptResponse getScript(GetScriptRequest request) throws IOException, } /** - * Get a script or search template. Retrieves a stored script or search - * template. + * Get a script or search template. + *

    + * Retrieves a stored script or search template. * * @param fn * a function that initializes a builder to create the @@ -2779,9 +2809,10 @@ public final GetSourceResponse getSource( // ----- Endpoint: health_report /** - * 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 @@ -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 IndexResponse index(IndexRequest request) throws I * "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. + * * @param fn * a function that initializes a builder to create the * {@link IndexRequest} @@ -3317,9 +3362,11 @@ public final IndexResponse index( // ----- Endpoint: info /** - * Get cluster info. 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. + * Get cluster info. + *

    + * 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 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. *

    * The 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. * *

    - * If reindexing from a remote cluster, you must explicitly allow the remote - * host in the 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. *

    * The 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 UpdateResponse update( // ----- Endpoint: update_by_query /** - * 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: @@ -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/_types/CommonStatsFlag.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/CommonStatsFlag.java new file mode 100644 index 0000000000..776f9a188c --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/CommonStatsFlag.java @@ -0,0 +1,106 @@ +/* + * 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. + */ + +package co.elastic.clients.elasticsearch._types; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum CommonStatsFlag implements JsonEnum { + All("_all"), + + Store("store"), + + Indexing("indexing"), + + Get("get"), + + Search("search"), + + Merge("merge"), + + Flush("flush"), + + Refresh("refresh"), + + QueryCache("query_cache"), + + Fielddata("fielddata"), + + Docs("docs"), + + Warmer("warmer"), + + Completion("completion"), + + Segments("segments"), + + Translog("translog"), + + RequestCache("request_cache"), + + Recovery("recovery"), + + Bulk("bulk"), + + ShardStats("shard_stats"), + + Mappings("mappings"), + + DenseVector("dense_vector"), + + SparseVector("sparse_vector"), + + ; + + private final String jsonValue; + + CommonStatsFlag(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + CommonStatsFlag.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/DiversifyRetriever.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/DiversifyRetriever.java new file mode 100644 index 0000000000..59f2f494a3 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/DiversifyRetriever.java @@ -0,0 +1,439 @@ +/* + * 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. + */ + +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.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Float; +import java.lang.Integer; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.DiversifyRetriever + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class DiversifyRetriever extends RetrieverBase implements RetrieverVariant { + private final DiversifyRetrieverTypes type; + + private final String field; + + private final Retriever retriever; + + @Nullable + private final Integer size; + + @Nullable + private final Integer rankWindowSize; + + private final List queryVector; + + @Nullable + private final QueryVectorBuilder queryVectorBuilder; + + @Nullable + private final Float lambda; + + // --------------------------------------------------------------------------------------------- + + private DiversifyRetriever(Builder builder) { + super(builder); + + this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); + this.retriever = ApiTypeHelper.requireNonNull(builder.retriever, this, "retriever"); + this.size = builder.size; + this.rankWindowSize = builder.rankWindowSize; + this.queryVector = ApiTypeHelper.unmodifiable(builder.queryVector); + this.queryVectorBuilder = builder.queryVectorBuilder; + this.lambda = builder.lambda; + + } + + public static DiversifyRetriever of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Retriever variant kind. + */ + @Override + public Retriever.Kind _retrieverKind() { + return Retriever.Kind.Diversify; + } + + /** + * Required - The diversification strategy to apply. + *

    + * 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 queryVector() { + return this.queryVector; + } + + /** + * a dense vector query vector builder to use instead of a static query_vector + *

    + * 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 + implements + ObjectBuilder { + private DiversifyRetrieverTypes type; + + private String field; + + private Retriever retriever; + + @Nullable + private Integer size; + + @Nullable + private Integer rankWindowSize; + + @Nullable + private List queryVector; + + @Nullable + private QueryVectorBuilder queryVectorBuilder; + + @Nullable + private Float lambda; + + /** + * Required - The diversification strategy to apply. + *

    + * 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> fn) { + return this.retriever(fn.apply(new Retriever.Builder()).build()); + } + + /** + * Required - The nested retriever whose results will be diversified. + *

    + * 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 list to queryVector. + */ + public final Builder queryVector(List list) { + this.queryVector = _listAddAll(this.queryVector, list); + return this; + } + + /** + * The query vector used for diversification. + *

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

    + * Adds one or more values to queryVector. + */ + 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 + *

    + * 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> fn) { + return this.queryVectorBuilder(fn.apply(new QueryVectorBuilder.Builder()).build()); + } + + /** + * a dense vector query vector builder to use instead of a static query_vector + *

    + * 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); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link DiversifyRetriever} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, DiversifyRetriever::setupDiversifyRetrieverDeserializer); + + protected static void setupDiversifyRetrieverDeserializer(ObjectDeserializer op) { + RetrieverBase.setupRetrieverBaseDeserializer(op); + op.add(Builder::type, DiversifyRetrieverTypes._DESERIALIZER, "type"); + op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field"); + op.add(Builder::retriever, Retriever._DESERIALIZER, "retriever"); + op.add(Builder::size, JsonpDeserializer.integerDeserializer(), "size"); + op.add(Builder::rankWindowSize, JsonpDeserializer.integerDeserializer(), "rank_window_size"); + op.add(Builder::queryVector, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.floatDeserializer()), + "query_vector"); + op.add(Builder::queryVectorBuilder, QueryVectorBuilder._DESERIALIZER, "query_vector_builder"); + op.add(Builder::lambda, JsonpDeserializer.floatDeserializer(), "lambda"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/DiversifyRetrieverTypes.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/DiversifyRetrieverTypes.java new file mode 100644 index 0000000000..f670e43025 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/DiversifyRetrieverTypes.java @@ -0,0 +1,64 @@ +/* + * 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. + */ + +package co.elastic.clients.elasticsearch._types; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum DiversifyRetrieverTypes implements JsonEnum { + Mmr("mmr"), + + ; + + private final String jsonValue; + + DiversifyRetrieverTypes(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + DiversifyRetrieverTypes.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GeoHashPrecision.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GeoHashPrecision.java index a0661a79de..6c619b3a3d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GeoHashPrecision.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GeoHashPrecision.java @@ -32,7 +32,7 @@ import co.elastic.clients.util.TaggedUnion; import co.elastic.clients.util.TaggedUnionUtils; import jakarta.json.stream.JsonGenerator; -import java.lang.Number; +import java.lang.Integer; import java.lang.Object; import java.lang.String; import java.util.Objects; @@ -92,7 +92,7 @@ private GeoHashPrecision(Kind kind, Object value) { public String _toJsonString() { switch (_kind) { case GeohashLength : - return this.geohashLength().toString(); + return String.valueOf(this.geohashLength()); case Distance : return this.distance(); @@ -125,7 +125,7 @@ public boolean isGeohashLength() { * @throws IllegalStateException * if the current variant is not of the {@code geohash_length} kind. */ - public Number geohashLength() { + public Integer geohashLength() { return TaggedUnionUtils.get(this, Kind.GeohashLength); } @@ -153,7 +153,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } else { switch (_kind) { case GeohashLength : - generator.write(((Number) this._value).doubleValue()); + generator.write(((Integer) this._value)); break; case Distance : @@ -174,7 +174,7 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder geohashLength(Number v) { + public ObjectBuilder geohashLength(Integer v) { this._kind = Kind.GeohashLength; this._value = v; return this; @@ -195,7 +195,7 @@ public GeoHashPrecision build() { private static JsonpDeserializer buildGeoHashPrecisionDeserializer() { return new UnionDeserializer.Builder(GeoHashPrecision::new, false) - .addMember(Kind.GeohashLength, JsonpDeserializer.numberDeserializer()) + .addMember(Kind.GeohashLength, JsonpDeserializer.integerDeserializer()) .addMember(Kind.Distance, JsonpDeserializer.stringDeserializer()).build(); } 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..8fa96c354e 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 InlineGet implements JsonpSerializable { @Nullable private final Long primaryTerm; - @Nullable - private final String routing; + private final List routing; @Nullable private final TDocument source; @@ -98,7 +98,7 @@ private InlineGet(Builder builder) { this.found = ApiTypeHelper.requireNonNull(builder.found, this, "found", false); this.seqNo = builder.seqNo; this.primaryTerm = builder.primaryTerm; - this.routing = builder.routing; + this.routing = ApiTypeHelper.unmodifiable(builder.routing); this.source = builder.source; this.tDocumentSerializer = builder.tDocumentSerializer; @@ -149,8 +149,7 @@ public final Long primaryTerm() { /** * API name: {@code _routing} */ - @Nullable - public final String routing() { + public final List routing() { return this.routing; } @@ -203,9 +202,14 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.primaryTerm); } - if (this.routing != null) { + if (ApiTypeHelper.isDefined(this.routing)) { generator.writeKey("_routing"); - generator.write(this.routing); + generator.writeStartArray(); + for (String item0 : this.routing) { + generator.write(item0); + + } + generator.writeEnd(); } if (this.source != null) { @@ -265,7 +269,7 @@ public final Builder metadata(String key, JsonData value) { private Long primaryTerm; @Nullable - private String routing; + private List routing; @Nullable private TDocument source; @@ -319,9 +323,21 @@ public final Builder primaryTerm(@Nullable Long value) { /** * API name: {@code _routing} + *

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

    + * Adds one or more values to routing. */ - public final Builder routing(@Nullable String value) { - this.routing = value; + public final Builder routing(String value, String... values) { + this.routing = _listAdd(this.routing, value, values); return this; } @@ -386,7 +402,8 @@ protected static void setupInlineGetDeserializer(ObjectDeserializer< op.add(Builder::found, JsonpDeserializer.booleanDeserializer(), "found"); op.add(Builder::seqNo, JsonpDeserializer.longDeserializer(), "_seq_no"); op.add(Builder::primaryTerm, JsonpDeserializer.longDeserializer(), "_primary_term"); - op.add(Builder::routing, JsonpDeserializer.stringDeserializer(), "_routing"); + op.add(Builder::routing, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "_routing"); op.add(Builder::source, tDocumentDeserializer, "_source"); op.setUnknownFieldHandler((builder, name, parser, mapper) -> { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/KnnQuery.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/KnnQuery.java index ab3f74ce0a..250637b8ea 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/KnnQuery.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/KnnQuery.java @@ -72,6 +72,9 @@ public class KnnQuery extends QueryBase implements QueryVariant { @Nullable private final Integer numCandidates; + @Nullable + private final Float visitPercentage; + @Nullable private final Integer k; @@ -92,6 +95,7 @@ private KnnQuery(Builder builder) { this.queryVector = ApiTypeHelper.unmodifiable(builder.queryVector); this.queryVectorBuilder = builder.queryVectorBuilder; this.numCandidates = builder.numCandidates; + this.visitPercentage = builder.visitPercentage; this.k = builder.k; this.filter = ApiTypeHelper.unmodifiable(builder.filter); this.similarity = builder.similarity; @@ -150,6 +154,17 @@ public final Integer numCandidates() { return this.numCandidates; } + /** + * The percentage of vectors to explore per shard while doing knn search with + * bbq_disk + *

    + * 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 implement @Nullable private Integer numCandidates; + @Nullable + private Float visitPercentage; + @Nullable private Integer k; @@ -350,6 +373,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 *

    @@ -472,6 +506,7 @@ protected static void setupKnnQueryDeserializer(ObjectDeserializer + * API name: {@code visit_percentage} + */ + @Nullable + public final Float visitPercentage() { + return this.visitPercentage; + } + /** * The minimum similarity required for a document to be considered a match. *

    @@ -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,6 +250,9 @@ public static class Builder extends RetrieverBase.AbstractBuilder imple private Integer numCandidates; + @Nullable + private Float visitPercentage; + @Nullable private Float similarity; @@ -324,6 +347,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. *

    @@ -387,6 +421,7 @@ protected static void setupKnnRetrieverDeserializer(ObjectDeserializer + * API name: {@code visit_percentage} + */ + @Nullable + public final Float visitPercentage() { + return this.visitPercentage; + } + /** * Boost value to apply to kNN scores *

    @@ -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 implement @Nullable private Integer numCandidates; + @Nullable + private Float visitPercentage; + @Nullable private Float boost; @@ -411,6 +434,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 *

    @@ -553,6 +587,7 @@ protected static void setupKnnSearchDeserializer(ObjectDeserializer retrievers; + private final List retrievers; @Nullable private final Integer rankConstant; @@ -98,11 +98,12 @@ public Retriever.Kind _retrieverKind() { /** * 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. *

    * API name: {@code retrievers} */ - public final List retrievers() { + public final List retrievers() { return this.retrievers; } @@ -148,7 +149,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { if (ApiTypeHelper.isDefined(this.retrievers)) { generator.writeKey("retrievers"); generator.writeStartArray(); - for (Retriever item0 : this.retrievers) { + for (RRFRetrieverEntry item0 : this.retrievers) { item0.serialize(generator, mapper); } @@ -190,7 +191,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { */ public static class Builder extends RetrieverBase.AbstractBuilder implements ObjectBuilder { - private List retrievers; + private List retrievers; @Nullable private Integer rankConstant; @@ -206,56 +207,43 @@ public static class Builder extends RetrieverBase.AbstractBuilder imple /** * 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. *

    * API name: {@code retrievers} *

    * Adds all elements of list to retrievers. */ - public final Builder retrievers(List list) { + public final Builder retrievers(List list) { this.retrievers = _listAddAll(this.retrievers, list); 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. *

    * API name: {@code retrievers} *

    * Adds one or more values to retrievers. */ - 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. - *

    - * API name: {@code retrievers} - *

    - * Adds one or more values to 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. *

    * API name: {@code retrievers} *

    * Adds a value to retrievers using a builder lambda. */ - public final Builder retrievers(Function> fn) { - return retrievers(fn.apply(new Retriever.Builder()).build()); + public final Builder retrievers(Function> fn) { + return retrievers(fn.apply(new RRFRetrieverEntry.Builder()).build()); } /** @@ -335,7 +323,7 @@ public RRFRetriever build() { protected static void setupRRFRetrieverDeserializer(ObjectDeserializer op) { RetrieverBase.setupRetrieverBaseDeserializer(op); - op.add(Builder::retrievers, JsonpDeserializer.arrayDeserializer(Retriever._DESERIALIZER), "retrievers"); + op.add(Builder::retrievers, JsonpDeserializer.arrayDeserializer(RRFRetrieverEntry._DESERIALIZER), "retrievers"); op.add(Builder::rankConstant, JsonpDeserializer.integerDeserializer(), "rank_constant"); op.add(Builder::rankWindowSize, JsonpDeserializer.integerDeserializer(), "rank_window_size"); op.add(Builder::query, JsonpDeserializer.stringDeserializer(), "query"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RRFRetrieverComponent.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RRFRetrieverComponent.java new file mode 100644 index 0000000000..d9dbe4ad07 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RRFRetrieverComponent.java @@ -0,0 +1,217 @@ +/* + * 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. + */ + +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.Float; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.RRFRetrieverComponent + +/** + * Wraps a retriever with an optional weight for RRF scoring. + * + * @see API + * specification + */ +@JsonpDeserializable +public class RRFRetrieverComponent implements JsonpSerializable { + private final Retriever retriever; + + @Nullable + private final Float weight; + + // --------------------------------------------------------------------------------------------- + + private RRFRetrieverComponent(Builder builder) { + + this.retriever = ApiTypeHelper.requireNonNull(builder.retriever, this, "retriever"); + this.weight = builder.weight; + + } + + public static RRFRetrieverComponent of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The nested retriever configuration. + *

    + * API name: {@code retriever} + */ + public final Retriever retriever() { + return this.retriever; + } + + /** + * Weight multiplier for this retriever's contribution to the RRF score. Higher + * values increase influence. Defaults to 1.0 if not specified. Must be + * non-negative. + *

    + * API name: {@code weight} + */ + @Nullable + public final Float weight() { + return this.weight; + } + + /** + * 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("retriever"); + this.retriever.serialize(generator, mapper); + + if (this.weight != null) { + generator.writeKey("weight"); + generator.write(this.weight); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link RRFRetrieverComponent}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Retriever retriever; + + @Nullable + private Float weight; + + /** + * Required - The nested retriever configuration. + *

    + * API name: {@code retriever} + */ + public final Builder retriever(Retriever value) { + this.retriever = value; + return this; + } + + /** + * Required - The nested retriever configuration. + *

    + * API name: {@code retriever} + */ + public final Builder retriever(Function> fn) { + return this.retriever(fn.apply(new Retriever.Builder()).build()); + } + + /** + * Required - The nested retriever configuration. + *

    + * API name: {@code retriever} + */ + public final Builder retriever(RetrieverVariant value) { + this.retriever = value._toRetriever(); + return this; + } + + /** + * Weight multiplier for this retriever's contribution to the RRF score. Higher + * values increase influence. Defaults to 1.0 if not specified. Must be + * non-negative. + *

    + * API name: {@code weight} + */ + public final Builder weight(@Nullable Float value) { + this.weight = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link RRFRetrieverComponent}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public RRFRetrieverComponent build() { + _checkSingleUse(); + + return new RRFRetrieverComponent(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link RRFRetrieverComponent} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, RRFRetrieverComponent::setupRRFRetrieverComponentDeserializer); + + protected static void setupRRFRetrieverComponentDeserializer(ObjectDeserializer op) { + + op.add(Builder::retriever, Retriever._DESERIALIZER, "retriever"); + op.add(Builder::weight, JsonpDeserializer.floatDeserializer(), "weight"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RRFRetrieverEntry.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RRFRetrieverEntry.java new file mode 100644 index 0000000000..416332fcab --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RRFRetrieverEntry.java @@ -0,0 +1,188 @@ +/* + * 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. + */ + +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.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.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.RRFRetrieverEntry + +/** + * Either a direct RetrieverContainer (backward compatible) or an + * RRFRetrieverComponent with weight. + * + * @see API + * specification + */ +@JsonpDeserializable +public class RRFRetrieverEntry implements TaggedUnion, JsonpSerializable { + + public enum Kind { + Weighted, Retriever + + } + + private final Kind _kind; + private final Object _value; + + @Override + public final Kind _kind() { + return _kind; + } + + @Override + public final Object _get() { + return _value; + } + + private RRFRetrieverEntry(Kind kind, Object value) { + this._kind = kind; + this._value = value; + } + + private RRFRetrieverEntry(Builder builder) { + + this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); + this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); + + } + + public static RRFRetrieverEntry of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Is this variant instance of kind {@code weighted}? + */ + public boolean isWeighted() { + return _kind == Kind.Weighted; + } + + /** + * Get the {@code weighted} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code weighted} kind. + */ + public RRFRetrieverComponent weighted() { + return TaggedUnionUtils.get(this, Kind.Weighted); + } + + /** + * Is this variant instance of kind {@code retriever}? + */ + public boolean isRetriever() { + return _kind == Kind.Retriever; + } + + /** + * Get the {@code retriever} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code retriever} kind. + */ + public Retriever retriever() { + return TaggedUnionUtils.get(this, Kind.Retriever); + } + + @Override + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + if (_value instanceof JsonpSerializable) { + ((JsonpSerializable) _value).serialize(generator, mapper); + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Kind _kind; + private Object _value; + + public ObjectBuilder weighted(RRFRetrieverComponent v) { + this._kind = Kind.Weighted; + this._value = v; + return this; + } + + public ObjectBuilder weighted( + Function> fn) { + return this.weighted(fn.apply(new RRFRetrieverComponent.Builder()).build()); + } + + public ObjectBuilder retriever(Retriever v) { + this._kind = Kind.Retriever; + this._value = v; + return this; + } + + public ObjectBuilder retriever(Function> fn) { + return this.retriever(fn.apply(new Retriever.Builder()).build()); + } + + public RRFRetrieverEntry build() { + _checkSingleUse(); + return new RRFRetrieverEntry(this); + } + + } + + private static JsonpDeserializer buildRRFRetrieverEntryDeserializer() { + return new UnionDeserializer.Builder(RRFRetrieverEntry::new, false) + .addMember(Kind.Weighted, RRFRetrieverComponent._DESERIALIZER) + .addMember(Kind.Retriever, Retriever._DESERIALIZER).build(); + } + + public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer + .lazy(RRFRetrieverEntry::buildRRFRetrieverEntryDeserializer); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RRFRetrieverEntryBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RRFRetrieverEntryBuilders.java new file mode 100644 index 0000000000..ee7b88292e --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RRFRetrieverEntryBuilders.java @@ -0,0 +1,63 @@ +/* + * 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. + */ + +package co.elastic.clients.elasticsearch._types; + +import co.elastic.clients.util.ObjectBuilder; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * Builders for {@link RRFRetrieverEntry} variants. + */ +public class RRFRetrieverEntryBuilders { + private RRFRetrieverEntryBuilders() { + } + + /** + * Creates a builder for the {@link RRFRetrieverComponent weighted} + * {@code RRFRetrieverEntry} variant. + */ + public static RRFRetrieverComponent.Builder weighted() { + return new RRFRetrieverComponent.Builder(); + } + + /** + * Creates a builder for the {@link Retriever retriever} + * {@code RRFRetrieverEntry} variant. + */ + public static Retriever.Builder retriever() { + return new Retriever.Builder(); + } + +} 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/_types/ReindexStatus.java similarity index 84% rename from java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexStatus.java rename to java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ReindexStatus.java index 1e1373670e..b0ad752efb 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/_types/ReindexStatus.java @@ -17,10 +17,8 @@ * under the License. */ -package co.elastic.clients.elasticsearch.core.reindex_rethrottle; +package co.elastic.clients.elasticsearch._types; -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; @@ -33,7 +31,9 @@ import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Float; +import java.lang.Integer; import java.lang.Long; +import java.lang.String; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -53,19 +53,22 @@ // //---------------------------------------------------------------- -// typedef: _global.reindex_rethrottle.ReindexStatus +// typedef: _types.ReindexStatus /** * - * @see API + * @see API * specification */ @JsonpDeserializable public class ReindexStatus implements JsonpSerializable { + @Nullable + private final Integer sliceId; + private final long batches; - private final long created; + @Nullable + private final Long created; private final long deleted; @@ -87,16 +90,21 @@ public class ReindexStatus implements JsonpSerializable { private final long total; - private final long updated; + @Nullable + private final Long updated; private final long versionConflicts; + @Nullable + private final String cancelled; + // --------------------------------------------------------------------------------------------- private ReindexStatus(Builder builder) { + this.sliceId = builder.sliceId; this.batches = ApiTypeHelper.requireNonNull(builder.batches, this, "batches", 0); - this.created = ApiTypeHelper.requireNonNull(builder.created, this, "created", 0); + this.created = builder.created; this.deleted = ApiTypeHelper.requireNonNull(builder.deleted, this, "deleted", 0); this.noops = ApiTypeHelper.requireNonNull(builder.noops, this, "noops", 0); this.requestsPerSecond = ApiTypeHelper.requireNonNull(builder.requestsPerSecond, this, "requestsPerSecond", 0); @@ -107,8 +115,9 @@ private ReindexStatus(Builder builder) { this.throttledUntilMillis = ApiTypeHelper.requireNonNull(builder.throttledUntilMillis, this, "throttledUntilMillis", 0); this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total", 0); - this.updated = ApiTypeHelper.requireNonNull(builder.updated, this, "updated", 0); + this.updated = builder.updated; this.versionConflicts = ApiTypeHelper.requireNonNull(builder.versionConflicts, this, "versionConflicts", 0); + this.cancelled = builder.cancelled; } @@ -116,6 +125,16 @@ public static ReindexStatus of(Function> f return fn.apply(new Builder()).build(); } + /** + * The slice ID + *

    + * API name: {@code slice_id} + */ + @Nullable + public final Integer sliceId() { + return this.sliceId; + } + /** * Required - The number of scroll responses pulled back by the reindex. *

    @@ -126,11 +145,12 @@ public final long batches() { } /** - * Required - The number of documents that were successfully created. + * The number of documents that were successfully created. *

    * API name: {@code created} */ - public final long created() { + @Nullable + public final Long created() { return this.created; } @@ -223,13 +243,13 @@ public final long total() { } /** - * Required - The number of documents that were successfully updated, for - * example, a document with same ID already existed prior to reindex updating - * it. + * 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() { + @Nullable + public final Long updated() { return this.updated; } @@ -242,6 +262,16 @@ public final long versionConflicts() { return this.versionConflicts; } + /** + * The reason for cancellation if the slice was canceled + *

    + * API name: {@code cancelled} + */ + @Nullable + public final String cancelled() { + return this.cancelled; + } + /** * Serialize this object to JSON. */ @@ -253,12 +283,19 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + if (this.sliceId != null) { + generator.writeKey("slice_id"); + generator.write(this.sliceId); + + } generator.writeKey("batches"); generator.write(this.batches); - generator.writeKey("created"); - generator.write(this.created); + if (this.created != null) { + generator.writeKey("created"); + generator.write(this.created); + } generator.writeKey("deleted"); generator.write(this.deleted); @@ -290,12 +327,20 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("total"); generator.write(this.total); - generator.writeKey("updated"); - generator.write(this.updated); + if (this.updated != null) { + generator.writeKey("updated"); + generator.write(this.updated); + } generator.writeKey("version_conflicts"); generator.write(this.versionConflicts); + if (this.cancelled != null) { + generator.writeKey("cancelled"); + generator.write(this.cancelled); + + } + } @Override @@ -310,8 +355,12 @@ public String toString() { */ public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private Integer sliceId; + private Long batches; + @Nullable private Long created; private Long deleted; @@ -334,10 +383,24 @@ public static class Builder extends WithJsonObjectBuilderBase implement private Long total; + @Nullable private Long updated; private Long versionConflicts; + @Nullable + private String cancelled; + + /** + * The slice ID + *

    + * API name: {@code slice_id} + */ + public final Builder sliceId(@Nullable Integer value) { + this.sliceId = value; + return this; + } + /** * Required - The number of scroll responses pulled back by the reindex. *

    @@ -349,11 +412,11 @@ public final Builder batches(long value) { } /** - * Required - The number of documents that were successfully created. + * The number of documents that were successfully created. *

    * API name: {@code created} */ - public final Builder created(long value) { + public final Builder created(@Nullable Long value) { this.created = value; return this; } @@ -479,13 +542,12 @@ public final Builder total(long value) { } /** - * Required - The number of documents that were successfully updated, for - * example, a document with same ID already existed prior to reindex updating - * it. + * 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) { + public final Builder updated(@Nullable Long value) { this.updated = value; return this; } @@ -500,6 +562,16 @@ public final Builder versionConflicts(long value) { return this; } + /** + * The reason for cancellation if the slice was canceled + *

    + * API name: {@code cancelled} + */ + public final Builder cancelled(@Nullable String value) { + this.cancelled = value; + return this; + } + @Override protected Builder self() { return this; @@ -528,6 +600,7 @@ public ReindexStatus build() { protected static void setupReindexStatusDeserializer(ObjectDeserializer op) { + op.add(Builder::sliceId, JsonpDeserializer.integerDeserializer(), "slice_id"); op.add(Builder::batches, JsonpDeserializer.longDeserializer(), "batches"); op.add(Builder::created, JsonpDeserializer.longDeserializer(), "created"); op.add(Builder::deleted, JsonpDeserializer.longDeserializer(), "deleted"); @@ -541,6 +614,7 @@ protected static void setupReindexStatusDeserializer(ObjectDeserializer pinned(Function diversify(DiversifyRetriever v) { + this._kind = Kind.Diversify; + this._value = v; + return this; + } + + public ObjectBuilder diversify( + Function> fn) { + return this.diversify(fn.apply(new DiversifyRetriever.Builder()).build()); + } + public Retriever build() { _checkSingleUse(); return new Retriever(this); @@ -397,6 +427,7 @@ protected static void setupRetrieverDeserializer(ObjectDeserializer op) op.add(Builder::rescorer, RescorerRetriever._DESERIALIZER, "rescorer"); op.add(Builder::linear, LinearRetriever._DESERIALIZER, "linear"); op.add(Builder::pinned, PinnedRetriever._DESERIALIZER, "pinned"); + op.add(Builder::diversify, DiversifyRetriever._DESERIALIZER, "diversify"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RetrieverBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RetrieverBuilders.java index 9766e80b70..fffdd371ca 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RetrieverBuilders.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RetrieverBuilders.java @@ -187,4 +187,22 @@ public static Retriever pinned(Function> fn) { + Retriever.Builder builder = new Retriever.Builder(); + builder.diversify(fn.apply(new DiversifyRetriever.Builder()).build()); + return builder.build(); + } + } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GeoLineAggregation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GeoLineAggregation.java index 0f27b3444d..ba1f5cef6c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GeoLineAggregation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GeoLineAggregation.java @@ -64,6 +64,7 @@ public class GeoLineAggregation implements AggregationVariant, JsonpSerializable { private final GeoLinePoint point; + @Nullable private final GeoLineSort sort; @Nullable @@ -80,7 +81,7 @@ public class GeoLineAggregation implements AggregationVariant, JsonpSerializable private GeoLineAggregation(Builder builder) { this.point = ApiTypeHelper.requireNonNull(builder.point, this, "point"); - this.sort = ApiTypeHelper.requireNonNull(builder.sort, this, "sort"); + this.sort = builder.sort; this.includeSort = builder.includeSort; this.sortOrder = builder.sortOrder; this.size = builder.size; @@ -109,13 +110,14 @@ public final GeoLinePoint point() { } /** - * Required - The name of the numeric field to use as the sort key for ordering - * the points. When the geo_line aggregation is nested inside a + * The name of the numeric field to use as the sort key for ordering the points. + * When the geo_line aggregation is nested inside a * time_series aggregation, this field defaults to * @timestamp, and any other value will result in error. *

    * API name: {@code sort} */ + @Nullable public final GeoLineSort sort() { return this.sort; } @@ -166,9 +168,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("point"); this.point.serialize(generator, mapper); - generator.writeKey("sort"); - this.sort.serialize(generator, mapper); + if (this.sort != null) { + generator.writeKey("sort"); + this.sort.serialize(generator, mapper); + } if (this.includeSort != null) { generator.writeKey("include_sort"); generator.write(this.includeSort); @@ -202,6 +206,7 @@ public static class Builder extends WithJsonObjectBuilderBase ObjectBuilder { private GeoLinePoint point; + @Nullable private GeoLineSort sort; @Nullable @@ -233,21 +238,21 @@ public final Builder point(Functiongeo_line aggregation is nested inside a + * The name of the numeric field to use as the sort key for ordering the points. + * When the geo_line aggregation is nested inside a * time_series aggregation, this field defaults to * @timestamp, and any other value will result in error. *

    * API name: {@code sort} */ - public final Builder sort(GeoLineSort value) { + public final Builder sort(@Nullable GeoLineSort value) { this.sort = value; return this; } /** - * Required - The name of the numeric field to use as the sort key for ordering - * the points. When the geo_line aggregation is nested inside a + * The name of the numeric field to use as the sort key for ordering the points. + * When the geo_line aggregation is nested inside a * time_series aggregation, this field defaults to * @timestamp, and any other value will result in error. *

    diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GeoTileGridAggregation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GeoTileGridAggregation.java index 7928c64452..ad42320a8e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GeoTileGridAggregation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GeoTileGridAggregation.java @@ -32,7 +32,6 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; -import java.lang.Number; import java.lang.String; import java.util.Objects; import java.util.function.Function; @@ -71,7 +70,7 @@ public class GeoTileGridAggregation extends BucketAggregationBase private final String field; @Nullable - private final Number precision; + private final Integer precision; @Nullable private final Integer shardSize; @@ -133,7 +132,7 @@ public final String field() { * API name: {@code precision} */ @Nullable - public final Number precision() { + public final Integer precision() { return this.precision; } @@ -187,7 +186,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } if (this.precision != null) { generator.writeKey("precision"); - generator.write(this.precision.doubleValue()); + generator.write(this.precision); } if (this.shardSize != null) { @@ -226,7 +225,7 @@ public static class Builder extends BucketAggregationBase.AbstractBuilder * API name: {@code precision} */ - public final Builder precision(@Nullable Number value) { + public final Builder precision(@Nullable Integer value) { this.precision = value; return this; } @@ -331,7 +330,7 @@ protected static void setupGeoTileGridAggregationDeserializer( ObjectDeserializer op) { op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field"); - op.add(Builder::precision, JsonpDeserializer.numberDeserializer(), "precision"); + op.add(Builder::precision, JsonpDeserializer.integerDeserializer(), "precision"); op.add(Builder::shardSize, JsonpDeserializer.integerDeserializer(), "shard_size"); op.add(Builder::size, JsonpDeserializer.integerDeserializer(), "size"); op.add(Builder::bounds, GeoBounds._DESERIALIZER, "bounds"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorElementType.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorElementType.java index 15678bbd40..2ecb413e61 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorElementType.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorElementType.java @@ -65,6 +65,11 @@ public enum DenseVectorElementType implements JsonEnum { */ Float("float"), + /** + * Indexes a 2-byte floating-point value per dimension. + */ + Bfloat16("bfloat16"), + ; private final String jsonValue; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java index c0e92c9154..f4c04ae0c1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java @@ -173,7 +173,8 @@ public final DenseVectorIndexOptionsRescoreVector rescoreVector() { /** * true if vector rescoring should be done on-disk *

    - * Only applicable to bbq_hnsw + * Only applicable to bbq_disk, bbq_hnsw, + * int4_hnsw, int8_hnsw *

    * API name: {@code on_disk_rescore} */ @@ -345,7 +346,8 @@ public final Builder rescoreVector( /** * true if vector rescoring should be done on-disk *

    - * Only applicable to bbq_hnsw + * Only applicable to bbq_disk, bbq_hnsw, + * int4_hnsw, int8_hnsw *

    * API name: {@code on_disk_rescore} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/ExponentialHistogramProperty.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/ExponentialHistogramProperty.java new file mode 100644 index 0000000000..bce4e42e4f --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/ExponentialHistogramProperty.java @@ -0,0 +1,155 @@ +/* + * 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. + */ + +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; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.mapping.ExponentialHistogramProperty + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ExponentialHistogramProperty extends PropertyBase implements PropertyVariant { + @Nullable + private final TimeSeriesMetricType timeSeriesMetric; + + // --------------------------------------------------------------------------------------------- + + private ExponentialHistogramProperty(Builder builder) { + super(builder); + + this.timeSeriesMetric = builder.timeSeriesMetric; + + } + + public static ExponentialHistogramProperty of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Property variant kind. + */ + @Override + public Property.Kind _propertyKind() { + return Property.Kind.ExponentialHistogram; + } + + /** + * API name: {@code time_series_metric} + */ + @Nullable + public final TimeSeriesMetricType timeSeriesMetric() { + return this.timeSeriesMetric; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "exponential_histogram"); + super.serializeInternal(generator, mapper); + if (this.timeSeriesMetric != null) { + generator.writeKey("time_series_metric"); + this.timeSeriesMetric.serialize(generator, mapper); + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ExponentialHistogramProperty}. + */ + + public static class Builder extends PropertyBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private TimeSeriesMetricType timeSeriesMetric; + + /** + * API name: {@code time_series_metric} + */ + public final Builder timeSeriesMetric(@Nullable TimeSeriesMetricType value) { + this.timeSeriesMetric = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ExponentialHistogramProperty}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ExponentialHistogramProperty build() { + _checkSingleUse(); + + return new ExponentialHistogramProperty(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ExponentialHistogramProperty} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, ExponentialHistogramProperty::setupExponentialHistogramPropertyDeserializer); + + protected static void setupExponentialHistogramPropertyDeserializer( + ObjectDeserializer op) { + PropertyBase.setupPropertyBaseDeserializer(op); + op.add(Builder::timeSeriesMetric, TimeSeriesMetricType._DESERIALIZER, "time_series_metric"); + + op.ignore("type"); + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/HistogramProperty.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/HistogramProperty.java index f20c76f043..9ac6cd2bf7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/HistogramProperty.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/HistogramProperty.java @@ -59,12 +59,16 @@ public class HistogramProperty extends PropertyBase implements PropertyVariant { @Nullable private final Boolean ignoreMalformed; + @Nullable + private final TimeSeriesMetricType timeSeriesMetric; + // --------------------------------------------------------------------------------------------- private HistogramProperty(Builder builder) { super(builder); this.ignoreMalformed = builder.ignoreMalformed; + this.timeSeriesMetric = builder.timeSeriesMetric; } @@ -88,6 +92,14 @@ public final Boolean ignoreMalformed() { return this.ignoreMalformed; } + /** + * API name: {@code time_series_metric} + */ + @Nullable + public final TimeSeriesMetricType timeSeriesMetric() { + return this.timeSeriesMetric; + } + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write("type", "histogram"); @@ -97,6 +109,10 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.ignoreMalformed); } + if (this.timeSeriesMetric != null) { + generator.writeKey("time_series_metric"); + this.timeSeriesMetric.serialize(generator, mapper); + } } @@ -112,6 +128,9 @@ public static class Builder extends PropertyBase.AbstractBuilder @Nullable private Boolean ignoreMalformed; + @Nullable + private TimeSeriesMetricType timeSeriesMetric; + /** * API name: {@code ignore_malformed} */ @@ -120,6 +139,14 @@ public final Builder ignoreMalformed(@Nullable Boolean value) { return this; } + /** + * API name: {@code time_series_metric} + */ + public final Builder timeSeriesMetric(@Nullable TimeSeriesMetricType value) { + this.timeSeriesMetric = value; + return this; + } + @Override protected Builder self() { return this; @@ -149,6 +176,7 @@ public HistogramProperty build() { protected static void setupHistogramPropertyDeserializer(ObjectDeserializer op) { PropertyBase.setupPropertyBaseDeserializer(op); op.add(Builder::ignoreMalformed, JsonpDeserializer.booleanDeserializer(), "ignore_malformed"); + op.add(Builder::timeSeriesMetric, TimeSeriesMetricType._DESERIALIZER, "time_series_metric"); op.ignore("type"); } 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 aa4a25bf10..958c8473ed 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 @@ -100,6 +100,8 @@ public enum Kind implements JsonEnum { DynamicType("{dynamic_type}"), + ExponentialHistogram("exponential_histogram"), + Alias("alias"), Flattened("flattened"), @@ -477,6 +479,24 @@ public DynamicProperty dynamicType() { return TaggedUnionUtils.get(this, Kind.DynamicType); } + /** + * Is this variant instance of kind {@code exponential_histogram}? + */ + public boolean isExponentialHistogram() { + return _kind == Kind.ExponentialHistogram; + } + + /** + * Get the {@code exponential_histogram} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the + * {@code exponential_histogram} kind. + */ + public ExponentialHistogramProperty exponentialHistogram() { + return TaggedUnionUtils.get(this, Kind.ExponentialHistogram); + } + /** * Is this variant instance of kind {@code alias}? */ @@ -1327,6 +1347,17 @@ public ObjectBuilder dynamicType( return this.dynamicType(fn.apply(new DynamicProperty.Builder()).build()); } + public ObjectBuilder exponentialHistogram(ExponentialHistogramProperty v) { + this._kind = Kind.ExponentialHistogram; + this._value = v; + return this; + } + + public ObjectBuilder exponentialHistogram( + Function> fn) { + return this.exponentialHistogram(fn.apply(new ExponentialHistogramProperty.Builder()).build()); + } + public ObjectBuilder alias(FieldAliasProperty v) { this._kind = Kind.Alias; this._value = v; @@ -1774,6 +1805,7 @@ protected static void setupPropertyDeserializer(ObjectDeserializer op) op.add(Builder::double_, DoubleNumberProperty._DESERIALIZER, "double"); op.add(Builder::doubleRange, DoubleRangeProperty._DESERIALIZER, "double_range"); op.add(Builder::dynamicType, DynamicProperty._DESERIALIZER, "{dynamic_type}"); + op.add(Builder::exponentialHistogram, ExponentialHistogramProperty._DESERIALIZER, "exponential_histogram"); op.add(Builder::alias, FieldAliasProperty._DESERIALIZER, "alias"); op.add(Builder::flattened, FlattenedProperty._DESERIALIZER, "flattened"); op.add(Builder::float_, FloatNumberProperty._DESERIALIZER, "float"); 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 7f2086bca9..6e19aa8512 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 @@ -297,6 +297,25 @@ public static Property dynamicType(Function> fn) { + Property.Builder builder = new Property.Builder(); + builder.exponentialHistogram(fn.apply(new ExponentialHistogramProperty.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link FieldAliasProperty alias} {@code Property} * variant. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/FieldLookup.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/FieldLookup.java index 5223759e13..7b02f05a40 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/FieldLookup.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/FieldLookup.java @@ -31,6 +31,7 @@ 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; @@ -67,8 +68,7 @@ public class FieldLookup implements JsonpSerializable { @Nullable private final String path; - @Nullable - private final String routing; + private final List routing; // --------------------------------------------------------------------------------------------- @@ -77,7 +77,7 @@ private FieldLookup(Builder builder) { this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); this.index = builder.index; this.path = builder.path; - this.routing = builder.routing; + this.routing = ApiTypeHelper.unmodifiable(builder.routing); } @@ -119,8 +119,7 @@ public final String path() { *

    * API name: {@code routing} */ - @Nullable - public final String routing() { + public final List routing() { return this.routing; } @@ -148,9 +147,14 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.path); } - if (this.routing != null) { + if (ApiTypeHelper.isDefined(this.routing)) { generator.writeKey("routing"); - generator.write(this.routing); + generator.writeStartArray(); + for (String item0 : this.routing) { + generator.write(item0); + + } + generator.writeEnd(); } @@ -177,7 +181,7 @@ public static class Builder extends WithJsonObjectBuilderBase implement private String path; @Nullable - private String routing; + private List routing; /** * Required - id of the document. @@ -213,9 +217,23 @@ public final Builder path(@Nullable String value) { * Custom routing value. *

    * API name: {@code routing} + *

    + * Adds all elements of list to routing. + */ + public final Builder routing(List list) { + this.routing = _listAddAll(this.routing, list); + return this; + } + + /** + * Custom routing value. + *

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

    + * Adds one or more values to routing. */ - public final Builder routing(@Nullable String value) { - this.routing = value; + public final Builder routing(String value, String... values) { + this.routing = _listAdd(this.routing, value, values); return this; } @@ -250,7 +268,8 @@ protected static void setupFieldLookupDeserializer(ObjectDeserializer perFieldAnalyzer; - @Nullable - private final String routing; + private final List routing; @Nullable private final Long version; @@ -96,7 +95,7 @@ private LikeDocument(Builder builder) { this.id = builder.id; this.index = builder.index; this.perFieldAnalyzer = ApiTypeHelper.unmodifiable(builder.perFieldAnalyzer); - this.routing = builder.routing; + this.routing = ApiTypeHelper.unmodifiable(builder.routing); this.version = builder.version; this.versionType = builder.versionType; @@ -155,8 +154,7 @@ public final Map perFieldAnalyzer() { /** * API name: {@code routing} */ - @Nullable - public final String routing() { + public final List routing() { return this.routing; } @@ -223,9 +221,14 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeEnd(); } - if (this.routing != null) { + if (ApiTypeHelper.isDefined(this.routing)) { generator.writeKey("routing"); - generator.write(this.routing); + generator.writeStartArray(); + for (String item0 : this.routing) { + generator.write(item0); + + } + generator.writeEnd(); } if (this.version != null) { @@ -268,7 +271,7 @@ public static class Builder extends WithJsonObjectBuilderBase implement private Map perFieldAnalyzer; @Nullable - private String routing; + private List routing; @Nullable private Long version; @@ -352,9 +355,21 @@ public final Builder perFieldAnalyzer(String key, String value) { /** * API name: {@code routing} + *

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

    + * Adds one or more values to routing. */ - public final Builder routing(@Nullable String value) { - this.routing = value; + public final Builder routing(String value, String... values) { + this.routing = _listAdd(this.routing, value, values); return this; } @@ -408,7 +423,8 @@ protected static void setupLikeDocumentDeserializer(ObjectDeserializer routing; private final List stopWords; @@ -131,7 +130,7 @@ private MoreLikeThisQuery(Builder builder) { this.minimumShouldMatch = builder.minimumShouldMatch; this.minTermFreq = builder.minTermFreq; this.minWordLength = builder.minWordLength; - this.routing = builder.routing; + this.routing = ApiTypeHelper.unmodifiable(builder.routing); this.stopWords = ApiTypeHelper.unmodifiable(builder.stopWords); this.unlike = ApiTypeHelper.unmodifiable(builder.unlike); this.version = builder.version; @@ -296,8 +295,7 @@ public final Integer minWordLength() { /** * API name: {@code routing} */ - @Nullable - public final String routing() { + public final List routing() { return this.routing; } @@ -414,9 +412,14 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.minWordLength); } - if (this.routing != null) { + if (ApiTypeHelper.isDefined(this.routing)) { generator.writeKey("routing"); - generator.write(this.routing); + generator.writeStartArray(); + for (String item0 : this.routing) { + generator.write(item0); + + } + generator.writeEnd(); } if (ApiTypeHelper.isDefined(this.stopWords)) { @@ -497,7 +500,7 @@ public static class Builder extends QueryBase.AbstractBuilder implement private Integer minWordLength; @Nullable - private String routing; + private List routing; @Nullable private List stopWords; @@ -700,9 +703,21 @@ public final Builder minWordLength(@Nullable Integer value) { /** * API name: {@code routing} + *

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

    + * Adds one or more values to routing. */ - public final Builder routing(@Nullable String value) { - this.routing = value; + public final Builder routing(String value, String... values) { + this.routing = _listAdd(this.routing, value, values); return this; } @@ -825,7 +840,8 @@ protected static void setupMoreLikeThisQueryDeserializer(ObjectDeserializer routing; @Nullable private final Long version; @@ -97,7 +96,7 @@ private PercolateQuery(Builder builder) { this.index = builder.index; this.name = builder.name; this.preference = builder.preference; - this.routing = builder.routing; + this.routing = ApiTypeHelper.unmodifiable(builder.routing); this.version = builder.version; } @@ -189,8 +188,7 @@ public final String preference() { *

    * API name: {@code routing} */ - @Nullable - public final String routing() { + public final List routing() { return this.routing; } @@ -245,9 +243,14 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.preference); } - if (this.routing != null) { + if (ApiTypeHelper.isDefined(this.routing)) { generator.writeKey("routing"); - generator.write(this.routing); + generator.writeStartArray(); + for (String item0 : this.routing) { + generator.write(item0); + + } + generator.writeEnd(); } if (this.version != null) { @@ -286,7 +289,7 @@ public static class Builder extends QueryBase.AbstractBuilder implement private String preference; @Nullable - private String routing; + private List routing; @Nullable private Long version; @@ -381,9 +384,23 @@ public final Builder preference(@Nullable String value) { * Routing used to fetch document to percolate. *

    * API name: {@code routing} + *

    + * Adds all elements of list to routing. + */ + public final Builder routing(List list) { + this.routing = _listAddAll(this.routing, list); + return this; + } + + /** + * Routing used to fetch document to percolate. + *

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

    + * Adds one or more values to routing. */ - public final Builder routing(@Nullable String value) { - this.routing = value; + public final Builder routing(String value, String... values) { + this.routing = _listAdd(this.routing, value, values); return this; } @@ -432,7 +449,8 @@ protected static void setupPercolateQueryDeserializer(ObjectDeserializer routing; // --------------------------------------------------------------------------------------------- @@ -75,7 +75,7 @@ private TermsLookup(Builder builder) { this.index = ApiTypeHelper.requireNonNull(builder.index, this, "index"); this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); this.path = ApiTypeHelper.requireNonNull(builder.path, this, "path"); - this.routing = builder.routing; + this.routing = ApiTypeHelper.unmodifiable(builder.routing); } @@ -107,8 +107,7 @@ public final String path() { /** * API name: {@code routing} */ - @Nullable - public final String routing() { + public final List routing() { return this.routing; } @@ -132,9 +131,14 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("path"); generator.write(this.path); - if (this.routing != null) { + if (ApiTypeHelper.isDefined(this.routing)) { generator.writeKey("routing"); - generator.write(this.routing); + generator.writeStartArray(); + for (String item0 : this.routing) { + generator.write(item0); + + } + generator.writeEnd(); } @@ -159,7 +163,7 @@ public static class Builder extends WithJsonObjectBuilderBase implement private String path; @Nullable - private String routing; + private List routing; /** * Required - API name: {@code index} @@ -187,9 +191,21 @@ public final Builder path(String value) { /** * API name: {@code routing} + *

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

    + * Adds one or more values to routing. */ - public final Builder routing(@Nullable String value) { - this.routing = value; + public final Builder routing(String value, String... values) { + this.routing = _listAdd(this.routing, value, values); return this; } @@ -224,7 +240,8 @@ protected static void setupTermsLookupDeserializer(ObjectDeserializer builder) { @@ -99,6 +104,7 @@ protected AsyncSearchResponseBase(AbstractBuilder builder) { this.startTimeInMillis = ApiTypeHelper.requireNonNull(builder.startTimeInMillis, this, "startTimeInMillis", 0); this.completionTime = builder.completionTime; this.completionTimeInMillis = builder.completionTimeInMillis; + this.error = builder.error; } @@ -189,6 +195,14 @@ public final Long completionTimeInMillis() { return this.completionTimeInMillis; } + /** + * API name: {@code error} + */ + @Nullable + public final ErrorCause error() { + return this.error; + } + /** * Serialize this object to JSON. */ @@ -234,6 +248,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.completionTimeInMillis); } + if (this.error != null) { + generator.writeKey("error"); + this.error.serialize(generator, mapper); + + } } @@ -268,6 +287,9 @@ public abstract static class AbstractBuilder> fn) { + return this.error(fn.apply(new ErrorCause.Builder()).build()); + } + protected abstract BuilderT self(); } @@ -378,6 +415,7 @@ protected static > void setupAsyncSea op.add(AbstractBuilder::completionTime, DateTime._DESERIALIZER, "completion_time"); op.add(AbstractBuilder::completionTimeInMillis, JsonpDeserializer.longDeserializer(), "completion_time_in_millis"); + op.add(AbstractBuilder::error, ErrorCause._DESERIALIZER, "error"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/SubmitRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/SubmitRequest.java index 3352b83e23..8f6ea21cd3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/SubmitRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/SubmitRequest.java @@ -210,8 +210,7 @@ public class SubmitRequest extends RequestBase implements JsonpSerializable { private final List rescore; - @Nullable - private final String routing; + private final List routing; private final Map runtimeMappings; @@ -299,7 +298,7 @@ private SubmitRequest(Builder builder) { this.query = builder.query; this.requestCache = builder.requestCache; this.rescore = ApiTypeHelper.unmodifiable(builder.rescore); - this.routing = builder.routing; + this.routing = ApiTypeHelper.unmodifiable(builder.routing); this.runtimeMappings = ApiTypeHelper.unmodifiable(builder.runtimeMappings); this.scriptFields = ApiTypeHelper.unmodifiable(builder.scriptFields); this.searchAfter = ApiTypeHelper.unmodifiable(builder.searchAfter); @@ -366,8 +365,7 @@ public final Boolean allowPartialSearchResults() { } /** - * Specify whether wildcard and prefix queries should be analyzed (default: - * false) + * Specify whether wildcard and prefix queries should be analyzed *

    * API name: {@code analyze_wildcard} */ @@ -450,7 +448,7 @@ public final List docvalueFields() { /** * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * closed or both *

    * API name: {@code expand_wildcards} */ @@ -634,8 +632,7 @@ public final Query postFilter() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specify the node or shard the operation should be performed on *

    * API name: {@code preference} */ @@ -709,8 +706,7 @@ public final List rescore() { *

    * API name: {@code routing} */ - @Nullable - public final String routing() { + public final List routing() { return this.routing; } @@ -1011,6 +1007,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("profile"); generator.write(this.profile); + } + if (this.projectRouting != null) { + generator.writeKey("project_routing"); + generator.write(this.projectRouting); + } if (this.query != null) { generator.writeKey("query"); @@ -1262,7 +1263,7 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private List rescore; @Nullable - private String routing; + private List routing; @Nullable private Map runtimeMappings; @@ -1399,8 +1400,7 @@ public final Builder allowPartialSearchResults(@Nullable Boolean value) { } /** - * Specify whether wildcard and prefix queries should be analyzed (default: - * false) + * Specify whether wildcard and prefix queries should be analyzed *

    * API name: {@code analyze_wildcard} */ @@ -1518,7 +1518,7 @@ public final Builder docvalueFields(Function * API name: {@code expand_wildcards} *

    @@ -1531,7 +1531,7 @@ public final Builder expandWildcards(List list) { /** * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * closed or both *

    * API name: {@code expand_wildcards} *

    @@ -1861,8 +1861,7 @@ public final Builder postFilter(QueryVariant value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specify the node or shard the operation should be performed on *

    * API name: {@code preference} */ @@ -1989,9 +1988,23 @@ public final Builder rescore(Function> f * A comma-separated list of specific routing values *

    * API name: {@code routing} + *

    + * Adds all elements of list to routing. */ - public final Builder routing(@Nullable String value) { - this.routing = value; + public final Builder routing(List list) { + this.routing = _listAddAll(this.routing, list); + return this; + } + + /** + * A comma-separated list of specific routing values + *

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

    + * Adds one or more values to routing. + */ + public final Builder routing(String value, String... values) { + this.routing = _listAdd(this.routing, value, values); return this; } @@ -2440,6 +2453,7 @@ protected static void setupSubmitRequestDeserializer(ObjectDeserializer v).collect(Collectors.joining(","))); } if (request.ignoreUnavailable != null) { params.put("ignore_unavailable", String.valueOf(request.ignoreUnavailable)); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/DeleteAutoscalingPolicyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/DeleteAutoscalingPolicyRequest.java index a86727e9fc..5c619bda82 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/DeleteAutoscalingPolicyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/DeleteAutoscalingPolicyRequest.java @@ -103,7 +103,7 @@ public final Time masterTimeout() { } /** - * Required - the name of the autoscaling policy + * Required - Name of the autoscaling policy *

    * API name: {@code name} */ @@ -161,7 +161,7 @@ public final Builder masterTimeout(Function> f } /** - * Required - the name of the autoscaling policy + * Required - Name of the autoscaling policy *

    * API name: {@code name} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingPolicyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingPolicyRequest.java index 4faccea7f0..f3f7cac7be 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingPolicyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingPolicyRequest.java @@ -98,7 +98,7 @@ public final Time masterTimeout() { } /** - * Required - the name of the autoscaling policy + * Required - Name of the autoscaling policy *

    * API name: {@code name} */ @@ -142,7 +142,7 @@ public final Builder masterTimeout(Function> f } /** - * Required - the name of the autoscaling policy + * Required - Name of the autoscaling policy *

    * API name: {@code name} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/PutAutoscalingPolicyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/PutAutoscalingPolicyRequest.java index 66e553363a..8633a26f6c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/PutAutoscalingPolicyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/PutAutoscalingPolicyRequest.java @@ -108,7 +108,7 @@ public final Time masterTimeout() { } /** - * Required - the name of the autoscaling policy + * Required - Name of the autoscaling policy *

    * API name: {@code name} */ @@ -183,7 +183,7 @@ public final Builder masterTimeout(Function> f } /** - * Required - the name of the autoscaling policy + * Required - Name of the autoscaling policy *

    * API name: {@code name} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java index 9ab5fb84c4..b6c3297e69 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java @@ -24,6 +24,8 @@ import co.elastic.clients.elasticsearch._types.TimeUnit; 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; @@ -72,8 +74,8 @@ * @see API * specification */ - -public class CountRequest extends CatRequestBase { +@JsonpDeserializable +public class CountRequest extends CatRequestBase implements JsonpSerializable { @Nullable private final Bytes bytes; @@ -147,11 +149,10 @@ public final List index() { } /** - * Specifies a subset of projects to target for the search using project - * metadata tags in a subset of Lucene query syntax. Allowed Lucene queries: the - * _alias tag and a single value (possibly wildcarded). Examples: - * _alias:my-project _alias:_origin _alias:pr Supported in serverless - * only. + * Specifies a subset of projects to target using project metadata tags in a + * subset of Lucene query syntax. Allowed Lucene queries: the _alias tag and a + * single value (possibly wildcarded). Examples: _alias:my-project + * _alias:_origin _alias:pr Supported in serverless only. *

    * API name: {@code project_routing} */ @@ -187,6 +188,25 @@ public final TimeUnit time() { return this.time; } + /** + * 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.projectRouting != null) { + generator.writeKey("project_routing"); + generator.write(this.projectRouting); + + } + + } + // --------------------------------------------------------------------------------------------- /** @@ -301,11 +321,10 @@ public final Builder index(String value, String... values) { } /** - * Specifies a subset of projects to target for the search using project - * metadata tags in a subset of Lucene query syntax. Allowed Lucene queries: the - * _alias tag and a single value (possibly wildcarded). Examples: - * _alias:my-project _alias:_origin _alias:pr Supported in serverless - * only. + * Specifies a subset of projects to target using project metadata tags in a + * subset of Lucene query syntax. Allowed Lucene queries: the _alias tag and a + * single value (possibly wildcarded). Examples: _alias:my-project + * _alias:_origin _alias:pr Supported in serverless only. *

    * API name: {@code project_routing} */ @@ -378,6 +397,20 @@ public CountRequest build() { // --------------------------------------------------------------------------------------------- + /** + * Json deserializer for {@link CountRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + CountRequest::setupCountRequestDeserializer); + + protected static void setupCountRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::projectRouting, JsonpDeserializer.stringDeserializer(), "project_routing"); + + } + + // --------------------------------------------------------------------------------------------- + /** * Endpoint "{@code cat.count}". */ @@ -386,7 +419,7 @@ public CountRequest build() { // Request method request -> { - return "GET"; + return "POST"; }, @@ -448,13 +481,10 @@ public CountRequest build() { if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(","))); } - if (request.projectRouting != null) { - params.put("project_routing", request.projectRouting); - } if (request.time != null) { params.put("time", request.time.jsonValue()); } return params; - }, SimpleEndpoint.emptyMap(), false, CountResponse._DESERIALIZER); + }, SimpleEndpoint.emptyMap(), true, CountResponse._DESERIALIZER); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsRequest.java index 6358831460..4574f4b94c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsRequest.java @@ -21,6 +21,7 @@ import co.elastic.clients.elasticsearch._types.Bytes; import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.ExpandWildcard; import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.elasticsearch._types.TimeUnit; import co.elastic.clients.json.JsonpDeserializable; @@ -74,11 +75,25 @@ */ public class SegmentsRequest extends CatRequestBase { + @Nullable + private final Boolean allowClosed; + + @Nullable + private final Boolean allowNoIndices; + @Nullable private final Bytes bytes; + private final List expandWildcards; + private final List h; + @Nullable + private final Boolean ignoreThrottled; + + @Nullable + private final Boolean ignoreUnavailable; + private final List index; @Nullable @@ -96,8 +111,13 @@ public class SegmentsRequest extends CatRequestBase { private SegmentsRequest(Builder builder) { + this.allowClosed = builder.allowClosed; + this.allowNoIndices = builder.allowNoIndices; this.bytes = builder.bytes; + this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); this.h = ApiTypeHelper.unmodifiable(builder.h); + this.ignoreThrottled = builder.ignoreThrottled; + this.ignoreUnavailable = builder.ignoreUnavailable; this.index = ApiTypeHelper.unmodifiable(builder.index); this.local = builder.local; this.masterTimeout = builder.masterTimeout; @@ -110,6 +130,32 @@ public static SegmentsRequest of(Function + * API name: {@code allow_closed} + */ + @Nullable + public final Boolean allowClosed() { + return this.allowClosed; + } + + /** + * 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} + */ + @Nullable + public final Boolean allowNoIndices() { + return this.allowNoIndices; + } + /** * Sets the units for columns that contain a byte-size value. Note that * byte-size value units work in terms of powers of 1024. For instance @@ -128,6 +174,17 @@ public final Bytes bytes() { return this.bytes; } + /** + * Type of index that wildcard expressions 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} + */ + public final List expandWildcards() { + return this.expandWildcards; + } + /** * A comma-separated list of columns names to display. It supports simple * wildcards. @@ -138,6 +195,26 @@ public final List h() { return this.h; } + /** + * If true, concrete, expanded or aliased indices are ignored when frozen. + *

    + * API name: {@code ignore_throttled} + */ + @Nullable + public final Boolean ignoreThrottled() { + return this.ignoreThrottled; + } + + /** + * If true, missing or closed indices are not included in the response. + *

    + * API name: {@code ignore_unavailable} + */ + @Nullable + public final Boolean ignoreUnavailable() { + return this.ignoreUnavailable; + } + /** * A comma-separated list of data streams, indices, and aliases used to limit * the request. Supports wildcards (*). To target all data streams @@ -209,12 +286,27 @@ public final TimeUnit time() { public static class Builder extends CatRequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Boolean allowClosed; + + @Nullable + private Boolean allowNoIndices; + @Nullable private Bytes bytes; + @Nullable + private List expandWildcards; + @Nullable private List h; + @Nullable + private Boolean ignoreThrottled; + + @Nullable + private Boolean ignoreUnavailable; + @Nullable private List index; @@ -230,6 +322,32 @@ public static class Builder extends CatRequestBase.AbstractBuilder @Nullable private TimeUnit time; + /** + * If true, allow closed indices to be returned in the response otherwise if + * false, keep the legacy behaviour of throwing an exception if index pattern + * matches closed indices + *

    + * API name: {@code allow_closed} + */ + public final Builder allowClosed(@Nullable Boolean value) { + this.allowClosed = value; + return this; + } + + /** + * 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} + */ + public final Builder allowNoIndices(@Nullable Boolean value) { + this.allowNoIndices = value; + return this; + } + /** * Sets the units for columns that contain a byte-size value. Note that * byte-size value units work in terms of powers of 1024. For instance @@ -248,6 +366,34 @@ public final Builder bytes(@Nullable Bytes value) { return this; } + /** + * Type of index that wildcard expressions 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} + *

    + * Adds all elements of list to expandWildcards. + */ + public final Builder expandWildcards(List list) { + this.expandWildcards = _listAddAll(this.expandWildcards, list); + return this; + } + + /** + * Type of index that wildcard expressions 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} + *

    + * Adds one or more values to expandWildcards. + */ + public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values) { + this.expandWildcards = _listAdd(this.expandWildcards, value, values); + return this; + } + /** * A comma-separated list of columns names to display. It supports simple * wildcards. @@ -288,6 +434,26 @@ public final Builder h(CatSegmentsColumn value, CatSegmentsColumn... values) { return this; } + /** + * If true, concrete, expanded or aliased indices are ignored when frozen. + *

    + * API name: {@code ignore_throttled} + */ + public final Builder ignoreThrottled(@Nullable Boolean value) { + this.ignoreThrottled = value; + return this; + } + + /** + * If true, missing or closed indices are not included in the response. + *

    + * API name: {@code ignore_unavailable} + */ + public final Builder ignoreUnavailable(@Nullable Boolean value) { + this.ignoreUnavailable = value; + return this; + } + /** * A comma-separated list of data streams, indices, and aliases used to limit * the request. Supports wildcards (*). To target all data streams @@ -480,12 +646,28 @@ public SegmentsRequest build() { if (ApiTypeHelper.isDefined(request.s)) { params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(","))); } + if (ApiTypeHelper.isDefined(request.expandWildcards)) { + params.put("expand_wildcards", + request.expandWildcards.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); + } + if (request.ignoreUnavailable != null) { + params.put("ignore_unavailable", String.valueOf(request.ignoreUnavailable)); + } + if (request.allowNoIndices != null) { + params.put("allow_no_indices", String.valueOf(request.allowNoIndices)); + } + if (request.allowClosed != null) { + params.put("allow_closed", String.valueOf(request.allowClosed)); + } if (request.bytes != null) { params.put("bytes", request.bytes.jsonValue()); } if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.ignoreThrottled != null) { + params.put("ignore_throttled", String.valueOf(request.ignoreThrottled)); + } if (request.time != null) { params.put("time", request.time.jsonValue()); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/indices/IndicesRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/indices/IndicesRecord.java index 533b3b1eec..68fe8f5e57 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/indices/IndicesRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/indices/IndicesRecord.java @@ -698,7 +698,11 @@ public final String rep() { } /** - * available docs + * The number of documents in the index, including hidden nested documents. For + * indices with semantic_text fields or other nested field types, + * this count includes the internal nested documents. To get the logical + * document count (excluding nested documents), use the _count API + * or _cat/count API instead. *

    * API name: {@code docs.count} */ @@ -3282,7 +3286,11 @@ public final Builder rep(@Nullable String value) { } /** - * available docs + * The number of documents in the index, including hidden nested documents. For + * indices with semantic_text fields or other nested field types, + * this count includes the internal nested documents. To get the logical + * document count (excluding nested documents), use the _count API + * or _cat/count API instead. *

    * API name: {@code docs.count} */ 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 d3dde85f64..ba876ee09d 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 @@ -105,10 +105,12 @@ public final CompletableFuture deleteAutoFollow // ----- Endpoint: ccr.follow /** - * Create a follower. Create a cross-cluster replication follower index that - * follows a specific leader index. When the API returns, the follower index - * exists and cross-cluster replication starts replicating operations from the - * leader index to the follower index. + * Create a follower. + *

    + * Create a cross-cluster replication follower index that follows a specific + * leader index. When the API returns, the follower index exists and + * cross-cluster replication starts replicating operations from the leader index + * to the follower index. * * @see Documentation @@ -123,10 +125,12 @@ public CompletableFuture follow(FollowRequest request) { } /** - * Create a follower. Create a cross-cluster replication follower index that - * follows a specific leader index. When the API returns, the follower index - * exists and cross-cluster replication starts replicating operations from the - * leader index to the follower index. + * Create a follower. + *

    + * Create a cross-cluster replication follower index that follows a specific + * leader index. When the API returns, the follower index exists and + * cross-cluster replication starts replicating operations from the leader index + * to the follower index. * * @param fn * a function that initializes a builder to create the @@ -226,8 +230,10 @@ public final CompletableFuture followStats( // ----- Endpoint: ccr.forget_follower /** - * Forget a follower. Remove the cross-cluster replication follower retention - * leases from the leader. + * Forget a follower. + *

    + * Remove the cross-cluster replication follower retention leases from the + * leader. *

    * A following index takes out retention leases on its leader index. These * leases are used to increase the likelihood that the shards of the leader @@ -261,8 +267,10 @@ public CompletableFuture forgetFollower(ForgetFollowerRe } /** - * Forget a follower. Remove the cross-cluster replication follower retention - * leases from the leader. + * Forget a follower. + *

    + * Remove the cross-cluster replication follower retention leases from the + * leader. *

    * A following index takes out retention leases on its leader index. These * leases are used to increase the likelihood that the shards of the leader @@ -450,12 +458,13 @@ public final CompletableFuture pauseFollow( // ----- Endpoint: ccr.put_auto_follow_pattern /** - * Create or update auto-follow patterns. Create a collection of cross-cluster - * replication auto-follow patterns for a remote cluster. Newly created indices - * on the remote cluster that match any of the patterns are automatically - * configured as follower indices. Indices on the remote cluster that were - * created before the auto-follow pattern was created will not be auto-followed - * even if they match the pattern. + * Create or update auto-follow patterns. + *

    + * Create a collection of cross-cluster replication auto-follow patterns for a + * remote cluster. Newly created indices on the remote cluster that match any of + * the patterns are automatically configured as follower indices. Indices on the + * remote cluster that were created before the auto-follow pattern was created + * will not be auto-followed even if they match the pattern. *

    * This API can also be used to update auto-follow patterns. NOTE: Follower * indices that were configured automatically before updating an auto-follow @@ -475,12 +484,13 @@ public CompletableFuture putAutoFollowPattern(PutA } /** - * Create or update auto-follow patterns. Create a collection of cross-cluster - * replication auto-follow patterns for a remote cluster. Newly created indices - * on the remote cluster that match any of the patterns are automatically - * configured as follower indices. Indices on the remote cluster that were - * created before the auto-follow pattern was created will not be auto-followed - * even if they match the pattern. + * Create or update auto-follow patterns. + *

    + * Create a collection of cross-cluster replication auto-follow patterns for a + * remote cluster. Newly created indices on the remote cluster that match any of + * the patterns are automatically configured as follower indices. Indices on the + * remote cluster that were created before the auto-follow pattern was created + * will not be auto-followed even if they match the pattern. *

    * This API can also be used to update auto-follow patterns. NOTE: Follower * indices that were configured automatically before updating an auto-follow @@ -549,11 +559,13 @@ public final CompletableFuture resumeAutoFollow // ----- Endpoint: ccr.resume_follow /** - * Resume a follower. Resume a cross-cluster replication follower index that was - * paused. The follower index could have been paused with the pause follower - * API. Alternatively it could be paused due to replication that cannot be - * retried due to failures during following tasks. When this API returns, the - * follower index will resume fetching operations from the leader index. + * Resume a follower. + *

    + * Resume a cross-cluster replication follower index that was paused. The + * follower index could have been paused with the pause follower API. + * Alternatively it could be paused due to replication that cannot be retried + * due to failures during following tasks. When this API returns, the follower + * index will resume fetching operations from the leader index. * * @see Documentation @@ -568,11 +580,13 @@ public CompletableFuture resumeFollow(ResumeFollowRequest } /** - * Resume a follower. Resume a cross-cluster replication follower index that was - * paused. The follower index could have been paused with the pause follower - * API. Alternatively it could be paused due to replication that cannot be - * retried due to failures during following tasks. When this API returns, the - * follower index will resume fetching operations from the leader index. + * Resume a follower. + *

    + * Resume a cross-cluster replication follower index that was paused. The + * follower index could have been paused with the pause follower API. + * Alternatively it could be paused due to replication that cannot be retried + * due to failures during following tasks. When this API returns, the follower + * index will resume fetching operations from the leader index. * * @param fn * a function that initializes a builder to create the 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 87cdd47a3d..accce4a706 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 @@ -107,10 +107,12 @@ public final DeleteAutoFollowPatternResponse deleteAutoFollowPattern( // ----- Endpoint: ccr.follow /** - * Create a follower. Create a cross-cluster replication follower index that - * follows a specific leader index. When the API returns, the follower index - * exists and cross-cluster replication starts replicating operations from the - * leader index to the follower index. + * Create a follower. + *

    + * Create a cross-cluster replication follower index that follows a specific + * leader index. When the API returns, the follower index exists and + * cross-cluster replication starts replicating operations from the leader index + * to the follower index. * * @see Documentation @@ -125,10 +127,12 @@ public FollowResponse follow(FollowRequest request) throws IOException, Elastics } /** - * Create a follower. Create a cross-cluster replication follower index that - * follows a specific leader index. When the API returns, the follower index - * exists and cross-cluster replication starts replicating operations from the - * leader index to the follower index. + * Create a follower. + *

    + * Create a cross-cluster replication follower index that follows a specific + * leader index. When the API returns, the follower index exists and + * cross-cluster replication starts replicating operations from the leader index + * to the follower index. * * @param fn * a function that initializes a builder to create the @@ -229,8 +233,10 @@ public final FollowStatsResponse followStats( // ----- Endpoint: ccr.forget_follower /** - * Forget a follower. Remove the cross-cluster replication follower retention - * leases from the leader. + * Forget a follower. + *

    + * Remove the cross-cluster replication follower retention leases from the + * leader. *

    * A following index takes out retention leases on its leader index. These * leases are used to increase the likelihood that the shards of the leader @@ -265,8 +271,10 @@ public ForgetFollowerResponse forgetFollower(ForgetFollowerRequest request) } /** - * Forget a follower. Remove the cross-cluster replication follower retention - * leases from the leader. + * Forget a follower. + *

    + * Remove the cross-cluster replication follower retention leases from the + * leader. *

    * A following index takes out retention leases on its leader index. These * leases are used to increase the likelihood that the shards of the leader @@ -459,12 +467,13 @@ public final PauseFollowResponse pauseFollow( // ----- Endpoint: ccr.put_auto_follow_pattern /** - * Create or update auto-follow patterns. Create a collection of cross-cluster - * replication auto-follow patterns for a remote cluster. Newly created indices - * on the remote cluster that match any of the patterns are automatically - * configured as follower indices. Indices on the remote cluster that were - * created before the auto-follow pattern was created will not be auto-followed - * even if they match the pattern. + * Create or update auto-follow patterns. + *

    + * Create a collection of cross-cluster replication auto-follow patterns for a + * remote cluster. Newly created indices on the remote cluster that match any of + * the patterns are automatically configured as follower indices. Indices on the + * remote cluster that were created before the auto-follow pattern was created + * will not be auto-followed even if they match the pattern. *

    * This API can also be used to update auto-follow patterns. NOTE: Follower * indices that were configured automatically before updating an auto-follow @@ -485,12 +494,13 @@ public PutAutoFollowPatternResponse putAutoFollowPattern(PutAutoFollowPatternReq } /** - * Create or update auto-follow patterns. Create a collection of cross-cluster - * replication auto-follow patterns for a remote cluster. Newly created indices - * on the remote cluster that match any of the patterns are automatically - * configured as follower indices. Indices on the remote cluster that were - * created before the auto-follow pattern was created will not be auto-followed - * even if they match the pattern. + * Create or update auto-follow patterns. + *

    + * Create a collection of cross-cluster replication auto-follow patterns for a + * remote cluster. Newly created indices on the remote cluster that match any of + * the patterns are automatically configured as follower indices. Indices on the + * remote cluster that were created before the auto-follow pattern was created + * will not be auto-followed even if they match the pattern. *

    * This API can also be used to update auto-follow patterns. NOTE: Follower * indices that were configured automatically before updating an auto-follow @@ -561,11 +571,13 @@ public final ResumeAutoFollowPatternResponse resumeAutoFollowPattern( // ----- Endpoint: ccr.resume_follow /** - * Resume a follower. Resume a cross-cluster replication follower index that was - * paused. The follower index could have been paused with the pause follower - * API. Alternatively it could be paused due to replication that cannot be - * retried due to failures during following tasks. When this API returns, the - * follower index will resume fetching operations from the leader index. + * Resume a follower. + *

    + * Resume a cross-cluster replication follower index that was paused. The + * follower index could have been paused with the pause follower API. + * Alternatively it could be paused due to replication that cannot be retried + * due to failures during following tasks. When this API returns, the follower + * index will resume fetching operations from the leader index. * * @see Documentation @@ -580,11 +592,13 @@ public ResumeFollowResponse resumeFollow(ResumeFollowRequest request) throws IOE } /** - * Resume a follower. Resume a cross-cluster replication follower index that was - * paused. The follower index could have been paused with the pause follower - * API. Alternatively it could be paused due to replication that cannot be - * retried due to failures during following tasks. When this API returns, the - * follower index will resume fetching operations from the leader index. + * Resume a follower. + *

    + * Resume a cross-cluster replication follower index that was paused. The + * follower index could have been paused with the pause follower API. + * Alternatively it could be paused due to replication that cannot be retried + * due to failures during following tasks. When this API returns, the follower + * index will resume fetching operations from the leader index. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowRequest.java index a9e968997a..55793614ec 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowRequest.java @@ -62,10 +62,12 @@ // typedef: ccr.follow.Request /** - * Create a follower. Create a cross-cluster replication follower index that - * follows a specific leader index. When the API returns, the follower index - * exists and cross-cluster replication starts replicating operations from the - * leader index to the follower index. + * Create a follower. + *

    + * Create a cross-cluster replication follower index that follows a specific + * leader index. When the API returns, the follower index exists and + * cross-cluster replication starts replicating operations from the leader index + * to the follower index. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ForgetFollowerRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ForgetFollowerRequest.java index 0881761e6d..e2b4f1af42 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ForgetFollowerRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ForgetFollowerRequest.java @@ -58,8 +58,10 @@ // typedef: ccr.forget_follower.Request /** - * Forget a follower. Remove the cross-cluster replication follower retention - * leases from the leader. + * Forget a follower. + *

    + * Remove the cross-cluster replication follower retention leases from the + * leader. *

    * A following index takes out retention leases on its leader index. These * leases are used to increase the likelihood that the shards of the leader @@ -144,8 +146,8 @@ public final String followerIndexUuid() { } /** - * Required - the name of the leader index for which specified follower - * retention leases should be removed + * Required - Name of the leader index for which specified follower retention + * leases should be removed *

    * API name: {@code index} */ @@ -257,8 +259,8 @@ public final Builder followerIndexUuid(@Nullable String value) { } /** - * Required - the name of the leader index for which specified follower - * retention leases should be removed + * Required - Name of the leader index for which specified follower retention + * leases should be removed *

    * API name: {@code index} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/PutAutoFollowPatternRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/PutAutoFollowPatternRequest.java index a98cd5d5db..26f6535c9d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/PutAutoFollowPatternRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/PutAutoFollowPatternRequest.java @@ -61,12 +61,13 @@ // typedef: ccr.put_auto_follow_pattern.Request /** - * Create or update auto-follow patterns. Create a collection of cross-cluster - * replication auto-follow patterns for a remote cluster. Newly created indices - * on the remote cluster that match any of the patterns are automatically - * configured as follower indices. Indices on the remote cluster that were - * created before the auto-follow pattern was created will not be auto-followed - * even if they match the pattern. + * Create or update auto-follow patterns. + *

    + * Create a collection of cross-cluster replication auto-follow patterns for a + * remote cluster. Newly created indices on the remote cluster that match any of + * the patterns are automatically configured as follower indices. Indices on the + * remote cluster that were created before the auto-follow pattern was created + * will not be auto-followed even if they match the pattern. *

    * This API can also be used to update auto-follow patterns. NOTE: Follower * indices that were configured automatically before updating an auto-follow diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ResumeFollowRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ResumeFollowRequest.java index 587e9efb82..8ce810e4ea 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ResumeFollowRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ResumeFollowRequest.java @@ -59,11 +59,13 @@ // typedef: ccr.resume_follow.Request /** - * Resume a follower. Resume a cross-cluster replication follower index that was - * paused. The follower index could have been paused with the pause follower - * API. Alternatively it could be paused due to replication that cannot be - * retried due to failures during following tasks. When this API returns, the - * follower index will resume fetching operations from the leader index. + * Resume a follower. + *

    + * Resume a cross-cluster replication follower index that was paused. The + * follower index could have been paused with the pause follower API. + * Alternatively it could be paused due to replication that cannot be retried + * due to failures during following tasks. When this API returns, the follower + * index will resume fetching operations from the leader index. * * @see API * specification @@ -129,7 +131,7 @@ public static ResumeFollowRequest of(Function * API name: {@code index} */ @@ -336,7 +338,7 @@ public static class Builder extends RequestBase.AbstractBuilder private Time readPollTimeout; /** - * Required - The name of the follow index to resume following. + * Required - Name of the follow index to resume following *

    * API name: {@code index} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/AllocationExplainRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/AllocationExplainRequest.java index dcaaaecc8f..8b7d8e2611 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/AllocationExplainRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/AllocationExplainRequest.java @@ -60,16 +60,18 @@ // typedef: cluster.allocation_explain.Request /** - * Explain the shard allocations. Get explanations for shard allocations in the - * cluster. This API accepts the current_node, index, primary and shard - * parameters in the request body or in query parameters, but not in both at the - * same time. For unassigned shards, it provides an explanation for why the - * shard is unassigned. For assigned shards, it provides an explanation for why - * the shard is remaining on its current node and has not moved or rebalanced to - * another node. This API can be very useful when attempting to diagnose why a - * shard is unassigned or why a shard continues to remain on its current node - * when you might expect otherwise. Refer to the linked documentation for - * examples of how to troubleshoot allocation issues using this API. + * Explain the shard allocations. + *

    + * Get explanations for shard allocations in the cluster. This API accepts the + * current_node, index, primary and shard parameters in the request body or in + * query parameters, but not in both at the same time. For unassigned shards, it + * provides an explanation for why the shard is unassigned. For assigned shards, + * it provides an explanation for why the shard is remaining on its current node + * and has not moved or rebalanced to another node. This API can be very useful + * when attempting to diagnose why a shard is unassigned or why a shard + * continues to remain on its current node when you might expect otherwise. + * Refer to the linked documentation for examples of how to troubleshoot + * allocation issues using this API. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ClusterInfoRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ClusterInfoRequest.java index e0cbc76f9a..22646ebbfa 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ClusterInfoRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ClusterInfoRequest.java @@ -58,7 +58,9 @@ // typedef: cluster.info.Request /** - * Get cluster info. Returns basic information about the cluster. + * Get cluster info. + *

    + * Returns basic information about the cluster. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ClusterStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ClusterStatsRequest.java index 0d4e38fc4d..76217bc81f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ClusterStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ClusterStatsRequest.java @@ -59,9 +59,11 @@ // typedef: cluster.stats.Request /** - * Get cluster statistics. Get basic index metrics (shard numbers, store size, - * memory usage) and information about the current nodes that form the cluster - * (number, roles, os, jvm versions, memory usage, cpu and installed plugins). + * Get cluster statistics. + *

    + * Get basic index metrics (shard numbers, store size, memory usage) and + * information about the current nodes that form the cluster (number, roles, os, + * jvm versions, memory usage, cpu and installed plugins). * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplateSummary.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplateSummary.java index 047a99518f..1612ebd055 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplateSummary.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplateSummary.java @@ -22,7 +22,7 @@ import co.elastic.clients.elasticsearch._types.mapping.TypeMapping; import co.elastic.clients.elasticsearch.indices.AliasDefinition; import co.elastic.clients.elasticsearch.indices.DataStreamLifecycleWithRollover; -import co.elastic.clients.elasticsearch.indices.DataStreamOptionsTemplate; +import co.elastic.clients.elasticsearch.indices.DataStreamOptions; import co.elastic.clients.elasticsearch.indices.IndexSettings; import co.elastic.clients.json.JsonData; import co.elastic.clients.json.JsonpDeserializable; @@ -84,7 +84,7 @@ public class ComponentTemplateSummary implements JsonpSerializable { private final DataStreamLifecycleWithRollover lifecycle; @Nullable - private final DataStreamOptionsTemplate dataStreamOptions; + private final DataStreamOptions dataStreamOptions; // --------------------------------------------------------------------------------------------- @@ -153,7 +153,7 @@ public final DataStreamLifecycleWithRollover lifecycle() { * API name: {@code data_stream_options} */ @Nullable - public final DataStreamOptionsTemplate dataStreamOptions() { + public final DataStreamOptions dataStreamOptions() { return this.dataStreamOptions; } @@ -257,7 +257,7 @@ public static class Builder extends WithJsonObjectBuilderBase private DataStreamLifecycleWithRollover lifecycle; @Nullable - private DataStreamOptionsTemplate dataStreamOptions; + private DataStreamOptions dataStreamOptions; /** * API name: {@code _meta} @@ -379,7 +379,7 @@ public final Builder lifecycle( /** * API name: {@code data_stream_options} */ - public final Builder dataStreamOptions(@Nullable DataStreamOptionsTemplate value) { + public final Builder dataStreamOptions(@Nullable DataStreamOptions value) { this.dataStreamOptions = value; return this; } @@ -388,8 +388,8 @@ public final Builder dataStreamOptions(@Nullable DataStreamOptionsTemplate value * API name: {@code data_stream_options} */ public final Builder dataStreamOptions( - Function> fn) { - return this.dataStreamOptions(fn.apply(new DataStreamOptionsTemplate.Builder()).build()); + Function> fn) { + return this.dataStreamOptions(fn.apply(new DataStreamOptions.Builder()).build()); } @Override @@ -427,7 +427,7 @@ protected static void setupComponentTemplateSummaryDeserializer( op.add(Builder::mappings, TypeMapping._DESERIALIZER, "mappings"); op.add(Builder::aliases, JsonpDeserializer.stringMapDeserializer(AliasDefinition._DESERIALIZER), "aliases"); op.add(Builder::lifecycle, DataStreamLifecycleWithRollover._DESERIALIZER, "lifecycle"); - op.add(Builder::dataStreamOptions, DataStreamOptionsTemplate._DESERIALIZER, "data_stream_options"); + op.add(Builder::dataStreamOptions, DataStreamOptions._DESERIALIZER, "data_stream_options"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteComponentTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteComponentTemplateRequest.java index 095f694f79..2ab2efd72d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteComponentTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteComponentTemplateRequest.java @@ -58,9 +58,10 @@ // typedef: cluster.delete_component_template.Request /** - * Delete component templates. Component templates are building blocks for - * constructing index templates that specify index mappings, settings, and - * aliases. + * Delete component templates. + *

    + * Component templates are building blocks for constructing index templates that + * specify index mappings, settings, and aliases. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteVotingConfigExclusionsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteVotingConfigExclusionsRequest.java index f2693fb577..3c01983203 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteVotingConfigExclusionsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteVotingConfigExclusionsRequest.java @@ -58,8 +58,9 @@ // typedef: cluster.delete_voting_config_exclusions.Request /** - * Clear cluster voting config exclusions. Remove master-eligible nodes from the - * voting configuration exclusion list. + * Clear cluster voting config exclusions. + *

    + * Remove master-eligible nodes from the voting configuration exclusion list. * * @see API 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 1d54471ddd..9cca5bca50 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 @@ -71,16 +71,18 @@ public ElasticsearchClusterAsyncClient withTransportOptions(@Nullable TransportO // ----- Endpoint: cluster.allocation_explain /** - * Explain the shard allocations. Get explanations for shard allocations in the - * cluster. This API accepts the current_node, index, primary and shard - * parameters in the request body or in query parameters, but not in both at the - * same time. For unassigned shards, it provides an explanation for why the - * shard is unassigned. For assigned shards, it provides an explanation for why - * the shard is remaining on its current node and has not moved or rebalanced to - * another node. This API can be very useful when attempting to diagnose why a - * shard is unassigned or why a shard continues to remain on its current node - * when you might expect otherwise. Refer to the linked documentation for - * examples of how to troubleshoot allocation issues using this API. + * Explain the shard allocations. + *

    + * Get explanations for shard allocations in the cluster. This API accepts the + * current_node, index, primary and shard parameters in the request body or in + * query parameters, but not in both at the same time. For unassigned shards, it + * provides an explanation for why the shard is unassigned. For assigned shards, + * it provides an explanation for why the shard is remaining on its current node + * and has not moved or rebalanced to another node. This API can be very useful + * when attempting to diagnose why a shard is unassigned or why a shard + * continues to remain on its current node when you might expect otherwise. + * Refer to the linked documentation for examples of how to troubleshoot + * allocation issues using this API. * * @see Documentation @@ -95,16 +97,18 @@ public CompletableFuture allocationExplain(Allocation } /** - * Explain the shard allocations. Get explanations for shard allocations in the - * cluster. This API accepts the current_node, index, primary and shard - * parameters in the request body or in query parameters, but not in both at the - * same time. For unassigned shards, it provides an explanation for why the - * shard is unassigned. For assigned shards, it provides an explanation for why - * the shard is remaining on its current node and has not moved or rebalanced to - * another node. This API can be very useful when attempting to diagnose why a - * shard is unassigned or why a shard continues to remain on its current node - * when you might expect otherwise. Refer to the linked documentation for - * examples of how to troubleshoot allocation issues using this API. + * Explain the shard allocations. + *

    + * Get explanations for shard allocations in the cluster. This API accepts the + * current_node, index, primary and shard parameters in the request body or in + * query parameters, but not in both at the same time. For unassigned shards, it + * provides an explanation for why the shard is unassigned. For assigned shards, + * it provides an explanation for why the shard is remaining on its current node + * and has not moved or rebalanced to another node. This API can be very useful + * when attempting to diagnose why a shard is unassigned or why a shard + * continues to remain on its current node when you might expect otherwise. + * Refer to the linked documentation for examples of how to troubleshoot + * allocation issues using this API. * * @param fn * a function that initializes a builder to create the @@ -120,16 +124,18 @@ public final CompletableFuture allocationExplain( } /** - * Explain the shard allocations. Get explanations for shard allocations in the - * cluster. This API accepts the current_node, index, primary and shard - * parameters in the request body or in query parameters, but not in both at the - * same time. For unassigned shards, it provides an explanation for why the - * shard is unassigned. For assigned shards, it provides an explanation for why - * the shard is remaining on its current node and has not moved or rebalanced to - * another node. This API can be very useful when attempting to diagnose why a - * shard is unassigned or why a shard continues to remain on its current node - * when you might expect otherwise. Refer to the linked documentation for - * examples of how to troubleshoot allocation issues using this API. + * Explain the shard allocations. + *

    + * Get explanations for shard allocations in the cluster. This API accepts the + * current_node, index, primary and shard parameters in the request body or in + * query parameters, but not in both at the same time. For unassigned shards, it + * provides an explanation for why the shard is unassigned. For assigned shards, + * it provides an explanation for why the shard is remaining on its current node + * and has not moved or rebalanced to another node. This API can be very useful + * when attempting to diagnose why a shard is unassigned or why a shard + * continues to remain on its current node when you might expect otherwise. + * Refer to the linked documentation for examples of how to troubleshoot + * allocation issues using this API. * * @see Documentation @@ -144,9 +150,10 @@ public CompletableFuture allocationExplain() { // ----- Endpoint: cluster.delete_component_template /** - * Delete component templates. Component templates are building blocks for - * constructing index templates that specify index mappings, settings, and - * aliases. + * Delete component templates. + *

    + * Component templates are building blocks for constructing index templates that + * specify index mappings, settings, and aliases. * * @see Documentation @@ -162,9 +169,10 @@ public CompletableFuture deleteComponentTemplat } /** - * Delete component templates. Component templates are building blocks for - * constructing index templates that specify index mappings, settings, and - * aliases. + * Delete component templates. + *

    + * Component templates are building blocks for constructing index templates that + * specify index mappings, settings, and aliases. * * @param fn * a function that initializes a builder to create the @@ -182,8 +190,9 @@ public final CompletableFuture deleteComponentT // ----- Endpoint: cluster.delete_voting_config_exclusions /** - * Clear cluster voting config exclusions. Remove master-eligible nodes from the - * voting configuration exclusion list. + * Clear cluster voting config exclusions. + *

    + * Remove master-eligible nodes from the voting configuration exclusion list. * * @see Documentation @@ -199,8 +208,9 @@ public CompletableFuture deleteVotingConfigExclusions( } /** - * Clear cluster voting config exclusions. Remove master-eligible nodes from the - * voting configuration exclusion list. + * Clear cluster voting config exclusions. + *

    + * Remove master-eligible nodes from the voting configuration exclusion list. * * @param fn * a function that initializes a builder to create the @@ -216,8 +226,9 @@ public final CompletableFuture deleteVotingConfigExclusions( } /** - * Clear cluster voting config exclusions. Remove master-eligible nodes from the - * voting configuration exclusion list. + * Clear cluster voting config exclusions. + *

    + * Remove master-eligible nodes from the voting configuration exclusion list. * * @see Documentation @@ -232,8 +243,9 @@ public CompletableFuture deleteVotingConfigExclusions() { // ----- Endpoint: cluster.exists_component_template /** - * Check component templates. Returns information about whether a particular - * component template exists. + * Check component templates. + *

    + * Returns information about whether a particular component template exists. * * @see Documentation @@ -248,8 +260,9 @@ public CompletableFuture existsComponentTemplate(ExistsComponen } /** - * Check component templates. Returns information about whether a particular - * component template exists. + * Check component templates. + *

    + * Returns information about whether a particular component template exists. * * @param fn * a function that initializes a builder to create the @@ -267,7 +280,9 @@ public final CompletableFuture existsComponentTemplate( // ----- Endpoint: cluster.get_component_template /** - * Get component templates. Get information about component templates. + * Get component templates. + *

    + * Get information about component templates. * * @see Documentation @@ -282,7 +297,9 @@ public CompletableFuture getComponentTemplate(GetC } /** - * Get component templates. Get information about component templates. + * Get component templates. + *

    + * Get information about component templates. * * @param fn * a function that initializes a builder to create the @@ -298,7 +315,9 @@ public final CompletableFuture getComponentTemplat } /** - * Get component templates. Get information about component templates. + * Get component templates. + *

    + * Get information about component templates. * * @see Documentation @@ -453,7 +472,9 @@ public CompletableFuture health() { // ----- Endpoint: cluster.info /** - * Get cluster info. Returns basic information about the cluster. + * Get cluster info. + *

    + * Returns basic information about the cluster. * * @see Documentation @@ -468,7 +489,9 @@ public CompletableFuture info(ClusterInfoRequest request) { } /** - * Get cluster info. Returns basic information about the cluster. + * Get cluster info. + *

    + * Returns basic information about the cluster. * * @param fn * a function that initializes a builder to create the @@ -486,9 +509,10 @@ public final CompletableFuture info( // ----- Endpoint: cluster.pending_tasks /** - * Get the pending cluster tasks. Get information about cluster-level changes - * (such as create index, update mapping, allocate or fail shard) that have not - * yet taken effect. + * Get the pending cluster tasks. + *

    + * Get information about cluster-level changes (such as create index, update + * mapping, allocate or fail shard) that have not yet taken effect. *

    * NOTE: This API returns a list of any pending updates to the cluster state. * These are distinct from the tasks reported by the task management API which @@ -510,9 +534,10 @@ public CompletableFuture pendingTasks(PendingTasksRequest } /** - * Get the pending cluster tasks. Get information about cluster-level changes - * (such as create index, update mapping, allocate or fail shard) that have not - * yet taken effect. + * Get the pending cluster tasks. + *

    + * Get information about cluster-level changes (such as create index, update + * mapping, allocate or fail shard) that have not yet taken effect. *

    * NOTE: This API returns a list of any pending updates to the cluster state. * These are distinct from the tasks reported by the task management API which @@ -535,9 +560,10 @@ public final CompletableFuture pendingTasks( } /** - * Get the pending cluster tasks. Get information about cluster-level changes - * (such as create index, update mapping, allocate or fail shard) that have not - * yet taken effect. + * Get the pending cluster tasks. + *

    + * Get information about cluster-level changes (such as create index, update + * mapping, allocate or fail shard) that have not yet taken effect. *

    * NOTE: This API returns a list of any pending updates to the cluster state. * These are distinct from the tasks reported by the task management API which @@ -559,16 +585,17 @@ public CompletableFuture pendingTasks() { // ----- Endpoint: cluster.post_voting_config_exclusions /** - * Update voting configuration exclusions. Update the cluster voting config - * exclusions by node IDs or node names. By default, if there are more than - * three master-eligible nodes in the cluster and you remove fewer than half of - * the master-eligible nodes in the cluster at once, the voting configuration - * automatically shrinks. If you want to shrink the voting configuration to - * contain fewer than three nodes or to remove half or more of the - * master-eligible nodes in the cluster at once, use this API to remove - * departing nodes from the voting configuration manually. The API adds an entry - * for each specified node to the cluster’s voting configuration exclusions - * list. It then waits until the cluster has reconfigured its voting + * Update voting configuration exclusions. + *

    + * Update the cluster voting config exclusions by node IDs or node names. By + * default, if there are more than three master-eligible nodes in the cluster + * and you remove fewer than half of the master-eligible nodes in the cluster at + * once, the voting configuration automatically shrinks. If you want to shrink + * the voting configuration to contain fewer than three nodes or to remove half + * or more of the master-eligible nodes in the cluster at once, use this API to + * remove departing nodes from the voting configuration manually. The API adds + * an entry for each specified node to the cluster’s voting configuration + * exclusions list. It then waits until the cluster has reconfigured its voting * configuration to exclude the specified nodes. *

    * Clusters should have no voting configuration exclusions in normal operation. @@ -609,16 +636,17 @@ public CompletableFuture postVotingConfigExclusions(PostVotingC } /** - * Update voting configuration exclusions. Update the cluster voting config - * exclusions by node IDs or node names. By default, if there are more than - * three master-eligible nodes in the cluster and you remove fewer than half of - * the master-eligible nodes in the cluster at once, the voting configuration - * automatically shrinks. If you want to shrink the voting configuration to - * contain fewer than three nodes or to remove half or more of the - * master-eligible nodes in the cluster at once, use this API to remove - * departing nodes from the voting configuration manually. The API adds an entry - * for each specified node to the cluster’s voting configuration exclusions - * list. It then waits until the cluster has reconfigured its voting + * Update voting configuration exclusions. + *

    + * Update the cluster voting config exclusions by node IDs or node names. By + * default, if there are more than three master-eligible nodes in the cluster + * and you remove fewer than half of the master-eligible nodes in the cluster at + * once, the voting configuration automatically shrinks. If you want to shrink + * the voting configuration to contain fewer than three nodes or to remove half + * or more of the master-eligible nodes in the cluster at once, use this API to + * remove departing nodes from the voting configuration manually. The API adds + * an entry for each specified node to the cluster’s voting configuration + * exclusions list. It then waits until the cluster has reconfigured its voting * configuration to exclude the specified nodes. *

    * Clusters should have no voting configuration exclusions in normal operation. @@ -660,16 +688,17 @@ public final CompletableFuture postVotingConfigExclusions( } /** - * Update voting configuration exclusions. Update the cluster voting config - * exclusions by node IDs or node names. By default, if there are more than - * three master-eligible nodes in the cluster and you remove fewer than half of - * the master-eligible nodes in the cluster at once, the voting configuration - * automatically shrinks. If you want to shrink the voting configuration to - * contain fewer than three nodes or to remove half or more of the - * master-eligible nodes in the cluster at once, use this API to remove - * departing nodes from the voting configuration manually. The API adds an entry - * for each specified node to the cluster’s voting configuration exclusions - * list. It then waits until the cluster has reconfigured its voting + * Update voting configuration exclusions. + *

    + * Update the cluster voting config exclusions by node IDs or node names. By + * default, if there are more than three master-eligible nodes in the cluster + * and you remove fewer than half of the master-eligible nodes in the cluster at + * once, the voting configuration automatically shrinks. If you want to shrink + * the voting configuration to contain fewer than three nodes or to remove half + * or more of the master-eligible nodes in the cluster at once, use this API to + * remove departing nodes from the voting configuration manually. The API adds + * an entry for each specified node to the cluster’s voting configuration + * exclusions list. It then waits until the cluster has reconfigured its voting * configuration to exclude the specified nodes. *

    * Clusters should have no voting configuration exclusions in normal operation. @@ -710,9 +739,10 @@ public CompletableFuture postVotingConfigExclusions() { // ----- Endpoint: cluster.put_component_template /** - * Create or update a component template. Component templates are building - * blocks for constructing index templates that specify index mappings, - * settings, and aliases. + * Create or update a component template. + *

    + * Component templates are building blocks for constructing index templates that + * specify index mappings, settings, and aliases. *

    * An index template can be composed of multiple component templates. To use a * component template, specify it in an index template’s @@ -751,9 +781,10 @@ public CompletableFuture putComponentTemplate(PutC } /** - * Create or update a component template. Component templates are building - * blocks for constructing index templates that specify index mappings, - * settings, and aliases. + * Create or update a component template. + *

    + * Component templates are building blocks for constructing index templates that + * specify index mappings, settings, and aliases. *

    * An index template can be composed of multiple component templates. To use a * component template, specify it in an index template’s @@ -955,10 +986,12 @@ public CompletableFuture remoteInfo() { // ----- Endpoint: cluster.reroute /** - * Reroute the cluster. Manually change the allocation of individual shards in - * the cluster. For example, a shard can be moved from one node to another - * explicitly, an allocation can be canceled, and an unassigned shard can be - * explicitly allocated to a specific node. + * Reroute the cluster. + *

    + * Manually change the allocation of individual shards in the cluster. For + * example, a shard can be moved from one node to another explicitly, an + * allocation can be canceled, and an unassigned shard can be explicitly + * allocated to a specific node. *

    * It is important to note that after processing any reroute commands * Elasticsearch will perform rebalancing as normal (respecting the values of @@ -996,10 +1029,12 @@ public CompletableFuture reroute(RerouteRequest request) { } /** - * Reroute the cluster. Manually change the allocation of individual shards in - * the cluster. For example, a shard can be moved from one node to another - * explicitly, an allocation can be canceled, and an unassigned shard can be - * explicitly allocated to a specific node. + * Reroute the cluster. + *

    + * Manually change the allocation of individual shards in the cluster. For + * example, a shard can be moved from one node to another explicitly, an + * allocation can be canceled, and an unassigned shard can be explicitly + * allocated to a specific node. *

    * It is important to note that after processing any reroute commands * Elasticsearch will perform rebalancing as normal (respecting the values of @@ -1038,10 +1073,12 @@ public final CompletableFuture reroute( } /** - * Reroute the cluster. Manually change the allocation of individual shards in - * the cluster. For example, a shard can be moved from one node to another - * explicitly, an allocation can be canceled, and an unassigned shard can be - * explicitly allocated to a specific node. + * Reroute the cluster. + *

    + * Manually change the allocation of individual shards in the cluster. For + * example, a shard can be moved from one node to another explicitly, an + * allocation can be canceled, and an unassigned shard can be explicitly + * allocated to a specific node. *

    * It is important to note that after processing any reroute commands * Elasticsearch will perform rebalancing as normal (respecting the values of @@ -1079,8 +1116,9 @@ public CompletableFuture reroute() { // ----- Endpoint: cluster.state /** - * Get the cluster state. Get comprehensive information about the state of the - * cluster. + * Get the cluster state. + *

    + * Get comprehensive information about the state of the cluster. *

    * The cluster state is an internal data structure which keeps track of a * variety of information needed by every node, including the identity and @@ -1123,8 +1161,9 @@ public CompletableFuture state(StateRequest request) { } /** - * Get the cluster state. Get comprehensive information about the state of the - * cluster. + * Get the cluster state. + *

    + * Get comprehensive information about the state of the cluster. *

    * The cluster state is an internal data structure which keeps track of a * variety of information needed by every node, including the identity and @@ -1168,8 +1207,9 @@ public final CompletableFuture state( } /** - * Get the cluster state. Get comprehensive information about the state of the - * cluster. + * Get the cluster state. + *

    + * Get comprehensive information about the state of the cluster. *

    * The cluster state is an internal data structure which keeps track of a * variety of information needed by every node, including the identity and @@ -1212,9 +1252,11 @@ public CompletableFuture state() { // ----- Endpoint: cluster.stats /** - * Get cluster statistics. Get basic index metrics (shard numbers, store size, - * memory usage) and information about the current nodes that form the cluster - * (number, roles, os, jvm versions, memory usage, cpu and installed plugins). + * Get cluster statistics. + *

    + * Get basic index metrics (shard numbers, store size, memory usage) and + * information about the current nodes that form the cluster (number, roles, os, + * jvm versions, memory usage, cpu and installed plugins). * * @see Documentation @@ -1229,9 +1271,11 @@ public CompletableFuture stats(ClusterStatsRequest request } /** - * Get cluster statistics. Get basic index metrics (shard numbers, store size, - * memory usage) and information about the current nodes that form the cluster - * (number, roles, os, jvm versions, memory usage, cpu and installed plugins). + * Get cluster statistics. + *

    + * Get basic index metrics (shard numbers, store size, memory usage) and + * information about the current nodes that form the cluster (number, roles, os, + * jvm versions, memory usage, cpu and installed plugins). * * @param fn * a function that initializes a builder to create the @@ -1247,9 +1291,11 @@ public final CompletableFuture stats( } /** - * Get cluster statistics. Get basic index metrics (shard numbers, store size, - * memory usage) and information about the current nodes that form the cluster - * (number, roles, os, jvm versions, memory usage, cpu and installed plugins). + * Get cluster statistics. + *

    + * Get basic index metrics (shard numbers, store size, memory usage) and + * information about the current nodes that form the cluster (number, roles, os, + * jvm versions, memory usage, cpu and installed plugins). * * @see Documentation 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 4e6b8f391c..0465f61838 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 @@ -69,16 +69,18 @@ public ElasticsearchClusterClient withTransportOptions(@Nullable TransportOption // ----- Endpoint: cluster.allocation_explain /** - * Explain the shard allocations. Get explanations for shard allocations in the - * cluster. This API accepts the current_node, index, primary and shard - * parameters in the request body or in query parameters, but not in both at the - * same time. For unassigned shards, it provides an explanation for why the - * shard is unassigned. For assigned shards, it provides an explanation for why - * the shard is remaining on its current node and has not moved or rebalanced to - * another node. This API can be very useful when attempting to diagnose why a - * shard is unassigned or why a shard continues to remain on its current node - * when you might expect otherwise. Refer to the linked documentation for - * examples of how to troubleshoot allocation issues using this API. + * Explain the shard allocations. + *

    + * Get explanations for shard allocations in the cluster. This API accepts the + * current_node, index, primary and shard parameters in the request body or in + * query parameters, but not in both at the same time. For unassigned shards, it + * provides an explanation for why the shard is unassigned. For assigned shards, + * it provides an explanation for why the shard is remaining on its current node + * and has not moved or rebalanced to another node. This API can be very useful + * when attempting to diagnose why a shard is unassigned or why a shard + * continues to remain on its current node when you might expect otherwise. + * Refer to the linked documentation for examples of how to troubleshoot + * allocation issues using this API. * * @see Documentation @@ -94,16 +96,18 @@ public AllocationExplainResponse allocationExplain(AllocationExplainRequest requ } /** - * Explain the shard allocations. Get explanations for shard allocations in the - * cluster. This API accepts the current_node, index, primary and shard - * parameters in the request body or in query parameters, but not in both at the - * same time. For unassigned shards, it provides an explanation for why the - * shard is unassigned. For assigned shards, it provides an explanation for why - * the shard is remaining on its current node and has not moved or rebalanced to - * another node. This API can be very useful when attempting to diagnose why a - * shard is unassigned or why a shard continues to remain on its current node - * when you might expect otherwise. Refer to the linked documentation for - * examples of how to troubleshoot allocation issues using this API. + * Explain the shard allocations. + *

    + * Get explanations for shard allocations in the cluster. This API accepts the + * current_node, index, primary and shard parameters in the request body or in + * query parameters, but not in both at the same time. For unassigned shards, it + * provides an explanation for why the shard is unassigned. For assigned shards, + * it provides an explanation for why the shard is remaining on its current node + * and has not moved or rebalanced to another node. This API can be very useful + * when attempting to diagnose why a shard is unassigned or why a shard + * continues to remain on its current node when you might expect otherwise. + * Refer to the linked documentation for examples of how to troubleshoot + * allocation issues using this API. * * @param fn * a function that initializes a builder to create the @@ -120,16 +124,18 @@ public final AllocationExplainResponse allocationExplain( } /** - * Explain the shard allocations. Get explanations for shard allocations in the - * cluster. This API accepts the current_node, index, primary and shard - * parameters in the request body or in query parameters, but not in both at the - * same time. For unassigned shards, it provides an explanation for why the - * shard is unassigned. For assigned shards, it provides an explanation for why - * the shard is remaining on its current node and has not moved or rebalanced to - * another node. This API can be very useful when attempting to diagnose why a - * shard is unassigned or why a shard continues to remain on its current node - * when you might expect otherwise. Refer to the linked documentation for - * examples of how to troubleshoot allocation issues using this API. + * Explain the shard allocations. + *

    + * Get explanations for shard allocations in the cluster. This API accepts the + * current_node, index, primary and shard parameters in the request body or in + * query parameters, but not in both at the same time. For unassigned shards, it + * provides an explanation for why the shard is unassigned. For assigned shards, + * it provides an explanation for why the shard is remaining on its current node + * and has not moved or rebalanced to another node. This API can be very useful + * when attempting to diagnose why a shard is unassigned or why a shard + * continues to remain on its current node when you might expect otherwise. + * Refer to the linked documentation for examples of how to troubleshoot + * allocation issues using this API. * * @see Documentation @@ -144,9 +150,10 @@ public AllocationExplainResponse allocationExplain() throws IOException, Elastic // ----- Endpoint: cluster.delete_component_template /** - * Delete component templates. Component templates are building blocks for - * constructing index templates that specify index mappings, settings, and - * aliases. + * Delete component templates. + *

    + * Component templates are building blocks for constructing index templates that + * specify index mappings, settings, and aliases. * * @see Documentation @@ -162,9 +169,10 @@ public DeleteComponentTemplateResponse deleteComponentTemplate(DeleteComponentTe } /** - * Delete component templates. Component templates are building blocks for - * constructing index templates that specify index mappings, settings, and - * aliases. + * Delete component templates. + *

    + * Component templates are building blocks for constructing index templates that + * specify index mappings, settings, and aliases. * * @param fn * a function that initializes a builder to create the @@ -183,8 +191,9 @@ public final DeleteComponentTemplateResponse deleteComponentTemplate( // ----- Endpoint: cluster.delete_voting_config_exclusions /** - * Clear cluster voting config exclusions. Remove master-eligible nodes from the - * voting configuration exclusion list. + * Clear cluster voting config exclusions. + *

    + * Remove master-eligible nodes from the voting configuration exclusion list. * * @see Documentation @@ -200,8 +209,9 @@ public BooleanResponse deleteVotingConfigExclusions(DeleteVotingConfigExclusions } /** - * Clear cluster voting config exclusions. Remove master-eligible nodes from the - * voting configuration exclusion list. + * Clear cluster voting config exclusions. + *

    + * Remove master-eligible nodes from the voting configuration exclusion list. * * @param fn * a function that initializes a builder to create the @@ -218,8 +228,9 @@ public final BooleanResponse deleteVotingConfigExclusions( } /** - * Clear cluster voting config exclusions. Remove master-eligible nodes from the - * voting configuration exclusion list. + * Clear cluster voting config exclusions. + *

    + * Remove master-eligible nodes from the voting configuration exclusion list. * * @see Documentation @@ -234,8 +245,9 @@ public BooleanResponse deleteVotingConfigExclusions() throws IOException, Elasti // ----- Endpoint: cluster.exists_component_template /** - * Check component templates. Returns information about whether a particular - * component template exists. + * Check component templates. + *

    + * Returns information about whether a particular component template exists. * * @see Documentation @@ -251,8 +263,9 @@ public BooleanResponse existsComponentTemplate(ExistsComponentTemplateRequest re } /** - * Check component templates. Returns information about whether a particular - * component template exists. + * Check component templates. + *

    + * Returns information about whether a particular component template exists. * * @param fn * a function that initializes a builder to create the @@ -271,7 +284,9 @@ public final BooleanResponse existsComponentTemplate( // ----- Endpoint: cluster.get_component_template /** - * Get component templates. Get information about component templates. + * Get component templates. + *

    + * Get information about component templates. * * @see Documentation @@ -287,7 +302,9 @@ public GetComponentTemplateResponse getComponentTemplate(GetComponentTemplateReq } /** - * Get component templates. Get information about component templates. + * Get component templates. + *

    + * Get information about component templates. * * @param fn * a function that initializes a builder to create the @@ -304,7 +321,9 @@ public final GetComponentTemplateResponse getComponentTemplate( } /** - * Get component templates. Get information about component templates. + * Get component templates. + *

    + * Get information about component templates. * * @see Documentation @@ -461,7 +480,9 @@ public HealthResponse health() throws IOException, ElasticsearchException { // ----- Endpoint: cluster.info /** - * Get cluster info. Returns basic information about the cluster. + * Get cluster info. + *

    + * Returns basic information about the cluster. * * @see Documentation @@ -476,7 +497,9 @@ public ClusterInfoResponse info(ClusterInfoRequest request) throws IOException, } /** - * Get cluster info. Returns basic information about the cluster. + * Get cluster info. + *

    + * Returns basic information about the cluster. * * @param fn * a function that initializes a builder to create the @@ -494,9 +517,10 @@ public final ClusterInfoResponse info(Function + * Get information about cluster-level changes (such as create index, update + * mapping, allocate or fail shard) that have not yet taken effect. *

    * NOTE: This API returns a list of any pending updates to the cluster state. * These are distinct from the tasks reported by the task management API which @@ -518,9 +542,10 @@ public PendingTasksResponse pendingTasks(PendingTasksRequest request) throws IOE } /** - * Get the pending cluster tasks. Get information about cluster-level changes - * (such as create index, update mapping, allocate or fail shard) that have not - * yet taken effect. + * Get the pending cluster tasks. + *

    + * Get information about cluster-level changes (such as create index, update + * mapping, allocate or fail shard) that have not yet taken effect. *

    * NOTE: This API returns a list of any pending updates to the cluster state. * These are distinct from the tasks reported by the task management API which @@ -544,9 +569,10 @@ public final PendingTasksResponse pendingTasks( } /** - * Get the pending cluster tasks. Get information about cluster-level changes - * (such as create index, update mapping, allocate or fail shard) that have not - * yet taken effect. + * Get the pending cluster tasks. + *

    + * Get information about cluster-level changes (such as create index, update + * mapping, allocate or fail shard) that have not yet taken effect. *

    * NOTE: This API returns a list of any pending updates to the cluster state. * These are distinct from the tasks reported by the task management API which @@ -568,16 +594,17 @@ public PendingTasksResponse pendingTasks() throws IOException, ElasticsearchExce // ----- Endpoint: cluster.post_voting_config_exclusions /** - * Update voting configuration exclusions. Update the cluster voting config - * exclusions by node IDs or node names. By default, if there are more than - * three master-eligible nodes in the cluster and you remove fewer than half of - * the master-eligible nodes in the cluster at once, the voting configuration - * automatically shrinks. If you want to shrink the voting configuration to - * contain fewer than three nodes or to remove half or more of the - * master-eligible nodes in the cluster at once, use this API to remove - * departing nodes from the voting configuration manually. The API adds an entry - * for each specified node to the cluster’s voting configuration exclusions - * list. It then waits until the cluster has reconfigured its voting + * Update voting configuration exclusions. + *

    + * Update the cluster voting config exclusions by node IDs or node names. By + * default, if there are more than three master-eligible nodes in the cluster + * and you remove fewer than half of the master-eligible nodes in the cluster at + * once, the voting configuration automatically shrinks. If you want to shrink + * the voting configuration to contain fewer than three nodes or to remove half + * or more of the master-eligible nodes in the cluster at once, use this API to + * remove departing nodes from the voting configuration manually. The API adds + * an entry for each specified node to the cluster’s voting configuration + * exclusions list. It then waits until the cluster has reconfigured its voting * configuration to exclude the specified nodes. *

    * Clusters should have no voting configuration exclusions in normal operation. @@ -619,16 +646,17 @@ public BooleanResponse postVotingConfigExclusions(PostVotingConfigExclusionsRequ } /** - * Update voting configuration exclusions. Update the cluster voting config - * exclusions by node IDs or node names. By default, if there are more than - * three master-eligible nodes in the cluster and you remove fewer than half of - * the master-eligible nodes in the cluster at once, the voting configuration - * automatically shrinks. If you want to shrink the voting configuration to - * contain fewer than three nodes or to remove half or more of the - * master-eligible nodes in the cluster at once, use this API to remove - * departing nodes from the voting configuration manually. The API adds an entry - * for each specified node to the cluster’s voting configuration exclusions - * list. It then waits until the cluster has reconfigured its voting + * Update voting configuration exclusions. + *

    + * Update the cluster voting config exclusions by node IDs or node names. By + * default, if there are more than three master-eligible nodes in the cluster + * and you remove fewer than half of the master-eligible nodes in the cluster at + * once, the voting configuration automatically shrinks. If you want to shrink + * the voting configuration to contain fewer than three nodes or to remove half + * or more of the master-eligible nodes in the cluster at once, use this API to + * remove departing nodes from the voting configuration manually. The API adds + * an entry for each specified node to the cluster’s voting configuration + * exclusions list. It then waits until the cluster has reconfigured its voting * configuration to exclude the specified nodes. *

    * Clusters should have no voting configuration exclusions in normal operation. @@ -671,16 +699,17 @@ public final BooleanResponse postVotingConfigExclusions( } /** - * Update voting configuration exclusions. Update the cluster voting config - * exclusions by node IDs or node names. By default, if there are more than - * three master-eligible nodes in the cluster and you remove fewer than half of - * the master-eligible nodes in the cluster at once, the voting configuration - * automatically shrinks. If you want to shrink the voting configuration to - * contain fewer than three nodes or to remove half or more of the - * master-eligible nodes in the cluster at once, use this API to remove - * departing nodes from the voting configuration manually. The API adds an entry - * for each specified node to the cluster’s voting configuration exclusions - * list. It then waits until the cluster has reconfigured its voting + * Update voting configuration exclusions. + *

    + * Update the cluster voting config exclusions by node IDs or node names. By + * default, if there are more than three master-eligible nodes in the cluster + * and you remove fewer than half of the master-eligible nodes in the cluster at + * once, the voting configuration automatically shrinks. If you want to shrink + * the voting configuration to contain fewer than three nodes or to remove half + * or more of the master-eligible nodes in the cluster at once, use this API to + * remove departing nodes from the voting configuration manually. The API adds + * an entry for each specified node to the cluster’s voting configuration + * exclusions list. It then waits until the cluster has reconfigured its voting * configuration to exclude the specified nodes. *

    * Clusters should have no voting configuration exclusions in normal operation. @@ -721,9 +750,10 @@ public BooleanResponse postVotingConfigExclusions() throws IOException, Elastics // ----- Endpoint: cluster.put_component_template /** - * Create or update a component template. Component templates are building - * blocks for constructing index templates that specify index mappings, - * settings, and aliases. + * Create or update a component template. + *

    + * Component templates are building blocks for constructing index templates that + * specify index mappings, settings, and aliases. *

    * An index template can be composed of multiple component templates. To use a * component template, specify it in an index template’s @@ -763,9 +793,10 @@ public PutComponentTemplateResponse putComponentTemplate(PutComponentTemplateReq } /** - * Create or update a component template. Component templates are building - * blocks for constructing index templates that specify index mappings, - * settings, and aliases. + * Create or update a component template. + *

    + * Component templates are building blocks for constructing index templates that + * specify index mappings, settings, and aliases. *

    * An index template can be composed of multiple component templates. To use a * component template, specify it in an index template’s @@ -970,10 +1001,12 @@ public RemoteInfoResponse remoteInfo() throws IOException, ElasticsearchExceptio // ----- Endpoint: cluster.reroute /** - * Reroute the cluster. Manually change the allocation of individual shards in - * the cluster. For example, a shard can be moved from one node to another - * explicitly, an allocation can be canceled, and an unassigned shard can be - * explicitly allocated to a specific node. + * Reroute the cluster. + *

    + * Manually change the allocation of individual shards in the cluster. For + * example, a shard can be moved from one node to another explicitly, an + * allocation can be canceled, and an unassigned shard can be explicitly + * allocated to a specific node. *

    * It is important to note that after processing any reroute commands * Elasticsearch will perform rebalancing as normal (respecting the values of @@ -1011,10 +1044,12 @@ public RerouteResponse reroute(RerouteRequest request) throws IOException, Elast } /** - * Reroute the cluster. Manually change the allocation of individual shards in - * the cluster. For example, a shard can be moved from one node to another - * explicitly, an allocation can be canceled, and an unassigned shard can be - * explicitly allocated to a specific node. + * Reroute the cluster. + *

    + * Manually change the allocation of individual shards in the cluster. For + * example, a shard can be moved from one node to another explicitly, an + * allocation can be canceled, and an unassigned shard can be explicitly + * allocated to a specific node. *

    * It is important to note that after processing any reroute commands * Elasticsearch will perform rebalancing as normal (respecting the values of @@ -1053,10 +1088,12 @@ public final RerouteResponse reroute(Function + * Manually change the allocation of individual shards in the cluster. For + * example, a shard can be moved from one node to another explicitly, an + * allocation can be canceled, and an unassigned shard can be explicitly + * allocated to a specific node. *

    * It is important to note that after processing any reroute commands * Elasticsearch will perform rebalancing as normal (respecting the values of @@ -1094,8 +1131,9 @@ public RerouteResponse reroute() throws IOException, ElasticsearchException { // ----- Endpoint: cluster.state /** - * Get the cluster state. Get comprehensive information about the state of the - * cluster. + * Get the cluster state. + *

    + * Get comprehensive information about the state of the cluster. *

    * The cluster state is an internal data structure which keeps track of a * variety of information needed by every node, including the identity and @@ -1138,8 +1176,9 @@ public StateResponse state(StateRequest request) throws IOException, Elasticsear } /** - * Get the cluster state. Get comprehensive information about the state of the - * cluster. + * Get the cluster state. + *

    + * Get comprehensive information about the state of the cluster. *

    * The cluster state is an internal data structure which keeps track of a * variety of information needed by every node, including the identity and @@ -1183,8 +1222,9 @@ public final StateResponse state(Function + * Get comprehensive information about the state of the cluster. *

    * The cluster state is an internal data structure which keeps track of a * variety of information needed by every node, including the identity and @@ -1227,9 +1267,11 @@ public StateResponse state() throws IOException, ElasticsearchException { // ----- Endpoint: cluster.stats /** - * Get cluster statistics. Get basic index metrics (shard numbers, store size, - * memory usage) and information about the current nodes that form the cluster - * (number, roles, os, jvm versions, memory usage, cpu and installed plugins). + * Get cluster statistics. + *

    + * Get basic index metrics (shard numbers, store size, memory usage) and + * information about the current nodes that form the cluster (number, roles, os, + * jvm versions, memory usage, cpu and installed plugins). * * @see Documentation @@ -1244,9 +1286,11 @@ public ClusterStatsResponse stats(ClusterStatsRequest request) throws IOExceptio } /** - * Get cluster statistics. Get basic index metrics (shard numbers, store size, - * memory usage) and information about the current nodes that form the cluster - * (number, roles, os, jvm versions, memory usage, cpu and installed plugins). + * Get cluster statistics. + *

    + * Get basic index metrics (shard numbers, store size, memory usage) and + * information about the current nodes that form the cluster (number, roles, os, + * jvm versions, memory usage, cpu and installed plugins). * * @param fn * a function that initializes a builder to create the @@ -1263,9 +1307,11 @@ public final ClusterStatsResponse stats( } /** - * Get cluster statistics. Get basic index metrics (shard numbers, store size, - * memory usage) and information about the current nodes that form the cluster - * (number, roles, os, jvm versions, memory usage, cpu and installed plugins). + * Get cluster statistics. + *

    + * Get basic index metrics (shard numbers, store size, memory usage) and + * information about the current nodes that form the cluster (number, roles, os, + * jvm versions, memory usage, cpu and installed plugins). * * @see Documentation diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ExistsComponentTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ExistsComponentTemplateRequest.java index a30c582f5e..af7b715d15 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ExistsComponentTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ExistsComponentTemplateRequest.java @@ -61,8 +61,9 @@ // typedef: cluster.exists_component_template.Request /** - * Check component templates. Returns information about whether a particular - * component template exists. + * Check component templates. + *

    + * Returns information about whether a particular component template exists. * * @see API @@ -98,7 +99,11 @@ public static ExistsComponentTemplateRequest of( * to false, which means information is retrieved from the master node. *

    * API name: {@code local} + * + * @deprecated 9.0.0 This parameter has no effect, is now deprecated, and will + * be removed in a future version. */ + @Deprecated @Nullable public final Boolean local() { return this.local; @@ -147,7 +152,11 @@ public static class Builder extends RequestBase.AbstractBuilder * to false, which means information is retrieved from the master node. *

    * API name: {@code local} + * + * @deprecated 9.0.0 This parameter has no effect, is now deprecated, and will + * be removed in a future version. */ + @Deprecated public final Builder local(@Nullable Boolean value) { this.local = value; return this; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/GetComponentTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/GetComponentTemplateRequest.java index a20ce4fd06..4fea608f2f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/GetComponentTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/GetComponentTemplateRequest.java @@ -59,7 +59,9 @@ // typedef: cluster.get_component_template.Request /** - * Get component templates. Get information about component templates. + * Get component templates. + *

    + * Get information about component templates. * * @see API @@ -112,7 +114,7 @@ public final Boolean flatSettings() { } /** - * Return all default configurations for the component template (default: false) + * Return all default configurations for the component template *

    * API name: {@code include_defaults} */ @@ -126,7 +128,11 @@ public final Boolean includeDefaults() { * only. If false, information is retrieved from the master node. *

    * API name: {@code local} + * + * @deprecated 9.0.0 This parameter has no effect, is now deprecated, and will + * be removed in a future version. */ + @Deprecated @Nullable public final Boolean local() { return this.local; @@ -144,8 +150,8 @@ public final Time masterTimeout() { } /** - * Comma-separated list of component template names used to limit the request. - * Wildcard (*) expressions are supported. + * Name of component template to retrieve. Wildcard (*) expressions + * are supported. *

    * API name: {@code name} */ @@ -202,7 +208,7 @@ public final Builder flatSettings(@Nullable Boolean value) { } /** - * Return all default configurations for the component template (default: false) + * Return all default configurations for the component template *

    * API name: {@code include_defaults} */ @@ -216,7 +222,11 @@ public final Builder includeDefaults(@Nullable Boolean value) { * only. If false, information is retrieved from the master node. *

    * API name: {@code local} + * + * @deprecated 9.0.0 This parameter has no effect, is now deprecated, and will + * be removed in a future version. */ + @Deprecated public final Builder local(@Nullable Boolean value) { this.local = value; return this; @@ -244,8 +254,8 @@ public final Builder masterTimeout(Function> f } /** - * Comma-separated list of component template names used to limit the request. - * Wildcard (*) expressions are supported. + * Name of component template to retrieve. Wildcard (*) expressions + * are supported. *

    * API name: {@code name} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/HealthRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/HealthRequest.java index 4059f042c0..f756239da8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/HealthRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/HealthRequest.java @@ -143,8 +143,7 @@ public static HealthRequest of(Function> f } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Expand wildcard expression to concrete indices that are open, closed or both. *

    * API name: {@code expand_wildcards} */ @@ -153,10 +152,10 @@ public final List expandWildcards() { } /** - * Comma-separated list of data streams, indices, and index aliases used to - * limit the request. Wildcard expressions (*) are supported. To - * target all data streams and indices in a cluster, omit this parameter or use - * _all or *. + * A comma-separated list of data streams, indices, and index aliases that limit + * the request. Wildcard expressions (*) are supported. To target + * all data streams and indices in a cluster, omit this parameter or use _all or + * *. *

    * API name: {@code index} */ @@ -165,8 +164,7 @@ public final List index() { } /** - * Can be one of cluster, indices or shards. Controls the details level of the - * health information returned. + * Return health information at a specific level of detail. *

    * API name: {@code level} */ @@ -176,8 +174,8 @@ public final Level level() { } /** - * If true, the request retrieves information from the local node only. Defaults - * to false, which means information is retrieved from the master node. + * If true, retrieve information from the local node only. If false, retrieve + * information from the master node. *

    * API name: {@code local} */ @@ -187,7 +185,7 @@ public final Boolean local() { } /** - * Period to wait for a connection to the master node. If no response is + * The 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} @@ -198,8 +196,8 @@ public final Time masterTimeout() { } /** - * Period to wait for a response. If no response is received before the timeout - * expires, the request fails and returns an error. + * The 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} */ @@ -209,8 +207,8 @@ public final Time timeout() { } /** - * A number controlling to how many active shards to wait for, all to wait for - * all shards in the cluster to be active, or 0 to not wait. + * Wait for the specified number of active shards. Use all to wait + * for all shards in the cluster to be active. Use 0 to not wait. *

    * API name: {@code wait_for_active_shards} */ @@ -220,8 +218,7 @@ public final WaitForActiveShards waitForActiveShards() { } /** - * Can be one of immediate, urgent, high, normal, low, languid. Wait until all - * currently queued events with the given priority are processed. + * Wait until all currently queued events with the given priority are processed. *

    * API name: {@code wait_for_events} */ @@ -231,9 +228,8 @@ public final WaitForEvents waitForEvents() { } /** - * A boolean value which controls whether to wait (until the timeout provided) - * for the cluster to have no shard initializations. Defaults to false, which - * means it will not wait for initializing shards. + * Wait (until the timeout expires) for the cluster to have no shard + * initializations. If false, the request does not wait for initializing shards. *

    * API name: {@code wait_for_no_initializing_shards} */ @@ -243,9 +239,8 @@ public final Boolean waitForNoInitializingShards() { } /** - * A boolean value which controls whether to wait (until the timeout provided) - * for the cluster to have no shard relocations. Defaults to false, which means - * it will not wait for relocating shards. + * Wait (until the timeout expires) for the cluster to have no shard + * relocations. If false, the request not wait for relocating shards. *

    * API name: {@code wait_for_no_relocating_shards} */ @@ -255,9 +250,10 @@ public final Boolean waitForNoRelocatingShards() { } /** - * The request waits until the specified number N of nodes is available. It also - * accepts >=N, <=N, >N and <N. Alternatively, it is possible to use - * ge(N), le(N), gt(N) and lt(N) notation. + * Wait until the specified number (N) of nodes is available. It also accepts + * >=N, <=N, >N and + * <N. Alternatively, use the notations ge(N), + * le(N), gt(N), and lt(N). *

    * API name: {@code wait_for_nodes} */ @@ -267,9 +263,10 @@ public final String waitForNodes() { } /** - * One of green, yellow or red. Will wait (until the timeout provided) until the - * status of the cluster changes to the one provided or better, i.e. green > - * yellow > red. By default, will not wait for any status. + * Wait (until the timeout expires) for the cluster to reach a specific health + * status (or a better status). A green status is better than yellow and yellow + * is better than red. By default, the request does not wait for a particular + * status. *

    * API name: {@code wait_for_status} */ @@ -322,8 +319,7 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private HealthStatus waitForStatus; /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Expand wildcard expression to concrete indices that are open, closed or both. *

    * API name: {@code expand_wildcards} *

    @@ -335,8 +331,7 @@ public final Builder expandWildcards(List list) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Expand wildcard expression to concrete indices that are open, closed or both. *

    * API name: {@code expand_wildcards} *

    @@ -348,10 +343,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * Comma-separated list of data streams, indices, and index aliases used to - * limit the request. Wildcard expressions (*) are supported. To - * target all data streams and indices in a cluster, omit this parameter or use - * _all or *. + * A comma-separated list of data streams, indices, and index aliases that limit + * the request. Wildcard expressions (*) are supported. To target + * all data streams and indices in a cluster, omit this parameter or use _all or + * *. *

    * API name: {@code index} *

    @@ -363,10 +358,10 @@ public final Builder index(List list) { } /** - * Comma-separated list of data streams, indices, and index aliases used to - * limit the request. Wildcard expressions (*) are supported. To - * target all data streams and indices in a cluster, omit this parameter or use - * _all or *. + * A comma-separated list of data streams, indices, and index aliases that limit + * the request. Wildcard expressions (*) are supported. To target + * all data streams and indices in a cluster, omit this parameter or use _all or + * *. *

    * API name: {@code index} *

    @@ -378,8 +373,7 @@ public final Builder index(String value, String... values) { } /** - * Can be one of cluster, indices or shards. Controls the details level of the - * health information returned. + * Return health information at a specific level of detail. *

    * API name: {@code level} */ @@ -389,8 +383,8 @@ public final Builder level(@Nullable Level value) { } /** - * If true, the request retrieves information from the local node only. Defaults - * to false, which means information is retrieved from the master node. + * If true, retrieve information from the local node only. If false, retrieve + * information from the master node. *

    * API name: {@code local} */ @@ -400,7 +394,7 @@ public final Builder local(@Nullable Boolean value) { } /** - * Period to wait for a connection to the master node. If no response is + * The 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} @@ -411,7 +405,7 @@ public final Builder masterTimeout(@Nullable Time value) { } /** - * Period to wait for a connection to the master node. If no response is + * The 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} @@ -421,8 +415,8 @@ public final Builder masterTimeout(Function> f } /** - * Period to wait for a response. If no response is received before the timeout - * expires, the request fails and returns an error. + * The 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} */ @@ -432,8 +426,8 @@ public final Builder timeout(@Nullable Time value) { } /** - * Period to wait for a response. If no response is received before the timeout - * expires, the request fails and returns an error. + * The 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} */ @@ -442,8 +436,8 @@ public final Builder timeout(Function> fn) { } /** - * A number controlling to how many active shards to wait for, all to wait for - * all shards in the cluster to be active, or 0 to not wait. + * Wait for the specified number of active shards. Use all to wait + * for all shards in the cluster to be active. Use 0 to not wait. *

    * API name: {@code wait_for_active_shards} */ @@ -453,8 +447,8 @@ public final Builder waitForActiveShards(@Nullable WaitForActiveShards value) { } /** - * A number controlling to how many active shards to wait for, all to wait for - * all shards in the cluster to be active, or 0 to not wait. + * Wait for the specified number of active shards. Use all to wait + * for all shards in the cluster to be active. Use 0 to not wait. *

    * API name: {@code wait_for_active_shards} */ @@ -464,8 +458,7 @@ public final Builder waitForActiveShards( } /** - * Can be one of immediate, urgent, high, normal, low, languid. Wait until all - * currently queued events with the given priority are processed. + * Wait until all currently queued events with the given priority are processed. *

    * API name: {@code wait_for_events} */ @@ -475,9 +468,8 @@ public final Builder waitForEvents(@Nullable WaitForEvents value) { } /** - * A boolean value which controls whether to wait (until the timeout provided) - * for the cluster to have no shard initializations. Defaults to false, which - * means it will not wait for initializing shards. + * Wait (until the timeout expires) for the cluster to have no shard + * initializations. If false, the request does not wait for initializing shards. *

    * API name: {@code wait_for_no_initializing_shards} */ @@ -487,9 +479,8 @@ public final Builder waitForNoInitializingShards(@Nullable Boolean value) { } /** - * A boolean value which controls whether to wait (until the timeout provided) - * for the cluster to have no shard relocations. Defaults to false, which means - * it will not wait for relocating shards. + * Wait (until the timeout expires) for the cluster to have no shard + * relocations. If false, the request not wait for relocating shards. *

    * API name: {@code wait_for_no_relocating_shards} */ @@ -499,9 +490,10 @@ public final Builder waitForNoRelocatingShards(@Nullable Boolean value) { } /** - * The request waits until the specified number N of nodes is available. It also - * accepts >=N, <=N, >N and <N. Alternatively, it is possible to use - * ge(N), le(N), gt(N) and lt(N) notation. + * Wait until the specified number (N) of nodes is available. It also accepts + * >=N, <=N, >N and + * <N. Alternatively, use the notations ge(N), + * le(N), gt(N), and lt(N). *

    * API name: {@code wait_for_nodes} */ @@ -511,9 +503,10 @@ public final Builder waitForNodes(@Nullable String value) { } /** - * One of green, yellow or red. Will wait (until the timeout provided) until the - * status of the cluster changes to the one provided or better, i.e. green > - * yellow > red. By default, will not wait for any status. + * Wait (until the timeout expires) for the cluster to reach a specific health + * status (or a better status). A green status is better than yellow and yellow + * is better than red. By default, the request does not wait for a particular + * status. *

    * API name: {@code wait_for_status} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PendingTasksRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PendingTasksRequest.java index dd3d455519..255d342d23 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PendingTasksRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PendingTasksRequest.java @@ -56,9 +56,10 @@ // typedef: cluster.pending_tasks.Request /** - * Get the pending cluster tasks. Get information about cluster-level changes - * (such as create index, update mapping, allocate or fail shard) that have not - * yet taken effect. + * Get the pending cluster tasks. + *

    + * Get information about cluster-level changes (such as create index, update + * mapping, allocate or fail shard) that have not yet taken effect. *

    * NOTE: This API returns a list of any pending updates to the cluster state. * These are distinct from the tasks reported by the task management API which diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PostVotingConfigExclusionsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PostVotingConfigExclusionsRequest.java index 66b3cd8558..48a5101956 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PostVotingConfigExclusionsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PostVotingConfigExclusionsRequest.java @@ -61,16 +61,17 @@ // typedef: cluster.post_voting_config_exclusions.Request /** - * Update voting configuration exclusions. Update the cluster voting config - * exclusions by node IDs or node names. By default, if there are more than - * three master-eligible nodes in the cluster and you remove fewer than half of - * the master-eligible nodes in the cluster at once, the voting configuration - * automatically shrinks. If you want to shrink the voting configuration to - * contain fewer than three nodes or to remove half or more of the - * master-eligible nodes in the cluster at once, use this API to remove - * departing nodes from the voting configuration manually. The API adds an entry - * for each specified node to the cluster’s voting configuration exclusions - * list. It then waits until the cluster has reconfigured its voting + * Update voting configuration exclusions. + *

    + * Update the cluster voting config exclusions by node IDs or node names. By + * default, if there are more than three master-eligible nodes in the cluster + * and you remove fewer than half of the master-eligible nodes in the cluster at + * once, the voting configuration automatically shrinks. If you want to shrink + * the voting configuration to contain fewer than three nodes or to remove half + * or more of the master-eligible nodes in the cluster at once, use this API to + * remove departing nodes from the voting configuration manually. The API adds + * an entry for each specified node to the cluster’s voting configuration + * exclusions list. It then waits until the cluster has reconfigured its voting * configuration to exclude the specified nodes. *

    * Clusters should have no voting configuration exclusions in normal operation. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutClusterSettingsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutClusterSettingsRequest.java index b733b6714b..95d4a49cd0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutClusterSettingsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutClusterSettingsRequest.java @@ -126,7 +126,7 @@ public static PutClusterSettingsRequest of(Function * API name: {@code flat_settings} */ @@ -136,7 +136,7 @@ public final Boolean flatSettings() { } /** - * Explicit operation timeout for connection to master node + * The period to wait for a connection to the master node. *

    * API name: {@code master_timeout} */ @@ -155,7 +155,7 @@ public final Map persistent() { } /** - * Explicit operation timeout + * The period to wait for a response. *

    * API name: {@code timeout} */ @@ -234,7 +234,7 @@ public static class Builder extends RequestBase.AbstractBuilder private Map transient_; /** - * Return settings in flat format (default: false) + * Return settings in flat format *

    * API name: {@code flat_settings} */ @@ -244,7 +244,7 @@ public final Builder flatSettings(@Nullable Boolean value) { } /** - * Explicit operation timeout for connection to master node + * The period to wait for a connection to the master node. *

    * API name: {@code master_timeout} */ @@ -254,7 +254,7 @@ public final Builder masterTimeout(@Nullable Time value) { } /** - * Explicit operation timeout for connection to master node + * The period to wait for a connection to the master node. *

    * API name: {@code master_timeout} */ @@ -287,7 +287,7 @@ public final Builder persistent(String key, JsonData value) { } /** - * Explicit operation timeout + * The period to wait for a response. *

    * API name: {@code timeout} */ @@ -297,7 +297,7 @@ public final Builder timeout(@Nullable Time value) { } /** - * Explicit operation timeout + * The period to wait for a response. *

    * API name: {@code timeout} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutComponentTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutComponentTemplateRequest.java index 049abd41af..90f4743330 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutComponentTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutComponentTemplateRequest.java @@ -22,7 +22,7 @@ import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.RequestBase; import co.elastic.clients.elasticsearch._types.Time; -import co.elastic.clients.elasticsearch.indices.IndexState; +import co.elastic.clients.elasticsearch.indices.put_index_template.IndexTemplateMapping; import co.elastic.clients.json.JsonData; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; @@ -62,9 +62,10 @@ // typedef: cluster.put_component_template.Request /** - * Create or update a component template. Component templates are building - * blocks for constructing index templates that specify index mappings, - * settings, and aliases. + * Create or update a component template. + *

    + * Component templates are building blocks for constructing index templates that + * specify index mappings, settings, and aliases. *

    * An index template can be composed of multiple component templates. To use a * component template, specify it in an index template’s @@ -112,7 +113,7 @@ public class PutComponentTemplateRequest extends RequestBase implements JsonpSer private final String name; - private final IndexState template; + private final IndexTemplateMapping template; @Nullable private final Long version; @@ -218,7 +219,7 @@ public final String name() { *

    * API name: {@code template} */ - public final IndexState template() { + public final IndexTemplateMapping template() { return this.template; } @@ -298,7 +299,7 @@ public static class Builder extends RequestBase.AbstractBuilder private String name; - private IndexState template; + private IndexTemplateMapping template; @Nullable private Long version; @@ -415,7 +416,7 @@ public final Builder name(String value) { *

    * API name: {@code template} */ - public final Builder template(IndexState value) { + public final Builder template(IndexTemplateMapping value) { this.template = value; return this; } @@ -426,8 +427,8 @@ public final Builder template(IndexState value) { *

    * API name: {@code template} */ - public final Builder template(Function> fn) { - return this.template(fn.apply(new IndexState.Builder()).build()); + public final Builder template(Function> fn) { + return this.template(fn.apply(new IndexTemplateMapping.Builder()).build()); } /** @@ -473,7 +474,7 @@ protected static void setupPutComponentTemplateRequestDeserializer( op.add(Builder::meta, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "_meta"); op.add(Builder::deprecated, JsonpDeserializer.booleanDeserializer(), "deprecated"); - op.add(Builder::template, IndexState._DESERIALIZER, "template"); + op.add(Builder::template, IndexTemplateMapping._DESERIALIZER, "template"); op.add(Builder::version, JsonpDeserializer.longDeserializer(), "version"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/RerouteRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/RerouteRequest.java index 1f63486bff..b0f7720bc3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/RerouteRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/RerouteRequest.java @@ -63,10 +63,12 @@ // typedef: cluster.reroute.Request /** - * Reroute the cluster. Manually change the allocation of individual shards in - * the cluster. For example, a shard can be moved from one node to another - * explicitly, an allocation can be canceled, and an unassigned shard can be - * explicitly allocated to a specific node. + * Reroute the cluster. + *

    + * Manually change the allocation of individual shards in the cluster. For + * example, a shard can be moved from one node to another explicitly, an + * allocation can be canceled, and an unassigned shard can be explicitly + * allocated to a specific node. *

    * It is important to note that after processing any reroute commands * Elasticsearch will perform rebalancing as normal (respecting the values of @@ -181,7 +183,11 @@ public final Time masterTimeout() { * Limits the information returned to the specified metrics. *

    * API name: {@code metric} + * + * @deprecated 8.6.0 This parameter has no effect; its use will be forbidden in + * a future version. */ + @Deprecated public final List metric() { return this.metric; } @@ -346,7 +352,11 @@ public final Builder masterTimeout(Function> f * API name: {@code metric} *

    * Adds all elements of list to metric. + * + * @deprecated 8.6.0 This parameter has no effect; its use will be forbidden in + * a future version. */ + @Deprecated public final Builder metric(List list) { this.metric = _listAddAll(this.metric, list); return this; @@ -358,7 +368,11 @@ public final Builder metric(List list) { * API name: {@code metric} *

    * Adds one or more values to metric. + * + * @deprecated 8.6.0 This parameter has no effect; its use will be forbidden in + * a future version. */ + @Deprecated public final Builder metric(String value, String... values) { this.metric = _listAdd(this.metric, value, values); return this; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/StateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/StateRequest.java index 138858ebd9..209ca5f63d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/StateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/StateRequest.java @@ -23,6 +23,7 @@ import co.elastic.clients.elasticsearch._types.ExpandWildcard; import co.elastic.clients.elasticsearch._types.RequestBase; import co.elastic.clients.elasticsearch._types.Time; +import co.elastic.clients.elasticsearch.cluster.state.ClusterStateMetric; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -61,8 +62,9 @@ // typedef: cluster.state.Request /** - * Get the cluster state. Get comprehensive information about the state of the - * cluster. + * Get the cluster state. + *

    + * Get comprehensive information about the state of the cluster. *

    * The cluster state is an internal data structure which keeps track of a * variety of information needed by every node, including the identity and @@ -116,7 +118,7 @@ public class StateRequest extends RequestBase { @Nullable private final Time masterTimeout; - private final List metric; + private final List metric; @Nullable private final Long waitForMetadataVersion; @@ -159,7 +161,7 @@ public final Boolean allowNoIndices() { /** * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * closed or both *

    * API name: {@code expand_wildcards} */ @@ -168,7 +170,7 @@ public final List expandWildcards() { } /** - * Return settings in flat format (default: false) + * Return settings in flat format *

    * API name: {@code flat_settings} */ @@ -200,10 +202,13 @@ public final List index() { /** * Return local information, do not retrieve the state from master node - * (default: false) *

    * API name: {@code local} + * + * @deprecated 9.0.0 This parameter has no effect, is now deprecated, and will + * be removed in a future version. */ + @Deprecated @Nullable public final Boolean local() { return this.local; @@ -213,21 +218,18 @@ public final Boolean local() { * Timeout for waiting for new cluster state in case it is blocked *

    * API name: {@code master_timeout} - * - * @deprecated 9.2.0 */ - @Deprecated @Nullable public final Time masterTimeout() { return this.masterTimeout; } /** - * Limit the information returned to the specified metrics + * Limit the information returned to the specified metrics. *

    * API name: {@code metric} */ - public final List metric() { + public final List metric() { return this.metric; } @@ -281,7 +283,7 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private Time masterTimeout; @Nullable - private List metric; + private List metric; @Nullable private Long waitForMetadataVersion; @@ -303,7 +305,7 @@ public final Builder allowNoIndices(@Nullable Boolean value) { /** * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * closed or both *

    * API name: {@code expand_wildcards} *

    @@ -316,7 +318,7 @@ public final Builder expandWildcards(List list) { /** * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * closed or both *

    * API name: {@code expand_wildcards} *

    @@ -328,7 +330,7 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * Return settings in flat format (default: false) + * Return settings in flat format *

    * API name: {@code flat_settings} */ @@ -376,10 +378,13 @@ public final Builder index(String value, String... values) { /** * Return local information, do not retrieve the state from master node - * (default: false) *

    * API name: {@code local} + * + * @deprecated 9.0.0 This parameter has no effect, is now deprecated, and will + * be removed in a future version. */ + @Deprecated public final Builder local(@Nullable Boolean value) { this.local = value; return this; @@ -389,10 +394,7 @@ public final Builder local(@Nullable Boolean value) { * Timeout for waiting for new cluster state in case it is blocked *

    * API name: {@code master_timeout} - * - * @deprecated 9.2.0 */ - @Deprecated public final Builder masterTimeout(@Nullable Time value) { this.masterTimeout = value; return this; @@ -402,34 +404,31 @@ public final Builder masterTimeout(@Nullable Time value) { * Timeout for waiting for new cluster state in case it is blocked *

    * API name: {@code master_timeout} - * - * @deprecated 9.2.0 */ - @Deprecated public final Builder masterTimeout(Function> fn) { return this.masterTimeout(fn.apply(new Time.Builder()).build()); } /** - * Limit the information returned to the specified metrics + * Limit the information returned to the specified metrics. *

    * API name: {@code metric} *

    * Adds all elements of list to metric. */ - public final Builder metric(List list) { + public final Builder metric(List list) { this.metric = _listAddAll(this.metric, list); return this; } /** - * Limit the information returned to the specified metrics + * Limit the information returned to the specified metrics. *

    * API name: {@code metric} *

    * Adds one or more values to metric. */ - public final Builder metric(String value, String... values) { + public final Builder metric(ClusterStateMetric value, ClusterStateMetric... values) { this.metric = _listAdd(this.metric, value, values); return this; } @@ -519,8 +518,8 @@ public StateRequest build() { buf.append("/_cluster"); buf.append("/state"); buf.append("/"); - SimpleEndpoint.pathEncode(request.metric.stream().map(v -> v).collect(Collectors.joining(",")), - buf); + SimpleEndpoint.pathEncode( + request.metric.stream().map(v -> v.jsonValue()).collect(Collectors.joining(",")), buf); return buf.toString(); } if (propsSet == (_metric | _index)) { @@ -528,8 +527,8 @@ public StateRequest build() { buf.append("/_cluster"); buf.append("/state"); buf.append("/"); - SimpleEndpoint.pathEncode(request.metric.stream().map(v -> v).collect(Collectors.joining(",")), - buf); + SimpleEndpoint.pathEncode( + request.metric.stream().map(v -> v.jsonValue()).collect(Collectors.joining(",")), buf); buf.append("/"); SimpleEndpoint.pathEncode(request.index.stream().map(v -> v).collect(Collectors.joining(",")), buf); return buf.toString(); @@ -554,10 +553,12 @@ public StateRequest build() { if (propsSet == 0) { } if (propsSet == (_metric)) { - params.put("metric", request.metric.stream().map(v -> v).collect(Collectors.joining(","))); + params.put("metric", + request.metric.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); } if (propsSet == (_metric | _index)) { - params.put("metric", request.metric.stream().map(v -> v).collect(Collectors.joining(","))); + params.put("metric", + request.metric.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); } return params; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/NodeAllocationExplanation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/NodeAllocationExplanation.java index 0d424dc8d4..102fc21611 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/NodeAllocationExplanation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/NodeAllocationExplanation.java @@ -81,13 +81,14 @@ public class NodeAllocationExplanation implements JsonpSerializable { private final String transportAddress; - private final int weightRanking; + @Nullable + private final Integer weightRanking; // --------------------------------------------------------------------------------------------- private NodeAllocationExplanation(Builder builder) { - this.deciders = ApiTypeHelper.unmodifiableRequired(builder.deciders, this, "deciders"); + this.deciders = ApiTypeHelper.unmodifiable(builder.deciders); this.nodeAttributes = ApiTypeHelper.unmodifiableRequired(builder.nodeAttributes, this, "nodeAttributes"); this.nodeDecision = ApiTypeHelper.requireNonNull(builder.nodeDecision, this, "nodeDecision"); this.nodeId = ApiTypeHelper.requireNonNull(builder.nodeId, this, "nodeId"); @@ -95,7 +96,7 @@ private NodeAllocationExplanation(Builder builder) { this.roles = ApiTypeHelper.unmodifiableRequired(builder.roles, this, "roles"); this.store = builder.store; this.transportAddress = ApiTypeHelper.requireNonNull(builder.transportAddress, this, "transportAddress"); - this.weightRanking = ApiTypeHelper.requireNonNull(builder.weightRanking, this, "weightRanking", 0); + this.weightRanking = builder.weightRanking; } @@ -104,7 +105,7 @@ public static NodeAllocationExplanation of(Function deciders() { return this.deciders; @@ -161,9 +162,10 @@ public final String transportAddress() { } /** - * Required - API name: {@code weight_ranking} + * API name: {@code weight_ranking} */ - public final int weightRanking() { + @Nullable + public final Integer weightRanking() { return this.weightRanking; } @@ -224,8 +226,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("transport_address"); generator.write(this.transportAddress); - generator.writeKey("weight_ranking"); - generator.write(this.weightRanking); + if (this.weightRanking != null) { + generator.writeKey("weight_ranking"); + generator.write(this.weightRanking); + + } } @@ -243,6 +248,7 @@ public String toString() { public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable private List deciders; private Map nodeAttributes; @@ -260,10 +266,11 @@ public static class Builder extends WithJsonObjectBuilderBase private String transportAddress; + @Nullable private Integer weightRanking; /** - * Required - API name: {@code deciders} + * API name: {@code deciders} *

    * Adds all elements of list to deciders. */ @@ -273,7 +280,7 @@ public final Builder deciders(List list) { } /** - * Required - API name: {@code deciders} + * API name: {@code deciders} *

    * Adds one or more values to deciders. */ @@ -283,7 +290,7 @@ public final Builder deciders(AllocationDecision value, AllocationDecision... va } /** - * Required - API name: {@code deciders} + * API name: {@code deciders} *

    * Adds a value to deciders using a builder lambda. */ @@ -379,9 +386,9 @@ public final Builder transportAddress(String value) { } /** - * Required - API name: {@code weight_ranking} + * API name: {@code weight_ranking} */ - public final Builder weightRanking(int value) { + public final Builder weightRanking(@Nullable Integer value) { this.weightRanking = value; return this; } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/state/ClusterStateMetric.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/state/ClusterStateMetric.java new file mode 100644 index 0000000000..80c6b5a0ff --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/state/ClusterStateMetric.java @@ -0,0 +1,81 @@ +/* + * 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. + */ + +package co.elastic.clients.elasticsearch.cluster.state; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum ClusterStateMetric implements JsonEnum { + All("_all"), + + Version("version"), + + MasterNode("master_node"), + + Blocks("blocks"), + + Nodes("nodes"), + + Metadata("metadata"), + + RoutingTable("routing_table"), + + RoutingNodes("routing_nodes"), + + Customs("customs"), + + ; + + private final String jsonValue; + + ClusterStateMetric(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + ClusterStateMetric.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/DenseVectorOffHeapStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/DenseVectorOffHeapStats.java index 3d7e4916fd..06b6a5cf71 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/DenseVectorOffHeapStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/DenseVectorOffHeapStats.java @@ -87,6 +87,16 @@ public class DenseVectorOffHeapStats implements JsonpSerializable { @Nullable private final String totalVexSize; + private final long totalCenifSizeBytes; + + @Nullable + private final String totalCenifSize; + + private final long totalClivfSizeBytes; + + @Nullable + private final String totalClivfSize; + private final Map> fielddata; // --------------------------------------------------------------------------------------------- @@ -103,6 +113,12 @@ private DenseVectorOffHeapStats(Builder builder) { this.totalVeqSize = builder.totalVeqSize; this.totalVexSizeBytes = ApiTypeHelper.requireNonNull(builder.totalVexSizeBytes, this, "totalVexSizeBytes", 0); this.totalVexSize = builder.totalVexSize; + this.totalCenifSizeBytes = ApiTypeHelper.requireNonNull(builder.totalCenifSizeBytes, this, + "totalCenifSizeBytes", 0); + this.totalCenifSize = builder.totalCenifSize; + this.totalClivfSizeBytes = ApiTypeHelper.requireNonNull(builder.totalClivfSizeBytes, this, + "totalClivfSizeBytes", 0); + this.totalClivfSize = builder.totalClivfSize; this.fielddata = ApiTypeHelper.unmodifiable(builder.fielddata); } @@ -186,6 +202,36 @@ public final String totalVexSize() { return this.totalVexSize; } + /** + * Required - API name: {@code total_cenif_size_bytes} + */ + public final long totalCenifSizeBytes() { + return this.totalCenifSizeBytes; + } + + /** + * API name: {@code total_cenif_size} + */ + @Nullable + public final String totalCenifSize() { + return this.totalCenifSize; + } + + /** + * Required - API name: {@code total_clivf_size_bytes} + */ + public final long totalClivfSizeBytes() { + return this.totalClivfSizeBytes; + } + + /** + * API name: {@code total_clivf_size} + */ + @Nullable + public final String totalClivfSize() { + return this.totalClivfSize; + } + /** * API name: {@code fielddata} */ @@ -243,6 +289,22 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("total_vex_size"); generator.write(this.totalVexSize); + } + generator.writeKey("total_cenif_size_bytes"); + generator.write(this.totalCenifSizeBytes); + + if (this.totalCenifSize != null) { + generator.writeKey("total_cenif_size"); + generator.write(this.totalCenifSize); + + } + generator.writeKey("total_clivf_size_bytes"); + generator.write(this.totalClivfSizeBytes); + + if (this.totalClivfSize != null) { + generator.writeKey("total_clivf_size"); + generator.write(this.totalClivfSize); + } if (ApiTypeHelper.isDefined(this.fielddata)) { generator.writeKey("fielddata"); @@ -305,6 +367,16 @@ public static class Builder extends WithJsonObjectBuilderBase @Nullable private String totalVexSize; + private Long totalCenifSizeBytes; + + @Nullable + private String totalCenifSize; + + private Long totalClivfSizeBytes; + + @Nullable + private String totalClivfSize; + @Nullable private Map> fielddata; @@ -388,6 +460,38 @@ public final Builder totalVexSize(@Nullable String value) { return this; } + /** + * Required - API name: {@code total_cenif_size_bytes} + */ + public final Builder totalCenifSizeBytes(long value) { + this.totalCenifSizeBytes = value; + return this; + } + + /** + * API name: {@code total_cenif_size} + */ + public final Builder totalCenifSize(@Nullable String value) { + this.totalCenifSize = value; + return this; + } + + /** + * Required - API name: {@code total_clivf_size_bytes} + */ + public final Builder totalClivfSizeBytes(long value) { + this.totalClivfSizeBytes = value; + return this; + } + + /** + * API name: {@code total_clivf_size} + */ + public final Builder totalClivfSize(@Nullable String value) { + this.totalClivfSize = value; + return this; + } + /** * API name: {@code fielddata} *

    @@ -447,6 +551,10 @@ protected static void setupDenseVectorOffHeapStatsDeserializer( op.add(Builder::totalVeqSize, JsonpDeserializer.stringDeserializer(), "total_veq_size"); op.add(Builder::totalVexSizeBytes, JsonpDeserializer.longDeserializer(), "total_vex_size_bytes"); op.add(Builder::totalVexSize, JsonpDeserializer.stringDeserializer(), "total_vex_size"); + op.add(Builder::totalCenifSizeBytes, JsonpDeserializer.longDeserializer(), "total_cenif_size_bytes"); + op.add(Builder::totalCenifSize, JsonpDeserializer.stringDeserializer(), "total_cenif_size"); + op.add(Builder::totalClivfSizeBytes, JsonpDeserializer.longDeserializer(), "total_clivf_size_bytes"); + op.add(Builder::totalClivfSize, JsonpDeserializer.stringDeserializer(), "total_clivf_size"); op.add(Builder::fielddata, JsonpDeserializer.stringMapDeserializer( JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.longDeserializer())), "fielddata"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorAsyncClient.java index df00ac3f6b..1a39655ed1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorAsyncClient.java @@ -391,9 +391,10 @@ public final CompletableFuture syncJobCancel( // ----- Endpoint: connector.sync_job_check_in /** - * Check in a connector sync job. Check in a connector sync job and set the - * last_seen field to the current time before updating it in the - * internal index. + * Check in a connector sync job. + *

    + * Check in a connector sync job and set the last_seen field to the + * current time before updating it in the internal index. *

    * To sync data using self-managed connectors, you need to deploy the Elastic * connector service on your own infrastructure. This service runs automatically @@ -412,9 +413,10 @@ public CompletableFuture syncJobCheckIn(SyncJobCheckInRe } /** - * Check in a connector sync job. Check in a connector sync job and set the - * last_seen field to the current time before updating it in the - * internal index. + * Check in a connector sync job. + *

    + * Check in a connector sync job and set the last_seen field to the + * current time before updating it in the internal index. *

    * To sync data using self-managed connectors, you need to deploy the Elastic * connector service on your own infrastructure. This service runs automatically @@ -436,10 +438,12 @@ public final CompletableFuture syncJobCheckIn( // ----- Endpoint: connector.sync_job_claim /** - * Claim a connector sync job. This action updates the job status to - * in_progress and sets the last_seen and - * started_at timestamps to the current time. Additionally, it can - * set the sync_cursor property for the sync job. + * Claim a connector sync job. + *

    + * This action updates the job status to in_progress and sets the + * last_seen and started_at timestamps to the current + * time. Additionally, it can set the sync_cursor property for the + * sync job. *

    * This API is not intended for direct connector management by users. It * supports the implementation of services that utilize the connector protocol @@ -462,10 +466,12 @@ public CompletableFuture syncJobClaim(SyncJobClaimRequest } /** - * Claim a connector sync job. This action updates the job status to - * in_progress and sets the last_seen and - * started_at timestamps to the current time. Additionally, it can - * set the sync_cursor property for the sync job. + * Claim a connector sync job. + *

    + * This action updates the job status to in_progress and sets the + * last_seen and started_at timestamps to the current + * time. Additionally, it can set the sync_cursor property for the + * sync job. *

    * This API is not intended for direct connector management by users. It * supports the implementation of services that utilize the connector protocol @@ -530,8 +536,10 @@ public final CompletableFuture syncJobDelete( // ----- Endpoint: connector.sync_job_error /** - * Set a connector sync job error. Set the error field for a - * connector sync job and set its status to error. + * Set a connector sync job error. + *

    + * Set the error field for a connector sync job and set its + * status to error. *

    * To sync data using self-managed connectors, you need to deploy the Elastic * connector service on your own infrastructure. This service runs automatically @@ -550,8 +558,10 @@ public CompletableFuture syncJobError(SyncJobErrorRequest } /** - * Set a connector sync job error. Set the error field for a - * connector sync job and set its status to error. + * Set a connector sync job error. + *

    + * Set the error field for a connector sync job and set its + * status to error. *

    * To sync data using self-managed connectors, you need to deploy the Elastic * connector service on your own infrastructure. This service runs automatically @@ -700,11 +710,13 @@ public final CompletableFuture syncJobPost( // ----- Endpoint: connector.sync_job_update_stats /** - * Set the connector sync job stats. Stats include: - * deleted_document_count, indexed_document_count, - * indexed_document_volume, and total_document_count. - * You can also update last_seen. This API is mainly used by the - * connector service for updating sync job information. + * Set the connector sync job stats. + *

    + * Stats include: deleted_document_count, + * indexed_document_count, indexed_document_volume, + * and total_document_count. You can also update + * last_seen. This API is mainly used by the connector service for + * updating sync job information. *

    * To sync data using self-managed connectors, you need to deploy the Elastic * connector service on your own infrastructure. This service runs automatically @@ -723,11 +735,13 @@ public CompletableFuture syncJobUpdateStats(SyncJobU } /** - * Set the connector sync job stats. Stats include: - * deleted_document_count, indexed_document_count, - * indexed_document_volume, and total_document_count. - * You can also update last_seen. This API is mainly used by the - * connector service for updating sync job information. + * Set the connector sync job stats. + *

    + * Stats include: deleted_document_count, + * indexed_document_count, indexed_document_volume, + * and total_document_count. You can also update + * last_seen. This API is mainly used by the connector service for + * updating sync job information. *

    * To sync data using self-managed connectors, you need to deploy the Elastic * connector service on your own infrastructure. This service runs automatically @@ -910,9 +924,10 @@ public final CompletableFuture updateError( // ----- Endpoint: connector.update_features /** - * Update the connector features. Update the connector features in the connector - * document. This API can be used to control the following aspects of a - * connector: + * Update the connector features. + *

    + * Update the connector features in the connector document. This API can be used + * to control the following aspects of a connector: *