diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/WriteResponseBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/WriteResponseBase.java index 428d5c38a..4cbff9266 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/WriteResponseBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/WriteResponseBase.java @@ -70,7 +70,8 @@ public abstract class WriteResponseBase implements JsonpSerializable { private final Result result; - private final long seqNo; + @Nullable + private final Long seqNo; private final ShardStatistics shards; @@ -87,7 +88,7 @@ protected WriteResponseBase(AbstractBuilder builder) { this.index = ApiTypeHelper.requireNonNull(builder.index, this, "index"); this.primaryTerm = builder.primaryTerm; this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); - this.seqNo = ApiTypeHelper.requireNonNull(builder.seqNo, this, "seqNo"); + this.seqNo = builder.seqNo; this.shards = ApiTypeHelper.requireNonNull(builder.shards, this, "shards"); this.version = ApiTypeHelper.requireNonNull(builder.version, this, "version"); this.forcedRefresh = builder.forcedRefresh; @@ -124,9 +125,10 @@ public final Result result() { } /** - * Required - API name: {@code _seq_no} + * API name: {@code _seq_no} */ - public final long seqNo() { + @Nullable + public final Long seqNo() { return this.seqNo; } @@ -176,9 +178,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } generator.writeKey("result"); this.result.serialize(generator, mapper); - generator.writeKey("_seq_no"); - generator.write(this.seqNo); + if (this.seqNo != null) { + generator.writeKey("_seq_no"); + generator.write(this.seqNo); + } generator.writeKey("_shards"); this.shards.serialize(generator, mapper); @@ -210,6 +214,7 @@ public abstract static class AbstractBuilder filters; + @Nullable + private final String separator; + // --------------------------------------------------------------------------------------------- private AdjacencyMatrixAggregation(Builder builder) { this.filters = ApiTypeHelper.unmodifiable(builder.filters); + this.separator = builder.separator; } @@ -92,6 +96,16 @@ public final Map filters() { return this.filters; } + /** + * Separator used to concatenate filter names. Defaults to &. + *

+ * API name: {@code separator} + */ + @Nullable + public final String separator() { + return this.separator; + } + /** * Serialize this object to JSON. */ @@ -114,6 +128,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeEnd(); } + if (this.separator != null) { + generator.writeKey("separator"); + generator.write(this.separator); + + } } @@ -134,6 +153,9 @@ public static class Builder extends BucketAggregationBase.AbstractBuilder filters; + @Nullable + private String separator; + /** * Filters used to create buckets. At least one filter is required. *

@@ -169,6 +191,16 @@ public final Builder filters(String key, Function + * API name: {@code separator} + */ + public final Builder separator(@Nullable String value) { + this.separator = value; + return this; + } + @Override protected Builder self() { return this; @@ -199,6 +231,7 @@ protected static void setupAdjacencyMatrixAggregationDeserializer( ObjectDeserializer op) { op.add(Builder::filters, JsonpDeserializer.stringMapDeserializer(Query._DESERIALIZER), "filters"); + op.add(Builder::separator, JsonpDeserializer.stringDeserializer(), "separator"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorProperty.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorProperty.java index ff85c4f63..200d4fc98 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorProperty.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorProperty.java @@ -58,6 +58,9 @@ */ @JsonpDeserializable public class DenseVectorProperty extends PropertyBase implements PropertyVariant { + @Nullable + private final String elementType; + @Nullable private final Integer dims; @@ -75,6 +78,7 @@ public class DenseVectorProperty extends PropertyBase implements PropertyVariant private DenseVectorProperty(Builder builder) { super(builder); + this.elementType = builder.elementType; this.dims = builder.dims; this.similarity = builder.similarity; this.index = builder.index; @@ -94,6 +98,14 @@ public Property.Kind _propertyKind() { return Property.Kind.DenseVector; } + /** + * API name: {@code element_type} + */ + @Nullable + public final String elementType() { + return this.elementType; + } + /** * API name: {@code dims} */ @@ -130,6 +142,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write("type", "dense_vector"); super.serializeInternal(generator, mapper); + if (this.elementType != null) { + generator.writeKey("element_type"); + generator.write(this.elementType); + + } if (this.dims != null) { generator.writeKey("dims"); generator.write(this.dims); @@ -162,6 +179,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { public static class Builder extends PropertyBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private String elementType; + @Nullable private Integer dims; @@ -174,6 +194,14 @@ public static class Builder extends PropertyBase.AbstractBuilder @Nullable private DenseVectorIndexOptions indexOptions; + /** + * API name: {@code element_type} + */ + public final Builder elementType(@Nullable String value) { + this.elementType = value; + return this; + } + /** * API name: {@code dims} */ @@ -242,6 +270,7 @@ public DenseVectorProperty build() { protected static void setupDenseVectorPropertyDeserializer(ObjectDeserializer op) { PropertyBase.setupPropertyBaseDeserializer(op); + op.add(Builder::elementType, JsonpDeserializer.stringDeserializer(), "element_type"); op.add(Builder::dims, JsonpDeserializer.integerDeserializer(), "dims"); op.add(Builder::similarity, JsonpDeserializer.stringDeserializer(), "similarity"); op.add(Builder::index, JsonpDeserializer.booleanDeserializer(), "index"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutComponentTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutComponentTemplateRequest.java index 479623d61..1e28d7a92 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutComponentTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutComponentTemplateRequest.java @@ -92,9 +92,6 @@ public class PutComponentTemplateRequest extends RequestBase implements JsonpSerializable { private final Map meta; - @Nullable - private final String cause; - @Nullable private final Boolean create; @@ -116,7 +113,6 @@ public class PutComponentTemplateRequest extends RequestBase implements JsonpSer private PutComponentTemplateRequest(Builder builder) { this.meta = ApiTypeHelper.unmodifiable(builder.meta); - this.cause = builder.cause; this.create = builder.create; this.deprecated = builder.deprecated; this.masterTimeout = builder.masterTimeout; @@ -142,14 +138,6 @@ public final Map meta() { return this.meta; } - /** - * API name: {@code cause} - */ - @Nullable - public final String cause() { - return this.cause; - } - /** * If true, this request cannot replace or update existing * component templates. @@ -268,9 +256,6 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private Map meta; - @Nullable - private String cause; - @Nullable private Boolean create; @@ -317,14 +302,6 @@ public final Builder meta(String key, JsonData value) { return this; } - /** - * API name: {@code cause} - */ - public final Builder cause(@Nullable String value) { - this.cause = value; - return this; - } - /** * If true, this request cannot replace or update existing * component templates. @@ -508,9 +485,6 @@ protected static void setupPutComponentTemplateRequestDeserializer( if (request.create != null) { params.put("create", String.valueOf(request.create)); } - if (request.cause != null) { - params.put("cause", request.cause); - } return params; }, SimpleEndpoint.emptyMap(), true, PutComponentTemplateResponse._DESERIALIZER); 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 742e8df76..c73314ca7 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 @@ -359,16 +359,16 @@ '_types.WktGeoBounds': '_types/Geo.ts#L150-L152', '_types.WriteResponseBase': '_types/Base.ts#L36-L45', '_types.aggregations.AdjacencyMatrixAggregate': '_types/aggregations/Aggregate.ts#L573-L575', -'_types.aggregations.AdjacencyMatrixAggregation': '_types/aggregations/bucket.ts#L55-L61', +'_types.aggregations.AdjacencyMatrixAggregation': '_types/aggregations/bucket.ts#L55-L65', '_types.aggregations.AdjacencyMatrixBucket': '_types/aggregations/Aggregate.ts#L577-L579', '_types.aggregations.Aggregate': '_types/aggregations/Aggregate.ts#L38-L123', '_types.aggregations.AggregateBase': '_types/aggregations/Aggregate.ts#L134-L136', '_types.aggregations.Aggregation': '_types/aggregations/Aggregation.ts#L20-L20', '_types.aggregations.AggregationContainer': '_types/aggregations/AggregationContainer.ts#L105-L514', -'_types.aggregations.AggregationRange': '_types/aggregations/bucket.ts#L670-L683', +'_types.aggregations.AggregationRange': '_types/aggregations/bucket.ts#L674-L687', '_types.aggregations.ArrayPercentilesItem': '_types/aggregations/Aggregate.ts#L160-L164', '_types.aggregations.AutoDateHistogramAggregate': '_types/aggregations/Aggregate.ts#L356-L360', -'_types.aggregations.AutoDateHistogramAggregation': '_types/aggregations/bucket.ts#L63-L98', +'_types.aggregations.AutoDateHistogramAggregation': '_types/aggregations/bucket.ts#L67-L102', '_types.aggregations.AverageAggregation': '_types/aggregations/metric.ts#L55-L55', '_types.aggregations.AverageBucketAggregation': '_types/aggregations/pipeline.ts#L78-L78', '_types.aggregations.AvgAggregate': '_types/aggregations/Aggregate.ts#L209-L210', @@ -387,66 +387,66 @@ '_types.aggregations.BucketSortAggregation': '_types/aggregations/pipeline.ts#L169-L190', '_types.aggregations.Buckets': '_types/aggregations/Aggregate.ts#L316-L325', '_types.aggregations.BucketsPath': '_types/aggregations/pipeline.ts#L53-L59', -'_types.aggregations.CalendarInterval': '_types/aggregations/bucket.ts#L247-L264', +'_types.aggregations.CalendarInterval': '_types/aggregations/bucket.ts#L251-L268', '_types.aggregations.CardinalityAggregate': '_types/aggregations/Aggregate.ts#L138-L141', '_types.aggregations.CardinalityAggregation': '_types/aggregations/metric.ts#L87-L99', '_types.aggregations.CardinalityExecutionMode': '_types/aggregations/metric.ts#L64-L85', -'_types.aggregations.CategorizeTextAggregation': '_types/aggregations/bucket.ts#L1036-L1100', -'_types.aggregations.CategorizeTextAnalyzer': '_types/aggregations/bucket.ts#L1102-L1105', -'_types.aggregations.ChiSquareHeuristic': '_types/aggregations/bucket.ts#L733-L742', +'_types.aggregations.CategorizeTextAggregation': '_types/aggregations/bucket.ts#L1040-L1104', +'_types.aggregations.CategorizeTextAnalyzer': '_types/aggregations/bucket.ts#L1106-L1109', +'_types.aggregations.ChiSquareHeuristic': '_types/aggregations/bucket.ts#L737-L746', '_types.aggregations.ChildrenAggregate': '_types/aggregations/Aggregate.ts#L776-L777', -'_types.aggregations.ChildrenAggregation': '_types/aggregations/bucket.ts#L109-L114', +'_types.aggregations.ChildrenAggregation': '_types/aggregations/bucket.ts#L113-L118', '_types.aggregations.CompositeAggregate': '_types/aggregations/Aggregate.ts#L618-L623', -'_types.aggregations.CompositeAggregation': '_types/aggregations/bucket.ts#L118-L134', -'_types.aggregations.CompositeAggregationBase': '_types/aggregations/bucket.ts#L155-L164', -'_types.aggregations.CompositeAggregationSource': '_types/aggregations/bucket.ts#L136-L153', +'_types.aggregations.CompositeAggregation': '_types/aggregations/bucket.ts#L122-L138', +'_types.aggregations.CompositeAggregationBase': '_types/aggregations/bucket.ts#L159-L168', +'_types.aggregations.CompositeAggregationSource': '_types/aggregations/bucket.ts#L140-L157', '_types.aggregations.CompositeBucket': '_types/aggregations/Aggregate.ts#L625-L627', -'_types.aggregations.CompositeDateHistogramAggregation': '_types/aggregations/bucket.ts#L172-L180', -'_types.aggregations.CompositeGeoTileGridAggregation': '_types/aggregations/bucket.ts#L182-L185', -'_types.aggregations.CompositeHistogramAggregation': '_types/aggregations/bucket.ts#L168-L170', -'_types.aggregations.CompositeTermsAggregation': '_types/aggregations/bucket.ts#L166-L166', +'_types.aggregations.CompositeDateHistogramAggregation': '_types/aggregations/bucket.ts#L176-L184', +'_types.aggregations.CompositeGeoTileGridAggregation': '_types/aggregations/bucket.ts#L186-L189', +'_types.aggregations.CompositeHistogramAggregation': '_types/aggregations/bucket.ts#L172-L174', +'_types.aggregations.CompositeTermsAggregation': '_types/aggregations/bucket.ts#L170-L170', '_types.aggregations.CumulativeCardinalityAggregate': '_types/aggregations/Aggregate.ts#L747-L755', '_types.aggregations.CumulativeCardinalityAggregation': '_types/aggregations/pipeline.ts#L192-L192', '_types.aggregations.CumulativeSumAggregation': '_types/aggregations/pipeline.ts#L194-L194', -'_types.aggregations.CustomCategorizeTextAnalyzer': '_types/aggregations/bucket.ts#L1107-L1111', +'_types.aggregations.CustomCategorizeTextAnalyzer': '_types/aggregations/bucket.ts#L1111-L1115', '_types.aggregations.DateHistogramAggregate': '_types/aggregations/Aggregate.ts#L348-L349', -'_types.aggregations.DateHistogramAggregation': '_types/aggregations/bucket.ts#L187-L245', +'_types.aggregations.DateHistogramAggregation': '_types/aggregations/bucket.ts#L191-L249', '_types.aggregations.DateHistogramBucket': '_types/aggregations/Aggregate.ts#L351-L354', '_types.aggregations.DateRangeAggregate': '_types/aggregations/Aggregate.ts#L543-L548', -'_types.aggregations.DateRangeAggregation': '_types/aggregations/bucket.ts#L266-L292', -'_types.aggregations.DateRangeExpression': '_types/aggregations/bucket.ts#L303-L316', +'_types.aggregations.DateRangeAggregation': '_types/aggregations/bucket.ts#L270-L296', +'_types.aggregations.DateRangeExpression': '_types/aggregations/bucket.ts#L307-L320', '_types.aggregations.DerivativeAggregate': '_types/aggregations/Aggregate.ts#L227-L231', '_types.aggregations.DerivativeAggregation': '_types/aggregations/pipeline.ts#L196-L196', -'_types.aggregations.DiversifiedSamplerAggregation': '_types/aggregations/bucket.ts#L318-L339', +'_types.aggregations.DiversifiedSamplerAggregation': '_types/aggregations/bucket.ts#L322-L343', '_types.aggregations.DoubleTermsAggregate': '_types/aggregations/Aggregate.ts#L411-L416', '_types.aggregations.DoubleTermsBucket': '_types/aggregations/Aggregate.ts#L418-L421', '_types.aggregations.EwmaModelSettings': '_types/aggregations/pipeline.ts#L267-L269', '_types.aggregations.EwmaMovingAverageAggregation': '_types/aggregations/pipeline.ts#L252-L255', -'_types.aggregations.ExtendedBounds': '_types/aggregations/bucket.ts#L487-L496', +'_types.aggregations.ExtendedBounds': '_types/aggregations/bucket.ts#L491-L500', '_types.aggregations.ExtendedStatsAggregate': '_types/aggregations/Aggregate.ts#L278-L296', '_types.aggregations.ExtendedStatsAggregation': '_types/aggregations/metric.ts#L101-L106', '_types.aggregations.ExtendedStatsBucketAggregate': '_types/aggregations/Aggregate.ts#L298-L299', '_types.aggregations.ExtendedStatsBucketAggregation': '_types/aggregations/pipeline.ts#L198-L203', -'_types.aggregations.FieldDateMath': '_types/aggregations/bucket.ts#L294-L301', +'_types.aggregations.FieldDateMath': '_types/aggregations/bucket.ts#L298-L305', '_types.aggregations.FilterAggregate': '_types/aggregations/Aggregate.ts#L495-L496', '_types.aggregations.FiltersAggregate': '_types/aggregations/Aggregate.ts#L568-L569', -'_types.aggregations.FiltersAggregation': '_types/aggregations/bucket.ts#L356-L376', +'_types.aggregations.FiltersAggregation': '_types/aggregations/bucket.ts#L360-L380', '_types.aggregations.FiltersBucket': '_types/aggregations/Aggregate.ts#L571-L571', '_types.aggregations.FormatMetricAggregationBase': '_types/aggregations/metric.ts#L47-L49', '_types.aggregations.FormattableMetricAggregation': '_types/aggregations/metric.ts#L51-L53', '_types.aggregations.FrequentItemSetsAggregate': '_types/aggregations/Aggregate.ts#L639-L640', -'_types.aggregations.FrequentItemSetsAggregation': '_types/aggregations/bucket.ts#L1158-L1182', +'_types.aggregations.FrequentItemSetsAggregation': '_types/aggregations/bucket.ts#L1162-L1186', '_types.aggregations.FrequentItemSetsBucket': '_types/aggregations/Aggregate.ts#L642-L645', -'_types.aggregations.FrequentItemSetsField': '_types/aggregations/bucket.ts#L1144-L1156', +'_types.aggregations.FrequentItemSetsField': '_types/aggregations/bucket.ts#L1148-L1160', '_types.aggregations.GapPolicy': '_types/aggregations/pipeline.ts#L61-L76', '_types.aggregations.GeoBoundsAggregate': '_types/aggregations/Aggregate.ts#L303-L306', '_types.aggregations.GeoBoundsAggregation': '_types/aggregations/metric.ts#L108-L114', '_types.aggregations.GeoCentroidAggregate': '_types/aggregations/Aggregate.ts#L308-L312', '_types.aggregations.GeoCentroidAggregation': '_types/aggregations/metric.ts#L116-L119', '_types.aggregations.GeoDistanceAggregate': '_types/aggregations/Aggregate.ts#L550-L554', -'_types.aggregations.GeoDistanceAggregation': '_types/aggregations/bucket.ts#L378-L401', +'_types.aggregations.GeoDistanceAggregation': '_types/aggregations/bucket.ts#L382-L405', '_types.aggregations.GeoHashGridAggregate': '_types/aggregations/Aggregate.ts#L506-L508', -'_types.aggregations.GeoHashGridAggregation': '_types/aggregations/bucket.ts#L403-L428', +'_types.aggregations.GeoHashGridAggregation': '_types/aggregations/bucket.ts#L407-L432', '_types.aggregations.GeoHashGridBucket': '_types/aggregations/Aggregate.ts#L510-L512', '_types.aggregations.GeoHexGridAggregate': '_types/aggregations/Aggregate.ts#L522-L523', '_types.aggregations.GeoHexGridBucket': '_types/aggregations/Aggregate.ts#L525-L527', @@ -455,17 +455,17 @@ '_types.aggregations.GeoLinePoint': '_types/aggregations/metric.ts#L155-L160', '_types.aggregations.GeoLineSort': '_types/aggregations/metric.ts#L148-L153', '_types.aggregations.GeoTileGridAggregate': '_types/aggregations/Aggregate.ts#L514-L516', -'_types.aggregations.GeoTileGridAggregation': '_types/aggregations/bucket.ts#L430-L456', +'_types.aggregations.GeoTileGridAggregation': '_types/aggregations/bucket.ts#L434-L460', '_types.aggregations.GeoTileGridBucket': '_types/aggregations/Aggregate.ts#L518-L520', -'_types.aggregations.GeohexGridAggregation': '_types/aggregations/bucket.ts#L458-L483', +'_types.aggregations.GeohexGridAggregation': '_types/aggregations/bucket.ts#L462-L487', '_types.aggregations.GlobalAggregate': '_types/aggregations/Aggregate.ts#L492-L493', -'_types.aggregations.GlobalAggregation': '_types/aggregations/bucket.ts#L485-L485', -'_types.aggregations.GoogleNormalizedDistanceHeuristic': '_types/aggregations/bucket.ts#L744-L749', +'_types.aggregations.GlobalAggregation': '_types/aggregations/bucket.ts#L489-L489', +'_types.aggregations.GoogleNormalizedDistanceHeuristic': '_types/aggregations/bucket.ts#L748-L753', '_types.aggregations.HdrMethod': '_types/aggregations/metric.ts#L216-L221', '_types.aggregations.HdrPercentileRanksAggregate': '_types/aggregations/Aggregate.ts#L169-L170', '_types.aggregations.HdrPercentilesAggregate': '_types/aggregations/Aggregate.ts#L166-L167', '_types.aggregations.HistogramAggregate': '_types/aggregations/Aggregate.ts#L340-L341', -'_types.aggregations.HistogramAggregation': '_types/aggregations/bucket.ts#L498-L544', +'_types.aggregations.HistogramAggregation': '_types/aggregations/bucket.ts#L502-L548', '_types.aggregations.HistogramBucket': '_types/aggregations/Aggregate.ts#L343-L346', '_types.aggregations.HoltLinearModelSettings': '_types/aggregations/pipeline.ts#L271-L274', '_types.aggregations.HoltMovingAverageAggregation': '_types/aggregations/pipeline.ts#L257-L260', @@ -479,11 +479,11 @@ '_types.aggregations.InferenceFeatureImportance': '_types/aggregations/Aggregate.ts#L678-L682', '_types.aggregations.InferenceTopClassEntry': '_types/aggregations/Aggregate.ts#L672-L676', '_types.aggregations.IpPrefixAggregate': '_types/aggregations/Aggregate.ts#L629-L630', -'_types.aggregations.IpPrefixAggregation': '_types/aggregations/bucket.ts#L1113-L1142', +'_types.aggregations.IpPrefixAggregation': '_types/aggregations/bucket.ts#L1117-L1146', '_types.aggregations.IpPrefixBucket': '_types/aggregations/Aggregate.ts#L632-L637', '_types.aggregations.IpRangeAggregate': '_types/aggregations/Aggregate.ts#L556-L558', -'_types.aggregations.IpRangeAggregation': '_types/aggregations/bucket.ts#L546-L555', -'_types.aggregations.IpRangeAggregationRange': '_types/aggregations/bucket.ts#L557-L570', +'_types.aggregations.IpRangeAggregation': '_types/aggregations/bucket.ts#L550-L559', +'_types.aggregations.IpRangeAggregationRange': '_types/aggregations/bucket.ts#L561-L574', '_types.aggregations.IpRangeBucket': '_types/aggregations/Aggregate.ts#L560-L564', '_types.aggregations.LinearMovingAverageAggregation': '_types/aggregations/pipeline.ts#L242-L245', '_types.aggregations.LongRareTermsAggregate': '_types/aggregations/Aggregate.ts#L431-L436', @@ -503,9 +503,9 @@ '_types.aggregations.MinAggregate': '_types/aggregations/Aggregate.ts#L197-L198', '_types.aggregations.MinAggregation': '_types/aggregations/metric.ts#L172-L172', '_types.aggregations.MinBucketAggregation': '_types/aggregations/pipeline.ts#L226-L226', -'_types.aggregations.MinimumInterval': '_types/aggregations/bucket.ts#L100-L107', +'_types.aggregations.MinimumInterval': '_types/aggregations/bucket.ts#L104-L111', '_types.aggregations.MissingAggregate': '_types/aggregations/Aggregate.ts#L483-L484', -'_types.aggregations.MissingAggregation': '_types/aggregations/bucket.ts#L572-L578', +'_types.aggregations.MissingAggregation': '_types/aggregations/bucket.ts#L576-L582', '_types.aggregations.MissingOrder': '_types/aggregations/AggregationContainer.ts#L517-L521', '_types.aggregations.MovingAverageAggregation': '_types/aggregations/pipeline.ts#L228-L234', '_types.aggregations.MovingAverageAggregationBase': '_types/aggregations/pipeline.ts#L236-L240', @@ -513,18 +513,18 @@ '_types.aggregations.MovingPercentilesAggregation': '_types/aggregations/pipeline.ts#L305-L317', '_types.aggregations.MultiBucketAggregateBase': '_types/aggregations/Aggregate.ts#L327-L329', '_types.aggregations.MultiBucketBase': '_types/aggregations/Aggregate.ts#L331-L338', -'_types.aggregations.MultiTermLookup': '_types/aggregations/bucket.ts#L622-L632', +'_types.aggregations.MultiTermLookup': '_types/aggregations/bucket.ts#L626-L636', '_types.aggregations.MultiTermsAggregate': '_types/aggregations/Aggregate.ts#L461-L463', -'_types.aggregations.MultiTermsAggregation': '_types/aggregations/bucket.ts#L580-L620', +'_types.aggregations.MultiTermsAggregation': '_types/aggregations/bucket.ts#L584-L624', '_types.aggregations.MultiTermsBucket': '_types/aggregations/Aggregate.ts#L465-L469', -'_types.aggregations.MutualInformationHeuristic': '_types/aggregations/bucket.ts#L751-L760', +'_types.aggregations.MutualInformationHeuristic': '_types/aggregations/bucket.ts#L755-L764', '_types.aggregations.NestedAggregate': '_types/aggregations/Aggregate.ts#L486-L487', -'_types.aggregations.NestedAggregation': '_types/aggregations/bucket.ts#L634-L639', +'_types.aggregations.NestedAggregation': '_types/aggregations/bucket.ts#L638-L643', '_types.aggregations.NormalizeAggregation': '_types/aggregations/pipeline.ts#L319-L324', '_types.aggregations.NormalizeMethod': '_types/aggregations/pipeline.ts#L326-L352', '_types.aggregations.ParentAggregate': '_types/aggregations/Aggregate.ts#L779-L780', -'_types.aggregations.ParentAggregation': '_types/aggregations/bucket.ts#L641-L646', -'_types.aggregations.PercentageScoreHeuristic': '_types/aggregations/bucket.ts#L762-L762', +'_types.aggregations.ParentAggregation': '_types/aggregations/bucket.ts#L645-L650', +'_types.aggregations.PercentageScoreHeuristic': '_types/aggregations/bucket.ts#L766-L766', '_types.aggregations.PercentileRanksAggregation': '_types/aggregations/metric.ts#L174-L193', '_types.aggregations.Percentiles': '_types/aggregations/Aggregate.ts#L150-L151', '_types.aggregations.PercentilesAggregateBase': '_types/aggregations/Aggregate.ts#L146-L148', @@ -533,18 +533,18 @@ '_types.aggregations.PercentilesBucketAggregation': '_types/aggregations/pipeline.ts#L354-L359', '_types.aggregations.PipelineAggregationBase': '_types/aggregations/pipeline.ts#L39-L51', '_types.aggregations.RangeAggregate': '_types/aggregations/Aggregate.ts#L531-L532', -'_types.aggregations.RangeAggregation': '_types/aggregations/bucket.ts#L648-L668', +'_types.aggregations.RangeAggregation': '_types/aggregations/bucket.ts#L652-L672', '_types.aggregations.RangeBucket': '_types/aggregations/Aggregate.ts#L534-L541', -'_types.aggregations.RareTermsAggregation': '_types/aggregations/bucket.ts#L685-L715', +'_types.aggregations.RareTermsAggregation': '_types/aggregations/bucket.ts#L689-L719', '_types.aggregations.RateAggregate': '_types/aggregations/Aggregate.ts#L741-L745', '_types.aggregations.RateAggregation': '_types/aggregations/metric.ts#L230-L241', '_types.aggregations.RateMode': '_types/aggregations/metric.ts#L243-L252', '_types.aggregations.ReverseNestedAggregate': '_types/aggregations/Aggregate.ts#L489-L490', -'_types.aggregations.ReverseNestedAggregation': '_types/aggregations/bucket.ts#L717-L723', +'_types.aggregations.ReverseNestedAggregation': '_types/aggregations/bucket.ts#L721-L727', '_types.aggregations.SamplerAggregate': '_types/aggregations/Aggregate.ts#L498-L499', -'_types.aggregations.SamplerAggregation': '_types/aggregations/bucket.ts#L725-L731', -'_types.aggregations.SamplerAggregationExecutionHint': '_types/aggregations/bucket.ts#L341-L354', -'_types.aggregations.ScriptedHeuristic': '_types/aggregations/bucket.ts#L764-L766', +'_types.aggregations.SamplerAggregation': '_types/aggregations/bucket.ts#L729-L735', +'_types.aggregations.SamplerAggregationExecutionHint': '_types/aggregations/bucket.ts#L345-L358', +'_types.aggregations.ScriptedHeuristic': '_types/aggregations/bucket.ts#L768-L770', '_types.aggregations.ScriptedMetricAggregate': '_types/aggregations/Aggregate.ts#L649-L652', '_types.aggregations.ScriptedMetricAggregation': '_types/aggregations/metric.ts#L254-L280', '_types.aggregations.SerialDifferencingAggregation': '_types/aggregations/pipeline.ts#L361-L367', @@ -553,9 +553,9 @@ '_types.aggregations.SignificantStringTermsAggregate': '_types/aggregations/Aggregate.ts#L602-L604', '_types.aggregations.SignificantStringTermsBucket': '_types/aggregations/Aggregate.ts#L606-L608', '_types.aggregations.SignificantTermsAggregateBase': '_types/aggregations/Aggregate.ts#L581-L586', -'_types.aggregations.SignificantTermsAggregation': '_types/aggregations/bucket.ts#L768-L832', +'_types.aggregations.SignificantTermsAggregation': '_types/aggregations/bucket.ts#L772-L836', '_types.aggregations.SignificantTermsBucketBase': '_types/aggregations/Aggregate.ts#L592-L595', -'_types.aggregations.SignificantTextAggregation': '_types/aggregations/bucket.ts#L834-L906', +'_types.aggregations.SignificantTextAggregation': '_types/aggregations/bucket.ts#L838-L910', '_types.aggregations.SimpleMovingAverageAggregation': '_types/aggregations/pipeline.ts#L247-L250', '_types.aggregations.SimpleValueAggregate': '_types/aggregations/Aggregate.ts#L224-L225', '_types.aggregations.SingleBucketAggregateBase': '_types/aggregations/Aggregate.ts#L473-L481', @@ -582,13 +582,13 @@ '_types.aggregations.TTestAggregation': '_types/aggregations/metric.ts#L294-L308', '_types.aggregations.TTestType': '_types/aggregations/metric.ts#L322-L335', '_types.aggregations.TermsAggregateBase': '_types/aggregations/Aggregate.ts#L377-L382', -'_types.aggregations.TermsAggregation': '_types/aggregations/bucket.ts#L908-L968', -'_types.aggregations.TermsAggregationCollectMode': '_types/aggregations/bucket.ts#L978-L987', -'_types.aggregations.TermsAggregationExecutionHint': '_types/aggregations/bucket.ts#L989-L994', +'_types.aggregations.TermsAggregation': '_types/aggregations/bucket.ts#L912-L972', +'_types.aggregations.TermsAggregationCollectMode': '_types/aggregations/bucket.ts#L982-L991', +'_types.aggregations.TermsAggregationExecutionHint': '_types/aggregations/bucket.ts#L993-L998', '_types.aggregations.TermsBucketBase': '_types/aggregations/Aggregate.ts#L391-L393', -'_types.aggregations.TermsExclude': '_types/aggregations/bucket.ts#L999-L1000', -'_types.aggregations.TermsInclude': '_types/aggregations/bucket.ts#L996-L997', -'_types.aggregations.TermsPartition': '_types/aggregations/bucket.ts#L1002-L1011', +'_types.aggregations.TermsExclude': '_types/aggregations/bucket.ts#L1003-L1004', +'_types.aggregations.TermsInclude': '_types/aggregations/bucket.ts#L1000-L1001', +'_types.aggregations.TermsPartition': '_types/aggregations/bucket.ts#L1006-L1015', '_types.aggregations.TestPopulation': '_types/aggregations/metric.ts#L310-L320', '_types.aggregations.TopHitsAggregate': '_types/aggregations/Aggregate.ts#L654-L657', '_types.aggregations.TopHitsAggregation': '_types/aggregations/metric.ts#L337-L397', @@ -604,7 +604,7 @@ '_types.aggregations.ValueCountAggregation': '_types/aggregations/metric.ts#L422-L422', '_types.aggregations.ValueType': '_types/aggregations/metric.ts#L424-L435', '_types.aggregations.VariableWidthHistogramAggregate': '_types/aggregations/Aggregate.ts#L362-L364', -'_types.aggregations.VariableWidthHistogramAggregation': '_types/aggregations/bucket.ts#L1013-L1034', +'_types.aggregations.VariableWidthHistogramAggregation': '_types/aggregations/bucket.ts#L1017-L1038', '_types.aggregations.VariableWidthHistogramBucket': '_types/aggregations/Aggregate.ts#L366-L373', '_types.aggregations.WeightedAverageAggregation': '_types/aggregations/metric.ts#L437-L451', '_types.aggregations.WeightedAverageValue': '_types/aggregations/metric.ts#L453-L463', @@ -723,7 +723,7 @@ '_types.analysis.WhitespaceTokenizer': '_types/analysis/tokenizers.ts#L115-L118', '_types.analysis.WordDelimiterGraphTokenFilter': '_types/analysis/token_filters.ts#L151-L168', '_types.analysis.WordDelimiterTokenFilter': '_types/analysis/token_filters.ts#L134-L149', -'_types.mapping.AggregateMetricDoubleProperty': '_types/mapping/complex.ts#L60-L65', +'_types.mapping.AggregateMetricDoubleProperty': '_types/mapping/complex.ts#L61-L66', '_types.mapping.AllField': '_types/mapping/meta-fields.ts#L29-L40', '_types.mapping.BinaryProperty': '_types/mapping/core.ts#L49-L51', '_types.mapping.BooleanProperty': '_types/mapping/core.ts#L53-L59', @@ -736,7 +736,7 @@ '_types.mapping.DateProperty': '_types/mapping/core.ts#L61-L71', '_types.mapping.DateRangeProperty': '_types/mapping/range.ts#L29-L32', '_types.mapping.DenseVectorIndexOptions': '_types/mapping/DenseVectorIndexOptions.ts#L22-L26', -'_types.mapping.DenseVectorProperty': '_types/mapping/complex.ts#L52-L58', +'_types.mapping.DenseVectorProperty': '_types/mapping/complex.ts#L52-L59', '_types.mapping.DocValuesPropertyBase': '_types/mapping/core.ts#L45-L47', '_types.mapping.DoubleNumberProperty': '_types/mapping/core.ts#L144-L147', '_types.mapping.DoubleRangeProperty': '_types/mapping/range.ts#L34-L36', @@ -1091,7 +1091,7 @@ 'cluster.pending_tasks.Request': 'cluster/pending_tasks/ClusterPendingTasksRequest.ts#L23-L48', 'cluster.pending_tasks.Response': 'cluster/pending_tasks/ClusterPendingTasksResponse.ts#L22-L24', 'cluster.post_voting_config_exclusions.Request': 'cluster/post_voting_config_exclusions/ClusterPostVotingConfigExclusionsRequest.ts#L24-L50', -'cluster.put_component_template.Request': 'cluster/put_component_template/ClusterPutComponentTemplateRequest.ts#L26-L96', +'cluster.put_component_template.Request': 'cluster/put_component_template/ClusterPutComponentTemplateRequest.ts#L25-L93', 'cluster.put_component_template.Response': 'cluster/put_component_template/ClusterPutComponentTemplateResponse.ts#L22-L24', 'cluster.put_settings.Request': 'cluster/put_settings/ClusterPutSettingsRequest.ts#L25-L43', 'cluster.put_settings.Response': 'cluster/put_settings/ClusterPutSettingsResponse.ts#L23-L29', @@ -1556,18 +1556,18 @@ 'ingest._types.PipelineProcessor': 'ingest/_types/Processors.ts#L928-L939', 'ingest._types.ProcessorBase': 'ingest/_types/Processors.ts#L241-L264', 'ingest._types.ProcessorContainer': 'ingest/_types/Processors.ts#L27-L239', -'ingest._types.RemoveProcessor': 'ingest/_types/Processors.ts#L941-L951', -'ingest._types.RenameProcessor': 'ingest/_types/Processors.ts#L953-L969', -'ingest._types.RerouteProcessor': 'ingest/_types/Processors.ts#L971-L999', -'ingest._types.ScriptProcessor': 'ingest/_types/Processors.ts#L1001-L1021', -'ingest._types.SetProcessor': 'ingest/_types/Processors.ts#L1023-L1057', -'ingest._types.SetSecurityUserProcessor': 'ingest/_types/Processors.ts#L1059-L1068', -'ingest._types.ShapeType': 'ingest/_types/Processors.ts#L1070-L1073', -'ingest._types.SortProcessor': 'ingest/_types/Processors.ts#L1075-L1091', -'ingest._types.SplitProcessor': 'ingest/_types/Processors.ts#L1093-L1118', -'ingest._types.TrimProcessor': 'ingest/_types/Processors.ts#L1120-L1136', -'ingest._types.UppercaseProcessor': 'ingest/_types/Processors.ts#L1138-L1154', -'ingest._types.UrlDecodeProcessor': 'ingest/_types/Processors.ts#L1156-L1172', +'ingest._types.RemoveProcessor': 'ingest/_types/Processors.ts#L941-L955', +'ingest._types.RenameProcessor': 'ingest/_types/Processors.ts#L957-L973', +'ingest._types.RerouteProcessor': 'ingest/_types/Processors.ts#L975-L1003', +'ingest._types.ScriptProcessor': 'ingest/_types/Processors.ts#L1005-L1025', +'ingest._types.SetProcessor': 'ingest/_types/Processors.ts#L1027-L1061', +'ingest._types.SetSecurityUserProcessor': 'ingest/_types/Processors.ts#L1063-L1072', +'ingest._types.ShapeType': 'ingest/_types/Processors.ts#L1074-L1077', +'ingest._types.SortProcessor': 'ingest/_types/Processors.ts#L1079-L1095', +'ingest._types.SplitProcessor': 'ingest/_types/Processors.ts#L1097-L1122', +'ingest._types.TrimProcessor': 'ingest/_types/Processors.ts#L1124-L1140', +'ingest._types.UppercaseProcessor': 'ingest/_types/Processors.ts#L1142-L1158', +'ingest._types.UrlDecodeProcessor': 'ingest/_types/Processors.ts#L1160-L1176', 'ingest._types.UserAgentProcessor': 'ingest/_types/Processors.ts#L370-L390', 'ingest._types.UserAgentProperty': 'ingest/_types/Processors.ts#L266-L277', 'ingest.delete_pipeline.Request': 'ingest/delete_pipeline/DeletePipelineRequest.ts#L24-L52', @@ -2714,10 +2714,10 @@ if (hash.length > 1) { hash = hash.substring(1); } - window.location = "https://github.com/elastic/elasticsearch-specification/tree/8d0b9be127b5ca759345e10ea9d571a7ea352b6f/specification/" + (paths[hash] || ""); + window.location = "https://github.com/elastic/elasticsearch-specification/tree/53edb7836cd4d15fc15c1341a5eb7bf9dfb5d50a/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/ingest/RemoveProcessor.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/RemoveProcessor.java index 60410b521..4d6b1ebbc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/RemoveProcessor.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/RemoveProcessor.java @@ -60,6 +60,8 @@ public class RemoveProcessor extends ProcessorBase implements ProcessorVariant { private final List field; + private final List keep; + @Nullable private final Boolean ignoreMissing; @@ -69,6 +71,7 @@ private RemoveProcessor(Builder builder) { super(builder); this.field = ApiTypeHelper.unmodifiableRequired(builder.field, this, "field"); + this.keep = ApiTypeHelper.unmodifiable(builder.keep); this.ignoreMissing = builder.ignoreMissing; } @@ -94,6 +97,16 @@ public final List field() { return this.field; } + /** + * Fields to be kept. When set, all fields other than those specified are + * removed. + *

+ * API name: {@code keep} + */ + public final List keep() { + return this.keep; + } + /** * If true and field does not exist or is * null, the processor quietly exits without modifying the @@ -118,6 +131,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } generator.writeEnd(); + } + if (ApiTypeHelper.isDefined(this.keep)) { + generator.writeKey("keep"); + generator.writeStartArray(); + for (String item0 : this.keep) { + generator.write(item0); + + } + generator.writeEnd(); + } if (this.ignoreMissing != null) { generator.writeKey("ignore_missing"); @@ -138,6 +161,9 @@ public static class Builder extends ProcessorBase.AbstractBuilder ObjectBuilder { private List field; + @Nullable + private List keep; + @Nullable private Boolean ignoreMissing; @@ -165,6 +191,32 @@ public final Builder field(String value, String... values) { return this; } + /** + * Fields to be kept. When set, all fields other than those specified are + * removed. + *

+ * API name: {@code keep} + *

+ * Adds all elements of list to keep. + */ + public final Builder keep(List list) { + this.keep = _listAddAll(this.keep, list); + return this; + } + + /** + * Fields to be kept. When set, all fields other than those specified are + * removed. + *

+ * API name: {@code keep} + *

+ * Adds one or more values to keep. + */ + public final Builder keep(String value, String... values) { + this.keep = _listAdd(this.keep, value, values); + return this; + } + /** * If true and field does not exist or is * null, the processor quietly exits without modifying the @@ -206,6 +258,7 @@ public RemoveProcessor build() { protected static void setupRemoveProcessorDeserializer(ObjectDeserializer op) { ProcessorBase.setupProcessorBaseDeserializer(op); op.add(Builder::field, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "field"); + op.add(Builder::keep, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "keep"); op.add(Builder::ignoreMissing, JsonpDeserializer.booleanDeserializer(), "ignore_missing"); } diff --git a/java-client/src/test/java/co/elastic/clients/documentation/usage/IndexingTest.java b/java-client/src/test/java/co/elastic/clients/documentation/usage/IndexingTest.java index 0ac9c45be..8d2573532 100644 --- a/java-client/src/test/java/co/elastic/clients/documentation/usage/IndexingTest.java +++ b/java-client/src/test/java/co/elastic/clients/documentation/usage/IndexingTest.java @@ -47,7 +47,7 @@ public class IndexingTest extends ModelTestCase { .id("bk-1") .version(1) .primaryTerm(1L) - .seqNo(1) + .seqNo(1L) .result(Result.Created) .shards(s -> s.total(1).successful(1).failed(0)) );