diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FieldDateMath.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FieldDateMath.java index b1b6f2bde7..33c35236cd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FieldDateMath.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FieldDateMath.java @@ -32,7 +32,7 @@ import co.elastic.clients.util.TaggedUnion; import co.elastic.clients.util.TaggedUnionUtils; import jakarta.json.stream.JsonGenerator; -import java.lang.Double; +import java.lang.Long; import java.lang.Object; import java.lang.String; import java.util.Objects; @@ -143,7 +143,7 @@ public boolean isValue() { * @throws IllegalStateException * if the current variant is not of the {@code value} kind. */ - public Double value() { + public Long value() { return TaggedUnionUtils.get(this, Kind.Value); } @@ -158,7 +158,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { break; case Value : - generator.write(((Double) this._value)); + generator.write(((Long) this._value)); break; } @@ -181,7 +181,7 @@ public ObjectBuilder expr(String v) { return this; } - public ObjectBuilder value(Double v) { + public ObjectBuilder value(Long v) { this._kind = Kind.Value; this._value = v; return this; @@ -197,7 +197,7 @@ public FieldDateMath build() { private static JsonpDeserializer buildFieldDateMathDeserializer() { return new UnionDeserializer.Builder(FieldDateMath::new, false) .addMember(Kind.Expr, JsonpDeserializer.stringDeserializer()) - .addMember(Kind.Value, JsonpDeserializer.doubleDeserializer()).build(); + .addMember(Kind.Value, JsonpDeserializer.longDeserializer()).build(); } public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/FieldType.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/FieldType.java index ce69d5d9fb..f348c562c0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/FieldType.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/FieldType.java @@ -61,6 +61,8 @@ public enum FieldType implements JsonEnum { SearchAsYouType("search_as_you_type"), + Wildcard("wildcard"), + Date("date"), DateNanos("date_nanos"), diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/LongNumberRangeQuery.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/LongNumberRangeQuery.java new file mode 100644 index 0000000000..a866905250 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/LongNumberRangeQuery.java @@ -0,0 +1,164 @@ +/* + * 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.query_dsl; + +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.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Long; +import java.lang.String; +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.query_dsl.LongNumberRangeQuery + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class LongNumberRangeQuery extends RangeQueryBase implements RangeQueryVariant { + // Single key dictionary + private final String field; + + // --------------------------------------------------------------------------------------------- + + private LongNumberRangeQuery(Builder builder) { + super(builder); + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); + + } + + public static LongNumberRangeQuery of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * RangeQuery variant kind. + */ + @Override + public RangeQuery.Kind _rangeQueryKind() { + return RangeQuery.Kind.LongNumber; + } + + /** + * Required - the required field + */ + public final String field() { + return this.field; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(this.field); + + super.serializeInternal(generator, mapper); + + generator.writeEnd(); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link LongNumberRangeQuery}. + */ + + public static class Builder extends RangeQueryBase.AbstractBuilder + implements + ObjectBuilder { + private String field; + + /** + * Required - the required field + */ + public final Builder field(String value) { + this.field = value; + return this; + } + + public Builder() { + } + private Builder(LongNumberRangeQuery instance) { + + } + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link LongNumberRangeQuery}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public LongNumberRangeQuery build() { + _checkSingleUse(); + super.tSerializer(null); + + return new LongNumberRangeQuery(this); + } + } + + /** + * @return New {@link Builder} initialized with field values of this instance + */ + public Builder rebuild() { + return new Builder(this); + } + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link LongNumberRangeQuery} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, LongNumberRangeQuery::setupLongNumberRangeQueryDeserializer); + + protected static void setupLongNumberRangeQueryDeserializer(ObjectDeserializer op) { + RangeQueryBase.setupRangeQueryBaseDeserializer(op, JsonpDeserializer.longDeserializer()); + + op.setKey(Builder::field, JsonpDeserializer.stringDeserializer()); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQuery.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQuery.java index cf7240e9cd..6255c59e40 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQuery.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQuery.java @@ -85,6 +85,8 @@ public class RangeQuery public enum Kind implements JsonEnum { Date("date"), + LongNumber("long_number"), + Number("number"), Term("term"), @@ -190,6 +192,23 @@ public DateRangeQuery date() { return TaggedUnionUtils.get(this, Kind.Date); } + /** + * Is this variant instance of kind {@code long_number}? + */ + public boolean isLongNumber() { + return _kind == Kind.LongNumber; + } + + /** + * Get the {@code long_number} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code long_number} kind. + */ + public LongNumberRangeQuery longNumber() { + return TaggedUnionUtils.get(this, Kind.LongNumber); + } + /** * Is this variant instance of kind {@code number}? */ @@ -267,6 +286,17 @@ public ObjectBuilder date(Function longNumber(LongNumberRangeQuery v) { + this._kind = Kind.LongNumber; + this._value = v; + return this; + } + + public ObjectBuilder longNumber( + Function> fn) { + return this.longNumber(fn.apply(new LongNumberRangeQuery.Builder()).build()); + } + public ObjectBuilder number(NumberRangeQuery v) { this._kind = Kind.Number; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQueryBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQueryBuilders.java index 3d49c97721..62e357b343 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQueryBuilders.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQueryBuilders.java @@ -62,6 +62,25 @@ public static RangeQuery date(Function> fn) { + RangeQuery.Builder builder = new RangeQuery.Builder(); + builder.longNumber(fn.apply(new LongNumberRangeQuery.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link NumberRangeQuery number} {@code RangeQuery} * variant. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplateSummary.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplateSummary.java index 9cb227c73b..0bf4bdba78 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplateSummary.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplateSummary.java @@ -39,6 +39,7 @@ import java.lang.Long; import java.lang.String; import java.util.Map; +import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; 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 46bb79f1a4..ef28fc2023 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 @@ -869,7 +869,7 @@ '_types.mapping.FieldAliasProperty': '_types/mapping/specialized.ts#L64-L67', '_types.mapping.FieldMapping': '_types/mapping/meta-fields.ts#L24-L27', '_types.mapping.FieldNamesField': '_types/mapping/meta-fields.ts#L42-L44', -'_types.mapping.FieldType': '_types/mapping/Property.ts#L193-L242', +'_types.mapping.FieldType': '_types/mapping/Property.ts#L193-L243', '_types.mapping.FlattenedProperty': '_types/mapping/complex.ts#L26-L38', '_types.mapping.FloatNumberProperty': '_types/mapping/core.ts#L158-L161', '_types.mapping.FloatRangeProperty': '_types/mapping/range.ts#L38-L40', @@ -989,6 +989,7 @@ '_types.query_dsl.IntervalsWildcard': '_types/query_dsl/fulltext.ts#L319-L334', '_types.query_dsl.Like': '_types/query_dsl/specialized.ts#L198-L203', '_types.query_dsl.LikeDocument': '_types/query_dsl/specialized.ts#L174-L196', +'_types.query_dsl.LongNumberRangeQuery': '_types/query_dsl/term.ts#L174-L174', '_types.query_dsl.MatchAllQuery': '_types/query_dsl/MatchAllQuery.ts#L22-L25', '_types.query_dsl.MatchBoolPrefixQuery': '_types/query_dsl/fulltext.ts#L406-L463', '_types.query_dsl.MatchNoneQuery': '_types/query_dsl/MatchNoneQuery.ts#L22-L25', @@ -1011,16 +1012,16 @@ '_types.query_dsl.QueryContainer': '_types/query_dsl/abstractions.ts#L103-L434', '_types.query_dsl.QueryStringQuery': '_types/query_dsl/fulltext.ts#L649-L772', '_types.query_dsl.RandomScoreFunction': '_types/query_dsl/compound.ts#L144-L147', -'_types.query_dsl.RangeQuery': '_types/query_dsl/term.ts#L176-L186', +'_types.query_dsl.RangeQuery': '_types/query_dsl/term.ts#L178-L189', '_types.query_dsl.RangeQueryBase': '_types/query_dsl/term.ts#L122-L148', -'_types.query_dsl.RangeRelation': '_types/query_dsl/term.ts#L188-L201', +'_types.query_dsl.RangeRelation': '_types/query_dsl/term.ts#L191-L204', '_types.query_dsl.RankFeatureFunction': '_types/query_dsl/specialized.ts#L280-L280', '_types.query_dsl.RankFeatureFunctionLinear': '_types/query_dsl/specialized.ts#L282-L282', '_types.query_dsl.RankFeatureFunctionLogarithm': '_types/query_dsl/specialized.ts#L284-L289', '_types.query_dsl.RankFeatureFunctionSaturation': '_types/query_dsl/specialized.ts#L291-L296', '_types.query_dsl.RankFeatureFunctionSigmoid': '_types/query_dsl/specialized.ts#L298-L307', '_types.query_dsl.RankFeatureQuery': '_types/query_dsl/specialized.ts#L309-L335', -'_types.query_dsl.RegexpQuery': '_types/query_dsl/term.ts#L203-L236', +'_types.query_dsl.RegexpQuery': '_types/query_dsl/term.ts#L206-L239', '_types.query_dsl.RuleQuery': '_types/query_dsl/specialized.ts#L398-L406', '_types.query_dsl.ScriptQuery': '_types/query_dsl/specialized.ts#L337-L346', '_types.query_dsl.ScriptScoreFunction': '_types/query_dsl/compound.ts#L137-L142', @@ -1041,20 +1042,20 @@ '_types.query_dsl.SpanTermQuery': '_types/query_dsl/span.ts#L134-L140', '_types.query_dsl.SpanWithinQuery': '_types/query_dsl/span.ts#L142-L156', '_types.query_dsl.SparseVectorQuery': '_types/query_dsl/SparseVectorQuery.ts#L26-L80', -'_types.query_dsl.TermQuery': '_types/query_dsl/term.ts#L238-L255', -'_types.query_dsl.TermRangeQuery': '_types/query_dsl/term.ts#L174-L174', -'_types.query_dsl.TermsLookup': '_types/query_dsl/term.ts#L270-L275', -'_types.query_dsl.TermsQuery': '_types/query_dsl/term.ts#L257-L263', -'_types.query_dsl.TermsQueryField': '_types/query_dsl/term.ts#L265-L268', -'_types.query_dsl.TermsSetQuery': '_types/query_dsl/term.ts#L277-L299', +'_types.query_dsl.TermQuery': '_types/query_dsl/term.ts#L241-L258', +'_types.query_dsl.TermRangeQuery': '_types/query_dsl/term.ts#L176-L176', +'_types.query_dsl.TermsLookup': '_types/query_dsl/term.ts#L273-L278', +'_types.query_dsl.TermsQuery': '_types/query_dsl/term.ts#L260-L266', +'_types.query_dsl.TermsQueryField': '_types/query_dsl/term.ts#L268-L271', +'_types.query_dsl.TermsSetQuery': '_types/query_dsl/term.ts#L280-L302', '_types.query_dsl.TextExpansionQuery': '_types/query_dsl/TextExpansionQuery.ts#L23-L36', '_types.query_dsl.TextQueryType': '_types/query_dsl/fulltext.ts#L610-L636', -'_types.query_dsl.TypeQuery': '_types/query_dsl/term.ts#L301-L303', +'_types.query_dsl.TypeQuery': '_types/query_dsl/term.ts#L304-L306', '_types.query_dsl.UntypedDecayFunction': '_types/query_dsl/compound.ts#L204-L207', '_types.query_dsl.UntypedDistanceFeatureQuery': '_types/query_dsl/specialized.ts#L61-L64', '_types.query_dsl.UntypedRangeQuery': '_types/query_dsl/term.ts#L150-L159', '_types.query_dsl.WeightedTokensQuery': '_types/query_dsl/WeightedTokensQuery.ts#L25-L33', -'_types.query_dsl.WildcardQuery': '_types/query_dsl/term.ts#L305-L325', +'_types.query_dsl.WildcardQuery': '_types/query_dsl/term.ts#L308-L328', '_types.query_dsl.WrapperQuery': '_types/query_dsl/abstractions.ts#L508-L517', '_types.query_dsl.ZeroTermsQuery': '_types/query_dsl/fulltext.ts#L638-L647', 'async_search._types.AsyncSearch': 'async_search/_types/AsyncSearch.ts#L30-L56', @@ -3132,10 +3133,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-L166', -'transform._types.Source': 'transform/_types/Transform.ts#L168-L187', -'transform._types.SyncContainer': 'transform/_types/Transform.ts#L191-L197', -'transform._types.TimeSync': 'transform/_types/Transform.ts#L199-L211', +'transform._types.Settings': 'transform/_types/Transform.ts#L98-L165', +'transform._types.Source': 'transform/_types/Transform.ts#L167-L186', +'transform._types.SyncContainer': 'transform/_types/Transform.ts#L190-L196', +'transform._types.TimeSync': 'transform/_types/Transform.ts#L198-L210', 'transform.delete_transform.Request': 'transform/delete_transform/DeleteTransformRequest.ts#L24-L65', 'transform.delete_transform.Response': 'transform/delete_transform/DeleteTransformResponse.ts#L22-L24', 'transform.get_node_stats.Request': 'transform/get_node_stats/GetNodeStatsRequest.ts#L23-L40', @@ -3378,10 +3379,10 @@ if (hash.length > 1) { hash = hash.substring(1); } - window.location = "https://github.com/elastic/elasticsearch-specification/tree/6ee016a765be615b0205fc209d3d3c515044689d/specification/" + (paths[hash] || ""); + window.location = "https://github.com/elastic/elasticsearch-specification/tree/fb6b5c55b2fdb0dd963d8902a0c7c427a2653371/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/indices/IndexTemplateSummary.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexTemplateSummary.java index 0e3eb1c972..9af51a801e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexTemplateSummary.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexTemplateSummary.java @@ -33,6 +33,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Map; +import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; 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 05bb5b7313..5f46e5cb82 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 @@ -158,7 +158,9 @@ public final Float docsPerSecond() { * Defines the initial page size to use for the composite aggregation for each * checkpoint. If circuit breaker exceptions occur, the page size is dynamically * adjusted to a lower value. The minimum value is 10 and the - * maximum is 65,536. + * maximum is 65,536. The default value is 500 for + * pivot transforms and 5000 for latest + * transforms. *

* API name: {@code max_page_search_size} */ @@ -370,7 +372,9 @@ public final Builder docsPerSecond(@Nullable Float value) { * Defines the initial page size to use for the composite aggregation for each * checkpoint. If circuit breaker exceptions occur, the page size is dynamically * adjusted to a lower value. The minimum value is 10 and the - * maximum is 65,536. + * maximum is 65,536. The default value is 500 for + * pivot transforms and 5000 for latest + * transforms. *

* API name: {@code max_page_search_size} */