diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/FlattenedProperty.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/FlattenedProperty.java
index 781d5aeae4..b8749024c1 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/FlattenedProperty.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/FlattenedProperty.java
@@ -82,6 +82,9 @@ public class FlattenedProperty extends PropertyBase implements PropertyVariant {
@Nullable
private final String nullValue;
+ @Nullable
+ private final PreserveLeafArrays preserveLeafArrays;
+
@Nullable
private final String similarity;
@@ -102,6 +105,7 @@ private FlattenedProperty(Builder builder) {
this.index = builder.index;
this.indexOptions = builder.indexOptions;
this.nullValue = builder.nullValue;
+ this.preserveLeafArrays = builder.preserveLeafArrays;
this.similarity = builder.similarity;
this.splitQueriesOnWhitespace = builder.splitQueriesOnWhitespace;
this.timeSeriesDimensions = ApiTypeHelper.unmodifiable(builder.timeSeriesDimensions);
@@ -176,6 +180,19 @@ public final String nullValue() {
return this.nullValue;
}
+ /**
+ * How leaf arrays are represented in synthetic source. When set to
+ * lossy, leaf arrays are sorted, de-nulled, and deduplicated in
+ * the returned synthetic source. When set to exact, leaf arrays
+ * preserve order, nulls, and duplicates.
+ *
+ * API name: {@code preserve_leaf_arrays}
+ */
+ @Nullable
+ public final PreserveLeafArrays preserveLeafArrays() {
+ return this.preserveLeafArrays;
+ }
+
/**
* API name: {@code similarity}
*/
@@ -237,6 +254,10 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.write(this.nullValue);
}
+ if (this.preserveLeafArrays != null) {
+ generator.writeKey("preserve_leaf_arrays");
+ this.preserveLeafArrays.serialize(generator, mapper);
+ }
if (this.similarity != null) {
generator.writeKey("similarity");
generator.write(this.similarity);
@@ -290,6 +311,9 @@ public static class Builder extends PropertyBase.AbstractBuilder
@Nullable
private String nullValue;
+ @Nullable
+ private PreserveLeafArrays preserveLeafArrays;
+
@Nullable
private String similarity;
@@ -309,6 +333,7 @@ private Builder(FlattenedProperty instance) {
this.index = instance.index;
this.indexOptions = instance.indexOptions;
this.nullValue = instance.nullValue;
+ this.preserveLeafArrays = instance.preserveLeafArrays;
this.similarity = instance.similarity;
this.splitQueriesOnWhitespace = instance.splitQueriesOnWhitespace;
this.timeSeriesDimensions = instance.timeSeriesDimensions;
@@ -370,6 +395,19 @@ public final Builder nullValue(@Nullable String value) {
return this;
}
+ /**
+ * How leaf arrays are represented in synthetic source. When set to
+ * lossy, leaf arrays are sorted, de-nulled, and deduplicated in
+ * the returned synthetic source. When set to exact, leaf arrays
+ * preserve order, nulls, and duplicates.
+ *
+ * API name: {@code preserve_leaf_arrays}
+ */
+ public final Builder preserveLeafArrays(@Nullable PreserveLeafArrays value) {
+ this.preserveLeafArrays = value;
+ return this;
+ }
+
/**
* API name: {@code similarity}
*/
@@ -447,6 +485,7 @@ protected static void setupFlattenedPropertyDeserializer(ObjectDeserializerAPI
+ * specification
+ */
+@JsonpDeserializable
+public enum PreserveLeafArrays implements JsonEnum {
+ Lossy("lossy"),
+
+ Exact("exact"),
+
+ ;
+
+ private final String jsonValue;
+
+ PreserveLeafArrays(String jsonValue) {
+ this.jsonValue = jsonValue;
+ }
+
+ public String jsonValue() {
+ return this.jsonValue;
+ }
+
+ public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(
+ PreserveLeafArrays.values());
+}
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RuntimeField.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RuntimeField.java
index 0f3a7b1518..59508b445f 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RuntimeField.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RuntimeField.java
@@ -81,6 +81,9 @@ public class RuntimeField implements DynamicTemplateVariant, JsonpSerializable {
@Nullable
private final Script script;
+ @Nullable
+ private final OnScriptError onScriptError;
+
private final RuntimeFieldType type;
// ---------------------------------------------------------------------------------------------
@@ -94,6 +97,7 @@ private RuntimeField(Builder builder) {
this.targetField = builder.targetField;
this.targetIndex = builder.targetIndex;
this.script = builder.script;
+ this.onScriptError = builder.onScriptError;
this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type");
}
@@ -178,6 +182,14 @@ public final Script script() {
return this.script;
}
+ /**
+ * API name: {@code on_script_error}
+ */
+ @Nullable
+ public final OnScriptError onScriptError() {
+ return this.onScriptError;
+ }
+
/**
* Required - Field type, which can be: boolean,
* composite, date, double,
@@ -247,6 +259,10 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
this.script.serialize(generator, mapper);
}
+ if (this.onScriptError != null) {
+ generator.writeKey("on_script_error");
+ this.onScriptError.serialize(generator, mapper);
+ }
generator.writeKey("type");
this.type.serialize(generator, mapper);
@@ -285,6 +301,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement
@Nullable
private Script script;
+ @Nullable
+ private OnScriptError onScriptError;
+
private RuntimeFieldType type;
public Builder() {
@@ -297,6 +316,7 @@ private Builder(RuntimeField instance) {
this.targetField = instance.targetField;
this.targetIndex = instance.targetIndex;
this.script = instance.script;
+ this.onScriptError = instance.onScriptError;
this.type = instance.type;
}
@@ -431,6 +451,14 @@ 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;
+ }
+
/**
* Required - Field type, which can be: boolean,
* composite, date, double,
@@ -486,6 +514,7 @@ protected static void setupRuntimeFieldDeserializer(ObjectDeserializer 1) {
hash = hash.substring(1);
}
- window.location = "https://github.com/elastic/elasticsearch-specification/tree/22c7eb88e9919e130aa40d86bf0dccd5de355673/specification/" + (paths[hash] || "");
+ window.location = "https://github.com/elastic/elasticsearch-specification/tree/76ba95c939b3564233489ad5e45596c936997853/specification/" + (paths[hash] || "");
- Please see the Elasticsearch API specification.
+ Please see the Elasticsearch API specification.