17
17
* under the License.
18
18
*/
19
19
20
- //----------------------------------------------------
21
- // THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
22
- //----------------------------------------------------
23
-
24
20
package co .elastic .clients .elasticsearch ;
25
21
26
22
import co .elastic .clients .ApiClient ;
46
42
import co .elastic .clients .elasticsearch .core .DeleteScriptResponse ;
47
43
import co .elastic .clients .elasticsearch .core .ExistsRequest ;
48
44
import co .elastic .clients .elasticsearch .core .ExistsSourceRequest ;
45
+ import co .elastic .clients .elasticsearch .core .ExplainRequest ;
46
+ import co .elastic .clients .elasticsearch .core .ExplainResponse ;
49
47
import co .elastic .clients .elasticsearch .core .FieldCapsRequest ;
50
48
import co .elastic .clients .elasticsearch .core .FieldCapsResponse ;
51
49
import co .elastic .clients .elasticsearch .core .GetRequest ;
73
71
import co .elastic .clients .elasticsearch .core .PutScriptResponse ;
74
72
import co .elastic .clients .elasticsearch .core .RankEvalRequest ;
75
73
import co .elastic .clients .elasticsearch .core .RankEvalResponse ;
74
+ import co .elastic .clients .elasticsearch .core .ReindexRequest ;
75
+ import co .elastic .clients .elasticsearch .core .ReindexResponse ;
76
76
import co .elastic .clients .elasticsearch .core .RenderSearchTemplateRequest ;
77
77
import co .elastic .clients .elasticsearch .core .RenderSearchTemplateResponse ;
78
78
import co .elastic .clients .elasticsearch .core .ScriptsPainlessExecuteRequest ;
93
93
import co .elastic .clients .elasticsearch .core .UpdateRequest ;
94
94
import co .elastic .clients .elasticsearch .core .UpdateResponse ;
95
95
import co .elastic .clients .elasticsearch .enrich .ElasticsearchEnrichAsyncClient ;
96
+ import co .elastic .clients .elasticsearch .eql .ElasticsearchEqlAsyncClient ;
96
97
import co .elastic .clients .elasticsearch .graph .ElasticsearchGraphAsyncClient ;
97
98
import co .elastic .clients .elasticsearch .indices .ElasticsearchIndicesAsyncClient ;
99
+ import co .elastic .clients .elasticsearch .inference .ElasticsearchInferenceAsyncClient ;
98
100
import co .elastic .clients .elasticsearch .ingest .ElasticsearchIngestAsyncClient ;
101
+ import co .elastic .clients .elasticsearch .license .ElasticsearchLicenseAsyncClient ;
99
102
import co .elastic .clients .elasticsearch .logstash .ElasticsearchLogstashAsyncClient ;
100
103
import co .elastic .clients .elasticsearch .ml .ElasticsearchMlAsyncClient ;
101
104
import co .elastic .clients .elasticsearch .query_ruleset .ElasticsearchQueryRulesetAsyncClient ;
102
105
import co .elastic .clients .elasticsearch .search_application .ElasticsearchSearchApplicationAsyncClient ;
103
106
import co .elastic .clients .elasticsearch .security .ElasticsearchSecurityAsyncClient ;
107
+ import co .elastic .clients .elasticsearch .sql .ElasticsearchSqlAsyncClient ;
104
108
import co .elastic .clients .elasticsearch .synonyms .ElasticsearchSynonymsAsyncClient ;
109
+ import co .elastic .clients .elasticsearch .tasks .ElasticsearchTasksAsyncClient ;
105
110
import co .elastic .clients .elasticsearch .transform .ElasticsearchTransformAsyncClient ;
106
111
import co .elastic .clients .transport .ElasticsearchTransport ;
107
112
import co .elastic .clients .transport .Endpoint ;
117
122
import java .util .function .Function ;
118
123
import javax .annotation .Nullable ;
119
124
125
+ //----------------------------------------------------------------
126
+ // THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
127
+ //----------------------------------------------------------------
128
+ //
129
+ // This code is generated from the Elasticsearch API specification
130
+ // at https://github.com/elastic/elasticsearch-specification
131
+ //
132
+ // Manual updates to this file will be lost when the code is
133
+ // re-generated.
134
+ //
135
+ // If you find a property that is missing or wrongly typed, please
136
+ // open an issue or a PR on the API specification repository.
137
+ //
138
+ //----------------------------------------------------------------
139
+
120
140
/**
121
141
* Client for the namespace.
122
142
*/
@@ -153,6 +173,10 @@ public ElasticsearchEnrichAsyncClient enrich() {
153
173
return new ElasticsearchEnrichAsyncClient (this .transport , this .transportOptions );
154
174
}
155
175
176
+ public ElasticsearchEqlAsyncClient eql () {
177
+ return new ElasticsearchEqlAsyncClient (this .transport , this .transportOptions );
178
+ }
179
+
156
180
public ElasticsearchGraphAsyncClient graph () {
157
181
return new ElasticsearchGraphAsyncClient (this .transport , this .transportOptions );
158
182
}
@@ -161,10 +185,18 @@ public ElasticsearchIndicesAsyncClient indices() {
161
185
return new ElasticsearchIndicesAsyncClient (this .transport , this .transportOptions );
162
186
}
163
187
188
+ public ElasticsearchInferenceAsyncClient inference () {
189
+ return new ElasticsearchInferenceAsyncClient (this .transport , this .transportOptions );
190
+ }
191
+
164
192
public ElasticsearchIngestAsyncClient ingest () {
165
193
return new ElasticsearchIngestAsyncClient (this .transport , this .transportOptions );
166
194
}
167
195
196
+ public ElasticsearchLicenseAsyncClient license () {
197
+ return new ElasticsearchLicenseAsyncClient (this .transport , this .transportOptions );
198
+ }
199
+
168
200
public ElasticsearchLogstashAsyncClient logstash () {
169
201
return new ElasticsearchLogstashAsyncClient (this .transport , this .transportOptions );
170
202
}
@@ -185,10 +217,18 @@ public ElasticsearchSecurityAsyncClient security() {
185
217
return new ElasticsearchSecurityAsyncClient (this .transport , this .transportOptions );
186
218
}
187
219
220
+ public ElasticsearchSqlAsyncClient sql () {
221
+ return new ElasticsearchSqlAsyncClient (this .transport , this .transportOptions );
222
+ }
223
+
188
224
public ElasticsearchSynonymsAsyncClient synonyms () {
189
225
return new ElasticsearchSynonymsAsyncClient (this .transport , this .transportOptions );
190
226
}
191
227
228
+ public ElasticsearchTasksAsyncClient tasks () {
229
+ return new ElasticsearchTasksAsyncClient (this .transport , this .transportOptions );
230
+ }
231
+
192
232
public ElasticsearchTransformAsyncClient transform () {
193
233
return new ElasticsearchTransformAsyncClient (this .transport , this .transportOptions );
194
234
}
@@ -570,6 +610,76 @@ public final CompletableFuture<BooleanResponse> existsSource(
570
610
return existsSource (fn .apply (new ExistsSourceRequest .Builder ()).build ());
571
611
}
572
612
613
+ // ----- Endpoint: explain
614
+
615
+ /**
616
+ * Returns information about why a specific matches (or doesn't match) a query.
617
+ *
618
+ * @see <a href=
619
+ * "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html">Documentation
620
+ * on elastic.co</a>
621
+ */
622
+
623
+ public <TDocument > CompletableFuture <ExplainResponse <TDocument >> explain (ExplainRequest request ,
624
+ Class <TDocument > tDocumentClass ) {
625
+ @ SuppressWarnings ("unchecked" )
626
+ JsonEndpoint <ExplainRequest , ExplainResponse <TDocument >, ErrorResponse > endpoint = (JsonEndpoint <ExplainRequest , ExplainResponse <TDocument >, ErrorResponse >) ExplainRequest ._ENDPOINT ;
627
+ endpoint = new EndpointWithResponseMapperAttr <>(endpoint ,
628
+ "co.elastic.clients:Deserializer:_global.explain.TDocument" , getDeserializer (tDocumentClass ));
629
+
630
+ return this .transport .performRequestAsync (request , endpoint , this .transportOptions );
631
+ }
632
+
633
+ /**
634
+ * Returns information about why a specific matches (or doesn't match) a query.
635
+ *
636
+ * @param fn
637
+ * a function that initializes a builder to create the
638
+ * {@link ExplainRequest}
639
+ * @see <a href=
640
+ * "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html">Documentation
641
+ * on elastic.co</a>
642
+ */
643
+
644
+ public final <TDocument > CompletableFuture <ExplainResponse <TDocument >> explain (
645
+ Function <ExplainRequest .Builder , ObjectBuilder <ExplainRequest >> fn , Class <TDocument > tDocumentClass ) {
646
+ return explain (fn .apply (new ExplainRequest .Builder ()).build (), tDocumentClass );
647
+ }
648
+
649
+ /**
650
+ * Returns information about why a specific matches (or doesn't match) a query.
651
+ *
652
+ * @see <a href=
653
+ * "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html">Documentation
654
+ * on elastic.co</a>
655
+ */
656
+
657
+ public <TDocument > CompletableFuture <ExplainResponse <TDocument >> explain (ExplainRequest request ,
658
+ Type tDocumentType ) {
659
+ @ SuppressWarnings ("unchecked" )
660
+ JsonEndpoint <ExplainRequest , ExplainResponse <TDocument >, ErrorResponse > endpoint = (JsonEndpoint <ExplainRequest , ExplainResponse <TDocument >, ErrorResponse >) ExplainRequest ._ENDPOINT ;
661
+ endpoint = new EndpointWithResponseMapperAttr <>(endpoint ,
662
+ "co.elastic.clients:Deserializer:_global.explain.TDocument" , getDeserializer (tDocumentType ));
663
+
664
+ return this .transport .performRequestAsync (request , endpoint , this .transportOptions );
665
+ }
666
+
667
+ /**
668
+ * Returns information about why a specific matches (or doesn't match) a query.
669
+ *
670
+ * @param fn
671
+ * a function that initializes a builder to create the
672
+ * {@link ExplainRequest}
673
+ * @see <a href=
674
+ * "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html">Documentation
675
+ * on elastic.co</a>
676
+ */
677
+
678
+ public final <TDocument > CompletableFuture <ExplainResponse <TDocument >> explain (
679
+ Function <ExplainRequest .Builder , ObjectBuilder <ExplainRequest >> fn , Type tDocumentType ) {
680
+ return explain (fn .apply (new ExplainRequest .Builder ()).build (), tDocumentType );
681
+ }
682
+
573
683
// ----- Endpoint: field_caps
574
684
575
685
/**
@@ -1207,6 +1317,43 @@ public final CompletableFuture<RankEvalResponse> rankEval(
1207
1317
return rankEval (fn .apply (new RankEvalRequest .Builder ()).build ());
1208
1318
}
1209
1319
1320
+ // ----- Endpoint: reindex
1321
+
1322
+ /**
1323
+ * Allows to copy documents from one index to another, optionally filtering the
1324
+ * source documents by a query, changing the destination index settings, or
1325
+ * fetching the documents from a remote cluster.
1326
+ *
1327
+ * @see <a href=
1328
+ * "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html">Documentation
1329
+ * on elastic.co</a>
1330
+ */
1331
+
1332
+ public CompletableFuture <ReindexResponse > reindex (ReindexRequest request ) {
1333
+ @ SuppressWarnings ("unchecked" )
1334
+ JsonEndpoint <ReindexRequest , ReindexResponse , ErrorResponse > endpoint = (JsonEndpoint <ReindexRequest , ReindexResponse , ErrorResponse >) ReindexRequest ._ENDPOINT ;
1335
+
1336
+ return this .transport .performRequestAsync (request , endpoint , this .transportOptions );
1337
+ }
1338
+
1339
+ /**
1340
+ * Allows to copy documents from one index to another, optionally filtering the
1341
+ * source documents by a query, changing the destination index settings, or
1342
+ * fetching the documents from a remote cluster.
1343
+ *
1344
+ * @param fn
1345
+ * a function that initializes a builder to create the
1346
+ * {@link ReindexRequest}
1347
+ * @see <a href=
1348
+ * "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html">Documentation
1349
+ * on elastic.co</a>
1350
+ */
1351
+
1352
+ public final CompletableFuture <ReindexResponse > reindex (
1353
+ Function <ReindexRequest .Builder , ObjectBuilder <ReindexRequest >> fn ) {
1354
+ return reindex (fn .apply (new ReindexRequest .Builder ()).build ());
1355
+ }
1356
+
1210
1357
// ----- Endpoint: render_search_template
1211
1358
1212
1359
/**
@@ -1718,7 +1865,8 @@ public final <TDocument, TPartialDocument> CompletableFuture<UpdateResponse<TDoc
1718
1865
// ----- Endpoint: update_by_query
1719
1866
1720
1867
/**
1721
- * Performs an update on every document in the index without changing the
1868
+ * Updates documents that match the specified query. If no query is specified,
1869
+ * performs an update on every document in the index without changing the
1722
1870
* source, for example to pick up a mapping change.
1723
1871
*
1724
1872
* @see <a href=
@@ -1734,7 +1882,8 @@ public CompletableFuture<UpdateByQueryResponse> updateByQuery(UpdateByQueryReque
1734
1882
}
1735
1883
1736
1884
/**
1737
- * Performs an update on every document in the index without changing the
1885
+ * Updates documents that match the specified query. If no query is specified,
1886
+ * performs an update on every document in the index without changing the
1738
1887
* source, for example to pick up a mapping change.
1739
1888
*
1740
1889
* @param fn
0 commit comments