Skip to content

Commit 220854f

Browse files
l-trottaswallez
authored andcommitted
fixes-from-pr-2412
1 parent f0f81a6 commit 220854f

22 files changed

+966
-440
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2238,7 +2238,8 @@ public final <TDocument, TPartialDocument> CompletableFuture<UpdateResponse<TDoc
22382238
// ----- Endpoint: update_by_query
22392239

22402240
/**
2241-
* Performs an update on every document in the index without changing the
2241+
* Updates documents that match the specified query. If no query is specified,
2242+
* performs an update on every document in the index without changing the
22422243
* source, for example to pick up a mapping change.
22432244
*
22442245
* @see <a href=
@@ -2254,7 +2255,8 @@ public CompletableFuture<UpdateByQueryResponse> updateByQuery(UpdateByQueryReque
22542255
}
22552256

22562257
/**
2257-
* Performs an update on every document in the index without changing the
2258+
* Updates documents that match the specified query. If no query is specified,
2259+
* performs an update on every document in the index without changing the
22582260
* source, for example to pick up a mapping change.
22592261
*
22602262
* @param fn

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2283,7 +2283,8 @@ public final <TDocument, TPartialDocument> UpdateResponse<TDocument> update(
22832283
// ----- Endpoint: update_by_query
22842284

22852285
/**
2286-
* Performs an update on every document in the index without changing the
2286+
* Updates documents that match the specified query. If no query is specified,
2287+
* performs an update on every document in the index without changing the
22872288
* source, for example to pick up a mapping change.
22882289
*
22892290
* @see <a href=
@@ -2300,7 +2301,8 @@ public UpdateByQueryResponse updateByQuery(UpdateByQueryRequest request)
23002301
}
23012302

23022303
/**
2303-
* Performs an update on every document in the index without changing the
2304+
* Updates documents that match the specified query. If no query is specified,
2305+
* performs an update on every document in the index without changing the
23042306
* source, for example to pick up a mapping change.
23052307
*
23062308
* @param fn

java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IcuTokenizer.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
* specification</a>
5656
*/
5757
@JsonpDeserializable
58-
public class IcuTokenizer extends TokenizerBase implements TokenizerDefinitionVariant, TokenFilterDefinitionVariant {
58+
public class IcuTokenizer extends TokenizerBase implements TokenizerDefinitionVariant {
5959
private final String ruleFiles;
6060

6161
// ---------------------------------------------------------------------------------------------
@@ -79,14 +79,6 @@ public TokenizerDefinition.Kind _tokenizerDefinitionKind() {
7979
return TokenizerDefinition.Kind.IcuTokenizer;
8080
}
8181

82-
/**
83-
* TokenFilterDefinition variant kind.
84-
*/
85-
@Override
86-
public TokenFilterDefinition.Kind _tokenFilterDefinitionKind() {
87-
return TokenFilterDefinition.Kind.IcuTokenizer;
88-
}
89-
9082
/**
9183
* Required - API name: {@code rule_files}
9284
*/

java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenFilterDefinition.java

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ public enum Kind implements JsonEnum {
100100

101101
IcuNormalizer("icu_normalizer"),
102102

103-
IcuTokenizer("icu_tokenizer"),
104-
105103
IcuTransform("icu_transform"),
106104

107105
Kstem("kstem"),
@@ -454,23 +452,6 @@ public IcuNormalizationTokenFilter icuNormalizer() {
454452
return TaggedUnionUtils.get(this, Kind.IcuNormalizer);
455453
}
456454

457-
/**
458-
* Is this variant instance of kind {@code icu_tokenizer}?
459-
*/
460-
public boolean isIcuTokenizer() {
461-
return _kind == Kind.IcuTokenizer;
462-
}
463-
464-
/**
465-
* Get the {@code icu_tokenizer} variant value.
466-
*
467-
* @throws IllegalStateException
468-
* if the current variant is not of the {@code icu_tokenizer} kind.
469-
*/
470-
public IcuTokenizer icuTokenizer() {
471-
return TaggedUnionUtils.get(this, Kind.IcuTokenizer);
472-
}
473-
474455
/**
475456
* Is this variant instance of kind {@code icu_transform}?
476457
*/
@@ -1254,17 +1235,6 @@ public ObjectBuilder<TokenFilterDefinition> icuNormalizer(
12541235
return this.icuNormalizer(fn.apply(new IcuNormalizationTokenFilter.Builder()).build());
12551236
}
12561237

1257-
public ObjectBuilder<TokenFilterDefinition> icuTokenizer(IcuTokenizer v) {
1258-
this._kind = Kind.IcuTokenizer;
1259-
this._value = v;
1260-
return this;
1261-
}
1262-
1263-
public ObjectBuilder<TokenFilterDefinition> icuTokenizer(
1264-
Function<IcuTokenizer.Builder, ObjectBuilder<IcuTokenizer>> fn) {
1265-
return this.icuTokenizer(fn.apply(new IcuTokenizer.Builder()).build());
1266-
}
1267-
12681238
public ObjectBuilder<TokenFilterDefinition> icuTransform(IcuTransformTokenFilter v) {
12691239
this._kind = Kind.IcuTransform;
12701240
this._value = v;
@@ -1679,7 +1649,6 @@ protected static void setupTokenFilterDefinitionDeserializer(ObjectDeserializer<
16791649
op.add(Builder::icuCollation, IcuCollationTokenFilter._DESERIALIZER, "icu_collation");
16801650
op.add(Builder::icuFolding, IcuFoldingTokenFilter._DESERIALIZER, "icu_folding");
16811651
op.add(Builder::icuNormalizer, IcuNormalizationTokenFilter._DESERIALIZER, "icu_normalizer");
1682-
op.add(Builder::icuTokenizer, IcuTokenizer._DESERIALIZER, "icu_tokenizer");
16831652
op.add(Builder::icuTransform, IcuTransformTokenFilter._DESERIALIZER, "icu_transform");
16841653
op.add(Builder::kstem, KStemTokenFilter._DESERIALIZER, "kstem");
16851654
op.add(Builder::keepTypes, KeepTypesTokenFilter._DESERIALIZER, "keep_types");

java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenFilterDefinitionBuilders.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -293,24 +293,6 @@ public static TokenFilterDefinition icuNormalizer(
293293
return builder.build();
294294
}
295295

296-
/**
297-
* Creates a builder for the {@link IcuTokenizer icu_tokenizer}
298-
* {@code TokenFilterDefinition} variant.
299-
*/
300-
public static IcuTokenizer.Builder icuTokenizer() {
301-
return new IcuTokenizer.Builder();
302-
}
303-
304-
/**
305-
* Creates a TokenFilterDefinition of the {@link IcuTokenizer icu_tokenizer}
306-
* {@code TokenFilterDefinition} variant.
307-
*/
308-
public static TokenFilterDefinition icuTokenizer(Function<IcuTokenizer.Builder, ObjectBuilder<IcuTokenizer>> fn) {
309-
TokenFilterDefinition.Builder builder = new TokenFilterDefinition.Builder();
310-
builder.icuTokenizer(fn.apply(new IcuTokenizer.Builder()).build());
311-
return builder.build();
312-
}
313-
314296
/**
315297
* Creates a builder for the {@link IcuTransformTokenFilter icu_transform}
316298
* {@code TokenFilterDefinition} variant.

java-client/src/main/java/co/elastic/clients/elasticsearch/core/FieldCapsRequest.java

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ public class FieldCapsRequest extends RequestBase implements JsonpSerializable {
8787
@Nullable
8888
private final Boolean ignoreUnavailable;
8989

90+
@Nullable
91+
private final Boolean includeEmptyFields;
92+
9093
@Nullable
9194
private final Boolean includeUnmapped;
9295

@@ -108,6 +111,7 @@ private FieldCapsRequest(Builder builder) {
108111
this.fields = ApiTypeHelper.unmodifiable(builder.fields);
109112
this.filters = builder.filters;
110113
this.ignoreUnavailable = builder.ignoreUnavailable;
114+
this.includeEmptyFields = builder.includeEmptyFields;
111115
this.includeUnmapped = builder.includeUnmapped;
112116
this.index = ApiTypeHelper.unmodifiable(builder.index);
113117
this.indexFilter = builder.indexFilter;
@@ -178,6 +182,16 @@ public final Boolean ignoreUnavailable() {
178182
return this.ignoreUnavailable;
179183
}
180184

185+
/**
186+
* If false, empty fields are not included in the response.
187+
* <p>
188+
* API name: {@code include_empty_fields}
189+
*/
190+
@Nullable
191+
public final Boolean includeEmptyFields() {
192+
return this.includeEmptyFields;
193+
}
194+
181195
/**
182196
* If true, unmapped fields are included in the response.
183197
* <p>
@@ -294,6 +308,9 @@ public static class Builder extends RequestBase.AbstractBuilder<Builder>
294308
@Nullable
295309
private Boolean ignoreUnavailable;
296310

311+
@Nullable
312+
private Boolean includeEmptyFields;
313+
297314
@Nullable
298315
private Boolean includeUnmapped;
299316

@@ -401,6 +418,16 @@ public final Builder ignoreUnavailable(@Nullable Boolean value) {
401418
return this;
402419
}
403420

421+
/**
422+
* If false, empty fields are not included in the response.
423+
* <p>
424+
* API name: {@code include_empty_fields}
425+
*/
426+
public final Builder includeEmptyFields(@Nullable Boolean value) {
427+
this.includeEmptyFields = value;
428+
return this;
429+
}
430+
404431
/**
405432
* If true, unmapped fields are included in the response.
406433
* <p>
@@ -634,6 +661,9 @@ protected static void setupFieldCapsRequestDeserializer(ObjectDeserializer<Field
634661
if (request.allowNoIndices != null) {
635662
params.put("allow_no_indices", String.valueOf(request.allowNoIndices));
636663
}
664+
if (request.includeEmptyFields != null) {
665+
params.put("include_empty_fields", String.valueOf(request.includeEmptyFields));
666+
}
637667
if (request.filters != null) {
638668
params.put("filters", request.filters);
639669
}

0 commit comments

Comments
 (0)