Skip to content

Commit

Permalink
fixes from pr 2412 (#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
l-trotta committed Feb 20, 2024
1 parent e263392 commit 57f91c7
Show file tree
Hide file tree
Showing 19 changed files with 964 additions and 381 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2238,7 +2238,8 @@ public final <TDocument, TPartialDocument> CompletableFuture<UpdateResponse<TDoc
// ----- Endpoint: update_by_query

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

/**
* Performs an update on every document in the index without changing the
* Updates documents that match the specified query. If no query is specified,
* performs an update on every document in the index without changing the
* source, for example to pick up a mapping change.
*
* @param fn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2283,7 +2283,8 @@ public final <TDocument, TPartialDocument> UpdateResponse<TDocument> update(
// ----- Endpoint: update_by_query

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

/**
* Performs an update on every document in the index without changing the
* Updates documents that match the specified query. If no query is specified,
* performs an update on every document in the index without changing the
* source, for example to pick up a mapping change.
*
* @param fn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ public class FieldCapsRequest extends RequestBase implements JsonpSerializable {
@Nullable
private final Boolean ignoreUnavailable;

@Nullable
private final Boolean includeEmptyFields;

@Nullable
private final Boolean includeUnmapped;

Expand All @@ -108,6 +111,7 @@ private FieldCapsRequest(Builder builder) {
this.fields = ApiTypeHelper.unmodifiable(builder.fields);
this.filters = builder.filters;
this.ignoreUnavailable = builder.ignoreUnavailable;
this.includeEmptyFields = builder.includeEmptyFields;
this.includeUnmapped = builder.includeUnmapped;
this.index = ApiTypeHelper.unmodifiable(builder.index);
this.indexFilter = builder.indexFilter;
Expand Down Expand Up @@ -178,6 +182,16 @@ public final Boolean ignoreUnavailable() {
return this.ignoreUnavailable;
}

/**
* If false, empty fields are not included in the response.
* <p>
* API name: {@code include_empty_fields}
*/
@Nullable
public final Boolean includeEmptyFields() {
return this.includeEmptyFields;
}

/**
* If true, unmapped fields are included in the response.
* <p>
Expand Down Expand Up @@ -294,6 +308,9 @@ public static class Builder extends RequestBase.AbstractBuilder<Builder>
@Nullable
private Boolean ignoreUnavailable;

@Nullable
private Boolean includeEmptyFields;

@Nullable
private Boolean includeUnmapped;

Expand Down Expand Up @@ -401,6 +418,16 @@ public final Builder ignoreUnavailable(@Nullable Boolean value) {
return this;
}

/**
* If false, empty fields are not included in the response.
* <p>
* API name: {@code include_empty_fields}
*/
public final Builder includeEmptyFields(@Nullable Boolean value) {
this.includeEmptyFields = value;
return this;
}

/**
* If true, unmapped fields are included in the response.
* <p>
Expand Down Expand Up @@ -634,6 +661,9 @@ protected static void setupFieldCapsRequestDeserializer(ObjectDeserializer<Field
if (request.allowNoIndices != null) {
params.put("allow_no_indices", String.valueOf(request.allowNoIndices));
}
if (request.includeEmptyFields != null) {
params.put("include_empty_fields", String.valueOf(request.includeEmptyFields));
}
if (request.filters != null) {
params.put("filters", request.filters);
}
Expand Down

Large diffs are not rendered by default.

0 comments on commit 57f91c7

Please sign in to comment.