Skip to content

Commit 59661d8

Browse files
committed
[codegen] update to latest spec
1 parent adf8ca8 commit 59661d8

17 files changed

+698
-72
lines changed

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ public ElasticsearchXpackAsyncClient xpack() {
475475
* <li>JavaScript: Check out <code>client.helpers.*</code></li>
476476
* <li>.NET: Check out <code>BulkAllObservable</code></li>
477477
* <li>PHP: Check out bulk indexing.</li>
478+
* <li>Ruby: Check out <code>Elasticsearch::Helpers::BulkHelper</code></li>
478479
* </ul>
479480
* <p>
480481
* <strong>Submitting bulk requests with cURL</strong>
@@ -653,6 +654,7 @@ public CompletableFuture<BulkResponse> bulk(BulkRequest request) {
653654
* <li>JavaScript: Check out <code>client.helpers.*</code></li>
654655
* <li>.NET: Check out <code>BulkAllObservable</code></li>
655656
* <li>PHP: Check out bulk indexing.</li>
657+
* <li>Ruby: Check out <code>Elasticsearch::Helpers::BulkHelper</code></li>
656658
* </ul>
657659
* <p>
658660
* <strong>Submitting bulk requests with cURL</strong>
@@ -831,6 +833,7 @@ public final CompletableFuture<BulkResponse> bulk(Function<BulkRequest.Builder,
831833
* <li>JavaScript: Check out <code>client.helpers.*</code></li>
832834
* <li>.NET: Check out <code>BulkAllObservable</code></li>
833835
* <li>PHP: Check out bulk indexing.</li>
836+
* <li>Ruby: Check out <code>Elasticsearch::Helpers::BulkHelper</code></li>
834837
* </ul>
835838
* <p>
836839
* <strong>Submitting bulk requests with cURL</strong>
@@ -4186,6 +4189,20 @@ public final CompletableFuture<RankEvalResponse> rankEval(
41864189
* until it has successfully indexed <code>max_docs</code> documents into the
41874190
* target or it has gone through every document in the source query.
41884191
* <p>
4192+
* It's recommended to reindex on indices with a green status. Reindexing can
4193+
* fail when a node shuts down or crashes.
4194+
* <ul>
4195+
* <li>When requested with <code>wait_for_completion=true</code> (default), the
4196+
* request fails if the node shuts down.</li>
4197+
* <li>When requested with <code>wait_for_completion=false</code>, a task id is
4198+
* returned, which can be used via the task management API to monitor, debug, or
4199+
* cancel the task. The task may disappear or fail if the node shuts down. When
4200+
* retrying a failed reindex operation, it might be necessary to set
4201+
* <code>conflicts=proceed</code> or to first delete the partial destination
4202+
* index. Additionally, dry runs, checking disk space, and fetching index
4203+
* recovery information can help address the root cause.</li>
4204+
* </ul>
4205+
* <p>
41894206
* Refer to the linked documentation for examples of how to reindex documents.
41904207
*
41914208
* @see <a href=
@@ -4265,6 +4282,20 @@ public CompletableFuture<ReindexResponse> reindex(ReindexRequest request) {
42654282
* until it has successfully indexed <code>max_docs</code> documents into the
42664283
* target or it has gone through every document in the source query.
42674284
* <p>
4285+
* It's recommended to reindex on indices with a green status. Reindexing can
4286+
* fail when a node shuts down or crashes.
4287+
* <ul>
4288+
* <li>When requested with <code>wait_for_completion=true</code> (default), the
4289+
* request fails if the node shuts down.</li>
4290+
* <li>When requested with <code>wait_for_completion=false</code>, a task id is
4291+
* returned, which can be used via the task management API to monitor, debug, or
4292+
* cancel the task. The task may disappear or fail if the node shuts down. When
4293+
* retrying a failed reindex operation, it might be necessary to set
4294+
* <code>conflicts=proceed</code> or to first delete the partial destination
4295+
* index. Additionally, dry runs, checking disk space, and fetching index
4296+
* recovery information can help address the root cause.</li>
4297+
* </ul>
4298+
* <p>
42684299
* Refer to the linked documentation for examples of how to reindex documents.
42694300
*
42704301
* @param fn

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ public ElasticsearchXpackClient xpack() {
475475
* <li>JavaScript: Check out <code>client.helpers.*</code></li>
476476
* <li>.NET: Check out <code>BulkAllObservable</code></li>
477477
* <li>PHP: Check out bulk indexing.</li>
478+
* <li>Ruby: Check out <code>Elasticsearch::Helpers::BulkHelper</code></li>
478479
* </ul>
479480
* <p>
480481
* <strong>Submitting bulk requests with cURL</strong>
@@ -653,6 +654,7 @@ public BulkResponse bulk(BulkRequest request) throws IOException, ElasticsearchE
653654
* <li>JavaScript: Check out <code>client.helpers.*</code></li>
654655
* <li>.NET: Check out <code>BulkAllObservable</code></li>
655656
* <li>PHP: Check out bulk indexing.</li>
657+
* <li>Ruby: Check out <code>Elasticsearch::Helpers::BulkHelper</code></li>
656658
* </ul>
657659
* <p>
658660
* <strong>Submitting bulk requests with cURL</strong>
@@ -832,6 +834,7 @@ public final BulkResponse bulk(Function<BulkRequest.Builder, ObjectBuilder<BulkR
832834
* <li>JavaScript: Check out <code>client.helpers.*</code></li>
833835
* <li>.NET: Check out <code>BulkAllObservable</code></li>
834836
* <li>PHP: Check out bulk indexing.</li>
837+
* <li>Ruby: Check out <code>Elasticsearch::Helpers::BulkHelper</code></li>
835838
* </ul>
836839
* <p>
837840
* <strong>Submitting bulk requests with cURL</strong>
@@ -4215,6 +4218,20 @@ public final RankEvalResponse rankEval(Function<RankEvalRequest.Builder, ObjectB
42154218
* until it has successfully indexed <code>max_docs</code> documents into the
42164219
* target or it has gone through every document in the source query.
42174220
* <p>
4221+
* It's recommended to reindex on indices with a green status. Reindexing can
4222+
* fail when a node shuts down or crashes.
4223+
* <ul>
4224+
* <li>When requested with <code>wait_for_completion=true</code> (default), the
4225+
* request fails if the node shuts down.</li>
4226+
* <li>When requested with <code>wait_for_completion=false</code>, a task id is
4227+
* returned, which can be used via the task management API to monitor, debug, or
4228+
* cancel the task. The task may disappear or fail if the node shuts down. When
4229+
* retrying a failed reindex operation, it might be necessary to set
4230+
* <code>conflicts=proceed</code> or to first delete the partial destination
4231+
* index. Additionally, dry runs, checking disk space, and fetching index
4232+
* recovery information can help address the root cause.</li>
4233+
* </ul>
4234+
* <p>
42184235
* Refer to the linked documentation for examples of how to reindex documents.
42194236
*
42204237
* @see <a href=
@@ -4294,6 +4311,20 @@ public ReindexResponse reindex(ReindexRequest request) throws IOException, Elast
42944311
* until it has successfully indexed <code>max_docs</code> documents into the
42954312
* target or it has gone through every document in the source query.
42964313
* <p>
4314+
* It's recommended to reindex on indices with a green status. Reindexing can
4315+
* fail when a node shuts down or crashes.
4316+
* <ul>
4317+
* <li>When requested with <code>wait_for_completion=true</code> (default), the
4318+
* request fails if the node shuts down.</li>
4319+
* <li>When requested with <code>wait_for_completion=false</code>, a task id is
4320+
* returned, which can be used via the task management API to monitor, debug, or
4321+
* cancel the task. The task may disappear or fail if the node shuts down. When
4322+
* retrying a failed reindex operation, it might be necessary to set
4323+
* <code>conflicts=proceed</code> or to first delete the partial destination
4324+
* index. Additionally, dry runs, checking disk space, and fetching index
4325+
* recovery information can help address the root cause.</li>
4326+
* </ul>
4327+
* <p>
42974328
* Refer to the linked documentation for examples of how to reindex documents.
42984329
*
42994330
* @param fn

java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ArrayPercentilesItem.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
*/
6262
@JsonpDeserializable
6363
public class ArrayPercentilesItem implements JsonpSerializable {
64-
private final String key;
64+
private final double key;
6565

6666
@Nullable
6767
private final Double value;
@@ -73,7 +73,7 @@ public class ArrayPercentilesItem implements JsonpSerializable {
7373

7474
private ArrayPercentilesItem(Builder builder) {
7575

76-
this.key = ApiTypeHelper.requireNonNull(builder.key, this, "key");
76+
this.key = ApiTypeHelper.requireNonNull(builder.key, this, "key", 0);
7777
this.value = builder.value;
7878
this.valueAsString = builder.valueAsString;
7979

@@ -86,7 +86,7 @@ public static ArrayPercentilesItem of(Function<Builder, ObjectBuilder<ArrayPerce
8686
/**
8787
* Required - API name: {@code key}
8888
*/
89-
public final String key() {
89+
public final double key() {
9090
return this.key;
9191
}
9292

@@ -147,7 +147,7 @@ public String toString() {
147147
public static class Builder extends WithJsonObjectBuilderBase<Builder>
148148
implements
149149
ObjectBuilder<ArrayPercentilesItem> {
150-
private String key;
150+
private Double key;
151151

152152
@Nullable
153153
private Double value;
@@ -158,7 +158,7 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder>
158158
/**
159159
* Required - API name: {@code key}
160160
*/
161-
public final Builder key(String value) {
161+
public final Builder key(double value) {
162162
this.key = value;
163163
return this;
164164
}
@@ -207,7 +207,7 @@ public ArrayPercentilesItem build() {
207207

208208
protected static void setupArrayPercentilesItemDeserializer(ObjectDeserializer<ArrayPercentilesItem.Builder> op) {
209209

210-
op.add(Builder::key, JsonpDeserializer.stringDeserializer(), "key");
210+
op.add(Builder::key, JsonpDeserializer.doubleDeserializer(), "key");
211211
op.add(Builder::value, JsonpDeserializer.doubleDeserializer(), "value");
212212
op.add(Builder::valueAsString, JsonpDeserializer.stringDeserializer(), "value_as_string");
213213

java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AliasesRequest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ public final List<ExpandWildcard> expandWildcards() {
112112
}
113113

114114
/**
115-
* List of columns to appear in the response. Supports simple wildcards.
115+
* A comma-separated list of columns names to display. It supports simple
116+
* wildcards.
116117
* <p>
117118
* API name: {@code h}
118119
*/
@@ -210,7 +211,8 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val
210211
}
211212

212213
/**
213-
* List of columns to appear in the response. Supports simple wildcards.
214+
* A comma-separated list of columns names to display. It supports simple
215+
* wildcards.
214216
* <p>
215217
* API name: {@code h}
216218
* <p>
@@ -222,7 +224,8 @@ public final Builder h(List<String> list) {
222224
}
223225

224226
/**
225-
* List of columns to appear in the response. Supports simple wildcards.
227+
* A comma-separated list of columns names to display. It supports simple
228+
* wildcards.
226229
* <p>
227230
* API name: {@code h}
228231
* <p>

java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationRequest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ public final Bytes bytes() {
115115
}
116116

117117
/**
118-
* List of columns to appear in the response. Supports simple wildcards.
118+
* A comma-separated list of columns names to display. It supports simple
119+
* wildcards.
119120
* <p>
120121
* API name: {@code h}
121122
*/
@@ -206,7 +207,8 @@ public final Builder bytes(@Nullable Bytes value) {
206207
}
207208

208209
/**
209-
* List of columns to appear in the response. Supports simple wildcards.
210+
* A comma-separated list of columns names to display. It supports simple
211+
* wildcards.
210212
* <p>
211213
* API name: {@code h}
212214
* <p>
@@ -218,7 +220,8 @@ public final Builder h(List<String> list) {
218220
}
219221

220222
/**
221-
* List of columns to appear in the response. Supports simple wildcards.
223+
* A comma-separated list of columns names to display. It supports simple
224+
* wildcards.
222225
* <p>
223226
* API name: {@code h}
224227
* <p>
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
package co.elastic.clients.elasticsearch.cat;
21+
22+
import co.elastic.clients.json.JsonEnum;
23+
import co.elastic.clients.json.JsonpDeserializable;
24+
import co.elastic.clients.json.JsonpDeserializer;
25+
26+
//----------------------------------------------------------------
27+
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
28+
//----------------------------------------------------------------
29+
//
30+
// This code is generated from the Elasticsearch API specification
31+
// at https://github.com/elastic/elasticsearch-specification
32+
//
33+
// Manual updates to this file will be lost when the code is
34+
// re-generated.
35+
//
36+
// If you find a property that is missing or wrongly typed, please
37+
// open an issue or a PR on the API specification repository.
38+
//
39+
//----------------------------------------------------------------
40+
41+
/**
42+
*
43+
* @see <a href="../doc-files/api-spec.html#cat._types.CatAliasesColumn">API
44+
* specification</a>
45+
*/
46+
@JsonpDeserializable
47+
public enum CatAliasesColumn implements JsonEnum {
48+
/**
49+
* The name of the alias.
50+
*/
51+
Alias("alias", "a"),
52+
53+
/**
54+
* The name of the index the alias points to.
55+
*/
56+
Index("index", "i", "idx"),
57+
58+
/**
59+
* The filter applied to the alias.
60+
*/
61+
Filter("filter", "f", "fi"),
62+
63+
/**
64+
* Index routing value for the alias.
65+
*/
66+
RoutingIndex("routing.index", "ri", "routingIndex"),
67+
68+
/**
69+
* Search routing value for the alias.
70+
*/
71+
RoutingSearch("routing.search", "rs", "routingSearch"),
72+
73+
/**
74+
* Indicates if the index is the write index for the alias.
75+
*/
76+
IsWriteIndex("is_write_index", "w", "isWriteIndex"),
77+
78+
;
79+
80+
private final String jsonValue;
81+
private final String[] aliases;
82+
83+
CatAliasesColumn(String jsonValue, String... aliases) {
84+
this.jsonValue = jsonValue;
85+
this.aliases = aliases;
86+
}
87+
88+
public String jsonValue() {
89+
return this.jsonValue;
90+
}
91+
92+
public String[] aliases() {
93+
return this.aliases;
94+
}
95+
96+
public static final JsonEnum.Deserializer<CatAliasesColumn> _DESERIALIZER = new JsonEnum.Deserializer<>(
97+
CatAliasesColumn.values());
98+
}

0 commit comments

Comments
 (0)