> fn) {
+ return fn.apply(new Builder()).build();
+ }
+
+ /**
+ * Required - The type of data that the value represents.
+ *
+ * API name: {@code type}
+ */
+ public final EmbeddingContentType type() {
+ return this.type;
+ }
+
+ /**
+ * The format of the data. If null, the default data format for the given type
+ * is used.
+ *
+ * API name: {@code format}
+ */
+ @Nullable
+ public final EmbeddingContentFormat format() {
+ return this.format;
+ }
+
+ /**
+ * Required - String which may be raw text, or the string representation of some
+ * other data such as an image in base64.
+ *
+ * API name: {@code value}
+ */
+ public final String value() {
+ return this.value;
+ }
+
+ /**
+ * Serialize this object to JSON.
+ */
+ public void serialize(JsonGenerator generator, JsonpMapper mapper) {
+ generator.writeStartObject();
+ serializeInternal(generator, mapper);
+ generator.writeEnd();
+ }
+
+ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
+
+ generator.writeKey("type");
+ this.type.serialize(generator, mapper);
+ if (this.format != null) {
+ generator.writeKey("format");
+ this.format.serialize(generator, mapper);
+ }
+ generator.writeKey("value");
+ generator.write(this.value);
+
+ }
+
+ @Override
+ public String toString() {
+ return JsonpUtils.toString(this);
+ }
+
+ // ---------------------------------------------------------------------------------------------
+
+ /**
+ * Builder for {@link InferenceString}.
+ */
+
+ public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder {
+ private EmbeddingContentType type;
+
+ @Nullable
+ private EmbeddingContentFormat format;
+
+ private String value;
+
+ public Builder() {
+ }
+ private Builder(InferenceString instance) {
+ this.type = instance.type;
+ this.format = instance.format;
+ this.value = instance.value;
+
+ }
+ /**
+ * Required - The type of data that the value represents.
+ *
+ * API name: {@code type}
+ */
+ public final Builder type(EmbeddingContentType value) {
+ this.type = value;
+ return this;
+ }
+
+ /**
+ * The format of the data. If null, the default data format for the given type
+ * is used.
+ *
+ * API name: {@code format}
+ */
+ public final Builder format(@Nullable EmbeddingContentFormat value) {
+ this.format = value;
+ return this;
+ }
+
+ /**
+ * Required - String which may be raw text, or the string representation of some
+ * other data such as an image in base64.
+ *
+ * API name: {@code value}
+ */
+ public final Builder value(String value) {
+ this.value = value;
+ return this;
+ }
+
+ @Override
+ protected Builder self() {
+ return this;
+ }
+
+ /**
+ * Builds a {@link InferenceString}.
+ *
+ * @throws NullPointerException
+ * if some of the required fields are null.
+ */
+ public InferenceString build() {
+ _checkSingleUse();
+
+ return new InferenceString(this);
+ }
+ }
+
+ /**
+ * @return New {@link Builder} initialized with field values of this instance
+ */
+ public Builder rebuild() {
+ return new Builder(this);
+ }
+ // ---------------------------------------------------------------------------------------------
+
+ /**
+ * Json deserializer for {@link InferenceString}
+ */
+ public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new,
+ InferenceString::setupInferenceStringDeserializer);
+
+ protected static void setupInferenceStringDeserializer(ObjectDeserializer op) {
+
+ op.add(Builder::type, EmbeddingContentType._DESERIALIZER, "type");
+ op.add(Builder::format, EmbeddingContentFormat._DESERIALIZER, "format");
+ op.add(Builder::value, JsonpDeserializer.stringDeserializer(), "value");
+
+ }
+
+}
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/KnnEmbeddingInput.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/KnnEmbeddingInput.java
new file mode 100644
index 0000000000..eb5b734c2b
--- /dev/null
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/KnnEmbeddingInput.java
@@ -0,0 +1,196 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package co.elastic.clients.elasticsearch._types;
+
+import co.elastic.clients.json.JsonpDeserializable;
+import co.elastic.clients.json.JsonpDeserializer;
+import co.elastic.clients.json.JsonpMapper;
+import co.elastic.clients.json.JsonpSerializable;
+import co.elastic.clients.json.JsonpUtils;
+import co.elastic.clients.json.ObjectDeserializer;
+import co.elastic.clients.json.UnionDeserializer;
+import co.elastic.clients.util.ApiTypeHelper;
+import co.elastic.clients.util.ObjectBuilder;
+import co.elastic.clients.util.ObjectBuilderBase;
+import co.elastic.clients.util.TaggedUnion;
+import co.elastic.clients.util.TaggedUnionUtils;
+import jakarta.json.stream.JsonGenerator;
+import java.lang.Object;
+import java.lang.String;
+import java.util.List;
+import java.util.Objects;
+import java.util.function.Function;
+import javax.annotation.Nullable;
+
+//----------------------------------------------------------------
+// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
+//----------------------------------------------------------------
+//
+// This code is generated from the Elasticsearch API specification
+// at https://github.com/elastic/elasticsearch-specification
+//
+// Manual updates to this file will be lost when the code is
+// re-generated.
+//
+// If you find a property that is missing or wrongly typed, please
+// open an issue or a PR on the API specification repository.
+//
+//----------------------------------------------------------------
+
+// typedef: _types.KnnEmbeddingInput
+
+/**
+ * Knn embedding input. Either a string, an object or array of objects
+ *
+ * @see API
+ * specification
+ */
+@JsonpDeserializable
+public class KnnEmbeddingInput implements TaggedUnion, JsonpSerializable {
+
+ public enum Kind {
+ Object, String
+
+ }
+
+ private final Kind _kind;
+ private final Object _value;
+
+ @Override
+ public final Kind _kind() {
+ return _kind;
+ }
+
+ @Override
+ public final Object _get() {
+ return _value;
+ }
+
+ private KnnEmbeddingInput(Kind kind, Object value) {
+ this._kind = kind;
+ this._value = value;
+ }
+
+ private KnnEmbeddingInput(Builder builder) {
+
+ this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, "");
+ this._value = ApiTypeHelper.requireNonNull(builder._value, builder, "");
+
+ }
+
+ public static KnnEmbeddingInput of(Function> fn) {
+ return fn.apply(new Builder()).build();
+ }
+
+ /**
+ * Is this variant instance of kind {@code object}?
+ */
+ public boolean isObject() {
+ return _kind == Kind.Object;
+ }
+
+ /**
+ * Get the {@code object} variant value.
+ *
+ * @throws IllegalStateException
+ * if the current variant is not of the {@code object} kind.
+ */
+ public List object() {
+ return TaggedUnionUtils.get(this, Kind.Object);
+ }
+
+ /**
+ * Is this variant instance of kind {@code string}?
+ */
+ public boolean isString() {
+ return _kind == Kind.String;
+ }
+
+ /**
+ * Get the {@code string} variant value.
+ *
+ * @throws IllegalStateException
+ * if the current variant is not of the {@code string} kind.
+ */
+ public String string() {
+ return TaggedUnionUtils.get(this, Kind.String);
+ }
+
+ @Override
+ public void serialize(JsonGenerator generator, JsonpMapper mapper) {
+ if (_value instanceof JsonpSerializable) {
+ ((JsonpSerializable) _value).serialize(generator, mapper);
+ } else {
+ switch (_kind) {
+ case Object :
+ generator.writeStartArray();
+ for (InferenceString item0 : ((List) this._value)) {
+ item0.serialize(generator, mapper);
+
+ }
+ generator.writeEnd();
+
+ break;
+ case String :
+ generator.write(((String) this._value));
+
+ break;
+ }
+ }
+
+ }
+
+ @Override
+ public String toString() {
+ return JsonpUtils.toString(this);
+ }
+
+ public static class Builder extends ObjectBuilderBase implements ObjectBuilder {
+ private Kind _kind;
+ private Object _value;
+
+ public ObjectBuilder object(List v) {
+ this._kind = Kind.Object;
+ this._value = v;
+ return this;
+ }
+
+ public ObjectBuilder string(String v) {
+ this._kind = Kind.String;
+ this._value = v;
+ return this;
+ }
+
+ public KnnEmbeddingInput build() {
+ _checkSingleUse();
+ return new KnnEmbeddingInput(this);
+ }
+
+ }
+
+ private static JsonpDeserializer buildKnnEmbeddingInputDeserializer() {
+ return new UnionDeserializer.Builder(KnnEmbeddingInput::new, false)
+ .addMember(Kind.Object, JsonpDeserializer.arrayDeserializer(InferenceString._DESERIALIZER))
+ .addMember(Kind.String, JsonpDeserializer.stringDeserializer()).build();
+ }
+
+ public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer
+ .lazy(KnnEmbeddingInput::buildKnnEmbeddingInputDeserializer);
+}
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/KnnEmbeddingInputBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/KnnEmbeddingInputBuilders.java
new file mode 100644
index 0000000000..ef73449631
--- /dev/null
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/KnnEmbeddingInputBuilders.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package co.elastic.clients.elasticsearch._types;
+
+import co.elastic.clients.util.ObjectBuilder;
+import java.util.function.Function;
+
+//----------------------------------------------------------------
+// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
+//----------------------------------------------------------------
+//
+// This code is generated from the Elasticsearch API specification
+// at https://github.com/elastic/elasticsearch-specification
+//
+// Manual updates to this file will be lost when the code is
+// re-generated.
+//
+// If you find a property that is missing or wrongly typed, please
+// open an issue or a PR on the API specification repository.
+//
+//----------------------------------------------------------------
+
+/**
+ * Builders for {@link KnnEmbeddingInput} variants.
+ *
+ * Variants object, string are not available here as
+ * they don't have a dedicated class. Use {@link KnnEmbeddingInput}'s builder
+ * for these.
+ *
+ */
+public class KnnEmbeddingInputBuilders {
+ private KnnEmbeddingInputBuilders() {
+ }
+
+}
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/QueryVectorBuilder.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/QueryVectorBuilder.java
index 2975a72ec4..84ea367c73 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/QueryVectorBuilder.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/QueryVectorBuilder.java
@@ -71,6 +71,8 @@ public class QueryVectorBuilder implements TaggedUnion
protected Builder self() {
return this;
}
+ public ObjectBuilder embedding(Embedding v) {
+ this._kind = Kind.Embedding;
+ this._value = v;
+ return this;
+ }
+
+ public ObjectBuilder embedding(Function> fn) {
+ return this.embedding(fn.apply(new Embedding.Builder()).build());
+ }
+
public ObjectBuilder textEmbedding(TextEmbedding v) {
this._kind = Kind.TextEmbedding;
this._value = v;
@@ -215,6 +244,7 @@ public QueryVectorBuilder build() {
protected static void setupQueryVectorBuilderDeserializer(ObjectDeserializer op) {
+ op.add(Builder::embedding, Embedding._DESERIALIZER, "embedding");
op.add(Builder::textEmbedding, TextEmbedding._DESERIALIZER, "text_embedding");
op.add(Builder::lookup, LookupQueryVectorBuilder._DESERIALIZER, "lookup");
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/QueryVectorBuilderBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/QueryVectorBuilderBuilders.java
index c7aba3d3f9..f1ad73a56a 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/QueryVectorBuilderBuilders.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/QueryVectorBuilderBuilders.java
@@ -44,6 +44,24 @@ public class QueryVectorBuilderBuilders {
private QueryVectorBuilderBuilders() {
}
+ /**
+ * Creates a builder for the {@link Embedding embedding}
+ * {@code QueryVectorBuilder} variant.
+ */
+ public static Embedding.Builder embedding() {
+ return new Embedding.Builder();
+ }
+
+ /**
+ * Creates a QueryVectorBuilder of the {@link Embedding embedding}
+ * {@code QueryVectorBuilder} variant.
+ */
+ public static QueryVectorBuilder embedding(Function> fn) {
+ QueryVectorBuilder.Builder builder = new QueryVectorBuilder.Builder();
+ builder.embedding(fn.apply(new Embedding.Builder()).build());
+ return builder.build();
+ }
+
/**
* Creates a builder for the {@link TextEmbedding text_embedding}
* {@code QueryVectorBuilder} variant.
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/CharFilterTypes.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/CharFilterTypes.java
index 1f9f0777af..207df68c3a 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/CharFilterTypes.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/CharFilterTypes.java
@@ -74,6 +74,9 @@ public class CharFilterTypes implements JsonpSerializable {
private final List charFilterTypes;
+ @Nullable
+ private final MultipleSynonymGraphFilter multipleSynonymGraphFilters;
+
private final List filterTypes;
private final List tokenizerTypes;
@@ -92,6 +95,7 @@ private CharFilterTypes(Builder builder) {
this.builtInTokenizers = ApiTypeHelper.unmodifiableRequired(builder.builtInTokenizers, this,
"builtInTokenizers");
this.charFilterTypes = ApiTypeHelper.unmodifiableRequired(builder.charFilterTypes, this, "charFilterTypes");
+ this.multipleSynonymGraphFilters = builder.multipleSynonymGraphFilters;
this.filterTypes = ApiTypeHelper.unmodifiableRequired(builder.filterTypes, this, "filterTypes");
this.tokenizerTypes = ApiTypeHelper.unmodifiableRequired(builder.tokenizerTypes, this, "tokenizerTypes");
this.synonyms = ApiTypeHelper.unmodifiableRequired(builder.synonyms, this, "synonyms");
@@ -161,6 +165,14 @@ public final List charFilterTypes() {
return this.charFilterTypes;
}
+ /**
+ * API name: {@code multiple_synonym_graph_filters}
+ */
+ @Nullable
+ public final MultipleSynonymGraphFilter multipleSynonymGraphFilters() {
+ return this.multipleSynonymGraphFilters;
+ }
+
/**
* Required - Contains statistics about token filter types used in selected
* nodes.
@@ -259,6 +271,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
}
generator.writeEnd();
+ }
+ if (this.multipleSynonymGraphFilters != null) {
+ generator.writeKey("multiple_synonym_graph_filters");
+ this.multipleSynonymGraphFilters.serialize(generator, mapper);
+
}
if (ApiTypeHelper.isDefined(this.filterTypes)) {
generator.writeKey("filter_types");
@@ -318,6 +335,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement
private List charFilterTypes;
+ @Nullable
+ private MultipleSynonymGraphFilter multipleSynonymGraphFilters;
+
private List filterTypes;
private List tokenizerTypes;
@@ -333,6 +353,7 @@ private Builder(CharFilterTypes instance) {
this.builtInFilters = instance.builtInFilters;
this.builtInTokenizers = instance.builtInTokenizers;
this.charFilterTypes = instance.charFilterTypes;
+ this.multipleSynonymGraphFilters = instance.multipleSynonymGraphFilters;
this.filterTypes = instance.filterTypes;
this.tokenizerTypes = instance.tokenizerTypes;
this.synonyms = instance.synonyms;
@@ -563,6 +584,22 @@ public final Builder charFilterTypes(Function> fn) {
+ return this.multipleSynonymGraphFilters(fn.apply(new MultipleSynonymGraphFilter.Builder()).build());
+ }
+
/**
* Required - Contains statistics about token filter types used in selected
* nodes.
@@ -716,6 +753,8 @@ protected static void setupCharFilterTypesDeserializer(ObjectDeserializerAPI
+ * specification
+ */
+@JsonpDeserializable
+public class MultipleSynonymGraphFilter implements JsonpSerializable {
+ @Nullable
+ private final Integer analyzerCount;
+
+ @Nullable
+ private final Integer indexCount;
+
+ // ---------------------------------------------------------------------------------------------
+
+ private MultipleSynonymGraphFilter(Builder builder) {
+
+ this.analyzerCount = builder.analyzerCount;
+ this.indexCount = builder.indexCount;
+
+ }
+
+ public static MultipleSynonymGraphFilter of(Function> fn) {
+ return fn.apply(new Builder()).build();
+ }
+
+ /**
+ * Number of analyzers across the cluster whose filter chain contains more than
+ * one synonym_graph filter.
+ *
+ * API name: {@code analyzer_count}
+ */
+ @Nullable
+ public final Integer analyzerCount() {
+ return this.analyzerCount;
+ }
+
+ /**
+ * Number of indices that contain at least one analyzer with more than one
+ * synonym_graph filter.
+ *
+ * API name: {@code index_count}
+ */
+ @Nullable
+ public final Integer indexCount() {
+ return this.indexCount;
+ }
+
+ /**
+ * Serialize this object to JSON.
+ */
+ public void serialize(JsonGenerator generator, JsonpMapper mapper) {
+ generator.writeStartObject();
+ serializeInternal(generator, mapper);
+ generator.writeEnd();
+ }
+
+ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
+
+ if (this.analyzerCount != null) {
+ generator.writeKey("analyzer_count");
+ generator.write(this.analyzerCount);
+
+ }
+ if (this.indexCount != null) {
+ generator.writeKey("index_count");
+ generator.write(this.indexCount);
+
+ }
+
+ }
+
+ @Override
+ public String toString() {
+ return JsonpUtils.toString(this);
+ }
+
+ // ---------------------------------------------------------------------------------------------
+
+ /**
+ * Builder for {@link MultipleSynonymGraphFilter}.
+ */
+
+ public static class Builder extends WithJsonObjectBuilderBase
+ implements
+ ObjectBuilder {
+ @Nullable
+ private Integer analyzerCount;
+
+ @Nullable
+ private Integer indexCount;
+
+ public Builder() {
+ }
+ private Builder(MultipleSynonymGraphFilter instance) {
+ this.analyzerCount = instance.analyzerCount;
+ this.indexCount = instance.indexCount;
+
+ }
+ /**
+ * Number of analyzers across the cluster whose filter chain contains more than
+ * one synonym_graph filter.
+ *
+ * API name: {@code analyzer_count}
+ */
+ public final Builder analyzerCount(@Nullable Integer value) {
+ this.analyzerCount = value;
+ return this;
+ }
+
+ /**
+ * Number of indices that contain at least one analyzer with more than one
+ * synonym_graph filter.
+ *
+ * API name: {@code index_count}
+ */
+ public final Builder indexCount(@Nullable Integer value) {
+ this.indexCount = value;
+ return this;
+ }
+
+ @Override
+ protected Builder self() {
+ return this;
+ }
+
+ /**
+ * Builds a {@link MultipleSynonymGraphFilter}.
+ *
+ * @throws NullPointerException
+ * if some of the required fields are null.
+ */
+ public MultipleSynonymGraphFilter build() {
+ _checkSingleUse();
+
+ return new MultipleSynonymGraphFilter(this);
+ }
+ }
+
+ /**
+ * @return New {@link Builder} initialized with field values of this instance
+ */
+ public Builder rebuild() {
+ return new Builder(this);
+ }
+ // ---------------------------------------------------------------------------------------------
+
+ /**
+ * Json deserializer for {@link MultipleSynonymGraphFilter}
+ */
+ public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer
+ .lazy(Builder::new, MultipleSynonymGraphFilter::setupMultipleSynonymGraphFilterDeserializer);
+
+ protected static void setupMultipleSynonymGraphFilterDeserializer(
+ ObjectDeserializer op) {
+
+ op.add(Builder::analyzerCount, JsonpDeserializer.integerDeserializer(), "analyzer_count");
+ op.add(Builder::indexCount, JsonpDeserializer.integerDeserializer(), "index_count");
+
+ }
+
+}
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ParentReindexStatus.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ParentReindexStatus.java
new file mode 100644
index 0000000000..26951ffaf7
--- /dev/null
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ParentReindexStatus.java
@@ -0,0 +1,708 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package co.elastic.clients.elasticsearch.core.reindex_rethrottle;
+
+import co.elastic.clients.elasticsearch._types.ReindexStatus;
+import co.elastic.clients.elasticsearch._types.Retries;
+import co.elastic.clients.elasticsearch._types.Time;
+import co.elastic.clients.json.JsonpDeserializable;
+import co.elastic.clients.json.JsonpDeserializer;
+import co.elastic.clients.json.JsonpMapper;
+import co.elastic.clients.json.JsonpSerializable;
+import co.elastic.clients.json.JsonpUtils;
+import co.elastic.clients.json.ObjectBuilderDeserializer;
+import co.elastic.clients.json.ObjectDeserializer;
+import co.elastic.clients.util.ApiTypeHelper;
+import co.elastic.clients.util.ObjectBuilder;
+import co.elastic.clients.util.WithJsonObjectBuilderBase;
+import jakarta.json.stream.JsonGenerator;
+import java.lang.Float;
+import java.lang.Integer;
+import java.lang.Long;
+import java.lang.String;
+import java.util.List;
+import java.util.Objects;
+import java.util.function.Function;
+import javax.annotation.Nullable;
+
+//----------------------------------------------------------------
+// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
+//----------------------------------------------------------------
+//
+// This code is generated from the Elasticsearch API specification
+// at https://github.com/elastic/elasticsearch-specification
+//
+// Manual updates to this file will be lost when the code is
+// re-generated.
+//
+// If you find a property that is missing or wrongly typed, please
+// open an issue or a PR on the API specification repository.
+//
+//----------------------------------------------------------------
+
+// typedef: _global.reindex_rethrottle.ParentReindexStatus
+
+/**
+ *
+ * @see API
+ * specification
+ */
+@JsonpDeserializable
+public class ParentReindexStatus implements JsonpSerializable {
+ private final List slices;
+
+ @Nullable
+ private final Integer sliceId;
+
+ private final long batches;
+
+ @Nullable
+ private final Long created;
+
+ private final long deleted;
+
+ private final long noops;
+
+ private final float requestsPerSecond;
+
+ private final Retries retries;
+
+ @Nullable
+ private final Time throttled;
+
+ private final long throttledMillis;
+
+ @Nullable
+ private final Time throttledUntil;
+
+ private final long throttledUntilMillis;
+
+ private final long total;
+
+ @Nullable
+ private final Long updated;
+
+ private final long versionConflicts;
+
+ @Nullable
+ private final String cancelled;
+
+ // ---------------------------------------------------------------------------------------------
+
+ private ParentReindexStatus(Builder builder) {
+
+ this.slices = ApiTypeHelper.unmodifiable(builder.slices);
+ this.sliceId = builder.sliceId;
+ this.batches = ApiTypeHelper.requireNonNull(builder.batches, this, "batches", 0);
+ this.created = builder.created;
+ this.deleted = ApiTypeHelper.requireNonNull(builder.deleted, this, "deleted", 0);
+ this.noops = ApiTypeHelper.requireNonNull(builder.noops, this, "noops", 0);
+ this.requestsPerSecond = ApiTypeHelper.requireNonNull(builder.requestsPerSecond, this, "requestsPerSecond", 0);
+ this.retries = ApiTypeHelper.requireNonNull(builder.retries, this, "retries");
+ this.throttled = builder.throttled;
+ this.throttledMillis = ApiTypeHelper.requireNonNull(builder.throttledMillis, this, "throttledMillis", 0);
+ this.throttledUntil = builder.throttledUntil;
+ this.throttledUntilMillis = ApiTypeHelper.requireNonNull(builder.throttledUntilMillis, this,
+ "throttledUntilMillis", 0);
+ this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total", 0);
+ this.updated = builder.updated;
+ this.versionConflicts = ApiTypeHelper.requireNonNull(builder.versionConflicts, this, "versionConflicts", 0);
+ this.cancelled = builder.cancelled;
+
+ }
+
+ public static ParentReindexStatus of(Function> fn) {
+ return fn.apply(new Builder()).build();
+ }
+
+ /**
+ * API name: {@code slices}
+ */
+ public final List slices() {
+ return this.slices;
+ }
+
+ /**
+ * The slice ID
+ *
+ * API name: {@code slice_id}
+ */
+ @Nullable
+ public final Integer sliceId() {
+ return this.sliceId;
+ }
+
+ /**
+ * Required - The number of scroll responses pulled back by the reindex.
+ *
+ * API name: {@code batches}
+ */
+ public final long batches() {
+ return this.batches;
+ }
+
+ /**
+ * The number of documents that were successfully created.
+ *
+ * API name: {@code created}
+ */
+ @Nullable
+ public final Long created() {
+ return this.created;
+ }
+
+ /**
+ * Required - The number of documents that were successfully deleted.
+ *
+ * API name: {@code deleted}
+ */
+ public final long deleted() {
+ return this.deleted;
+ }
+
+ /**
+ * Required - The number of documents that were ignored because the script used
+ * for the reindex returned a noop value for ctx.op.
+ *
+ * API name: {@code noops}
+ */
+ public final long noops() {
+ return this.noops;
+ }
+
+ /**
+ * Required - The number of requests per second effectively executed during the
+ * reindex.
+ *
+ * API name: {@code requests_per_second}
+ */
+ public final float requestsPerSecond() {
+ return this.requestsPerSecond;
+ }
+
+ /**
+ * Required - The number of retries attempted by reindex. bulk is
+ * the number of bulk actions retried and search is the number of
+ * search actions retried.
+ *
+ * API name: {@code retries}
+ */
+ public final Retries retries() {
+ return this.retries;
+ }
+
+ /**
+ * API name: {@code throttled}
+ */
+ @Nullable
+ public final Time throttled() {
+ return this.throttled;
+ }
+
+ /**
+ * Required - Number of milliseconds the request slept to conform to
+ * requests_per_second.
+ *
+ * API name: {@code throttled_millis}
+ */
+ public final long throttledMillis() {
+ return this.throttledMillis;
+ }
+
+ /**
+ * API name: {@code throttled_until}
+ */
+ @Nullable
+ public final Time throttledUntil() {
+ return this.throttledUntil;
+ }
+
+ /**
+ * Required - This field should always be equal to zero in a
+ * _reindex response. It only has meaning when using the Task API,
+ * where it indicates the next time (in milliseconds since epoch) a throttled
+ * request will be executed again in order to conform to
+ * requests_per_second.
+ *
+ * API name: {@code throttled_until_millis}
+ */
+ public final long throttledUntilMillis() {
+ return this.throttledUntilMillis;
+ }
+
+ /**
+ * Required - The number of documents that were successfully processed.
+ *
+ * API name: {@code total}
+ */
+ public final long total() {
+ return this.total;
+ }
+
+ /**
+ * The number of documents that were successfully updated, for example, a
+ * document with same ID already existed prior to reindex updating it.
+ *
+ * API name: {@code updated}
+ */
+ @Nullable
+ public final Long updated() {
+ return this.updated;
+ }
+
+ /**
+ * Required - The number of version conflicts that reindex hits.
+ *
+ * API name: {@code version_conflicts}
+ */
+ public final long versionConflicts() {
+ return this.versionConflicts;
+ }
+
+ /**
+ * The reason for cancellation if the slice was canceled
+ *
+ * API name: {@code cancelled}
+ */
+ @Nullable
+ public final String cancelled() {
+ return this.cancelled;
+ }
+
+ /**
+ * Serialize this object to JSON.
+ */
+ public void serialize(JsonGenerator generator, JsonpMapper mapper) {
+ generator.writeStartObject();
+ serializeInternal(generator, mapper);
+ generator.writeEnd();
+ }
+
+ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
+
+ if (ApiTypeHelper.isDefined(this.slices)) {
+ generator.writeKey("slices");
+ generator.writeStartArray();
+ for (ReindexStatus item0 : this.slices) {
+ item0.serialize(generator, mapper);
+
+ }
+ generator.writeEnd();
+
+ }
+ if (this.sliceId != null) {
+ generator.writeKey("slice_id");
+ generator.write(this.sliceId);
+
+ }
+ generator.writeKey("batches");
+ generator.write(this.batches);
+
+ if (this.created != null) {
+ generator.writeKey("created");
+ generator.write(this.created);
+
+ }
+ generator.writeKey("deleted");
+ generator.write(this.deleted);
+
+ generator.writeKey("noops");
+ generator.write(this.noops);
+
+ generator.writeKey("requests_per_second");
+ generator.write(this.requestsPerSecond);
+
+ generator.writeKey("retries");
+ this.retries.serialize(generator, mapper);
+
+ if (this.throttled != null) {
+ generator.writeKey("throttled");
+ this.throttled.serialize(generator, mapper);
+
+ }
+ generator.writeKey("throttled_millis");
+ generator.write(this.throttledMillis);
+
+ if (this.throttledUntil != null) {
+ generator.writeKey("throttled_until");
+ this.throttledUntil.serialize(generator, mapper);
+
+ }
+ generator.writeKey("throttled_until_millis");
+ generator.write(this.throttledUntilMillis);
+
+ generator.writeKey("total");
+ generator.write(this.total);
+
+ if (this.updated != null) {
+ generator.writeKey("updated");
+ generator.write(this.updated);
+
+ }
+ generator.writeKey("version_conflicts");
+ generator.write(this.versionConflicts);
+
+ if (this.cancelled != null) {
+ generator.writeKey("cancelled");
+ generator.write(this.cancelled);
+
+ }
+
+ }
+
+ @Override
+ public String toString() {
+ return JsonpUtils.toString(this);
+ }
+
+ // ---------------------------------------------------------------------------------------------
+
+ /**
+ * Builder for {@link ParentReindexStatus}.
+ */
+
+ public static class Builder extends WithJsonObjectBuilderBase
+ implements
+ ObjectBuilder {
+ @Nullable
+ private List slices;
+
+ @Nullable
+ private Integer sliceId;
+
+ private Long batches;
+
+ @Nullable
+ private Long created;
+
+ private Long deleted;
+
+ private Long noops;
+
+ private Float requestsPerSecond;
+
+ private Retries retries;
+
+ @Nullable
+ private Time throttled;
+
+ private Long throttledMillis;
+
+ @Nullable
+ private Time throttledUntil;
+
+ private Long throttledUntilMillis;
+
+ private Long total;
+
+ @Nullable
+ private Long updated;
+
+ private Long versionConflicts;
+
+ @Nullable
+ private String cancelled;
+
+ public Builder() {
+ }
+ private Builder(ParentReindexStatus instance) {
+ this.slices = instance.slices;
+ this.sliceId = instance.sliceId;
+ this.batches = instance.batches;
+ this.created = instance.created;
+ this.deleted = instance.deleted;
+ this.noops = instance.noops;
+ this.requestsPerSecond = instance.requestsPerSecond;
+ this.retries = instance.retries;
+ this.throttled = instance.throttled;
+ this.throttledMillis = instance.throttledMillis;
+ this.throttledUntil = instance.throttledUntil;
+ this.throttledUntilMillis = instance.throttledUntilMillis;
+ this.total = instance.total;
+ this.updated = instance.updated;
+ this.versionConflicts = instance.versionConflicts;
+ this.cancelled = instance.cancelled;
+
+ }
+ /**
+ * API name: {@code slices}
+ *
+ * Adds all elements of list to slices.
+ */
+ public final Builder slices(List list) {
+ this.slices = _listAddAll(this.slices, list);
+ return this;
+ }
+
+ /**
+ * API name: {@code slices}
+ *
+ * Adds one or more values to slices.
+ */
+ public final Builder slices(ReindexStatus value, ReindexStatus... values) {
+ this.slices = _listAdd(this.slices, value, values);
+ return this;
+ }
+
+ /**
+ * API name: {@code slices}
+ *
+ * Adds a value to slices using a builder lambda.
+ */
+ public final Builder slices(Function> fn) {
+ return slices(fn.apply(new ReindexStatus.Builder()).build());
+ }
+
+ /**
+ * The slice ID
+ *
+ * API name: {@code slice_id}
+ */
+ public final Builder sliceId(@Nullable Integer value) {
+ this.sliceId = value;
+ return this;
+ }
+
+ /**
+ * Required - The number of scroll responses pulled back by the reindex.
+ *
+ * API name: {@code batches}
+ */
+ public final Builder batches(long value) {
+ this.batches = value;
+ return this;
+ }
+
+ /**
+ * The number of documents that were successfully created.
+ *
+ * API name: {@code created}
+ */
+ public final Builder created(@Nullable Long value) {
+ this.created = value;
+ return this;
+ }
+
+ /**
+ * Required - The number of documents that were successfully deleted.
+ *
+ * API name: {@code deleted}
+ */
+ public final Builder deleted(long value) {
+ this.deleted = value;
+ return this;
+ }
+
+ /**
+ * Required - The number of documents that were ignored because the script used
+ * for the reindex returned a noop value for ctx.op.
+ *
+ * API name: {@code noops}
+ */
+ public final Builder noops(long value) {
+ this.noops = value;
+ return this;
+ }
+
+ /**
+ * Required - The number of requests per second effectively executed during the
+ * reindex.
+ *
+ * API name: {@code requests_per_second}
+ */
+ public final Builder requestsPerSecond(float value) {
+ this.requestsPerSecond = value;
+ return this;
+ }
+
+ /**
+ * Required - The number of retries attempted by reindex. bulk is
+ * the number of bulk actions retried and search is the number of
+ * search actions retried.
+ *
+ * API name: {@code retries}
+ */
+ public final Builder retries(Retries value) {
+ this.retries = value;
+ return this;
+ }
+
+ /**
+ * Required - The number of retries attempted by reindex. bulk is
+ * the number of bulk actions retried and search is the number of
+ * search actions retried.
+ *
+ * API name: {@code retries}
+ */
+ public final Builder retries(Function> fn) {
+ return this.retries(fn.apply(new Retries.Builder()).build());
+ }
+
+ /**
+ * API name: {@code throttled}
+ */
+ public final Builder throttled(@Nullable Time value) {
+ this.throttled = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code throttled}
+ */
+ public final Builder throttled(Function> fn) {
+ return this.throttled(fn.apply(new Time.Builder()).build());
+ }
+
+ /**
+ * Required - Number of milliseconds the request slept to conform to
+ * requests_per_second.
+ *
+ * API name: {@code throttled_millis}
+ */
+ public final Builder throttledMillis(long value) {
+ this.throttledMillis = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code throttled_until}
+ */
+ public final Builder throttledUntil(@Nullable Time value) {
+ this.throttledUntil = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code throttled_until}
+ */
+ public final Builder throttledUntil(Function> fn) {
+ return this.throttledUntil(fn.apply(new Time.Builder()).build());
+ }
+
+ /**
+ * Required - This field should always be equal to zero in a
+ * _reindex response. It only has meaning when using the Task API,
+ * where it indicates the next time (in milliseconds since epoch) a throttled
+ * request will be executed again in order to conform to
+ * requests_per_second.
+ *
+ * API name: {@code throttled_until_millis}
+ */
+ public final Builder throttledUntilMillis(long value) {
+ this.throttledUntilMillis = value;
+ return this;
+ }
+
+ /**
+ * Required - The number of documents that were successfully processed.
+ *
+ * API name: {@code total}
+ */
+ public final Builder total(long value) {
+ this.total = value;
+ return this;
+ }
+
+ /**
+ * The number of documents that were successfully updated, for example, a
+ * document with same ID already existed prior to reindex updating it.
+ *
+ * API name: {@code updated}
+ */
+ public final Builder updated(@Nullable Long value) {
+ this.updated = value;
+ return this;
+ }
+
+ /**
+ * Required - The number of version conflicts that reindex hits.
+ *
+ * API name: {@code version_conflicts}
+ */
+ public final Builder versionConflicts(long value) {
+ this.versionConflicts = value;
+ return this;
+ }
+
+ /**
+ * The reason for cancellation if the slice was canceled
+ *
+ * API name: {@code cancelled}
+ */
+ public final Builder cancelled(@Nullable String value) {
+ this.cancelled = value;
+ return this;
+ }
+
+ @Override
+ protected Builder self() {
+ return this;
+ }
+
+ /**
+ * Builds a {@link ParentReindexStatus}.
+ *
+ * @throws NullPointerException
+ * if some of the required fields are null.
+ */
+ public ParentReindexStatus build() {
+ _checkSingleUse();
+
+ return new ParentReindexStatus(this);
+ }
+ }
+
+ /**
+ * @return New {@link Builder} initialized with field values of this instance
+ */
+ public Builder rebuild() {
+ return new Builder(this);
+ }
+ // ---------------------------------------------------------------------------------------------
+
+ /**
+ * Json deserializer for {@link ParentReindexStatus}
+ */
+ public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer
+ .lazy(Builder::new, ParentReindexStatus::setupParentReindexStatusDeserializer);
+
+ protected static void setupParentReindexStatusDeserializer(ObjectDeserializer op) {
+
+ op.add(Builder::slices, JsonpDeserializer.arrayDeserializer(ReindexStatus._DESERIALIZER), "slices");
+ op.add(Builder::sliceId, JsonpDeserializer.integerDeserializer(), "slice_id");
+ op.add(Builder::batches, JsonpDeserializer.longDeserializer(), "batches");
+ op.add(Builder::created, JsonpDeserializer.longDeserializer(), "created");
+ op.add(Builder::deleted, JsonpDeserializer.longDeserializer(), "deleted");
+ op.add(Builder::noops, JsonpDeserializer.longDeserializer(), "noops");
+ op.add(Builder::requestsPerSecond, JsonpDeserializer.floatDeserializer(), "requests_per_second");
+ op.add(Builder::retries, Retries._DESERIALIZER, "retries");
+ op.add(Builder::throttled, Time._DESERIALIZER, "throttled");
+ op.add(Builder::throttledMillis, JsonpDeserializer.longDeserializer(), "throttled_millis");
+ op.add(Builder::throttledUntil, Time._DESERIALIZER, "throttled_until");
+ op.add(Builder::throttledUntilMillis, JsonpDeserializer.longDeserializer(), "throttled_until_millis");
+ op.add(Builder::total, JsonpDeserializer.longDeserializer(), "total");
+ op.add(Builder::updated, JsonpDeserializer.longDeserializer(), "updated");
+ op.add(Builder::versionConflicts, JsonpDeserializer.longDeserializer(), "version_conflicts");
+ op.add(Builder::cancelled, JsonpDeserializer.stringDeserializer(), "cancelled");
+
+ }
+
+}
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexTask.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexTask.java
index 227f36d064..9bcda32e4b 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexTask.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexTask.java
@@ -19,7 +19,6 @@
package co.elastic.clients.elasticsearch.core.reindex_rethrottle;
-import co.elastic.clients.elasticsearch._types.ReindexStatus;
import co.elastic.clients.json.JsonpDeserializable;
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
@@ -81,7 +80,7 @@ public class ReindexTask implements JsonpSerializable {
private final long startTimeInMillis;
- private final ReindexStatus status;
+ private final ParentReindexStatus status;
private final String type;
@@ -169,7 +168,7 @@ public final long startTimeInMillis() {
/**
* Required - API name: {@code status}
*/
- public final ReindexStatus status() {
+ public final ParentReindexStatus status() {
return this.status;
}
@@ -298,7 +297,7 @@ public abstract static class AbstractBuilder> fn) {
- return this.status(fn.apply(new ReindexStatus.Builder()).build());
+ public final BuilderT status(Function> fn) {
+ return this.status(fn.apply(new ParentReindexStatus.Builder()).build());
}
/**
@@ -434,7 +433,7 @@ protected static > void setupReindexT
op.add(AbstractBuilder::node, JsonpDeserializer.stringDeserializer(), "node");
op.add(AbstractBuilder::runningTimeInNanos, JsonpDeserializer.longDeserializer(), "running_time_in_nanos");
op.add(AbstractBuilder::startTimeInMillis, JsonpDeserializer.longDeserializer(), "start_time_in_millis");
- op.add(AbstractBuilder::status, ReindexStatus._DESERIALIZER, "status");
+ op.add(AbstractBuilder::status, ParentReindexStatus._DESERIALIZER, "status");
op.add(AbstractBuilder::type, JsonpDeserializer.stringDeserializer(), "type");
op.add(AbstractBuilder::headers, JsonpDeserializer.stringMapDeserializer(
JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer())), "headers");
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/InnerHits.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/InnerHits.java
index a8f93a699d..a4540c150a 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/InnerHits.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/InnerHits.java
@@ -95,7 +95,9 @@ public class InnerHits implements JsonpSerializable {
@Nullable
private final Boolean seqNoPrimaryTerm;
- private final List fields;
+ private final List field;
+
+ private final List fields;
private final List sort;
@@ -124,6 +126,7 @@ private InnerHits(Builder builder) {
this.ignoreUnmapped = builder.ignoreUnmapped;
this.scriptFields = ApiTypeHelper.unmodifiable(builder.scriptFields);
this.seqNoPrimaryTerm = builder.seqNoPrimaryTerm;
+ this.field = ApiTypeHelper.unmodifiable(builder.field);
this.fields = ApiTypeHelper.unmodifiable(builder.fields);
this.sort = ApiTypeHelper.unmodifiable(builder.sort);
this.source = builder.source;
@@ -222,10 +225,17 @@ public final Boolean seqNoPrimaryTerm() {
return this.seqNoPrimaryTerm;
}
+ /**
+ * API name: {@code field}
+ */
+ public final List field() {
+ return this.field;
+ }
+
/**
* API name: {@code fields}
*/
- public final List fields() {
+ public final List fields() {
return this.fields;
}
@@ -341,12 +351,22 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.writeKey("seq_no_primary_term");
generator.write(this.seqNoPrimaryTerm);
+ }
+ if (ApiTypeHelper.isDefined(this.field)) {
+ generator.writeKey("field");
+ generator.writeStartArray();
+ for (String item0 : this.field) {
+ generator.write(item0);
+
+ }
+ generator.writeEnd();
+
}
if (ApiTypeHelper.isDefined(this.fields)) {
generator.writeKey("fields");
generator.writeStartArray();
- for (String item0 : this.fields) {
- generator.write(item0);
+ for (FieldAndFormat item0 : this.fields) {
+ item0.serialize(generator, mapper);
}
generator.writeEnd();
@@ -433,7 +453,10 @@ public static class Builder extends WithJsonObjectBuilderBase implement
private Boolean seqNoPrimaryTerm;
@Nullable
- private List fields;
+ private List field;
+
+ @Nullable
+ private List fields;
@Nullable
private List sort;
@@ -463,6 +486,7 @@ private Builder(InnerHits instance) {
this.ignoreUnmapped = instance.ignoreUnmapped;
this.scriptFields = instance.scriptFields;
this.seqNoPrimaryTerm = instance.seqNoPrimaryTerm;
+ this.field = instance.field;
this.fields = instance.fields;
this.sort = instance.sort;
this.source = instance.source;
@@ -614,12 +638,32 @@ public final Builder seqNoPrimaryTerm(@Nullable Boolean value) {
return this;
}
+ /**
+ * API name: {@code field}
+ *
+ * Adds all elements of list to field.
+ */
+ public final Builder field(List list) {
+ this.field = _listAddAll(this.field, list);
+ return this;
+ }
+
+ /**
+ * API name: {@code field}
+ *
+ * Adds one or more values to field.
+ */
+ public final Builder field(String value, String... values) {
+ this.field = _listAdd(this.field, value, values);
+ return this;
+ }
+
/**
* API name: {@code fields}
*
* Adds all elements of list to fields.
*/
- public final Builder fields(List list) {
+ public final Builder fields(List list) {
this.fields = _listAddAll(this.fields, list);
return this;
}
@@ -629,11 +673,20 @@ public final Builder fields(List list) {
*
* Adds one or more values to fields.
*/
- public final Builder fields(String value, String... values) {
+ public final Builder fields(FieldAndFormat value, FieldAndFormat... values) {
this.fields = _listAdd(this.fields, value, values);
return this;
}
+ /**
+ * API name: {@code fields}
+ *
+ * Adds a value to fields using a builder lambda.
+ */
+ public final Builder fields(Function> fn) {
+ return fields(fn.apply(new FieldAndFormat.Builder()).build());
+ }
+
/**
* How the inner hits should be sorted per inner_hits. By default,
* inner hits are sorted by score.
@@ -769,7 +822,8 @@ protected static void setupInnerHitsDeserializer(ObjectDeserializer 1) {
hash = hash.substring(1);
}
- window.location = "https://github.com/elastic/elasticsearch-specification/tree/7ada49949544b577bc7c9ab5420771204a12cdd2/specification/" + (paths[hash] || "");
+ window.location = "https://github.com/elastic/elasticsearch-specification/tree/a11ffef0fa62bc289d624a0dde052163740ee4bf/specification/" + (paths[hash] || "");
- Please see the Elasticsearch API specification.
+ Please see the Elasticsearch API specification.