Skip to content

Fixes from pr 2412 backport 8.13 #746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading