diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index 54b114ee0d..ade08b7f0b 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -177,7 +177,7 @@ signing { dependencies { // Compile and test with the last 7.x version to make sure transition scenarios where // the Java API client coexists with a 7.x HLRC work fine - val elasticsearchVersion = "8.19.0" + val elasticsearchVersion = "8.19.18" val jacksonVersion = "2.17.0" val openTelemetryVersion = "1.29.0" val jackson3Version = "3.0.0" diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/TextIndexPrefixes.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/TextIndexPrefixes.java index 1802423738..7dc1a8c21b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/TextIndexPrefixes.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/TextIndexPrefixes.java @@ -26,13 +26,13 @@ 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.Integer; import java.util.Objects; import java.util.function.Function; +import javax.annotation.Nullable; //---------------------------------------------------------------- // THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. @@ -59,16 +59,18 @@ */ @JsonpDeserializable public class TextIndexPrefixes implements JsonpSerializable { - private final int maxChars; + @Nullable + private final Integer maxChars; - private final int minChars; + @Nullable + private final Integer minChars; // --------------------------------------------------------------------------------------------- private TextIndexPrefixes(Builder builder) { - this.maxChars = ApiTypeHelper.requireNonNull(builder.maxChars, this, "maxChars", 0); - this.minChars = ApiTypeHelper.requireNonNull(builder.minChars, this, "minChars", 0); + this.maxChars = builder.maxChars; + this.minChars = builder.minChars; } @@ -77,16 +79,18 @@ public static TextIndexPrefixes of(Function implements ObjectBuilder { + @Nullable private Integer maxChars; + @Nullable private Integer minChars; public Builder() { @@ -133,17 +144,17 @@ private Builder(TextIndexPrefixes instance) { } /** - * Required - API name: {@code max_chars} + * API name: {@code max_chars} */ - public final Builder maxChars(int value) { + public final Builder maxChars(@Nullable Integer value) { this.maxChars = value; return this; } /** - * Required - API name: {@code min_chars} + * API name: {@code min_chars} */ - public final Builder minChars(int value) { + public final Builder minChars(@Nullable Integer value) { this.minChars = value; return this; } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SourceConfig.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SourceConfig.java index c4053b4068..bda8571bfc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SourceConfig.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SourceConfig.java @@ -186,20 +186,23 @@ public SourceConfig build() { public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer .lazy(() -> JsonpDeserializer.of(EnumSet.of(JsonParser.Event.START_OBJECT, JsonParser.Event.START_ARRAY, JsonParser.Event.VALUE_TRUE, JsonParser.Event.VALUE_FALSE), (parser, mapper, event) -> { - return switch (event) { - case VALUE_TRUE -> SourceConfig.of(b -> b.fetch(true)); - case VALUE_FALSE -> SourceConfig.of(b -> b.fetch(false)); - case START_ARRAY -> { - List includes = JsonpDeserializer - .arrayDeserializer(JsonpDeserializer.stringDeserializer()) - .deserialize(parser, mapper, event); - yield SourceConfig.of(b -> b.filter(f -> f.includes(includes))); - } - case START_OBJECT -> { - SourceFilter filter = SourceFilter._DESERIALIZER.deserialize(parser, mapper, event); - yield SourceConfig.of(b -> b.filter(filter)); - } - default -> null; - }; - })); + switch (event) { + case VALUE_TRUE : + return SourceConfig.of(b -> b.fetch(true)); + case VALUE_FALSE : + return SourceConfig.of(b -> b.fetch(false)); + case START_ARRAY : { + List includes = JsonpDeserializer + .arrayDeserializer(JsonpDeserializer.stringDeserializer()) + .deserialize(parser, mapper, event); + return SourceConfig.of(b -> b.filter(f -> f.includes(includes))); + } + case START_OBJECT : { + SourceFilter filter = SourceFilter._DESERIALIZER.deserialize(parser, mapper, event); + return SourceConfig.of(b -> b.filter(filter)); + } + default : + return null; + } + })); } 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 2e2c94b82b..093456d44e 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 @@ -3381,10 +3381,10 @@ if (hash.length > 1) { hash = hash.substring(1); } - window.location = "https://github.com/elastic/elasticsearch-specification/tree/7519af4b0af73ca3853a06b148d0951e21e0ca37/specification/" + (paths[hash] || ""); + window.location = "https://github.com/elastic/elasticsearch-specification/tree/2c64e145d46f8357f9333ce632b7d7a894e05865/specification/" + (paths[hash] || ""); - Please see the Elasticsearch API specification. + Please see the Elasticsearch API specification.