Skip to content

Commit 57f91c7

Browse files
authored
fixes from pr 2412 (#746)
1 parent e263392 commit 57f91c7

19 files changed

+964
-381
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/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
}

java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html

Lines changed: 134 additions & 134 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)