2929import co .elastic .clients .elasticsearch .connector .ElasticsearchConnectorAsyncClient ;
3030import co .elastic .clients .elasticsearch .core .BulkRequest ;
3131import co .elastic .clients .elasticsearch .core .BulkResponse ;
32+ import co .elastic .clients .elasticsearch .core .CancelReindexRequest ;
33+ import co .elastic .clients .elasticsearch .core .CancelReindexResponse ;
3234import co .elastic .clients .elasticsearch .core .ClearScrollRequest ;
3335import co .elastic .clients .elasticsearch .core .ClearScrollResponse ;
3436import co .elastic .clients .elasticsearch .core .ClosePointInTimeRequest ;
5153import co .elastic .clients .elasticsearch .core .ExplainResponse ;
5254import co .elastic .clients .elasticsearch .core .FieldCapsRequest ;
5355import co .elastic .clients .elasticsearch .core .FieldCapsResponse ;
56+ import co .elastic .clients .elasticsearch .core .GetReindexRequest ;
57+ import co .elastic .clients .elasticsearch .core .GetReindexResponse ;
5458import co .elastic .clients .elasticsearch .core .GetRequest ;
5559import co .elastic .clients .elasticsearch .core .GetResponse ;
5660import co .elastic .clients .elasticsearch .core .GetScriptContextRequest ;
6771import co .elastic .clients .elasticsearch .core .IndexResponse ;
6872import co .elastic .clients .elasticsearch .core .InfoRequest ;
6973import co .elastic .clients .elasticsearch .core .InfoResponse ;
74+ import co .elastic .clients .elasticsearch .core .ListReindexRequest ;
75+ import co .elastic .clients .elasticsearch .core .ListReindexResponse ;
7076import co .elastic .clients .elasticsearch .core .MgetRequest ;
7177import co .elastic .clients .elasticsearch .core .MgetResponse ;
7278import co .elastic .clients .elasticsearch .core .MsearchRequest ;
@@ -926,6 +932,51 @@ public CompletableFuture<BulkResponse> bulk() {
926932 this .transportOptions );
927933 }
928934
935+ // ----- Endpoint: cancel_reindex
936+
937+ /**
938+ * Cancel a reindex task.
939+ * <p>
940+ * Cancel an ongoing reindex task. If <code>wait_for_completion</code> is
941+ * <code>true</code> (the default), the response contains the final task state
942+ * after cancellation. If <code>wait_for_completion</code> is
943+ * <code>false</code>, the response contains only
944+ * <code>acknowledged: true</code>.
945+ *
946+ * @see <a href=
947+ * "https://www.elastic.co/docs/api/doc/elasticsearch#TODO">Documentation
948+ * on elastic.co</a>
949+ */
950+
951+ public CompletableFuture <CancelReindexResponse > cancelReindex (CancelReindexRequest request ) {
952+ @ SuppressWarnings ("unchecked" )
953+ JsonEndpoint <CancelReindexRequest , CancelReindexResponse , ErrorResponse > endpoint = (JsonEndpoint <CancelReindexRequest , CancelReindexResponse , ErrorResponse >) CancelReindexRequest ._ENDPOINT ;
954+
955+ return this .transport .performRequestAsync (request , endpoint , this .transportOptions );
956+ }
957+
958+ /**
959+ * Cancel a reindex task.
960+ * <p>
961+ * Cancel an ongoing reindex task. If <code>wait_for_completion</code> is
962+ * <code>true</code> (the default), the response contains the final task state
963+ * after cancellation. If <code>wait_for_completion</code> is
964+ * <code>false</code>, the response contains only
965+ * <code>acknowledged: true</code>.
966+ *
967+ * @param fn
968+ * a function that initializes a builder to create the
969+ * {@link CancelReindexRequest}
970+ * @see <a href=
971+ * "https://www.elastic.co/docs/api/doc/elasticsearch#TODO">Documentation
972+ * on elastic.co</a>
973+ */
974+
975+ public final CompletableFuture <CancelReindexResponse > cancelReindex (
976+ Function <CancelReindexRequest .Builder , ObjectBuilder <CancelReindexRequest >> fn ) {
977+ return cancelReindex (fn .apply (new CancelReindexRequest .Builder ()).build ());
978+ }
979+
929980 // ----- Endpoint: clear_scroll
930981
931982 /**
@@ -2566,6 +2617,43 @@ public final <TDocument> CompletableFuture<GetResponse<TDocument>> get(
25662617 return get (fn .apply (new GetRequest .Builder ()).build (), tDocumentType );
25672618 }
25682619
2620+ // ----- Endpoint: get_reindex
2621+
2622+ /**
2623+ * Get a reindex task.
2624+ * <p>
2625+ * Get the status and progress of a specific reindex task.
2626+ *
2627+ * @see <a href=
2628+ * "https://www.elastic.co/docs/api/doc/elasticsearch#TODO">Documentation
2629+ * on elastic.co</a>
2630+ */
2631+
2632+ public CompletableFuture <GetReindexResponse > getReindex (GetReindexRequest request ) {
2633+ @ SuppressWarnings ("unchecked" )
2634+ JsonEndpoint <GetReindexRequest , GetReindexResponse , ErrorResponse > endpoint = (JsonEndpoint <GetReindexRequest , GetReindexResponse , ErrorResponse >) GetReindexRequest ._ENDPOINT ;
2635+
2636+ return this .transport .performRequestAsync (request , endpoint , this .transportOptions );
2637+ }
2638+
2639+ /**
2640+ * Get a reindex task.
2641+ * <p>
2642+ * Get the status and progress of a specific reindex task.
2643+ *
2644+ * @param fn
2645+ * a function that initializes a builder to create the
2646+ * {@link GetReindexRequest}
2647+ * @see <a href=
2648+ * "https://www.elastic.co/docs/api/doc/elasticsearch#TODO">Documentation
2649+ * on elastic.co</a>
2650+ */
2651+
2652+ public final CompletableFuture <GetReindexResponse > getReindex (
2653+ Function <GetReindexRequest .Builder , ObjectBuilder <GetReindexRequest >> fn ) {
2654+ return getReindex (fn .apply (new GetReindexRequest .Builder ()).build ());
2655+ }
2656+
25692657 // ----- Endpoint: get_script
25702658
25712659 /**
@@ -3344,9 +3432,13 @@ public final <TDocument> CompletableFuture<IndexResponse> index(
33443432 /**
33453433 * Get cluster info.
33463434 * <p>
3347- * Get basic build, version, and cluster information. ::: In Serverless, this
3348- * API is retained for backward compatibility only. Some response fields, such
3349- * as the version number, should be ignored.
3435+ * Get basic build, version, and cluster information. ::: In Serverless,
3436+ * <code>version.number</code> always reports the next target Elasticsearch
3437+ * release version at the time of the request. Serverless does not track to a
3438+ * traditional release versioning model; it is continuously updated. The version
3439+ * number is provided to maintain compatibility with existing clients, but it is
3440+ * not meaningful for assessing feature availability. Clients should detect a
3441+ * Serverless environment by checking for <code>build_flavor: serverless</code>.
33503442 *
33513443 * @see <a href=
33523444 * "https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-info">Documentation
@@ -3356,6 +3448,58 @@ public CompletableFuture<InfoResponse> info() {
33563448 return this .transport .performRequestAsync (InfoRequest ._INSTANCE , InfoRequest ._ENDPOINT , this .transportOptions );
33573449 }
33583450
3451+ // ----- Endpoint: list_reindex
3452+
3453+ /**
3454+ * List active reindex tasks.
3455+ * <p>
3456+ * Get information about all currently running reindex tasks.
3457+ *
3458+ * @see <a href=
3459+ * "https://www.elastic.co/docs/api/doc/elasticsearch#TODO">Documentation
3460+ * on elastic.co</a>
3461+ */
3462+
3463+ public CompletableFuture <ListReindexResponse > listReindex (ListReindexRequest request ) {
3464+ @ SuppressWarnings ("unchecked" )
3465+ JsonEndpoint <ListReindexRequest , ListReindexResponse , ErrorResponse > endpoint = (JsonEndpoint <ListReindexRequest , ListReindexResponse , ErrorResponse >) ListReindexRequest ._ENDPOINT ;
3466+
3467+ return this .transport .performRequestAsync (request , endpoint , this .transportOptions );
3468+ }
3469+
3470+ /**
3471+ * List active reindex tasks.
3472+ * <p>
3473+ * Get information about all currently running reindex tasks.
3474+ *
3475+ * @param fn
3476+ * a function that initializes a builder to create the
3477+ * {@link ListReindexRequest}
3478+ * @see <a href=
3479+ * "https://www.elastic.co/docs/api/doc/elasticsearch#TODO">Documentation
3480+ * on elastic.co</a>
3481+ */
3482+
3483+ public final CompletableFuture <ListReindexResponse > listReindex (
3484+ Function <ListReindexRequest .Builder , ObjectBuilder <ListReindexRequest >> fn ) {
3485+ return listReindex (fn .apply (new ListReindexRequest .Builder ()).build ());
3486+ }
3487+
3488+ /**
3489+ * List active reindex tasks.
3490+ * <p>
3491+ * Get information about all currently running reindex tasks.
3492+ *
3493+ * @see <a href=
3494+ * "https://www.elastic.co/docs/api/doc/elasticsearch#TODO">Documentation
3495+ * on elastic.co</a>
3496+ */
3497+
3498+ public CompletableFuture <ListReindexResponse > listReindex () {
3499+ return this .transport .performRequestAsync (new ListReindexRequest .Builder ().build (),
3500+ ListReindexRequest ._ENDPOINT , this .transportOptions );
3501+ }
3502+
33593503 // ----- Endpoint: mget
33603504
33613505 /**
@@ -4220,9 +4364,10 @@ public final CompletableFuture<RankEvalResponse> rankEval(
42204364 * must explicitly allow the remote host using the
42214365 * <code>reindex.remote.whitelist</code> node setting on the destination
42224366 * cluster. If reindexing from a remote cluster into an Elastic Cloud Serverless
4223- * project, only remote hosts from Elastic Cloud Hosted are allowed. Automatic
4224- * data stream creation requires a matching index template with data stream
4225- * enabled.
4367+ * project, only remote hosts from <a href=
4368+ * "https://cloud.elastic.co/registration?page=docs&placement=docs-body">Elastic
4369+ * Cloud Hosted and Elastic Cloud Serverless</a> are allowed. Automatic data
4370+ * stream creation requires a matching index template with data stream enabled.
42264371 * <p>
42274372 * The <code>dest</code> element can be configured like the index API to control
42284373 * optimistic concurrency control. Omitting <code>version_type</code> or setting
@@ -4316,9 +4461,10 @@ public CompletableFuture<ReindexResponse> reindex(ReindexRequest request) {
43164461 * must explicitly allow the remote host using the
43174462 * <code>reindex.remote.whitelist</code> node setting on the destination
43184463 * cluster. If reindexing from a remote cluster into an Elastic Cloud Serverless
4319- * project, only remote hosts from Elastic Cloud Hosted are allowed. Automatic
4320- * data stream creation requires a matching index template with data stream
4321- * enabled.
4464+ * project, only remote hosts from <a href=
4465+ * "https://cloud.elastic.co/registration?page=docs&placement=docs-body">Elastic
4466+ * Cloud Hosted and Elastic Cloud Serverless</a> are allowed. Automatic data
4467+ * stream creation requires a matching index template with data stream enabled.
43224468 * <p>
43234469 * The <code>dest</code> element can be configured like the index API to control
43244470 * optimistic concurrency control. Omitting <code>version_type</code> or setting
0 commit comments