Skip to content

Commit 7b1566a

Browse files
committed
Update to latest spec
1 parent 75c6966 commit 7b1566a

File tree

579 files changed

+52408
-6418
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

579 files changed

+52408
-6418
lines changed

java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@
8585
import co.elastic.clients.elasticsearch._global.ReindexRethrottleResponse;
8686
import co.elastic.clients.elasticsearch._global.ScriptsPainlessExecuteRequest;
8787
import co.elastic.clients.elasticsearch._global.ScriptsPainlessExecuteResponse;
88+
import co.elastic.clients.elasticsearch._global.SearchMvtRequest;
89+
import co.elastic.clients.elasticsearch._global.SearchMvtResponse;
8890
import co.elastic.clients.elasticsearch._global.SearchRequest;
8991
import co.elastic.clients.elasticsearch._global.SearchResponse;
9092
import co.elastic.clients.elasticsearch._global.SearchShardsRequest;
@@ -1255,6 +1257,39 @@ public final <TDocument> CompletableFuture<SearchResponse<TDocument>> search(
12551257
return search(fn.apply(new SearchRequest.Builder()).build(), tDocumentClass);
12561258
}
12571259

1260+
// ----- Endpoint: search_mvt
1261+
1262+
/**
1263+
* Searches a vector tile for geospatial values. Returns results as a binary
1264+
* Mapbox vector tile.
1265+
*
1266+
* @see <a href=
1267+
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-vector-tile-api.html">Documentation
1268+
* on elastic.co</a>
1269+
*/
1270+
1271+
public CompletableFuture<SearchMvtResponse> searchMvt(SearchMvtRequest request) throws IOException {
1272+
return this.transport.performRequestAsync(request, SearchMvtRequest.ENDPOINT, this.requestOptions);
1273+
}
1274+
1275+
/**
1276+
* Searches a vector tile for geospatial values. Returns results as a binary
1277+
* Mapbox vector tile.
1278+
*
1279+
* @param fn
1280+
* a function that initializes a freshly created builder. This
1281+
* function can either return its builder argument after having set
1282+
* its properties or return another builder.
1283+
* @see <a href=
1284+
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-vector-tile-api.html">Documentation
1285+
* on elastic.co</a>
1286+
*/
1287+
1288+
public final CompletableFuture<SearchMvtResponse> searchMvt(
1289+
Function<SearchMvtRequest.Builder, ObjectBuilder<SearchMvtRequest>> fn) throws IOException {
1290+
return searchMvt(fn.apply(new SearchMvtRequest.Builder()).build());
1291+
}
1292+
12581293
// ----- Endpoint: search_shards
12591294

12601295
/**

java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@
8585
import co.elastic.clients.elasticsearch._global.ReindexRethrottleResponse;
8686
import co.elastic.clients.elasticsearch._global.ScriptsPainlessExecuteRequest;
8787
import co.elastic.clients.elasticsearch._global.ScriptsPainlessExecuteResponse;
88+
import co.elastic.clients.elasticsearch._global.SearchMvtRequest;
89+
import co.elastic.clients.elasticsearch._global.SearchMvtResponse;
8890
import co.elastic.clients.elasticsearch._global.SearchRequest;
8991
import co.elastic.clients.elasticsearch._global.SearchResponse;
9092
import co.elastic.clients.elasticsearch._global.SearchShardsRequest;
@@ -1248,6 +1250,39 @@ public final <TDocument> SearchResponse<TDocument> search(
12481250
return search(fn.apply(new SearchRequest.Builder()).build(), tDocumentClass);
12491251
}
12501252

1253+
// ----- Endpoint: search_mvt
1254+
1255+
/**
1256+
* Searches a vector tile for geospatial values. Returns results as a binary
1257+
* Mapbox vector tile.
1258+
*
1259+
* @see <a href=
1260+
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-vector-tile-api.html">Documentation
1261+
* on elastic.co</a>
1262+
*/
1263+
1264+
public SearchMvtResponse searchMvt(SearchMvtRequest request) throws IOException {
1265+
return this.transport.performRequest(request, SearchMvtRequest.ENDPOINT, this.requestOptions);
1266+
}
1267+
1268+
/**
1269+
* Searches a vector tile for geospatial values. Returns results as a binary
1270+
* Mapbox vector tile.
1271+
*
1272+
* @param fn
1273+
* a function that initializes a freshly created builder. This
1274+
* function can either return its builder argument after having set
1275+
* its properties or return another builder.
1276+
* @see <a href=
1277+
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-vector-tile-api.html">Documentation
1278+
* on elastic.co</a>
1279+
*/
1280+
1281+
public final SearchMvtResponse searchMvt(Function<SearchMvtRequest.Builder, ObjectBuilder<SearchMvtRequest>> fn)
1282+
throws IOException {
1283+
return searchMvt(fn.apply(new SearchMvtRequest.Builder()).build());
1284+
}
1285+
12511286
// ----- Endpoint: search_shards
12521287

12531288
/**

java-client/src/main/java/co/elastic/clients/elasticsearch/_global/BulkRequest.java

Lines changed: 71 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public final class BulkRequest<TSource> extends RequestBase implements ToJsonp {
6363
private final JsonValue refresh;
6464

6565
@Nullable
66-
private final JsonValue routing;
66+
private final String routing;
6767

6868
@Nullable
6969
private final JsonValue source;
@@ -109,8 +109,7 @@ protected BulkRequest(Builder<TSource> builder) {
109109
}
110110

111111
/**
112-
* A comma-separated list of index names to search; use <code>_all</code> or
113-
* empty string to perform the operation on all indices
112+
* Default index for items which don't provide one
114113
* <p>
115114
* API name: {@code index}
116115
*/
@@ -120,8 +119,7 @@ public String index() {
120119
}
121120

122121
/**
123-
* A comma-separated list of document types to search; leave empty to perform
124-
* the operation on all types
122+
* Default document type for items which don't provide one
125123
* <p>
126124
* API name: {@code type}
127125
*/
@@ -131,6 +129,8 @@ public String type() {
131129
}
132130

133131
/**
132+
* The pipeline id to preprocess incoming documents with
133+
* <p>
134134
* API name: {@code pipeline}
135135
*/
136136
@Nullable
@@ -139,6 +139,11 @@ public String pipeline() {
139139
}
140140

141141
/**
142+
* If <code>true</code> then refresh the affected shards to make this operation
143+
* visible to search, if <code>wait_for</code> then wait for a refresh to make
144+
* this operation visible to search, if <code>false</code> (the default) then do
145+
* nothing with refreshes.
146+
* <p>
142147
* API name: {@code refresh}
143148
*/
144149
@Nullable
@@ -147,14 +152,19 @@ public JsonValue refresh() {
147152
}
148153

149154
/**
155+
* Specific routing value
156+
* <p>
150157
* API name: {@code routing}
151158
*/
152159
@Nullable
153-
public JsonValue routing() {
160+
public String routing() {
154161
return this.routing;
155162
}
156163

157164
/**
165+
* True or false to return the _source field or not, or default list of fields
166+
* to return, can be overridden on each sub-request
167+
* <p>
158168
* API name: {@code _source}
159169
*/
160170
@Nullable
@@ -163,6 +173,9 @@ public JsonValue source() {
163173
}
164174

165175
/**
176+
* Default list of fields to exclude from the returned _source field, can be
177+
* overridden on each sub-request
178+
* <p>
166179
* API name: {@code _source_excludes}
167180
*/
168181
@Nullable
@@ -171,6 +184,9 @@ public List<String> sourceExcludes() {
171184
}
172185

173186
/**
187+
* Default list of fields to extract and return from the _source field, can be
188+
* overridden on each sub-request
189+
* <p>
174190
* API name: {@code _source_includes}
175191
*/
176192
@Nullable
@@ -179,6 +195,8 @@ public List<String> sourceIncludes() {
179195
}
180196

181197
/**
198+
* Explicit operation timeout
199+
* <p>
182200
* API name: {@code timeout}
183201
*/
184202
@Nullable
@@ -187,6 +205,12 @@ public JsonValue timeout() {
187205
}
188206

189207
/**
208+
* Sets the number of shard copies that must be active before proceeding with
209+
* the bulk operation. Defaults to 1, meaning the primary shard only. Set to
210+
* <code>all</code> for all shard copies, otherwise set to any non-negative
211+
* value less than or equal to the total number of copies for the shard (number
212+
* of replicas + 1)
213+
* <p>
190214
* API name: {@code wait_for_active_shards}
191215
*/
192216
@Nullable
@@ -195,6 +219,8 @@ public JsonValue waitForActiveShards() {
195219
}
196220

197221
/**
222+
* Sets require_alias for all incoming documents. Defaults to unset (false)
223+
* <p>
198224
* API name: {@code require_alias}
199225
*/
200226
@Nullable
@@ -243,7 +269,7 @@ public static class Builder<TSource> implements ObjectBuilder<BulkRequest<TSourc
243269
private JsonValue refresh;
244270

245271
@Nullable
246-
private JsonValue routing;
272+
private String routing;
247273

248274
@Nullable
249275
private JsonValue source;
@@ -269,8 +295,7 @@ public static class Builder<TSource> implements ObjectBuilder<BulkRequest<TSourc
269295
private JsonpSerializer<TSource> tSourceSerializer;
270296

271297
/**
272-
* A comma-separated list of index names to search; use <code>_all</code> or
273-
* empty string to perform the operation on all indices
298+
* Default index for items which don't provide one
274299
* <p>
275300
* API name: {@code index}
276301
*/
@@ -280,8 +305,7 @@ public Builder<TSource> index(@Nullable String value) {
280305
}
281306

282307
/**
283-
* A comma-separated list of document types to search; leave empty to perform
284-
* the operation on all types
308+
* Default document type for items which don't provide one
285309
* <p>
286310
* API name: {@code type}
287311
*/
@@ -291,6 +315,8 @@ public Builder<TSource> type(@Nullable String value) {
291315
}
292316

293317
/**
318+
* The pipeline id to preprocess incoming documents with
319+
* <p>
294320
* API name: {@code pipeline}
295321
*/
296322
public Builder<TSource> pipeline(@Nullable String value) {
@@ -299,6 +325,11 @@ public Builder<TSource> pipeline(@Nullable String value) {
299325
}
300326

301327
/**
328+
* If <code>true</code> then refresh the affected shards to make this operation
329+
* visible to search, if <code>wait_for</code> then wait for a refresh to make
330+
* this operation visible to search, if <code>false</code> (the default) then do
331+
* nothing with refreshes.
332+
* <p>
302333
* API name: {@code refresh}
303334
*/
304335
public Builder<TSource> refresh(@Nullable JsonValue value) {
@@ -307,14 +338,19 @@ public Builder<TSource> refresh(@Nullable JsonValue value) {
307338
}
308339

309340
/**
341+
* Specific routing value
342+
* <p>
310343
* API name: {@code routing}
311344
*/
312-
public Builder<TSource> routing(@Nullable JsonValue value) {
345+
public Builder<TSource> routing(@Nullable String value) {
313346
this.routing = value;
314347
return this;
315348
}
316349

317350
/**
351+
* True or false to return the _source field or not, or default list of fields
352+
* to return, can be overridden on each sub-request
353+
* <p>
318354
* API name: {@code _source}
319355
*/
320356
public Builder<TSource> source(@Nullable JsonValue value) {
@@ -323,6 +359,9 @@ public Builder<TSource> source(@Nullable JsonValue value) {
323359
}
324360

325361
/**
362+
* Default list of fields to exclude from the returned _source field, can be
363+
* overridden on each sub-request
364+
* <p>
326365
* API name: {@code _source_excludes}
327366
*/
328367
public Builder<TSource> sourceExcludes(@Nullable List<String> value) {
@@ -331,6 +370,9 @@ public Builder<TSource> sourceExcludes(@Nullable List<String> value) {
331370
}
332371

333372
/**
373+
* Default list of fields to exclude from the returned _source field, can be
374+
* overridden on each sub-request
375+
* <p>
334376
* API name: {@code _source_excludes}
335377
*/
336378
public Builder<TSource> sourceExcludes(String... value) {
@@ -350,6 +392,9 @@ public Builder<TSource> addSourceExcludes(String value) {
350392
}
351393

352394
/**
395+
* Default list of fields to extract and return from the _source field, can be
396+
* overridden on each sub-request
397+
* <p>
353398
* API name: {@code _source_includes}
354399
*/
355400
public Builder<TSource> sourceIncludes(@Nullable List<String> value) {
@@ -358,6 +403,9 @@ public Builder<TSource> sourceIncludes(@Nullable List<String> value) {
358403
}
359404

360405
/**
406+
* Default list of fields to extract and return from the _source field, can be
407+
* overridden on each sub-request
408+
* <p>
361409
* API name: {@code _source_includes}
362410
*/
363411
public Builder<TSource> sourceIncludes(String... value) {
@@ -377,6 +425,8 @@ public Builder<TSource> addSourceIncludes(String value) {
377425
}
378426

379427
/**
428+
* Explicit operation timeout
429+
* <p>
380430
* API name: {@code timeout}
381431
*/
382432
public Builder<TSource> timeout(@Nullable JsonValue value) {
@@ -385,6 +435,12 @@ public Builder<TSource> timeout(@Nullable JsonValue value) {
385435
}
386436

387437
/**
438+
* Sets the number of shard copies that must be active before proceeding with
439+
* the bulk operation. Defaults to 1, meaning the primary shard only. Set to
440+
* <code>all</code> for all shard copies, otherwise set to any non-negative
441+
* value less than or equal to the total number of copies for the shard (number
442+
* of replicas + 1)
443+
* <p>
388444
* API name: {@code wait_for_active_shards}
389445
*/
390446
public Builder<TSource> waitForActiveShards(@Nullable JsonValue value) {
@@ -393,6 +449,8 @@ public Builder<TSource> waitForActiveShards(@Nullable JsonValue value) {
393449
}
394450

395451
/**
452+
* Sets require_alias for all incoming documents. Defaults to unset (false)
453+
* <p>
396454
* API name: {@code require_alias}
397455
*/
398456
public Builder<TSource> requireAlias(@Nullable Boolean value) {
@@ -529,7 +587,7 @@ protected static <TSource> void setupBulkRequestDeserializer(
529587
params.put("refresh", request.refresh.toString());
530588
}
531589
if (request.routing != null) {
532-
params.put("routing", request.routing.toString());
590+
params.put("routing", request.routing);
533591
}
534592
if (request.source != null) {
535593
params.put("_source", request.source.toString());

java-client/src/main/java/co/elastic/clients/elasticsearch/_global/ClearScrollRequest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ protected ClearScrollRequest(Builder builder) {
5656
}
5757

5858
/**
59+
* A comma-separated list of scroll IDs to clear
60+
* <p>
5961
* API name: {@code scroll_id}
6062
*/
6163
@Nullable
@@ -86,6 +88,8 @@ public static class Builder implements ObjectBuilder<ClearScrollRequest> {
8688
private List<String> scrollId;
8789

8890
/**
91+
* A comma-separated list of scroll IDs to clear
92+
* <p>
8993
* API name: {@code scroll_id}
9094
*/
9195
public Builder scrollId(@Nullable List<String> value) {
@@ -94,6 +98,8 @@ public Builder scrollId(@Nullable List<String> value) {
9498
}
9599

96100
/**
101+
* A comma-separated list of scroll IDs to clear
102+
* <p>
97103
* API name: {@code scroll_id}
98104
*/
99105
public Builder scrollId(String... value) {

0 commit comments

Comments
 (0)