diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/KuromojiAnalyzer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/KuromojiAnalyzer.java index 1f1202ae7e..8ff279cbde 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/KuromojiAnalyzer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/KuromojiAnalyzer.java @@ -26,7 +26,6 @@ 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; @@ -60,6 +59,7 @@ */ @JsonpDeserializable public class KuromojiAnalyzer implements AnalyzerVariant, JsonpSerializable { + @Nullable private final KuromojiTokenizationMode mode; @Nullable @@ -69,7 +69,7 @@ public class KuromojiAnalyzer implements AnalyzerVariant, JsonpSerializable { private KuromojiAnalyzer(Builder builder) { - this.mode = ApiTypeHelper.requireNonNull(builder.mode, this, "mode"); + this.mode = builder.mode; this.userDictionary = builder.userDictionary; } @@ -87,8 +87,9 @@ public Analyzer.Kind _analyzerKind() { } /** - * Required - API name: {@code mode} + * API name: {@code mode} */ + @Nullable public final KuromojiTokenizationMode mode() { return this.mode; } @@ -114,8 +115,10 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write("type", "kuromoji"); - generator.writeKey("mode"); - this.mode.serialize(generator, mapper); + if (this.mode != null) { + generator.writeKey("mode"); + this.mode.serialize(generator, mapper); + } if (this.userDictionary != null) { generator.writeKey("user_dictionary"); generator.write(this.userDictionary); @@ -136,15 +139,16 @@ public String toString() { */ public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable private KuromojiTokenizationMode mode; @Nullable private String userDictionary; /** - * Required - API name: {@code mode} + * API name: {@code mode} */ - public final Builder mode(KuromojiTokenizationMode value) { + public final Builder mode(@Nullable KuromojiTokenizationMode value) { this.mode = value; return this; } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html b/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html index 1255fff13f..7eb5886ba2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html @@ -3082,10 +3082,10 @@ 'transform._types.PivotGroupByContainer': 'transform/_types/Transform.ts#L70-L78', 'transform._types.RetentionPolicy': 'transform/_types/Transform.ts#L88-L96', 'transform._types.RetentionPolicyContainer': 'transform/_types/Transform.ts#L80-L86', -'transform._types.Settings': 'transform/_types/Transform.ts#L98-L144', -'transform._types.Source': 'transform/_types/Transform.ts#L146-L165', -'transform._types.SyncContainer': 'transform/_types/Transform.ts#L169-L175', -'transform._types.TimeSync': 'transform/_types/Transform.ts#L177-L189', +'transform._types.Settings': 'transform/_types/Transform.ts#L98-L154', +'transform._types.Source': 'transform/_types/Transform.ts#L156-L175', +'transform._types.SyncContainer': 'transform/_types/Transform.ts#L179-L185', +'transform._types.TimeSync': 'transform/_types/Transform.ts#L187-L199', 'transform.delete_transform.Request': 'transform/delete_transform/DeleteTransformRequest.ts#L24-L64', 'transform.delete_transform.Response': 'transform/delete_transform/DeleteTransformResponse.ts#L22-L25', 'transform.get_transform.Request': 'transform/get_transform/GetTransformRequest.ts#L24-L84', @@ -3322,10 +3322,10 @@ if (hash.length > 1) { hash = hash.substring(1); } - window.location = "https://github.com/elastic/elasticsearch-specification/tree/32e19181074f337369c123c1b7e9518f71b8bb6b/specification/" + (paths[hash] || ""); + window.location = "https://github.com/elastic/elasticsearch-specification/tree/d4d8c79c221bc01acf5f802bc5c41632dcf6cde9/specification/" + (paths[hash] || ""); - Please see the Elasticsearch API specification. + Please see the Elasticsearch API specification. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/Settings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/Settings.java index 1be72a0fd3..920f7aa72e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/Settings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/Settings.java @@ -76,6 +76,9 @@ public class Settings implements JsonpSerializable { @Nullable private final Integer maxPageSearchSize; + @Nullable + private final Boolean usePointInTime; + @Nullable private final Boolean unattended; @@ -88,6 +91,7 @@ private Settings(Builder builder) { this.deduceMappings = builder.deduceMappings; this.docsPerSecond = builder.docsPerSecond; this.maxPageSearchSize = builder.maxPageSearchSize; + this.usePointInTime = builder.usePointInTime; this.unattended = builder.unattended; } @@ -159,6 +163,22 @@ public final Integer maxPageSearchSize() { return this.maxPageSearchSize; } + /** + * Specifies whether the transform checkpoint will use the Point In Time API + * while searching over the source index. In general, Point In Time is an + * optimization that will reduce pressure on the source index by reducing the + * amount of refreshes and merges, but it can be expensive if a large number of + * Point In Times are opened and closed for a given index. The benefits and + * impact depend on the data being searched, the ingest rate into the source + * index, and the amount of other consumers searching the same source index. + *

+ * API name: {@code use_point_in_time} + */ + @Nullable + public final Boolean usePointInTime() { + return this.usePointInTime; + } + /** * If true, the transform runs in unattended mode. In unattended * mode, the transform retries indefinitely in case of an error which means the @@ -207,6 +227,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("max_page_search_size"); generator.write(this.maxPageSearchSize); + } + if (this.usePointInTime != null) { + generator.writeKey("use_point_in_time"); + generator.write(this.usePointInTime); + } if (this.unattended != null) { generator.writeKey("unattended"); @@ -243,6 +268,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private Integer maxPageSearchSize; + @Nullable + private Boolean usePointInTime; + @Nullable private Boolean unattended; @@ -309,6 +337,22 @@ public final Builder maxPageSearchSize(@Nullable Integer value) { return this; } + /** + * Specifies whether the transform checkpoint will use the Point In Time API + * while searching over the source index. In general, Point In Time is an + * optimization that will reduce pressure on the source index by reducing the + * amount of refreshes and merges, but it can be expensive if a large number of + * Point In Times are opened and closed for a given index. The benefits and + * impact depend on the data being searched, the ingest rate into the source + * index, and the amount of other consumers searching the same source index. + *

+ * API name: {@code use_point_in_time} + */ + public final Builder usePointInTime(@Nullable Boolean value) { + this.usePointInTime = value; + return this; + } + /** * If true, the transform runs in unattended mode. In unattended * mode, the transform retries indefinitely in case of an error which means the @@ -355,6 +399,7 @@ protected static void setupSettingsDeserializer(ObjectDeserializer