_DESERIALIZER = JsonpDeserializer
+ .lazy(Slices::buildSlicesDeserializer);
+}
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SlicesBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SlicesBuilders.java
new file mode 100644
index 000000000..acfc50b48
--- /dev/null
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SlicesBuilders.java
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+//----------------------------------------------------
+// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
+//----------------------------------------------------
+
+package co.elastic.clients.elasticsearch._types;
+
+import co.elastic.clients.util.ObjectBuilder;
+import java.util.function.Function;
+
+/**
+ * Builders for {@link Slices} variants.
+ *
+ * Variants computed
, value
are not available here as
+ * they don't have a dedicated class. Use {@link Slices}'s builder for these.
+ *
+ */
+public class SlicesBuilders {
+ private SlicesBuilders() {
+ }
+
+}
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SlicesCalculation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SlicesCalculation.java
new file mode 100644
index 000000000..70b42b0a8
--- /dev/null
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SlicesCalculation.java
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+
+//----------------------------------------------------
+// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
+//----------------------------------------------------
+
+package co.elastic.clients.elasticsearch._types;
+
+import co.elastic.clients.json.JsonEnum;
+import co.elastic.clients.json.JsonpDeserializable;
+import co.elastic.clients.json.JsonpDeserializer;
+
+/**
+ *
+ * @see API
+ * specification
+ */
+@JsonpDeserializable
+public enum SlicesCalculation implements JsonEnum {
+ /**
+ * Let Elasticsearch choose a reasonable number for most data streams and
+ * indices.
+ */
+ Auto("auto"),
+
+ ;
+
+ private final String jsonValue;
+
+ SlicesCalculation(String jsonValue) {
+ this.jsonValue = jsonValue;
+ }
+
+ public String jsonValue() {
+ return this.jsonValue;
+ }
+
+ public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(
+ SlicesCalculation.values());
+}
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DynamicProperty.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DynamicProperty.java
new file mode 100644
index 000000000..3e1693028
--- /dev/null
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DynamicProperty.java
@@ -0,0 +1,780 @@
+/*
+ * 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.
+ */
+
+//----------------------------------------------------
+// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
+//----------------------------------------------------
+
+package co.elastic.clients.elasticsearch._types.mapping;
+
+import co.elastic.clients.elasticsearch._types.FieldValue;
+import co.elastic.clients.elasticsearch._types.Script;
+import co.elastic.clients.json.JsonpDeserializable;
+import co.elastic.clients.json.JsonpDeserializer;
+import co.elastic.clients.json.JsonpMapper;
+import co.elastic.clients.json.ObjectBuilderDeserializer;
+import co.elastic.clients.json.ObjectDeserializer;
+import co.elastic.clients.util.ObjectBuilder;
+import jakarta.json.stream.JsonGenerator;
+import java.lang.Boolean;
+import java.lang.Double;
+import java.lang.Integer;
+import java.lang.String;
+import java.util.Objects;
+import java.util.function.Function;
+import javax.annotation.Nullable;
+
+// typedef: _types.mapping.DynamicProperty
+
+/**
+ *
+ * @see API
+ * specification
+ */
+@JsonpDeserializable
+public class DynamicProperty extends DocValuesPropertyBase implements PropertyVariant {
+ @Nullable
+ private final Boolean enabled;
+
+ @Nullable
+ private final FieldValue nullValue;
+
+ @Nullable
+ private final Double boost;
+
+ @Nullable
+ private final Boolean coerce;
+
+ @Nullable
+ private final Script script;
+
+ @Nullable
+ private final OnScriptError onScriptError;
+
+ @Nullable
+ private final Boolean ignoreMalformed;
+
+ @Nullable
+ private final String analyzer;
+
+ @Nullable
+ private final Boolean eagerGlobalOrdinals;
+
+ @Nullable
+ private final Boolean index;
+
+ @Nullable
+ private final IndexOptions indexOptions;
+
+ @Nullable
+ private final Boolean indexPhrases;
+
+ @Nullable
+ private final TextIndexPrefixes indexPrefixes;
+
+ @Nullable
+ private final Boolean norms;
+
+ @Nullable
+ private final Integer positionIncrementGap;
+
+ @Nullable
+ private final String searchAnalyzer;
+
+ @Nullable
+ private final String searchQuoteAnalyzer;
+
+ @Nullable
+ private final TermVectorOption termVector;
+
+ @Nullable
+ private final String format;
+
+ @Nullable
+ private final Integer precisionStep;
+
+ @Nullable
+ private final String locale;
+
+ // ---------------------------------------------------------------------------------------------
+
+ private DynamicProperty(Builder builder) {
+ super(builder);
+
+ this.enabled = builder.enabled;
+ this.nullValue = builder.nullValue;
+ this.boost = builder.boost;
+ this.coerce = builder.coerce;
+ this.script = builder.script;
+ this.onScriptError = builder.onScriptError;
+ this.ignoreMalformed = builder.ignoreMalformed;
+ this.analyzer = builder.analyzer;
+ this.eagerGlobalOrdinals = builder.eagerGlobalOrdinals;
+ this.index = builder.index;
+ this.indexOptions = builder.indexOptions;
+ this.indexPhrases = builder.indexPhrases;
+ this.indexPrefixes = builder.indexPrefixes;
+ this.norms = builder.norms;
+ this.positionIncrementGap = builder.positionIncrementGap;
+ this.searchAnalyzer = builder.searchAnalyzer;
+ this.searchQuoteAnalyzer = builder.searchQuoteAnalyzer;
+ this.termVector = builder.termVector;
+ this.format = builder.format;
+ this.precisionStep = builder.precisionStep;
+ this.locale = builder.locale;
+
+ }
+
+ public static DynamicProperty of(Function> fn) {
+ return fn.apply(new Builder()).build();
+ }
+
+ /**
+ * Property variant kind.
+ */
+ @Override
+ public Property.Kind _propertyKind() {
+ return Property.Kind.DynamicProperty;
+ }
+
+ /**
+ * API name: {@code enabled}
+ */
+ @Nullable
+ public final Boolean enabled() {
+ return this.enabled;
+ }
+
+ /**
+ * API name: {@code null_value}
+ */
+ @Nullable
+ public final FieldValue nullValue() {
+ return this.nullValue;
+ }
+
+ /**
+ * API name: {@code boost}
+ */
+ @Nullable
+ public final Double boost() {
+ return this.boost;
+ }
+
+ /**
+ * API name: {@code coerce}
+ */
+ @Nullable
+ public final Boolean coerce() {
+ return this.coerce;
+ }
+
+ /**
+ * API name: {@code script}
+ */
+ @Nullable
+ public final Script script() {
+ return this.script;
+ }
+
+ /**
+ * API name: {@code on_script_error}
+ */
+ @Nullable
+ public final OnScriptError onScriptError() {
+ return this.onScriptError;
+ }
+
+ /**
+ * API name: {@code ignore_malformed}
+ */
+ @Nullable
+ public final Boolean ignoreMalformed() {
+ return this.ignoreMalformed;
+ }
+
+ /**
+ * API name: {@code analyzer}
+ */
+ @Nullable
+ public final String analyzer() {
+ return this.analyzer;
+ }
+
+ /**
+ * API name: {@code eager_global_ordinals}
+ */
+ @Nullable
+ public final Boolean eagerGlobalOrdinals() {
+ return this.eagerGlobalOrdinals;
+ }
+
+ /**
+ * API name: {@code index}
+ */
+ @Nullable
+ public final Boolean index() {
+ return this.index;
+ }
+
+ /**
+ * API name: {@code index_options}
+ */
+ @Nullable
+ public final IndexOptions indexOptions() {
+ return this.indexOptions;
+ }
+
+ /**
+ * API name: {@code index_phrases}
+ */
+ @Nullable
+ public final Boolean indexPhrases() {
+ return this.indexPhrases;
+ }
+
+ /**
+ * API name: {@code index_prefixes}
+ */
+ @Nullable
+ public final TextIndexPrefixes indexPrefixes() {
+ return this.indexPrefixes;
+ }
+
+ /**
+ * API name: {@code norms}
+ */
+ @Nullable
+ public final Boolean norms() {
+ return this.norms;
+ }
+
+ /**
+ * API name: {@code position_increment_gap}
+ */
+ @Nullable
+ public final Integer positionIncrementGap() {
+ return this.positionIncrementGap;
+ }
+
+ /**
+ * API name: {@code search_analyzer}
+ */
+ @Nullable
+ public final String searchAnalyzer() {
+ return this.searchAnalyzer;
+ }
+
+ /**
+ * API name: {@code search_quote_analyzer}
+ */
+ @Nullable
+ public final String searchQuoteAnalyzer() {
+ return this.searchQuoteAnalyzer;
+ }
+
+ /**
+ * API name: {@code term_vector}
+ */
+ @Nullable
+ public final TermVectorOption termVector() {
+ return this.termVector;
+ }
+
+ /**
+ * API name: {@code format}
+ */
+ @Nullable
+ public final String format() {
+ return this.format;
+ }
+
+ /**
+ * API name: {@code precision_step}
+ */
+ @Nullable
+ public final Integer precisionStep() {
+ return this.precisionStep;
+ }
+
+ /**
+ * API name: {@code locale}
+ */
+ @Nullable
+ public final String locale() {
+ return this.locale;
+ }
+
+ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
+
+ generator.write("type", "{dynamic_property}");
+ super.serializeInternal(generator, mapper);
+ if (this.enabled != null) {
+ generator.writeKey("enabled");
+ generator.write(this.enabled);
+
+ }
+ if (this.nullValue != null) {
+ generator.writeKey("null_value");
+ this.nullValue.serialize(generator, mapper);
+
+ }
+ if (this.boost != null) {
+ generator.writeKey("boost");
+ generator.write(this.boost);
+
+ }
+ if (this.coerce != null) {
+ generator.writeKey("coerce");
+ generator.write(this.coerce);
+
+ }
+ if (this.script != null) {
+ generator.writeKey("script");
+ this.script.serialize(generator, mapper);
+
+ }
+ if (this.onScriptError != null) {
+ generator.writeKey("on_script_error");
+ this.onScriptError.serialize(generator, mapper);
+ }
+ if (this.ignoreMalformed != null) {
+ generator.writeKey("ignore_malformed");
+ generator.write(this.ignoreMalformed);
+
+ }
+ if (this.analyzer != null) {
+ generator.writeKey("analyzer");
+ generator.write(this.analyzer);
+
+ }
+ if (this.eagerGlobalOrdinals != null) {
+ generator.writeKey("eager_global_ordinals");
+ generator.write(this.eagerGlobalOrdinals);
+
+ }
+ if (this.index != null) {
+ generator.writeKey("index");
+ generator.write(this.index);
+
+ }
+ if (this.indexOptions != null) {
+ generator.writeKey("index_options");
+ this.indexOptions.serialize(generator, mapper);
+ }
+ if (this.indexPhrases != null) {
+ generator.writeKey("index_phrases");
+ generator.write(this.indexPhrases);
+
+ }
+ if (this.indexPrefixes != null) {
+ generator.writeKey("index_prefixes");
+ this.indexPrefixes.serialize(generator, mapper);
+
+ }
+ if (this.norms != null) {
+ generator.writeKey("norms");
+ generator.write(this.norms);
+
+ }
+ if (this.positionIncrementGap != null) {
+ generator.writeKey("position_increment_gap");
+ generator.write(this.positionIncrementGap);
+
+ }
+ if (this.searchAnalyzer != null) {
+ generator.writeKey("search_analyzer");
+ generator.write(this.searchAnalyzer);
+
+ }
+ if (this.searchQuoteAnalyzer != null) {
+ generator.writeKey("search_quote_analyzer");
+ generator.write(this.searchQuoteAnalyzer);
+
+ }
+ if (this.termVector != null) {
+ generator.writeKey("term_vector");
+ this.termVector.serialize(generator, mapper);
+ }
+ if (this.format != null) {
+ generator.writeKey("format");
+ generator.write(this.format);
+
+ }
+ if (this.precisionStep != null) {
+ generator.writeKey("precision_step");
+ generator.write(this.precisionStep);
+
+ }
+ if (this.locale != null) {
+ generator.writeKey("locale");
+ generator.write(this.locale);
+
+ }
+
+ }
+
+ // ---------------------------------------------------------------------------------------------
+
+ /**
+ * Builder for {@link DynamicProperty}.
+ */
+
+ public static class Builder extends DocValuesPropertyBase.AbstractBuilder
+ implements
+ ObjectBuilder {
+ @Nullable
+ private Boolean enabled;
+
+ @Nullable
+ private FieldValue nullValue;
+
+ @Nullable
+ private Double boost;
+
+ @Nullable
+ private Boolean coerce;
+
+ @Nullable
+ private Script script;
+
+ @Nullable
+ private OnScriptError onScriptError;
+
+ @Nullable
+ private Boolean ignoreMalformed;
+
+ @Nullable
+ private String analyzer;
+
+ @Nullable
+ private Boolean eagerGlobalOrdinals;
+
+ @Nullable
+ private Boolean index;
+
+ @Nullable
+ private IndexOptions indexOptions;
+
+ @Nullable
+ private Boolean indexPhrases;
+
+ @Nullable
+ private TextIndexPrefixes indexPrefixes;
+
+ @Nullable
+ private Boolean norms;
+
+ @Nullable
+ private Integer positionIncrementGap;
+
+ @Nullable
+ private String searchAnalyzer;
+
+ @Nullable
+ private String searchQuoteAnalyzer;
+
+ @Nullable
+ private TermVectorOption termVector;
+
+ @Nullable
+ private String format;
+
+ @Nullable
+ private Integer precisionStep;
+
+ @Nullable
+ private String locale;
+
+ /**
+ * API name: {@code enabled}
+ */
+ public final Builder enabled(@Nullable Boolean value) {
+ this.enabled = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code null_value}
+ */
+ public final Builder nullValue(@Nullable FieldValue value) {
+ this.nullValue = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code null_value}
+ */
+ public final Builder nullValue(Function> fn) {
+ return this.nullValue(fn.apply(new FieldValue.Builder()).build());
+ }
+
+ /**
+ * API name: {@code null_value}
+ */
+ public final Builder nullValue(String value) {
+ this.nullValue = FieldValue.of(value);
+ return this;
+ }
+
+ /**
+ * API name: {@code null_value}
+ */
+ public final Builder nullValue(long value) {
+ this.nullValue = FieldValue.of(value);
+ return this;
+ }
+
+ /**
+ * API name: {@code null_value}
+ */
+ public final Builder nullValue(double value) {
+ this.nullValue = FieldValue.of(value);
+ return this;
+ }
+
+ /**
+ * API name: {@code null_value}
+ */
+ public final Builder nullValue(boolean value) {
+ this.nullValue = FieldValue.of(value);
+ return this;
+ }
+
+ /**
+ * API name: {@code boost}
+ */
+ public final Builder boost(@Nullable Double value) {
+ this.boost = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code coerce}
+ */
+ public final Builder coerce(@Nullable Boolean value) {
+ this.coerce = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code script}
+ */
+ public final Builder script(@Nullable Script value) {
+ this.script = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code script}
+ */
+ public final Builder script(Function> fn) {
+ return this.script(fn.apply(new Script.Builder()).build());
+ }
+
+ /**
+ * API name: {@code on_script_error}
+ */
+ public final Builder onScriptError(@Nullable OnScriptError value) {
+ this.onScriptError = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code ignore_malformed}
+ */
+ public final Builder ignoreMalformed(@Nullable Boolean value) {
+ this.ignoreMalformed = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code analyzer}
+ */
+ public final Builder analyzer(@Nullable String value) {
+ this.analyzer = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code eager_global_ordinals}
+ */
+ public final Builder eagerGlobalOrdinals(@Nullable Boolean value) {
+ this.eagerGlobalOrdinals = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code index}
+ */
+ public final Builder index(@Nullable Boolean value) {
+ this.index = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code index_options}
+ */
+ public final Builder indexOptions(@Nullable IndexOptions value) {
+ this.indexOptions = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code index_phrases}
+ */
+ public final Builder indexPhrases(@Nullable Boolean value) {
+ this.indexPhrases = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code index_prefixes}
+ */
+ public final Builder indexPrefixes(@Nullable TextIndexPrefixes value) {
+ this.indexPrefixes = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code index_prefixes}
+ */
+ public final Builder indexPrefixes(Function> fn) {
+ return this.indexPrefixes(fn.apply(new TextIndexPrefixes.Builder()).build());
+ }
+
+ /**
+ * API name: {@code norms}
+ */
+ public final Builder norms(@Nullable Boolean value) {
+ this.norms = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code position_increment_gap}
+ */
+ public final Builder positionIncrementGap(@Nullable Integer value) {
+ this.positionIncrementGap = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code search_analyzer}
+ */
+ public final Builder searchAnalyzer(@Nullable String value) {
+ this.searchAnalyzer = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code search_quote_analyzer}
+ */
+ public final Builder searchQuoteAnalyzer(@Nullable String value) {
+ this.searchQuoteAnalyzer = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code term_vector}
+ */
+ public final Builder termVector(@Nullable TermVectorOption value) {
+ this.termVector = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code format}
+ */
+ public final Builder format(@Nullable String value) {
+ this.format = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code precision_step}
+ */
+ public final Builder precisionStep(@Nullable Integer value) {
+ this.precisionStep = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code locale}
+ */
+ public final Builder locale(@Nullable String value) {
+ this.locale = value;
+ return this;
+ }
+
+ @Override
+ protected Builder self() {
+ return this;
+ }
+
+ /**
+ * Builds a {@link DynamicProperty}.
+ *
+ * @throws NullPointerException
+ * if some of the required fields are null.
+ */
+ public DynamicProperty build() {
+ _checkSingleUse();
+
+ return new DynamicProperty(this);
+ }
+ }
+
+ // ---------------------------------------------------------------------------------------------
+
+ /**
+ * Json deserializer for {@link DynamicProperty}
+ */
+ public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new,
+ DynamicProperty::setupDynamicPropertyDeserializer);
+
+ protected static void setupDynamicPropertyDeserializer(ObjectDeserializer op) {
+ DocValuesPropertyBase.setupDocValuesPropertyBaseDeserializer(op);
+ op.add(Builder::enabled, JsonpDeserializer.booleanDeserializer(), "enabled");
+ op.add(Builder::nullValue, FieldValue._DESERIALIZER, "null_value");
+ op.add(Builder::boost, JsonpDeserializer.doubleDeserializer(), "boost");
+ op.add(Builder::coerce, JsonpDeserializer.booleanDeserializer(), "coerce");
+ op.add(Builder::script, Script._DESERIALIZER, "script");
+ op.add(Builder::onScriptError, OnScriptError._DESERIALIZER, "on_script_error");
+ op.add(Builder::ignoreMalformed, JsonpDeserializer.booleanDeserializer(), "ignore_malformed");
+ op.add(Builder::analyzer, JsonpDeserializer.stringDeserializer(), "analyzer");
+ op.add(Builder::eagerGlobalOrdinals, JsonpDeserializer.booleanDeserializer(), "eager_global_ordinals");
+ op.add(Builder::index, JsonpDeserializer.booleanDeserializer(), "index");
+ op.add(Builder::indexOptions, IndexOptions._DESERIALIZER, "index_options");
+ op.add(Builder::indexPhrases, JsonpDeserializer.booleanDeserializer(), "index_phrases");
+ op.add(Builder::indexPrefixes, TextIndexPrefixes._DESERIALIZER, "index_prefixes");
+ op.add(Builder::norms, JsonpDeserializer.booleanDeserializer(), "norms");
+ op.add(Builder::positionIncrementGap, JsonpDeserializer.integerDeserializer(), "position_increment_gap");
+ op.add(Builder::searchAnalyzer, JsonpDeserializer.stringDeserializer(), "search_analyzer");
+ op.add(Builder::searchQuoteAnalyzer, JsonpDeserializer.stringDeserializer(), "search_quote_analyzer");
+ op.add(Builder::termVector, TermVectorOption._DESERIALIZER, "term_vector");
+ op.add(Builder::format, JsonpDeserializer.stringDeserializer(), "format");
+ op.add(Builder::precisionStep, JsonpDeserializer.integerDeserializer(), "precision_step");
+ op.add(Builder::locale, JsonpDeserializer.stringDeserializer(), "locale");
+
+ op.ignore("type");
+ }
+
+}
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/Property.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/Property.java
index 25e347501..4184d3e8b 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/Property.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/Property.java
@@ -85,6 +85,8 @@ public enum Kind implements JsonEnum {
DoubleRange("double_range"),
+ DynamicProperty("{dynamic_property}"),
+
Alias("alias"),
Flattened("flattened"),
@@ -402,6 +404,24 @@ public DoubleRangeProperty doubleRange() {
return TaggedUnionUtils.get(this, Kind.DoubleRange);
}
+ /**
+ * Is this variant instance of kind {@code {dynamic_property}}?
+ */
+ public boolean isDynamicProperty() {
+ return _kind == Kind.DynamicProperty;
+ }
+
+ /**
+ * Get the {@code {dynamic_property}} variant value.
+ *
+ * @throws IllegalStateException
+ * if the current variant is not of the {@code {dynamic_property}}
+ * kind.
+ */
+ public DynamicProperty dynamicProperty() {
+ return TaggedUnionUtils.get(this, Kind.DynamicProperty);
+ }
+
/**
* Is this variant instance of kind {@code alias}?
*/
@@ -1109,6 +1129,17 @@ public ObjectBuilder doubleRange(
return this.doubleRange(fn.apply(new DoubleRangeProperty.Builder()).build());
}
+ public ObjectBuilder dynamicProperty(DynamicProperty v) {
+ this._kind = Kind.DynamicProperty;
+ this._value = v;
+ return this;
+ }
+
+ public ObjectBuilder dynamicProperty(
+ Function> fn) {
+ return this.dynamicProperty(fn.apply(new DynamicProperty.Builder()).build());
+ }
+
public ObjectBuilder alias(FieldAliasProperty v) {
this._kind = Kind.Alias;
this._value = v;
@@ -1483,6 +1514,7 @@ protected static void setupPropertyDeserializer(ObjectDeserializer op)
op.add(Builder::denseVector, DenseVectorProperty._DESERIALIZER, "dense_vector");
op.add(Builder::double_, DoubleNumberProperty._DESERIALIZER, "double");
op.add(Builder::doubleRange, DoubleRangeProperty._DESERIALIZER, "double_range");
+ op.add(Builder::dynamicProperty, DynamicProperty._DESERIALIZER, "{dynamic_property}");
op.add(Builder::alias, FieldAliasProperty._DESERIALIZER, "alias");
op.add(Builder::flattened, FlattenedProperty._DESERIALIZER, "flattened");
op.add(Builder::float_, FloatNumberProperty._DESERIALIZER, "float");
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/PropertyBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/PropertyBase.java
index 66e875059..bf8df2870 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/PropertyBase.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/PropertyBase.java
@@ -55,9 +55,6 @@ public abstract class PropertyBase implements JsonpSerializable {
private final Map meta;
- @Nullable
- private final String name;
-
private final Map properties;
@Nullable
@@ -74,7 +71,6 @@ protected PropertyBase(AbstractBuilder> builder) {
this.localMetadata = ApiTypeHelper.unmodifiable(builder.localMetadata);
this.meta = ApiTypeHelper.unmodifiable(builder.meta);
- this.name = builder.name;
this.properties = ApiTypeHelper.unmodifiable(builder.properties);
this.ignoreAbove = builder.ignoreAbove;
this.dynamic = builder.dynamic;
@@ -96,14 +92,6 @@ public final Map meta() {
return this.meta;
}
- /**
- * API name: {@code name}
- */
- @Nullable
- public final String name() {
- return this.name;
- }
-
/**
* API name: {@code properties}
*/
@@ -166,11 +154,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
}
generator.writeEnd();
- }
- if (this.name != null) {
- generator.writeKey("name");
- generator.write(this.name);
-
}
if (ApiTypeHelper.isDefined(this.properties)) {
generator.writeKey("properties");
@@ -220,9 +203,6 @@ protected abstract static class AbstractBuilder meta;
- @Nullable
- private String name;
-
@Nullable
private Map properties;
@@ -275,14 +255,6 @@ public final BuilderT meta(String key, String value) {
return self();
}
- /**
- * API name: {@code name}
- */
- public final BuilderT name(@Nullable String value) {
- this.name = value;
- return self();
- }
-
/**
* API name: {@code properties}
*
@@ -369,7 +341,6 @@ protected static > void setupProperty
"local_metadata");
op.add(AbstractBuilder::meta, JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()),
"meta");
- op.add(AbstractBuilder::name, JsonpDeserializer.stringDeserializer(), "name");
op.add(AbstractBuilder::properties, JsonpDeserializer.stringMapDeserializer(Property._DESERIALIZER),
"properties");
op.add(AbstractBuilder::ignoreAbove, JsonpDeserializer.integerDeserializer(), "ignore_above");
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/PropertyBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/PropertyBuilders.java
index 24a1b85c2..6c8ad3a6f 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/PropertyBuilders.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/PropertyBuilders.java
@@ -249,6 +249,24 @@ public static Property doubleRange(Function> fn) {
+ Property.Builder builder = new Property.Builder();
+ builder.dynamicProperty(fn.apply(new DynamicProperty.Builder()).build());
+ return builder.build();
+ }
+
/**
* Creates a builder for the {@link FieldAliasProperty alias} {@code Property}
* variant.
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java
index fa350f782..aaf90b387 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java
@@ -29,6 +29,7 @@
import co.elastic.clients.elasticsearch._types.RequestBase;
import co.elastic.clients.elasticsearch._types.SearchType;
import co.elastic.clients.elasticsearch._types.SlicedScroll;
+import co.elastic.clients.elasticsearch._types.Slices;
import co.elastic.clients.elasticsearch._types.Time;
import co.elastic.clients.elasticsearch._types.WaitForActiveShards;
import co.elastic.clients.elasticsearch._types.query_dsl.Operator;
@@ -140,7 +141,7 @@ public class DeleteByQueryRequest extends RequestBase implements JsonpSerializab
private final SlicedScroll slice;
@Nullable
- private final Long slices;
+ private final Slices slices;
private final List sort;
@@ -469,7 +470,7 @@ public final SlicedScroll slice() {
* API name: {@code slices}
*/
@Nullable
- public final Long slices() {
+ public final Slices slices() {
return this.slices;
}
@@ -670,7 +671,7 @@ public static class Builder extends WithJsonObjectBuilderBase
private SlicedScroll slice;
@Nullable
- private Long slices;
+ private Slices slices;
@Nullable
private List sort;
@@ -1021,11 +1022,21 @@ public final Builder slice(Function
* API name: {@code slices}
*/
- public final Builder slices(@Nullable Long value) {
+ public final Builder slices(@Nullable Slices value) {
this.slices = value;
return this;
}
+ /**
+ * The number of slices this task should be divided into. Defaults to 1, meaning
+ * the task isn't sliced into subtasks. Can be set to auto
.
+ *
+ * API name: {@code slices}
+ */
+ public final Builder slices(Function> fn) {
+ return this.slices(fn.apply(new Slices.Builder()).build());
+ }
+
/**
* A comma-separated list of <field>:<direction> pairs
*
@@ -1263,7 +1274,7 @@ protected static void setupDeleteByQueryRequestDeserializer(ObjectDeserializer {
Map params = new HashMap<>();
if (request.slices != null) {
- params.put("slices", String.valueOf(request.slices));
+ params.put("slices", request.slices._toJsonString());
}
if (request.df != null) {
params.put("df", request.df);
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchRequest.java
index 1b1e2e3c6..1c0a1c5a7 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchRequest.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchRequest.java
@@ -88,6 +88,9 @@ public class MsearchRequest extends RequestBase implements NdJsonpSerializable,
@Nullable
private final Long preFilterShardSize;
+ @Nullable
+ private final String routing;
+
@Nullable
private final SearchType searchType;
@@ -108,6 +111,7 @@ private MsearchRequest(Builder builder) {
this.maxConcurrentSearches = builder.maxConcurrentSearches;
this.maxConcurrentShardRequests = builder.maxConcurrentShardRequests;
this.preFilterShardSize = builder.preFilterShardSize;
+ this.routing = builder.routing;
this.searchType = builder.searchType;
this.type = ApiTypeHelper.unmodifiable(builder.type);
this.searches = ApiTypeHelper.unmodifiableRequired(builder.searches, this, "searches");
@@ -223,6 +227,16 @@ public final Long preFilterShardSize() {
return this.preFilterShardSize;
}
+ /**
+ * Custom routing value used to route search operations to a specific shard.
+ *
+ * API name: {@code routing}
+ */
+ @Nullable
+ public final String routing() {
+ return this.routing;
+ }
+
/**
* Indicates whether global term and document frequencies should be used when
* scoring returned documents.
@@ -297,6 +311,9 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder
+ * API name: {@code routing}
+ */
+ public final Builder routing(@Nullable String value) {
+ this.routing = value;
+ return this;
+ }
+
/**
* Indicates whether global term and document frequencies should be used when
* scoring returned documents.
@@ -569,6 +596,9 @@ public MsearchRequest build() {
request -> {
Map params = new HashMap<>();
params.put("typed_keys", "true");
+ if (request.routing != null) {
+ params.put("routing", request.routing);
+ }
if (request.preFilterShardSize != null) {
params.put("pre_filter_shard_size", String.valueOf(request.preFilterShardSize));
}
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRequest.java
index 4954c079e..c2a9c8fe9 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRequest.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRequest.java
@@ -27,6 +27,7 @@
import co.elastic.clients.elasticsearch._types.ErrorResponse;
import co.elastic.clients.elasticsearch._types.RequestBase;
import co.elastic.clients.elasticsearch._types.Script;
+import co.elastic.clients.elasticsearch._types.Slices;
import co.elastic.clients.elasticsearch._types.Time;
import co.elastic.clients.elasticsearch._types.WaitForActiveShards;
import co.elastic.clients.elasticsearch.core.reindex.Destination;
@@ -90,7 +91,7 @@ public class ReindexRequest extends RequestBase implements JsonpSerializable {
private final Long size;
@Nullable
- private final Long slices;
+ private final Slices slices;
private final Source source;
@@ -213,7 +214,7 @@ public final Long size() {
* API name: {@code slices}
*/
@Nullable
- public final Long slices() {
+ public final Slices slices() {
return this.slices;
}
@@ -331,7 +332,7 @@ public static class Builder extends WithJsonObjectBuilderBase implement
private Long size;
@Nullable
- private Long slices;
+ private Slices slices;
private Source source;
@@ -452,11 +453,21 @@ public final Builder size(@Nullable Long value) {
*
* API name: {@code slices}
*/
- public final Builder slices(@Nullable Long value) {
+ public final Builder slices(@Nullable Slices value) {
this.slices = value;
return this;
}
+ /**
+ * The number of slices this task should be divided into. Defaults to 1, meaning
+ * the task isn't sliced into subtasks. Can be set to auto
.
+ *
+ * API name: {@code slices}
+ */
+ public final Builder slices(Function> fn) {
+ return this.slices(fn.apply(new Slices.Builder()).build());
+ }
+
/**
* Required - API name: {@code source}
*/
@@ -592,7 +603,7 @@ protected static void setupReindexRequestDeserializer(ObjectDeserializer {
Map params = new HashMap<>();
if (request.slices != null) {
- params.put("slices", String.valueOf(request.slices));
+ params.put("slices", request.slices._toJsonString());
}
if (request.requestsPerSecond != null) {
params.put("requests_per_second", String.valueOf(request.requestsPerSecond));
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java
index fb9e0163e..03c810257 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java
@@ -30,6 +30,7 @@
import co.elastic.clients.elasticsearch._types.Script;
import co.elastic.clients.elasticsearch._types.SearchType;
import co.elastic.clients.elasticsearch._types.SlicedScroll;
+import co.elastic.clients.elasticsearch._types.Slices;
import co.elastic.clients.elasticsearch._types.Time;
import co.elastic.clients.elasticsearch._types.WaitForActiveShards;
import co.elastic.clients.elasticsearch._types.query_dsl.Operator;
@@ -145,7 +146,7 @@ public class UpdateByQueryRequest extends RequestBase implements JsonpSerializab
private final SlicedScroll slice;
@Nullable
- private final Long slices;
+ private final Slices slices;
private final List sort;
@@ -485,7 +486,7 @@ public final SlicedScroll slice() {
* API name: {@code slices}
*/
@Nullable
- public final Long slices() {
+ public final Slices slices() {
return this.slices;
}
@@ -710,7 +711,7 @@ public static class Builder extends WithJsonObjectBuilderBase
private SlicedScroll slice;
@Nullable
- private Long slices;
+ private Slices slices;
@Nullable
private List sort;
@@ -1077,11 +1078,21 @@ public final Builder slice(Function
* API name: {@code slices}
*/
- public final Builder slices(@Nullable Long value) {
+ public final Builder slices(@Nullable Slices value) {
this.slices = value;
return this;
}
+ /**
+ * The number of slices this task should be divided into. Defaults to 1, meaning
+ * the task isn't sliced into subtasks. Can be set to auto
.
+ *
+ * API name: {@code slices}
+ */
+ public final Builder slices(Function> fn) {
+ return this.slices(fn.apply(new Slices.Builder()).build());
+ }
+
/**
* A comma-separated list of <field>:<direction> pairs
*
@@ -1333,7 +1344,7 @@ protected static void setupUpdateByQueryRequestDeserializer(ObjectDeserializer {
Map params = new HashMap<>();
if (request.slices != null) {
- params.put("slices", String.valueOf(request.slices));
+ params.put("slices", request.slices._toJsonString());
}
if (request.df != null) {
params.put("df", request.df);
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch/MultisearchBody.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch/MultisearchBody.java
index f541bd04e..57d70a952 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch/MultisearchBody.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch/MultisearchBody.java
@@ -23,9 +23,17 @@
package co.elastic.clients.elasticsearch.core.msearch;
+import co.elastic.clients.elasticsearch._types.ScriptField;
+import co.elastic.clients.elasticsearch._types.SortOptions;
import co.elastic.clients.elasticsearch._types.aggregations.Aggregation;
+import co.elastic.clients.elasticsearch._types.mapping.RuntimeField;
+import co.elastic.clients.elasticsearch._types.query_dsl.FieldAndFormat;
import co.elastic.clients.elasticsearch._types.query_dsl.Query;
+import co.elastic.clients.elasticsearch.core.search.FieldCollapse;
+import co.elastic.clients.elasticsearch.core.search.Highlight;
import co.elastic.clients.elasticsearch.core.search.PointInTimeReference;
+import co.elastic.clients.elasticsearch.core.search.Rescore;
+import co.elastic.clients.elasticsearch.core.search.SourceConfig;
import co.elastic.clients.elasticsearch.core.search.Suggester;
import co.elastic.clients.elasticsearch.core.search.TrackHits;
import co.elastic.clients.json.JsonpDeserializable;
@@ -39,8 +47,12 @@
import co.elastic.clients.util.ObjectBuilder;
import co.elastic.clients.util.WithJsonObjectBuilderBase;
import jakarta.json.stream.JsonGenerator;
+import java.lang.Boolean;
+import java.lang.Double;
import java.lang.Integer;
+import java.lang.Long;
import java.lang.String;
+import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;
@@ -58,21 +70,77 @@
public class MultisearchBody implements JsonpSerializable {
private final Map aggregations;
+ @Nullable
+ private final FieldCollapse collapse;
+
@Nullable
private final Query query;
+ @Nullable
+ private final Boolean explain;
+
+ private final List storedFields;
+
+ private final List docvalueFields;
+
@Nullable
private final Integer from;
+ @Nullable
+ private final Highlight highlight;
+
+ private final List