diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterStatistics.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterStatistics.java index 7c730fdfd..58dcc2bda 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterStatistics.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterStatistics.java @@ -35,8 +35,11 @@ import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; +import java.lang.String; +import java.util.Map; import java.util.Objects; import java.util.function.Function; +import javax.annotation.Nullable; // typedef: _types.ClusterStatistics @@ -53,6 +56,14 @@ public class ClusterStatistics implements JsonpSerializable { private final int total; + private final int running; + + private final int partial; + + private final int failed; + + private final Map details; + // --------------------------------------------------------------------------------------------- private ClusterStatistics(Builder builder) { @@ -60,6 +71,10 @@ private ClusterStatistics(Builder builder) { this.skipped = ApiTypeHelper.requireNonNull(builder.skipped, this, "skipped"); this.successful = ApiTypeHelper.requireNonNull(builder.successful, this, "successful"); this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total"); + this.running = ApiTypeHelper.requireNonNull(builder.running, this, "running"); + this.partial = ApiTypeHelper.requireNonNull(builder.partial, this, "partial"); + this.failed = ApiTypeHelper.requireNonNull(builder.failed, this, "failed"); + this.details = ApiTypeHelper.unmodifiable(builder.details); } @@ -88,6 +103,34 @@ public final int total() { return this.total; } + /** + * Required - API name: {@code running} + */ + public final int running() { + return this.running; + } + + /** + * Required - API name: {@code partial} + */ + public final int partial() { + return this.partial; + } + + /** + * Required - API name: {@code failed} + */ + public final int failed() { + return this.failed; + } + + /** + * API name: {@code details} + */ + public final Map details() { + return this.details; + } + /** * Serialize this object to JSON. */ @@ -108,6 +151,27 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("total"); generator.write(this.total); + generator.writeKey("running"); + generator.write(this.running); + + generator.writeKey("partial"); + generator.write(this.partial); + + generator.writeKey("failed"); + generator.write(this.failed); + + if (ApiTypeHelper.isDefined(this.details)) { + generator.writeKey("details"); + generator.writeStartObject(); + for (Map.Entry item0 : this.details.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + } @Override @@ -128,6 +192,15 @@ public static class Builder extends WithJsonObjectBuilderBase implement private Integer total; + private Integer running; + + private Integer partial; + + private Integer failed; + + @Nullable + private Map details; + /** * Required - API name: {@code skipped} */ @@ -152,6 +225,59 @@ public final Builder total(int value) { return this; } + /** + * Required - API name: {@code running} + */ + public final Builder running(int value) { + this.running = value; + return this; + } + + /** + * Required - API name: {@code partial} + */ + public final Builder partial(int value) { + this.partial = value; + return this; + } + + /** + * Required - API name: {@code failed} + */ + public final Builder failed(int value) { + this.failed = value; + return this; + } + + /** + * API name: {@code details} + *

+ * Adds all entries of map to details. + */ + public final Builder details(Map map) { + this.details = _mapPutAll(this.details, map); + return this; + } + + /** + * API name: {@code details} + *

+ * Adds an entry to details. + */ + public final Builder details(String key, ClusterDetails value) { + this.details = _mapPut(this.details, key, value); + return this; + } + + /** + * API name: {@code details} + *

+ * Adds an entry to details using a builder lambda. + */ + public final Builder details(String key, Function> fn) { + return details(key, fn.apply(new ClusterDetails.Builder()).build()); + } + @Override protected Builder self() { return this; @@ -183,6 +309,10 @@ protected static void setupClusterStatisticsDeserializer(ObjectDeserializer filter; + @Nullable + private final Float similarity; + // --------------------------------------------------------------------------------------------- private KnnQuery(Builder builder) { @@ -79,6 +82,7 @@ private KnnQuery(Builder builder) { this.numCandidates = ApiTypeHelper.requireNonNull(builder.numCandidates, this, "numCandidates"); this.boost = builder.boost; this.filter = ApiTypeHelper.unmodifiable(builder.filter); + this.similarity = builder.similarity; } @@ -152,6 +156,16 @@ public final List filter() { return this.filter; } + /** + * The minimum similarity for a vector to be considered a match + *

+ * API name: {@code similarity} + */ + @Nullable + public final Float similarity() { + return this.similarity; + } + /** * Serialize this object to JSON. */ @@ -202,6 +216,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeEnd(); } + if (this.similarity != null) { + generator.writeKey("similarity"); + generator.write(this.similarity); + + } } @@ -235,6 +254,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private List filter; + @Nullable + private Float similarity; + /** * Required - The name of the vector field to search against *

@@ -356,6 +378,16 @@ public final Builder filter(Function> fn) { return filter(fn.apply(new Query.Builder()).build()); } + /** + * The minimum similarity for a vector to be considered a match + *

+ * API name: {@code similarity} + */ + public final Builder similarity(@Nullable Float value) { + this.similarity = value; + return this; + } + @Override protected Builder self() { return this; @@ -392,6 +424,7 @@ protected static void setupKnnQueryDeserializer(ObjectDeserializer exclude; + @Nullable + private final TermsExclude exclude; - private final List include; + @Nullable + private final TermsInclude include; // --------------------------------------------------------------------------------------------- private FrequentItemSetsField(Builder builder) { this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); - this.exclude = ApiTypeHelper.unmodifiable(builder.exclude); - this.include = ApiTypeHelper.unmodifiable(builder.include); + this.exclude = builder.exclude; + this.include = builder.include; } @@ -83,7 +84,8 @@ public final String field() { *

* API name: {@code exclude} */ - public final List exclude() { + @Nullable + public final TermsExclude exclude() { return this.exclude; } @@ -93,7 +95,8 @@ public final List exclude() { *

* API name: {@code include} */ - public final List include() { + @Nullable + public final TermsInclude include() { return this.include; } @@ -111,24 +114,14 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("field"); generator.write(this.field); - if (ApiTypeHelper.isDefined(this.exclude)) { + if (this.exclude != null) { generator.writeKey("exclude"); - generator.writeStartArray(); - for (String item0 : this.exclude) { - generator.write(item0); - - } - generator.writeEnd(); + this.exclude.serialize(generator, mapper); } - if (ApiTypeHelper.isDefined(this.include)) { + if (this.include != null) { generator.writeKey("include"); - generator.writeStartArray(); - for (String item0 : this.include) { - generator.write(item0); - - } - generator.writeEnd(); + this.include.serialize(generator, mapper); } @@ -151,10 +144,10 @@ public static class Builder extends WithJsonObjectBuilderBase private String field; @Nullable - private List exclude; + private TermsExclude exclude; @Nullable - private List include; + private TermsInclude include; /** * Required - API name: {@code field} @@ -169,11 +162,9 @@ public final Builder field(String value) { * exact terms. *

* API name: {@code exclude} - *

- * Adds all elements of list to exclude. */ - public final Builder exclude(List list) { - this.exclude = _listAddAll(this.exclude, list); + public final Builder exclude(@Nullable TermsExclude value) { + this.exclude = value; return this; } @@ -182,12 +173,9 @@ public final Builder exclude(List list) { * exact terms. *

* API name: {@code exclude} - *

- * Adds one or more values to exclude. */ - public final Builder exclude(String value, String... values) { - this.exclude = _listAdd(this.exclude, value, values); - return this; + public final Builder exclude(Function> fn) { + return this.exclude(fn.apply(new TermsExclude.Builder()).build()); } /** @@ -195,11 +183,9 @@ public final Builder exclude(String value, String... values) { * exact terms. *

* API name: {@code include} - *

- * Adds all elements of list to include. */ - public final Builder include(List list) { - this.include = _listAddAll(this.include, list); + public final Builder include(@Nullable TermsInclude value) { + this.include = value; return this; } @@ -208,12 +194,9 @@ public final Builder include(List list) { * exact terms. *

* API name: {@code include} - *

- * Adds one or more values to include. */ - public final Builder include(String value, String... values) { - this.include = _listAdd(this.include, value, values); - return this; + public final Builder include(Function> fn) { + return this.include(fn.apply(new TermsInclude.Builder()).build()); } @Override @@ -245,10 +228,8 @@ public FrequentItemSetsField build() { protected static void setupFrequentItemSetsFieldDeserializer(ObjectDeserializer op) { op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field"); - op.add(Builder::exclude, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), - "exclude"); - op.add(Builder::include, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), - "include"); + op.add(Builder::exclude, TermsExclude._DESERIALIZER, "exclude"); + op.add(Builder::include, TermsInclude._DESERIALIZER, "include"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SignificantTextAggregation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SignificantTextAggregation.java index cbc22532b..d20b0adc6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SignificantTextAggregation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SignificantTextAggregation.java @@ -73,7 +73,8 @@ public class SignificantTextAggregation extends BucketAggregationBase implements @Nullable private final GoogleNormalizedDistanceHeuristic gnd; - private final List include; + @Nullable + private final TermsInclude include; @Nullable private final EmptyObject jlh; @@ -113,7 +114,7 @@ private SignificantTextAggregation(Builder builder) { this.field = builder.field; this.filterDuplicateText = builder.filterDuplicateText; this.gnd = builder.gnd; - this.include = ApiTypeHelper.unmodifiable(builder.include); + this.include = builder.include; this.jlh = builder.jlh; this.minDocCount = builder.minDocCount; this.mutualInformation = builder.mutualInformation; @@ -217,7 +218,8 @@ public final GoogleNormalizedDistanceHeuristic gnd() { *

* API name: {@code include} */ - public final List include() { + @Nullable + public final TermsInclude include() { return this.include; } @@ -356,14 +358,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { this.gnd.serialize(generator, mapper); } - if (ApiTypeHelper.isDefined(this.include)) { + if (this.include != null) { generator.writeKey("include"); - generator.writeStartArray(); - for (String item0 : this.include) { - generator.write(item0); - - } - generator.writeEnd(); + this.include.serialize(generator, mapper); } if (this.jlh != null) { @@ -450,7 +447,7 @@ public static class Builder extends BucketAggregationBase.AbstractBuilder include; + private TermsInclude include; @Nullable private EmptyObject jlh; @@ -597,11 +594,9 @@ public final Builder gnd( * Values to include. *

* API name: {@code include} - *

- * Adds all elements of list to include. */ - public final Builder include(List list) { - this.include = _listAddAll(this.include, list); + public final Builder include(@Nullable TermsInclude value) { + this.include = value; return this; } @@ -609,12 +604,9 @@ public final Builder include(List list) { * Values to include. *

* API name: {@code include} - *

- * Adds one or more values to include. */ - public final Builder include(String value, String... values) { - this.include = _listAdd(this.include, value, values); - return this; + public final Builder include(Function> fn) { + return this.include(fn.apply(new TermsInclude.Builder()).build()); } /** @@ -807,8 +799,7 @@ protected static void setupSignificantTextAggregationDeserializer( op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field"); op.add(Builder::filterDuplicateText, JsonpDeserializer.booleanDeserializer(), "filter_duplicate_text"); op.add(Builder::gnd, GoogleNormalizedDistanceHeuristic._DESERIALIZER, "gnd"); - op.add(Builder::include, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), - "include"); + op.add(Builder::include, TermsInclude._DESERIALIZER, "include"); op.add(Builder::jlh, EmptyObject._DESERIALIZER, "jlh"); op.add(Builder::minDocCount, JsonpDeserializer.longDeserializer(), "min_doc_count"); op.add(Builder::mutualInformation, MutualInformationHeuristic._DESERIALIZER, "mutual_information"); 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 092eff417..10a8e77f5 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 @@ -116,6 +116,8 @@ public enum FieldType implements JsonEnum { DenseVector("dense_vector"), + SparseVector("sparse_vector"), + MatchOnlyText("match_only_text"), ; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/SimpleQueryStringFlags.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/SimpleQueryStringFlags.java deleted file mode 100644 index c28ca93b2..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/SimpleQueryStringFlags.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * 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. - */ - -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - -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.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.json.UnionDeserializer; -import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; -import co.elastic.clients.util.TaggedUnion; -import co.elastic.clients.util.TaggedUnionUtils; -import jakarta.json.stream.JsonGenerator; -import java.lang.Object; -import java.lang.String; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -// typedef: _types.query_dsl.SimpleQueryStringFlags - -/** - * Query flags can be either a single flag or a combination of flags, e.g. - * OR|AND|PREFIX - * - * @see Documentation - * on elastic.co - * @see API - * specification - */ -@JsonpDeserializable -public class SimpleQueryStringFlags implements TaggedUnion, JsonpSerializable { - - public enum Kind { - Single, Multiple - - } - - private final Kind _kind; - private final Object _value; - - @Override - public final Kind _kind() { - return _kind; - } - - @Override - public final Object _get() { - return _value; - } - - private SimpleQueryStringFlags(Kind kind, Object value) { - this._kind = kind; - this._value = value; - } - - public String _toJsonString() { - switch (_kind) { - case Single : - return this.single().jsonValue(); - case Multiple : - return this.multiple(); - - default : - throw new IllegalStateException("Unknown kind " + _kind); - } - } - - private SimpleQueryStringFlags(Builder builder) { - - this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); - this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); - - } - - public static SimpleQueryStringFlags of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Is this variant instance of kind {@code single}? - */ - public boolean isSingle() { - return _kind == Kind.Single; - } - - /** - * Get the {@code single} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code single} kind. - */ - public SimpleQueryStringFlag single() { - return TaggedUnionUtils.get(this, Kind.Single); - } - - /** - * Is this variant instance of kind {@code multiple}? - */ - public boolean isMultiple() { - return _kind == Kind.Multiple; - } - - /** - * Get the {@code multiple} variant value. - * - * @throws IllegalStateException - * if the current variant is not of the {@code multiple} kind. - */ - public String multiple() { - return TaggedUnionUtils.get(this, Kind.Multiple); - } - - @Override - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - if (_value instanceof JsonpSerializable) { - ((JsonpSerializable) _value).serialize(generator, mapper); - } else { - switch (_kind) { - case Multiple : - generator.write(((String) this._value)); - - break; - } - } - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Kind _kind; - private Object _value; - - public ObjectBuilder single(SimpleQueryStringFlag v) { - this._kind = Kind.Single; - this._value = v; - return this; - } - - public ObjectBuilder multiple(String v) { - this._kind = Kind.Multiple; - this._value = v; - return this; - } - - public SimpleQueryStringFlags build() { - _checkSingleUse(); - return new SimpleQueryStringFlags(this); - } - - } - - private static JsonpDeserializer buildSimpleQueryStringFlagsDeserializer() { - return new UnionDeserializer.Builder(SimpleQueryStringFlags::new, true) - .addMember(Kind.Single, SimpleQueryStringFlag._DESERIALIZER) - .addMember(Kind.Multiple, JsonpDeserializer.stringDeserializer()).build(); - } - - public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer - .lazy(SimpleQueryStringFlags::buildSimpleQueryStringFlagsDeserializer); -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/SimpleQueryStringFlagsBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/SimpleQueryStringFlagsBuilders.java deleted file mode 100644 index 00ae85425..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/SimpleQueryStringFlagsBuilders.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ - -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - -package co.elastic.clients.elasticsearch._types.query_dsl; - -import co.elastic.clients.util.ObjectBuilder; -import java.util.function.Function; - -/** - * Builders for {@link SimpleQueryStringFlags} variants. - *

- * Variants single, multiple are not available here as - * they don't have a dedicated class. Use {@link SimpleQueryStringFlags}'s - * builder for these. - * - */ -public class SimpleQueryStringFlagsBuilders { - private SimpleQueryStringFlagsBuilders() { - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchResponseBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchResponseBase.java index 840403414..a8c39ebd0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchResponseBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchResponseBase.java @@ -68,6 +68,12 @@ public abstract class AsyncSearchResponseBase implements JsonpSerializable { private final long startTimeInMillis; + @Nullable + private final DateTime completionTime; + + @Nullable + private final Long completionTimeInMillis; + // --------------------------------------------------------------------------------------------- protected AsyncSearchResponseBase(AbstractBuilder builder) { @@ -80,6 +86,8 @@ protected AsyncSearchResponseBase(AbstractBuilder builder) { "expirationTimeInMillis"); this.startTime = builder.startTime; this.startTimeInMillis = ApiTypeHelper.requireNonNull(builder.startTimeInMillis, this, "startTimeInMillis"); + this.completionTime = builder.completionTime; + this.completionTimeInMillis = builder.completionTimeInMillis; } @@ -147,6 +155,25 @@ public final long startTimeInMillis() { return this.startTimeInMillis; } + /** + * Indicates when the async search completed. Only present when the search has + * completed. + *

+ * API name: {@code completion_time} + */ + @Nullable + public final DateTime completionTime() { + return this.completionTime; + } + + /** + * API name: {@code completion_time_in_millis} + */ + @Nullable + public final Long completionTimeInMillis() { + return this.completionTimeInMillis; + } + /** * Serialize this object to JSON. */ @@ -183,6 +210,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("start_time_in_millis"); generator.write(this.startTimeInMillis); + if (this.completionTime != null) { + generator.writeKey("completion_time"); + this.completionTime.serialize(generator, mapper); + } + if (this.completionTimeInMillis != null) { + generator.writeKey("completion_time_in_millis"); + generator.write(this.completionTimeInMillis); + + } + } @Override @@ -210,6 +247,12 @@ public abstract static class AbstractBuilder + * API name: {@code completion_time} + */ + public final BuilderT completionTime(@Nullable DateTime value) { + this.completionTime = value; + return self(); + } + + /** + * API name: {@code completion_time_in_millis} + */ + public final BuilderT completionTimeInMillis(@Nullable Long value) { + this.completionTimeInMillis = value; + return self(); + } + protected abstract BuilderT self(); } @@ -294,6 +356,9 @@ protected static > void setupAsyncSea "expiration_time_in_millis"); op.add(AbstractBuilder::startTime, DateTime._DESERIALIZER, "start_time"); op.add(AbstractBuilder::startTimeInMillis, JsonpDeserializer.longDeserializer(), "start_time_in_millis"); + op.add(AbstractBuilder::completionTime, DateTime._DESERIALIZER, "completion_time"); + op.add(AbstractBuilder::completionTimeInMillis, JsonpDeserializer.longDeserializer(), + "completion_time_in_millis"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/status/StatusResponseBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/status/StatusResponseBase.java index eed6bcf01..a8764d67c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/status/StatusResponseBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/status/StatusResponseBase.java @@ -23,6 +23,7 @@ package co.elastic.clients.elasticsearch.async_search.status; +import co.elastic.clients.elasticsearch._types.ClusterStatistics; import co.elastic.clients.elasticsearch._types.ShardStatistics; import co.elastic.clients.elasticsearch.async_search.AsyncSearchResponseBase; import co.elastic.clients.json.JsonpDeserializable; @@ -51,6 +52,9 @@ public abstract class StatusResponseBase extends AsyncSearchResponseBase { private final ShardStatistics shards; + @Nullable + private final ClusterStatistics clusters; + @Nullable private final Integer completionStatus; @@ -60,6 +64,7 @@ protected StatusResponseBase(AbstractBuilder builder) { super(builder); this.shards = ApiTypeHelper.requireNonNull(builder.shards, this, "shards"); + this.clusters = builder.clusters; this.completionStatus = builder.completionStatus; } @@ -73,6 +78,17 @@ public final ShardStatistics shards() { return this.shards; } + /** + * Metadata about clusters involved in the cross-cluster search. Not shown for + * local-only searches. + *

+ * API name: {@code _clusters} + */ + @Nullable + public final ClusterStatistics clusters() { + return this.clusters; + } + /** * If the async search completed, this field shows the status code of the * search. For example, 200 indicates that the async search was successfully @@ -91,6 +107,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("_shards"); this.shards.serialize(generator, mapper); + if (this.clusters != null) { + generator.writeKey("_clusters"); + this.clusters.serialize(generator, mapper); + + } if (this.completionStatus != null) { generator.writeKey("completion_status"); generator.write(this.completionStatus); @@ -104,6 +125,9 @@ public abstract static class AbstractBuilder { private ShardStatistics shards; + @Nullable + private ClusterStatistics clusters; + @Nullable private Integer completionStatus; @@ -126,6 +150,27 @@ public final BuilderT shards(Function + * API name: {@code _clusters} + */ + public final BuilderT clusters(@Nullable ClusterStatistics value) { + this.clusters = value; + return self(); + } + + /** + * Metadata about clusters involved in the cross-cluster search. Not shown for + * local-only searches. + *

+ * API name: {@code _clusters} + */ + public final BuilderT clusters(Function> fn) { + return this.clusters(fn.apply(new ClusterStatistics.Builder()).build()); + } + /** * If the async search completed, this field shows the status code of the * search. For example, 200 indicates that the async search was successfully @@ -145,6 +190,7 @@ protected static > void setupStatusRe ObjectDeserializer op) { AsyncSearchResponseBase.setupAsyncSearchResponseBaseDeserializer(op); op.add(AbstractBuilder::shards, ShardStatistics._DESERIALIZER, "_shards"); + op.add(AbstractBuilder::clusters, ClusterStatistics._DESERIALIZER, "_clusters"); op.add(AbstractBuilder::completionStatus, JsonpDeserializer.integerDeserializer(), "completion_status"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java index fe1e6a4bd..58f8b1c88 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java @@ -56,8 +56,8 @@ // typedef: _global.bulk.Request /** - * Allows to perform multiple index/update/delete operations in a single - * request. + * Performs multiple indexing or delete operations in a single API call. This + * reduces overhead and can greatly increase indexing speed. * * @see API * specification @@ -121,8 +121,8 @@ public Iterator _serializables() { return this.operations.iterator(); } /** - * True or false to return the _source field or not, or default list of fields - * to return, can be overridden on each sub-request + * true or false to return the _source + * field or not, or a list of fields to return. *

* API name: {@code _source} */ @@ -132,8 +132,7 @@ public final SourceConfigParam source() { } /** - * Default list of fields to exclude from the returned _source field, can be - * overridden on each sub-request + * A comma-separated list of source fields to exclude from the response. *

* API name: {@code _source_excludes} */ @@ -142,8 +141,7 @@ public final List sourceExcludes() { } /** - * Default list of fields to extract and return from the _source field, can be - * overridden on each sub-request + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} */ @@ -152,7 +150,7 @@ public final List sourceIncludes() { } /** - * Default index for items which don't provide one + * Name of the data stream, index, or index alias to perform bulk actions on. *

* API name: {@code index} */ @@ -162,7 +160,11 @@ public final String index() { } /** - * The pipeline id to preprocess incoming documents with + * ID of the pipeline to use to preprocess incoming documents. If the index has + * a default ingest pipeline specified, then setting the value to + * _none disables the default ingest pipeline for this request. If + * a final pipeline is configured it will always run, regardless of the value of + * this parameter. *

* API name: {@code pipeline} */ @@ -172,10 +174,11 @@ public final String pipeline() { } /** - * If true then refresh the affected shards to make this operation - * visible to search, if wait_for then wait for a refresh to make - * this operation visible to search, if false (the default) then do - * nothing with refreshes. + * If true, Elasticsearch refreshes the affected shards to make + * this operation visible to search, if wait_for then wait for a + * refresh to make this operation visible to search, if false do + * nothing with refreshes. Valid values: true, false, + * wait_for. *

* API name: {@code refresh} */ @@ -185,7 +188,7 @@ public final Refresh refresh() { } /** - * Sets require_alias for all incoming documents. Defaults to unset (false) + * If true, the request’s actions must target an index alias. *

* API name: {@code require_alias} */ @@ -195,7 +198,7 @@ public final Boolean requireAlias() { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -205,7 +208,8 @@ public final String routing() { } /** - * Explicit operation timeout + * Period each action waits for the following operations: automatic index + * creation, dynamic mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -215,11 +219,9 @@ public final Time timeout() { } /** - * Sets the number of shard copies that must be active before proceeding with - * the bulk operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total number of + * shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -288,8 +290,8 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private List operations; /** - * True or false to return the _source field or not, or default list of fields - * to return, can be overridden on each sub-request + * true or false to return the _source + * field or not, or a list of fields to return. *

* API name: {@code _source} */ @@ -299,8 +301,8 @@ public final Builder source(@Nullable SourceConfigParam value) { } /** - * True or false to return the _source field or not, or default list of fields - * to return, can be overridden on each sub-request + * true or false to return the _source + * field or not, or a list of fields to return. *

* API name: {@code _source} */ @@ -309,8 +311,7 @@ public final Builder source(Function * API name: {@code _source_excludes} *

@@ -322,8 +323,7 @@ public final Builder sourceExcludes(List list) { } /** - * Default list of fields to exclude from the returned _source field, can be - * overridden on each sub-request + * A comma-separated list of source fields to exclude from the response. *

* API name: {@code _source_excludes} *

@@ -335,8 +335,7 @@ public final Builder sourceExcludes(String value, String... values) { } /** - * Default list of fields to extract and return from the _source field, can be - * overridden on each sub-request + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} *

@@ -348,8 +347,7 @@ public final Builder sourceIncludes(List list) { } /** - * Default list of fields to extract and return from the _source field, can be - * overridden on each sub-request + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} *

@@ -361,7 +359,7 @@ public final Builder sourceIncludes(String value, String... values) { } /** - * Default index for items which don't provide one + * Name of the data stream, index, or index alias to perform bulk actions on. *

* API name: {@code index} */ @@ -371,7 +369,11 @@ public final Builder index(@Nullable String value) { } /** - * The pipeline id to preprocess incoming documents with + * ID of the pipeline to use to preprocess incoming documents. If the index has + * a default ingest pipeline specified, then setting the value to + * _none disables the default ingest pipeline for this request. If + * a final pipeline is configured it will always run, regardless of the value of + * this parameter. *

* API name: {@code pipeline} */ @@ -381,10 +383,11 @@ public final Builder pipeline(@Nullable String value) { } /** - * If true then refresh the affected shards to make this operation - * visible to search, if wait_for then wait for a refresh to make - * this operation visible to search, if false (the default) then do - * nothing with refreshes. + * If true, Elasticsearch refreshes the affected shards to make + * this operation visible to search, if wait_for then wait for a + * refresh to make this operation visible to search, if false do + * nothing with refreshes. Valid values: true, false, + * wait_for. *

* API name: {@code refresh} */ @@ -394,7 +397,7 @@ public final Builder refresh(@Nullable Refresh value) { } /** - * Sets require_alias for all incoming documents. Defaults to unset (false) + * If true, the request’s actions must target an index alias. *

* API name: {@code require_alias} */ @@ -404,7 +407,7 @@ public final Builder requireAlias(@Nullable Boolean value) { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -414,7 +417,8 @@ public final Builder routing(@Nullable String value) { } /** - * Explicit operation timeout + * Period each action waits for the following operations: automatic index + * creation, dynamic mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -424,7 +428,8 @@ public final Builder timeout(@Nullable Time value) { } /** - * Explicit operation timeout + * Period each action waits for the following operations: automatic index + * creation, dynamic mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -433,11 +438,9 @@ public final Builder timeout(Function> fn) { } /** - * Sets the number of shard copies that must be active before proceeding with - * the bulk operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total number of + * shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -447,11 +450,9 @@ public final Builder waitForActiveShards(@Nullable WaitForActiveShards value) { } /** - * Sets the number of shard copies that must be active before proceeding with - * the bulk operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total number of + * shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClearScrollRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClearScrollRequest.java index 423d02c83..0de612a5d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClearScrollRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClearScrollRequest.java @@ -46,7 +46,7 @@ // typedef: _global.clear_scroll.Request /** - * Explicitly clears the search context for a scroll. + * Clears the search context and results for a scrolling search. * * @see API * specification @@ -68,6 +68,8 @@ public static ClearScrollRequest of(Function_all. + *

* API name: {@code scroll_id} */ public final List scrollId() { @@ -111,6 +113,8 @@ public static class Builder extends RequestBase.AbstractBuilder private List scrollId; /** + * Scroll IDs to clear. To clear all scroll IDs, use _all. + *

* API name: {@code scroll_id} *

* Adds all elements of list to scrollId. @@ -121,6 +125,8 @@ public final Builder scrollId(List list) { } /** + * Scroll IDs to clear. To clear all scroll IDs, use _all. + *

* API name: {@code scroll_id} *

* Adds one or more values to scrollId. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClosePointInTimeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClosePointInTimeRequest.java index 943f8e18d..ee7cd00e8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClosePointInTimeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClosePointInTimeRequest.java @@ -45,7 +45,7 @@ // typedef: _global.close_point_in_time.Request /** - * Close a point in time + * Closes a point-in-time. * * @see API @@ -68,7 +68,9 @@ public static ClosePointInTimeRequest of(Function + * API name: {@code id} */ public final String id() { return this.id; @@ -102,7 +104,9 @@ public static class Builder extends RequestBase.AbstractBuilder private String id; /** - * Required - API name: {@code id} + * Required - The ID of the point-in-time. + *

+ * API name: {@code id} */ public final Builder id(String value) { this.id = value; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CountRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CountRequest.java index 2c6c92d9d..114364d1f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CountRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CountRequest.java @@ -135,9 +135,10 @@ public static CountRequest of(Function> fn) } /** - * Whether to ignore if a wildcard indices expression resolves into no concrete - * indices. (This includes _all string or when no indices have been - * specified) + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. *

* API name: {@code allow_no_indices} */ @@ -147,8 +148,9 @@ public final Boolean allowNoIndices() { } /** - * Specify whether wildcard and prefix queries should be analyzed (default: - * false) + * If true, wildcard and prefix queries are analyzed. This + * parameter can only be used when the q query string parameter is + * specified. *

* API name: {@code analyze_wildcard} */ @@ -158,7 +160,8 @@ public final Boolean analyzeWildcard() { } /** - * The analyzer to use for the query string + * Analyzer to use for the query string. This parameter can only be used when + * the q query string parameter is specified. *

* API name: {@code analyzer} */ @@ -168,7 +171,9 @@ public final String analyzer() { } /** - * The default operator for query string query (AND or OR) + * The default operator for query string query: AND or + * OR. This parameter can only be used when the q + * query string parameter is specified. *

* API name: {@code default_operator} */ @@ -178,8 +183,9 @@ public final Operator defaultOperator() { } /** - * The field to use as default where no field prefix is given in the query - * string + * Field to use as default where no field prefix is given in the query string. + * This parameter can only be used when the q query string + * parameter is specified. *

* API name: {@code df} */ @@ -189,8 +195,10 @@ public final String df() { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. *

* API name: {@code expand_wildcards} */ @@ -199,8 +207,8 @@ public final List expandWildcards() { } /** - * Whether specified concrete, expanded or aliased indices should be ignored - * when throttled + * If true, concrete, expanded or aliased indices are ignored when + * frozen. *

* API name: {@code ignore_throttled} */ @@ -210,8 +218,8 @@ public final Boolean ignoreThrottled() { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -221,7 +229,9 @@ public final Boolean ignoreUnavailable() { } /** - * A comma-separated list of indices to restrict the results + * Comma-separated list of data streams, indices, and aliases to search. + * Supports wildcards (*). To search all data streams and indices, + * omit this parameter or use * or _all. *

* API name: {@code index} */ @@ -230,8 +240,8 @@ public final List index() { } /** - * Specify whether format-based query failures (such as providing text to a - * numeric field) should be ignored + * If true, format-based query failures (such as providing text to + * a numeric field) in the query string will be ignored. *

* API name: {@code lenient} */ @@ -241,8 +251,8 @@ public final Boolean lenient() { } /** - * Include only documents with a specific _score value in the - * result + * Sets the minimum _score value that documents must have to be + * included in the result. *

* API name: {@code min_score} */ @@ -252,8 +262,8 @@ public final Double minScore() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -263,7 +273,7 @@ public final String preference() { } /** - * Query in the Lucene query string syntax + * Query in the Lucene query string syntax. *

* API name: {@code q} */ @@ -273,6 +283,8 @@ public final String q() { } /** + * Defines the search definition using the Query DSL. + *

* API name: {@code query} */ @Nullable @@ -281,7 +293,7 @@ public final Query query() { } /** - * A comma-separated list of specific routing values + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -291,8 +303,9 @@ public final String routing() { } /** - * The maximum count for each shard, upon reaching which the query execution - * will terminate early + * Maximum number of documents to collect for each shard. If a query reaches + * this limit, Elasticsearch terminates the query early. Elasticsearch collects + * documents before sorting. *

* API name: {@code terminate_after} */ @@ -376,9 +389,10 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private Long terminateAfter; /** - * Whether to ignore if a wildcard indices expression resolves into no concrete - * indices. (This includes _all string or when no indices have been - * specified) + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. *

* API name: {@code allow_no_indices} */ @@ -388,8 +402,9 @@ public final Builder allowNoIndices(@Nullable Boolean value) { } /** - * Specify whether wildcard and prefix queries should be analyzed (default: - * false) + * If true, wildcard and prefix queries are analyzed. This + * parameter can only be used when the q query string parameter is + * specified. *

* API name: {@code analyze_wildcard} */ @@ -399,7 +414,8 @@ public final Builder analyzeWildcard(@Nullable Boolean value) { } /** - * The analyzer to use for the query string + * Analyzer to use for the query string. This parameter can only be used when + * the q query string parameter is specified. *

* API name: {@code analyzer} */ @@ -409,7 +425,9 @@ public final Builder analyzer(@Nullable String value) { } /** - * The default operator for query string query (AND or OR) + * The default operator for query string query: AND or + * OR. This parameter can only be used when the q + * query string parameter is specified. *

* API name: {@code default_operator} */ @@ -419,8 +437,9 @@ public final Builder defaultOperator(@Nullable Operator value) { } /** - * The field to use as default where no field prefix is given in the query - * string + * Field to use as default where no field prefix is given in the query string. + * This parameter can only be used when the q query string + * parameter is specified. *

* API name: {@code df} */ @@ -430,8 +449,10 @@ public final Builder df(@Nullable String value) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. *

* API name: {@code expand_wildcards} *

@@ -443,8 +464,10 @@ public final Builder expandWildcards(List list) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. *

* API name: {@code expand_wildcards} *

@@ -456,8 +479,8 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * Whether specified concrete, expanded or aliased indices should be ignored - * when throttled + * If true, concrete, expanded or aliased indices are ignored when + * frozen. *

* API name: {@code ignore_throttled} */ @@ -467,8 +490,8 @@ public final Builder ignoreThrottled(@Nullable Boolean value) { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -478,7 +501,9 @@ public final Builder ignoreUnavailable(@Nullable Boolean value) { } /** - * A comma-separated list of indices to restrict the results + * Comma-separated list of data streams, indices, and aliases to search. + * Supports wildcards (*). To search all data streams and indices, + * omit this parameter or use * or _all. *

* API name: {@code index} *

@@ -490,7 +515,9 @@ public final Builder index(List list) { } /** - * A comma-separated list of indices to restrict the results + * Comma-separated list of data streams, indices, and aliases to search. + * Supports wildcards (*). To search all data streams and indices, + * omit this parameter or use * or _all. *

* API name: {@code index} *

@@ -502,8 +529,8 @@ public final Builder index(String value, String... values) { } /** - * Specify whether format-based query failures (such as providing text to a - * numeric field) should be ignored + * If true, format-based query failures (such as providing text to + * a numeric field) in the query string will be ignored. *

* API name: {@code lenient} */ @@ -513,8 +540,8 @@ public final Builder lenient(@Nullable Boolean value) { } /** - * Include only documents with a specific _score value in the - * result + * Sets the minimum _score value that documents must have to be + * included in the result. *

* API name: {@code min_score} */ @@ -524,8 +551,8 @@ public final Builder minScore(@Nullable Double value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -535,7 +562,7 @@ public final Builder preference(@Nullable String value) { } /** - * Query in the Lucene query string syntax + * Query in the Lucene query string syntax. *

* API name: {@code q} */ @@ -545,6 +572,8 @@ public final Builder q(@Nullable String value) { } /** + * Defines the search definition using the Query DSL. + *

* API name: {@code query} */ public final Builder query(@Nullable Query value) { @@ -553,6 +582,8 @@ public final Builder query(@Nullable Query value) { } /** + * Defines the search definition using the Query DSL. + *

* API name: {@code query} */ public final Builder query(Function> fn) { @@ -560,7 +591,7 @@ public final Builder query(Function> fn) { } /** - * A comma-separated list of specific routing values + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -570,8 +601,9 @@ public final Builder routing(@Nullable String value) { } /** - * The maximum count for each shard, upon reaching which the query execution - * will terminate early + * Maximum number of documents to collect for each shard. If a query reaches + * this limit, Elasticsearch terminates the query early. Elasticsearch collects + * documents before sorting. *

* API name: {@code terminate_after} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CreateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CreateRequest.java index a985597e4..a67eeb342 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CreateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CreateRequest.java @@ -56,10 +56,9 @@ // typedef: _global.create.Request /** - * Creates a new document in the index. - *

- * Returns a 409 response when a document with a same ID already exists in the - * index. + * Adds a JSON document to the specified data stream or index and makes it + * searchable. If the target is an index and the document already exists, the + * request updates the document and increments its version. * * @see API * specification @@ -120,7 +119,7 @@ public static CreateRequest of( } /** - * Required - Document ID + * Required - Unique identifier for the document. *

* API name: {@code id} */ @@ -129,7 +128,11 @@ public final String id() { } /** - * Required - The name of the index + * Required - Name of the data stream or index to target. If the target doesn’t + * exist and matches the name or wildcard (*) pattern of an index + * template with a data_stream definition, this request creates the + * data stream. If the target doesn’t exist and doesn’t match a data stream + * template, this request creates the index. *

* API name: {@code index} */ @@ -138,7 +141,11 @@ public final String index() { } /** - * The pipeline id to preprocess incoming documents with + * ID of the pipeline to use to preprocess incoming documents. If the index has + * a default ingest pipeline specified, then setting the value to + * _none disables the default ingest pipeline for this request. If + * a final pipeline is configured it will always run, regardless of the value of + * this parameter. *

* API name: {@code pipeline} */ @@ -148,10 +155,11 @@ public final String pipeline() { } /** - * If true then refresh the affected shards to make this operation - * visible to search, if wait_for then wait for a refresh to make - * this operation visible to search, if false (the default) then do - * nothing with refreshes. + * If true, Elasticsearch refreshes the affected shards to make + * this operation visible to search, if wait_for then wait for a + * refresh to make this operation visible to search, if false do + * nothing with refreshes. Valid values: true, false, + * wait_for. *

* API name: {@code refresh} */ @@ -161,7 +169,7 @@ public final Refresh refresh() { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -171,7 +179,8 @@ public final String routing() { } /** - * Explicit operation timeout + * Period the request waits for the following operations: automatic index + * creation, dynamic mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -181,7 +190,8 @@ public final Time timeout() { } /** - * Explicit version number for concurrency control + * Explicit version number for concurrency control. The specified version must + * match the current version of the document for the request to succeed. *

* API name: {@code version} */ @@ -191,7 +201,7 @@ public final Long version() { } /** - * Specific version type + * Specific version type: external, external_gte. *

* API name: {@code version_type} */ @@ -201,11 +211,9 @@ public final VersionType versionType() { } /** - * Sets the number of shard copies that must be active before proceeding with - * the index operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total + * number of shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -269,7 +277,7 @@ public static class Builder extends RequestBase.AbstractBuilder tDocumentSerializer; /** - * Required - Document ID + * Required - Unique identifier for the document. *

* API name: {@code id} */ @@ -279,7 +287,11 @@ public final Builder id(String value) { } /** - * Required - The name of the index + * Required - Name of the data stream or index to target. If the target doesn’t + * exist and matches the name or wildcard (*) pattern of an index + * template with a data_stream definition, this request creates the + * data stream. If the target doesn’t exist and doesn’t match a data stream + * template, this request creates the index. *

* API name: {@code index} */ @@ -289,7 +301,11 @@ public final Builder index(String value) { } /** - * The pipeline id to preprocess incoming documents with + * ID of the pipeline to use to preprocess incoming documents. If the index has + * a default ingest pipeline specified, then setting the value to + * _none disables the default ingest pipeline for this request. If + * a final pipeline is configured it will always run, regardless of the value of + * this parameter. *

* API name: {@code pipeline} */ @@ -299,10 +315,11 @@ public final Builder pipeline(@Nullable String value) { } /** - * If true then refresh the affected shards to make this operation - * visible to search, if wait_for then wait for a refresh to make - * this operation visible to search, if false (the default) then do - * nothing with refreshes. + * If true, Elasticsearch refreshes the affected shards to make + * this operation visible to search, if wait_for then wait for a + * refresh to make this operation visible to search, if false do + * nothing with refreshes. Valid values: true, false, + * wait_for. *

* API name: {@code refresh} */ @@ -312,7 +329,7 @@ public final Builder refresh(@Nullable Refresh value) { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -322,7 +339,8 @@ public final Builder routing(@Nullable String value) { } /** - * Explicit operation timeout + * Period the request waits for the following operations: automatic index + * creation, dynamic mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -332,7 +350,8 @@ public final Builder timeout(@Nullable Time value) { } /** - * Explicit operation timeout + * Period the request waits for the following operations: automatic index + * creation, dynamic mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -341,7 +360,8 @@ public final Builder timeout(Function * API name: {@code version} */ @@ -351,7 +371,7 @@ public final Builder version(@Nullable Long value) { } /** - * Specific version type + * Specific version type: external, external_gte. *

* API name: {@code version_type} */ @@ -361,11 +381,9 @@ public final Builder versionType(@Nullable VersionType value) { } /** - * Sets the number of shard copies that must be active before proceeding with - * the index operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total + * number of shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -375,11 +393,9 @@ public final Builder waitForActiveShards(@Nullable WaitForActiveShard } /** - * Sets the number of shard copies that must be active before proceeding with - * the index operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total + * number of shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java index c6b2b897a..68dcc9b6f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java @@ -60,7 +60,7 @@ // typedef: _global.delete_by_query.Request /** - * Deletes documents matching the provided query. + * Deletes documents that match the specified query. * * @see API * specification @@ -203,9 +203,12 @@ public static DeleteByQueryRequest of(Function_all string or when no indices have been - * specified) + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. For example, a request targeting foo*,bar* returns an + * error if an index starts with foo but no index starts with + * bar. *

* API name: {@code allow_no_indices} */ @@ -215,8 +218,7 @@ public final Boolean allowNoIndices() { } /** - * Specify whether wildcard and prefix queries should be analyzed (default: - * false) + * If true, wildcard and prefix queries are analyzed. *

* API name: {@code analyze_wildcard} */ @@ -226,7 +228,7 @@ public final Boolean analyzeWildcard() { } /** - * The analyzer to use for the query string + * Analyzer to use for the query string. *

* API name: {@code analyzer} */ @@ -236,7 +238,8 @@ public final String analyzer() { } /** - * What to do when the delete by query hits version conflicts? + * What to do if delete by query hits version conflicts: abort or + * proceed. *

* API name: {@code conflicts} */ @@ -246,7 +249,8 @@ public final Conflicts conflicts() { } /** - * The default operator for query string query (AND or OR) + * The default operator for query string query: AND or + * OR. *

* API name: {@code default_operator} */ @@ -256,8 +260,7 @@ public final Operator defaultOperator() { } /** - * The field to use as default where no field prefix is given in the query - * string + * Field to use as default where no field prefix is given in the query string. *

* API name: {@code df} */ @@ -267,8 +270,12 @@ public final String df() { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} */ @@ -287,8 +294,8 @@ public final Long from() { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -298,8 +305,9 @@ public final Boolean ignoreUnavailable() { } /** - * Required - A comma-separated list of index names to search; use - * _all or empty string to perform the operation on all indices + * Required - Comma-separated list of data streams, indices, and aliases to + * search. Supports wildcards (*). To search all data streams or + * indices, omit this parameter or use * or _all. *

* API name: {@code index} */ @@ -308,8 +316,8 @@ public final List index() { } /** - * Specify whether format-based query failures (such as providing text to a - * numeric field) should be ignored + * If true, format-based query failures (such as providing text to + * a numeric field) in the query string will be ignored. *

* API name: {@code lenient} */ @@ -319,6 +327,8 @@ public final Boolean lenient() { } /** + * The maximum number of documents to delete. + *

* API name: {@code max_docs} */ @Nullable @@ -327,8 +337,8 @@ public final Long maxDocs() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -338,7 +348,7 @@ public final String preference() { } /** - * Query in the Lucene query string syntax + * Query in the Lucene query string syntax. *

* API name: {@code q} */ @@ -348,6 +358,8 @@ public final String q() { } /** + * Specifies the documents to delete using the Query DSL. + *

* API name: {@code query} */ @Nullable @@ -356,7 +368,8 @@ public final Query query() { } /** - * Should the affected indexes be refreshed? + * If true, Elasticsearch refreshes all shards involved in the + * delete by query after the request completes. *

* API name: {@code refresh} */ @@ -366,8 +379,8 @@ public final Boolean refresh() { } /** - * Specify if request cache should be used for this request or not, defaults to - * index level setting + * If true, the request cache is used for this request. Defaults to + * the index-level setting. *

* API name: {@code request_cache} */ @@ -377,8 +390,7 @@ public final Boolean requestCache() { } /** - * The throttle for this request in sub-requests per second. -1 means no - * throttle. + * The throttle for this request in sub-requests per second. *

* API name: {@code requests_per_second} */ @@ -388,7 +400,7 @@ public final Float requestsPerSecond() { } /** - * A comma-separated list of specific routing values + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -398,8 +410,7 @@ public final String routing() { } /** - * Specify how long a consistent view of the index should be maintained for - * scrolled search + * Period to retain the search context for scrolling. *

* API name: {@code scroll} */ @@ -409,7 +420,7 @@ public final Time scroll() { } /** - * Size on the scroll request powering the delete by query + * Size of the scroll request that powers the operation. *

* API name: {@code scroll_size} */ @@ -429,7 +440,8 @@ public final Time searchTimeout() { } /** - * Search operation type + * The type of the search operation. Available options: + * query_then_fetch, dfs_query_then_fetch. *

* API name: {@code search_type} */ @@ -439,6 +451,9 @@ public final SearchType searchType() { } /** + * Slice the request manually using the provided slice ID and total number of + * slices. + *

* API name: {@code slice} */ @Nullable @@ -447,8 +462,7 @@ public final SlicedScroll slice() { } /** - * The number of slices this task should be divided into. Defaults to 1, meaning - * the task isn't sliced into subtasks. Can be set to auto. + * The number of slices this task should be divided into. *

* API name: {@code slices} */ @@ -458,7 +472,7 @@ public final Slices slices() { } /** - * A comma-separated list of <field>:<direction> pairs + * A comma-separated list of <field>:<direction> pairs. *

* API name: {@code sort} */ @@ -467,7 +481,8 @@ public final List sort() { } /** - * Specific 'tag' of the request for logging and statistical purposes + * Specific tag of the request for logging and statistical + * purposes. *

* API name: {@code stats} */ @@ -476,8 +491,13 @@ public final List stats() { } /** - * The maximum number of documents to collect for each shard, upon reaching - * which the query execution will terminate early. + * Maximum number of documents to collect for each shard. If a query reaches + * this limit, Elasticsearch terminates the query early. Elasticsearch collects + * documents before sorting. Use with caution. Elasticsearch applies this + * parameter to each shard handling the request. When possible, let + * Elasticsearch perform early termination automatically. Avoid specifying this + * parameter for requests that target data streams with backing indices across + * multiple data tiers. *

* API name: {@code terminate_after} */ @@ -487,8 +507,7 @@ public final Long terminateAfter() { } /** - * Time each individual bulk request should wait for shards that are - * unavailable. + * Period each deletion request waits for active shards. *

* API name: {@code timeout} */ @@ -498,7 +517,7 @@ public final Time timeout() { } /** - * Specify whether to return document version as part of a hit + * If true, returns the document version as part of a hit. *

* API name: {@code version} */ @@ -508,11 +527,9 @@ public final Boolean version() { } /** - * Sets the number of shard copies that must be active before proceeding with - * the delete by query operation. Defaults to 1, meaning the primary shard only. - * Set to all for all shard copies, otherwise set to any - * non-negative value less than or equal to the total number of copies for the - * shard (number of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total number of + * shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -522,7 +539,7 @@ public final WaitForActiveShards waitForActiveShards() { } /** - * Should the request should block until the delete by query is complete. + * If true, the request blocks until the operation is complete. *

* API name: {@code wait_for_completion} */ @@ -665,9 +682,12 @@ public static class Builder extends RequestBase.AbstractBuilder private Boolean waitForCompletion; /** - * Whether to ignore if a wildcard indices expression resolves into no concrete - * indices. (This includes _all string or when no indices have been - * specified) + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. For example, a request targeting foo*,bar* returns an + * error if an index starts with foo but no index starts with + * bar. *

* API name: {@code allow_no_indices} */ @@ -677,8 +697,7 @@ public final Builder allowNoIndices(@Nullable Boolean value) { } /** - * Specify whether wildcard and prefix queries should be analyzed (default: - * false) + * If true, wildcard and prefix queries are analyzed. *

* API name: {@code analyze_wildcard} */ @@ -688,7 +707,7 @@ public final Builder analyzeWildcard(@Nullable Boolean value) { } /** - * The analyzer to use for the query string + * Analyzer to use for the query string. *

* API name: {@code analyzer} */ @@ -698,7 +717,8 @@ public final Builder analyzer(@Nullable String value) { } /** - * What to do when the delete by query hits version conflicts? + * What to do if delete by query hits version conflicts: abort or + * proceed. *

* API name: {@code conflicts} */ @@ -708,7 +728,8 @@ public final Builder conflicts(@Nullable Conflicts value) { } /** - * The default operator for query string query (AND or OR) + * The default operator for query string query: AND or + * OR. *

* API name: {@code default_operator} */ @@ -718,8 +739,7 @@ public final Builder defaultOperator(@Nullable Operator value) { } /** - * The field to use as default where no field prefix is given in the query - * string + * Field to use as default where no field prefix is given in the query string. *

* API name: {@code df} */ @@ -729,8 +749,12 @@ public final Builder df(@Nullable String value) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} *

@@ -742,8 +766,12 @@ public final Builder expandWildcards(List list) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} *

@@ -765,8 +793,8 @@ public final Builder from(@Nullable Long value) { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -776,8 +804,9 @@ public final Builder ignoreUnavailable(@Nullable Boolean value) { } /** - * Required - A comma-separated list of index names to search; use - * _all or empty string to perform the operation on all indices + * Required - Comma-separated list of data streams, indices, and aliases to + * search. Supports wildcards (*). To search all data streams or + * indices, omit this parameter or use * or _all. *

* API name: {@code index} *

@@ -789,8 +818,9 @@ public final Builder index(List list) { } /** - * Required - A comma-separated list of index names to search; use - * _all or empty string to perform the operation on all indices + * Required - Comma-separated list of data streams, indices, and aliases to + * search. Supports wildcards (*). To search all data streams or + * indices, omit this parameter or use * or _all. *

* API name: {@code index} *

@@ -802,8 +832,8 @@ public final Builder index(String value, String... values) { } /** - * Specify whether format-based query failures (such as providing text to a - * numeric field) should be ignored + * If true, format-based query failures (such as providing text to + * a numeric field) in the query string will be ignored. *

* API name: {@code lenient} */ @@ -813,6 +843,8 @@ public final Builder lenient(@Nullable Boolean value) { } /** + * The maximum number of documents to delete. + *

* API name: {@code max_docs} */ public final Builder maxDocs(@Nullable Long value) { @@ -821,8 +853,8 @@ public final Builder maxDocs(@Nullable Long value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -832,7 +864,7 @@ public final Builder preference(@Nullable String value) { } /** - * Query in the Lucene query string syntax + * Query in the Lucene query string syntax. *

* API name: {@code q} */ @@ -842,6 +874,8 @@ public final Builder q(@Nullable String value) { } /** + * Specifies the documents to delete using the Query DSL. + *

* API name: {@code query} */ public final Builder query(@Nullable Query value) { @@ -850,6 +884,8 @@ public final Builder query(@Nullable Query value) { } /** + * Specifies the documents to delete using the Query DSL. + *

* API name: {@code query} */ public final Builder query(Function> fn) { @@ -857,7 +893,8 @@ public final Builder query(Function> fn) { } /** - * Should the affected indexes be refreshed? + * If true, Elasticsearch refreshes all shards involved in the + * delete by query after the request completes. *

* API name: {@code refresh} */ @@ -867,8 +904,8 @@ public final Builder refresh(@Nullable Boolean value) { } /** - * Specify if request cache should be used for this request or not, defaults to - * index level setting + * If true, the request cache is used for this request. Defaults to + * the index-level setting. *

* API name: {@code request_cache} */ @@ -878,8 +915,7 @@ public final Builder requestCache(@Nullable Boolean value) { } /** - * The throttle for this request in sub-requests per second. -1 means no - * throttle. + * The throttle for this request in sub-requests per second. *

* API name: {@code requests_per_second} */ @@ -889,7 +925,7 @@ public final Builder requestsPerSecond(@Nullable Float value) { } /** - * A comma-separated list of specific routing values + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -899,8 +935,7 @@ public final Builder routing(@Nullable String value) { } /** - * Specify how long a consistent view of the index should be maintained for - * scrolled search + * Period to retain the search context for scrolling. *

* API name: {@code scroll} */ @@ -910,8 +945,7 @@ public final Builder scroll(@Nullable Time value) { } /** - * Specify how long a consistent view of the index should be maintained for - * scrolled search + * Period to retain the search context for scrolling. *

* API name: {@code scroll} */ @@ -920,7 +954,7 @@ public final Builder scroll(Function> fn) { } /** - * Size on the scroll request powering the delete by query + * Size of the scroll request that powers the operation. *

* API name: {@code scroll_size} */ @@ -949,7 +983,8 @@ public final Builder searchTimeout(Function> f } /** - * Search operation type + * The type of the search operation. Available options: + * query_then_fetch, dfs_query_then_fetch. *

* API name: {@code search_type} */ @@ -959,6 +994,9 @@ public final Builder searchType(@Nullable SearchType value) { } /** + * Slice the request manually using the provided slice ID and total number of + * slices. + *

* API name: {@code slice} */ public final Builder slice(@Nullable SlicedScroll value) { @@ -967,6 +1005,9 @@ public final Builder slice(@Nullable SlicedScroll value) { } /** + * Slice the request manually using the provided slice ID and total number of + * slices. + *

* API name: {@code slice} */ public final Builder slice(Function> fn) { @@ -974,8 +1015,7 @@ public final Builder slice(Functionauto. + * The number of slices this task should be divided into. *

* API name: {@code slices} */ @@ -985,8 +1025,7 @@ public final Builder slices(@Nullable Slices value) { } /** - * The number of slices this task should be divided into. Defaults to 1, meaning - * the task isn't sliced into subtasks. Can be set to auto. + * The number of slices this task should be divided into. *

* API name: {@code slices} */ @@ -995,7 +1034,7 @@ public final Builder slices(Function> fn) } /** - * A comma-separated list of <field>:<direction> pairs + * A comma-separated list of <field>:<direction> pairs. *

* API name: {@code sort} *

@@ -1007,7 +1046,7 @@ public final Builder sort(List list) { } /** - * A comma-separated list of <field>:<direction> pairs + * A comma-separated list of <field>:<direction> pairs. *

* API name: {@code sort} *

@@ -1019,7 +1058,8 @@ public final Builder sort(String value, String... values) { } /** - * Specific 'tag' of the request for logging and statistical purposes + * Specific tag of the request for logging and statistical + * purposes. *

* API name: {@code stats} *

@@ -1031,7 +1071,8 @@ public final Builder stats(List list) { } /** - * Specific 'tag' of the request for logging and statistical purposes + * Specific tag of the request for logging and statistical + * purposes. *

* API name: {@code stats} *

@@ -1043,8 +1084,13 @@ public final Builder stats(String value, String... values) { } /** - * The maximum number of documents to collect for each shard, upon reaching - * which the query execution will terminate early. + * Maximum number of documents to collect for each shard. If a query reaches + * this limit, Elasticsearch terminates the query early. Elasticsearch collects + * documents before sorting. Use with caution. Elasticsearch applies this + * parameter to each shard handling the request. When possible, let + * Elasticsearch perform early termination automatically. Avoid specifying this + * parameter for requests that target data streams with backing indices across + * multiple data tiers. *

* API name: {@code terminate_after} */ @@ -1054,8 +1100,7 @@ public final Builder terminateAfter(@Nullable Long value) { } /** - * Time each individual bulk request should wait for shards that are - * unavailable. + * Period each deletion request waits for active shards. *

* API name: {@code timeout} */ @@ -1065,8 +1110,7 @@ public final Builder timeout(@Nullable Time value) { } /** - * Time each individual bulk request should wait for shards that are - * unavailable. + * Period each deletion request waits for active shards. *

* API name: {@code timeout} */ @@ -1075,7 +1119,7 @@ public final Builder timeout(Function> fn) { } /** - * Specify whether to return document version as part of a hit + * If true, returns the document version as part of a hit. *

* API name: {@code version} */ @@ -1085,11 +1129,9 @@ public final Builder version(@Nullable Boolean value) { } /** - * Sets the number of shard copies that must be active before proceeding with - * the delete by query operation. Defaults to 1, meaning the primary shard only. - * Set to all for all shard copies, otherwise set to any - * non-negative value less than or equal to the total number of copies for the - * shard (number of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total number of + * shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -1099,11 +1141,9 @@ public final Builder waitForActiveShards(@Nullable WaitForActiveShards value) { } /** - * Sets the number of shard copies that must be active before proceeding with - * the delete by query operation. Defaults to 1, meaning the primary shard only. - * Set to all for all shard copies, otherwise set to any - * non-negative value less than or equal to the total number of copies for the - * shard (number of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total number of + * shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -1113,7 +1153,7 @@ public final Builder waitForActiveShards( } /** - * Should the request should block until the delete by query is complete. + * If true, the request blocks until the operation is complete. *

* API name: {@code wait_for_completion} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java index 6fce6a54f..270a6f0d3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java @@ -74,8 +74,7 @@ public static DeleteByQueryRethrottleRequest of( } /** - * The throttle to set on this request in floating sub-requests per second. -1 - * means set no throttle. + * The throttle for this request in sub-requests per second. *

* API name: {@code requests_per_second} */ @@ -85,7 +84,7 @@ public final Float requestsPerSecond() { } /** - * Required - The task id to rethrottle + * Required - The ID for the task. *

* API name: {@code task_id} */ @@ -108,8 +107,7 @@ public static class Builder extends RequestBase.AbstractBuilder private String taskId; /** - * The throttle to set on this request in floating sub-requests per second. -1 - * means set no throttle. + * The throttle for this request in sub-requests per second. *

* API name: {@code requests_per_second} */ @@ -119,7 +117,7 @@ public final Builder requestsPerSecond(@Nullable Float value) { } /** - * Required - The task id to rethrottle + * Required - The ID for the task. *

* API name: {@code task_id} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteRequest.java index 8cd658a77..f074861c2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteRequest.java @@ -49,7 +49,7 @@ // typedef: _global.delete.Request /** - * Removes a document from the index. + * Removes a JSON document from the specified index. * * @see API * specification @@ -106,7 +106,7 @@ public static DeleteRequest of(Function> f } /** - * Required - The document ID + * Required - Unique identifier for the document. *

* API name: {@code id} */ @@ -115,8 +115,7 @@ public final String id() { } /** - * only perform the delete operation if the last operation that has changed the - * document has the specified primary term + * Only perform the operation if the document has this primary term. *

* API name: {@code if_primary_term} */ @@ -126,8 +125,7 @@ public final Long ifPrimaryTerm() { } /** - * only perform the delete operation if the last operation that has changed the - * document has the specified sequence number + * Only perform the operation if the document has this sequence number. *

* API name: {@code if_seq_no} */ @@ -137,7 +135,7 @@ public final Long ifSeqNo() { } /** - * Required - The name of the index + * Required - Name of the target index. *

* API name: {@code index} */ @@ -146,10 +144,11 @@ public final String index() { } /** - * If true then refresh the affected shards to make this operation - * visible to search, if wait_for then wait for a refresh to make - * this operation visible to search, if false (the default) then do - * nothing with refreshes. + * If true, Elasticsearch refreshes the affected shards to make + * this operation visible to search, if wait_for then wait for a + * refresh to make this operation visible to search, if false do + * nothing with refreshes. Valid values: true, false, + * wait_for. *

* API name: {@code refresh} */ @@ -159,7 +158,7 @@ public final Refresh refresh() { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -169,7 +168,7 @@ public final String routing() { } /** - * Explicit operation timeout + * Period to wait for active shards. *

* API name: {@code timeout} */ @@ -179,7 +178,8 @@ public final Time timeout() { } /** - * Explicit version number for concurrency control + * Explicit version number for concurrency control. The specified version must + * match the current version of the document for the request to succeed. *

* API name: {@code version} */ @@ -189,7 +189,7 @@ public final Long version() { } /** - * Specific version type + * Specific version type: external, external_gte. *

* API name: {@code version_type} */ @@ -199,11 +199,9 @@ public final VersionType versionType() { } /** - * Sets the number of shard copies that must be active before proceeding with - * the delete operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total + * number of shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -248,7 +246,7 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private WaitForActiveShards waitForActiveShards; /** - * Required - The document ID + * Required - Unique identifier for the document. *

* API name: {@code id} */ @@ -258,8 +256,7 @@ public final Builder id(String value) { } /** - * only perform the delete operation if the last operation that has changed the - * document has the specified primary term + * Only perform the operation if the document has this primary term. *

* API name: {@code if_primary_term} */ @@ -269,8 +266,7 @@ public final Builder ifPrimaryTerm(@Nullable Long value) { } /** - * only perform the delete operation if the last operation that has changed the - * document has the specified sequence number + * Only perform the operation if the document has this sequence number. *

* API name: {@code if_seq_no} */ @@ -280,7 +276,7 @@ public final Builder ifSeqNo(@Nullable Long value) { } /** - * Required - The name of the index + * Required - Name of the target index. *

* API name: {@code index} */ @@ -290,10 +286,11 @@ public final Builder index(String value) { } /** - * If true then refresh the affected shards to make this operation - * visible to search, if wait_for then wait for a refresh to make - * this operation visible to search, if false (the default) then do - * nothing with refreshes. + * If true, Elasticsearch refreshes the affected shards to make + * this operation visible to search, if wait_for then wait for a + * refresh to make this operation visible to search, if false do + * nothing with refreshes. Valid values: true, false, + * wait_for. *

* API name: {@code refresh} */ @@ -303,7 +300,7 @@ public final Builder refresh(@Nullable Refresh value) { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -313,7 +310,7 @@ public final Builder routing(@Nullable String value) { } /** - * Explicit operation timeout + * Period to wait for active shards. *

* API name: {@code timeout} */ @@ -323,7 +320,7 @@ public final Builder timeout(@Nullable Time value) { } /** - * Explicit operation timeout + * Period to wait for active shards. *

* API name: {@code timeout} */ @@ -332,7 +329,8 @@ public final Builder timeout(Function> fn) { } /** - * Explicit version number for concurrency control + * Explicit version number for concurrency control. The specified version must + * match the current version of the document for the request to succeed. *

* API name: {@code version} */ @@ -342,7 +340,7 @@ public final Builder version(@Nullable Long value) { } /** - * Specific version type + * Specific version type: external, external_gte. *

* API name: {@code version_type} */ @@ -352,11 +350,9 @@ public final Builder versionType(@Nullable VersionType value) { } /** - * Sets the number of shard copies that must be active before proceeding with - * the delete operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total + * number of shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -366,11 +362,9 @@ public final Builder waitForActiveShards(@Nullable WaitForActiveShards value) { } /** - * Sets the number of shard copies that must be active before proceeding with - * the delete operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total + * number of shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteScriptRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteScriptRequest.java index da3d6c4f1..696492663 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteScriptRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteScriptRequest.java @@ -45,7 +45,7 @@ // typedef: _global.delete_script.Request /** - * Deletes a script. + * Deletes a stored script or search template. * * @see API * specification @@ -75,7 +75,7 @@ public static DeleteScriptRequest of(Function * API name: {@code id} */ @@ -84,7 +84,8 @@ public final String id() { } /** - * Specify timeout for connection to master + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. *

* API name: {@code master_timeout} */ @@ -94,7 +95,8 @@ public final Time masterTimeout() { } /** - * Explicit operation timeout + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. *

* API name: {@code timeout} */ @@ -121,7 +123,7 @@ public static class Builder extends RequestBase.AbstractBuilder private Time timeout; /** - * Required - Script ID + * Required - Identifier for the stored script or search template. *

* API name: {@code id} */ @@ -131,7 +133,8 @@ public final Builder id(String value) { } /** - * Specify timeout for connection to master + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. *

* API name: {@code master_timeout} */ @@ -141,7 +144,8 @@ public final Builder masterTimeout(@Nullable Time value) { } /** - * Specify timeout for connection to master + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. *

* API name: {@code master_timeout} */ @@ -150,7 +154,8 @@ public final Builder masterTimeout(Function> f } /** - * Explicit operation timeout + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. *

* API name: {@code timeout} */ @@ -160,7 +165,8 @@ public final Builder timeout(@Nullable Time value) { } /** - * Explicit operation timeout + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. *

* API name: {@code timeout} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsRequest.java index b86dd3793..ff0b7e4e1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsRequest.java @@ -52,7 +52,7 @@ // typedef: _global.exists.Request /** - * Returns information about whether a document exists in an index. + * Checks if a document in an index exists. * * @see API * specification @@ -114,8 +114,8 @@ public static ExistsRequest of(Function> f } /** - * True or false to return the _source field or not, or a list of fields to - * return + * true or false to return the _source + * field or not, or a list of fields to return. *

* API name: {@code _source} */ @@ -125,7 +125,7 @@ public final SourceConfigParam source() { } /** - * A list of fields to exclude from the returned _source field + * A comma-separated list of source fields to exclude in the response. *

* API name: {@code _source_excludes} */ @@ -134,7 +134,7 @@ public final List sourceExcludes() { } /** - * A list of fields to extract and return from the _source field + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} */ @@ -143,7 +143,7 @@ public final List sourceIncludes() { } /** - * Required - The document ID + * Required - Identifier of the document. *

* API name: {@code id} */ @@ -152,7 +152,8 @@ public final String id() { } /** - * Required - The name of the index + * Required - Comma-separated list of data streams, indices, and aliases. + * Supports wildcards (*). *

* API name: {@code index} */ @@ -161,8 +162,8 @@ public final String index() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -172,7 +173,7 @@ public final String preference() { } /** - * Specify whether to perform the operation in realtime or search mode + * If true, the request is real-time as opposed to near-real-time. *

* API name: {@code realtime} */ @@ -182,7 +183,8 @@ public final Boolean realtime() { } /** - * Refresh the shard containing the document before performing the operation + * If true, Elasticsearch refreshes all shards involved in the + * delete by query after the request completes. *

* API name: {@code refresh} */ @@ -192,7 +194,7 @@ public final Boolean refresh() { } /** - * Specific routing value + * Target the specified primary shard. *

* API name: {@code routing} */ @@ -202,7 +204,9 @@ public final String routing() { } /** - * A comma-separated list of stored fields to return in the response + * List of stored fields to return as part of a hit. If no fields are specified, + * no stored fields are included in the response. If this field is specified, + * the _source parameter defaults to false. *

* API name: {@code stored_fields} */ @@ -211,7 +215,8 @@ public final List storedFields() { } /** - * Explicit version number for concurrency control + * Explicit version number for concurrency control. The specified version must + * match the current version of the document for the request to succeed. *

* API name: {@code version} */ @@ -221,7 +226,7 @@ public final Long version() { } /** - * Specific version type + * Specific version type: external, external_gte. *

* API name: {@code version_type} */ @@ -272,8 +277,8 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private VersionType versionType; /** - * True or false to return the _source field or not, or a list of fields to - * return + * true or false to return the _source + * field or not, or a list of fields to return. *

* API name: {@code _source} */ @@ -283,8 +288,8 @@ public final Builder source(@Nullable SourceConfigParam value) { } /** - * True or false to return the _source field or not, or a list of fields to - * return + * true or false to return the _source + * field or not, or a list of fields to return. *

* API name: {@code _source} */ @@ -293,7 +298,7 @@ public final Builder source(Function * API name: {@code _source_excludes} *

@@ -305,7 +310,7 @@ public final Builder sourceExcludes(List list) { } /** - * A list of fields to exclude from the returned _source field + * A comma-separated list of source fields to exclude in the response. *

* API name: {@code _source_excludes} *

@@ -317,7 +322,7 @@ public final Builder sourceExcludes(String value, String... values) { } /** - * A list of fields to extract and return from the _source field + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} *

@@ -329,7 +334,7 @@ public final Builder sourceIncludes(List list) { } /** - * A list of fields to extract and return from the _source field + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} *

@@ -341,7 +346,7 @@ public final Builder sourceIncludes(String value, String... values) { } /** - * Required - The document ID + * Required - Identifier of the document. *

* API name: {@code id} */ @@ -351,7 +356,8 @@ public final Builder id(String value) { } /** - * Required - The name of the index + * Required - Comma-separated list of data streams, indices, and aliases. + * Supports wildcards (*). *

* API name: {@code index} */ @@ -361,8 +367,8 @@ public final Builder index(String value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -372,7 +378,7 @@ public final Builder preference(@Nullable String value) { } /** - * Specify whether to perform the operation in realtime or search mode + * If true, the request is real-time as opposed to near-real-time. *

* API name: {@code realtime} */ @@ -382,7 +388,8 @@ public final Builder realtime(@Nullable Boolean value) { } /** - * Refresh the shard containing the document before performing the operation + * If true, Elasticsearch refreshes all shards involved in the + * delete by query after the request completes. *

* API name: {@code refresh} */ @@ -392,7 +399,7 @@ public final Builder refresh(@Nullable Boolean value) { } /** - * Specific routing value + * Target the specified primary shard. *

* API name: {@code routing} */ @@ -402,7 +409,9 @@ public final Builder routing(@Nullable String value) { } /** - * A comma-separated list of stored fields to return in the response + * List of stored fields to return as part of a hit. If no fields are specified, + * no stored fields are included in the response. If this field is specified, + * the _source parameter defaults to false. *

* API name: {@code stored_fields} *

@@ -414,7 +423,9 @@ public final Builder storedFields(List list) { } /** - * A comma-separated list of stored fields to return in the response + * List of stored fields to return as part of a hit. If no fields are specified, + * no stored fields are included in the response. If this field is specified, + * the _source parameter defaults to false. *

* API name: {@code stored_fields} *

@@ -426,7 +437,8 @@ public final Builder storedFields(String value, String... values) { } /** - * Explicit version number for concurrency control + * Explicit version number for concurrency control. The specified version must + * match the current version of the document for the request to succeed. *

* API name: {@code version} */ @@ -436,7 +448,7 @@ public final Builder version(@Nullable Long value) { } /** - * Specific version type + * Specific version type: external, external_gte. *

* API name: {@code version_type} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsSourceRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsSourceRequest.java index fef36572e..16d6cf7ca 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsSourceRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsSourceRequest.java @@ -52,7 +52,7 @@ // typedef: _global.exists_source.Request /** - * Returns information about whether a document source exists in an index. + * Checks if a document's _source is stored. * * @see API * specification @@ -111,8 +111,8 @@ public static ExistsSourceRequest of(Functiontrue or false to return the _source + * field or not, or a list of fields to return. *

* API name: {@code _source} */ @@ -122,7 +122,7 @@ public final SourceConfigParam source() { } /** - * A list of fields to exclude from the returned _source field + * A comma-separated list of source fields to exclude in the response. *

* API name: {@code _source_excludes} */ @@ -131,7 +131,7 @@ public final List sourceExcludes() { } /** - * A list of fields to extract and return from the _source field + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} */ @@ -140,7 +140,7 @@ public final List sourceIncludes() { } /** - * Required - The document ID + * Required - Identifier of the document. *

* API name: {@code id} */ @@ -149,7 +149,8 @@ public final String id() { } /** - * Required - The name of the index + * Required - Comma-separated list of data streams, indices, and aliases. + * Supports wildcards (*). *

* API name: {@code index} */ @@ -158,8 +159,8 @@ public final String index() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -169,7 +170,7 @@ public final String preference() { } /** - * Specify whether to perform the operation in realtime or search mode + * If true, the request is real-time as opposed to near-real-time. *

* API name: {@code realtime} */ @@ -179,7 +180,8 @@ public final Boolean realtime() { } /** - * Refresh the shard containing the document before performing the operation + * If true, Elasticsearch refreshes all shards involved in the + * delete by query after the request completes. *

* API name: {@code refresh} */ @@ -189,7 +191,7 @@ public final Boolean refresh() { } /** - * Specific routing value + * Target the specified primary shard. *

* API name: {@code routing} */ @@ -199,7 +201,8 @@ public final String routing() { } /** - * Explicit version number for concurrency control + * Explicit version number for concurrency control. The specified version must + * match the current version of the document for the request to succeed. *

* API name: {@code version} */ @@ -209,7 +212,7 @@ public final Long version() { } /** - * Specific version type + * Specific version type: external, external_gte. *

* API name: {@code version_type} */ @@ -259,8 +262,8 @@ public static class Builder extends RequestBase.AbstractBuilder private VersionType versionType; /** - * True or false to return the _source field or not, or a list of fields to - * return + * true or false to return the _source + * field or not, or a list of fields to return. *

* API name: {@code _source} */ @@ -270,8 +273,8 @@ public final Builder source(@Nullable SourceConfigParam value) { } /** - * True or false to return the _source field or not, or a list of fields to - * return + * true or false to return the _source + * field or not, or a list of fields to return. *

* API name: {@code _source} */ @@ -280,7 +283,7 @@ public final Builder source(Function * API name: {@code _source_excludes} *

@@ -292,7 +295,7 @@ public final Builder sourceExcludes(List list) { } /** - * A list of fields to exclude from the returned _source field + * A comma-separated list of source fields to exclude in the response. *

* API name: {@code _source_excludes} *

@@ -304,7 +307,7 @@ public final Builder sourceExcludes(String value, String... values) { } /** - * A list of fields to extract and return from the _source field + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} *

@@ -316,7 +319,7 @@ public final Builder sourceIncludes(List list) { } /** - * A list of fields to extract and return from the _source field + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} *

@@ -328,7 +331,7 @@ public final Builder sourceIncludes(String value, String... values) { } /** - * Required - The document ID + * Required - Identifier of the document. *

* API name: {@code id} */ @@ -338,7 +341,8 @@ public final Builder id(String value) { } /** - * Required - The name of the index + * Required - Comma-separated list of data streams, indices, and aliases. + * Supports wildcards (*). *

* API name: {@code index} */ @@ -348,8 +352,8 @@ public final Builder index(String value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -359,7 +363,7 @@ public final Builder preference(@Nullable String value) { } /** - * Specify whether to perform the operation in realtime or search mode + * If true, the request is real-time as opposed to near-real-time. *

* API name: {@code realtime} */ @@ -369,7 +373,8 @@ public final Builder realtime(@Nullable Boolean value) { } /** - * Refresh the shard containing the document before performing the operation + * If true, Elasticsearch refreshes all shards involved in the + * delete by query after the request completes. *

* API name: {@code refresh} */ @@ -379,7 +384,7 @@ public final Builder refresh(@Nullable Boolean value) { } /** - * Specific routing value + * Target the specified primary shard. *

* API name: {@code routing} */ @@ -389,7 +394,8 @@ public final Builder routing(@Nullable String value) { } /** - * Explicit version number for concurrency control + * Explicit version number for concurrency control. The specified version must + * match the current version of the document for the request to succeed. *

* API name: {@code version} */ @@ -399,7 +405,7 @@ public final Builder version(@Nullable Long value) { } /** - * Specific version type + * Specific version type: external, external_gte. *

* API name: {@code version_type} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExplainRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExplainRequest.java index a4e54b0c5..ddf8878df 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExplainRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExplainRequest.java @@ -52,7 +52,8 @@ // typedef: _global.explain.Request /** - * Returns information about why a specific matches (or doesn't match) a query. + * Returns information about why a specific document matches (or doesn’t match) + * a query. * * @see API * specification @@ -126,8 +127,8 @@ public static ExplainRequest of(Function> } /** - * True or false to return the _source field or not, or a list of fields to - * return + * True or false to return the _source field or not, or a list of + * fields to return. *

* API name: {@code _source} */ @@ -137,7 +138,7 @@ public final SourceConfigParam source() { } /** - * A list of fields to exclude from the returned _source field + * A comma-separated list of source fields to exclude from the response. *

* API name: {@code _source_excludes} */ @@ -146,7 +147,7 @@ public final List sourceExcludes() { } /** - * A list of fields to extract and return from the _source field + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} */ @@ -155,8 +156,7 @@ public final List sourceIncludes() { } /** - * Specify whether wildcards and prefix queries in the query string query should - * be analyzed (default: false) + * If true, wildcard and prefix queries are analyzed. *

* API name: {@code analyze_wildcard} */ @@ -166,7 +166,8 @@ public final Boolean analyzeWildcard() { } /** - * The analyzer for the query string query + * Analyzer to use for the query string. This parameter can only be used when + * the q query string parameter is specified. *

* API name: {@code analyzer} */ @@ -176,7 +177,8 @@ public final String analyzer() { } /** - * The default operator for query string query (AND or OR) + * The default operator for query string query: AND or + * OR. *

* API name: {@code default_operator} */ @@ -186,7 +188,7 @@ public final Operator defaultOperator() { } /** - * The default field for query string query (default: _all) + * Field to use as default where no field prefix is given in the query string. *

* API name: {@code df} */ @@ -196,7 +198,7 @@ public final String df() { } /** - * Required - The document ID + * Required - Defines the document ID. *

* API name: {@code id} */ @@ -205,7 +207,8 @@ public final String id() { } /** - * Required - The name of the index + * Required - Index names used to limit the request. Only a single index name + * can be provided to this parameter. *

* API name: {@code index} */ @@ -214,8 +217,8 @@ public final String index() { } /** - * Specify whether format-based query failures (such as providing text to a - * numeric field) should be ignored + * If true, format-based query failures (such as providing text to + * a numeric field) in the query string will be ignored. *

* API name: {@code lenient} */ @@ -225,8 +228,8 @@ public final Boolean lenient() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -236,7 +239,7 @@ public final String preference() { } /** - * Query in the Lucene query string syntax + * Query in the Lucene query string syntax. *

* API name: {@code q} */ @@ -246,6 +249,8 @@ public final String q() { } /** + * Defines the search definition using the Query DSL. + *

* API name: {@code query} */ @Nullable @@ -254,7 +259,7 @@ public final Query query() { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -264,7 +269,7 @@ public final String routing() { } /** - * A comma-separated list of stored fields to return in the response + * A comma-separated list of stored fields to return in the response. *

* API name: {@code stored_fields} */ @@ -342,8 +347,8 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private List storedFields; /** - * True or false to return the _source field or not, or a list of fields to - * return + * True or false to return the _source field or not, or a list of + * fields to return. *

* API name: {@code _source} */ @@ -353,8 +358,8 @@ public final Builder source(@Nullable SourceConfigParam value) { } /** - * True or false to return the _source field or not, or a list of fields to - * return + * True or false to return the _source field or not, or a list of + * fields to return. *

* API name: {@code _source} */ @@ -363,7 +368,7 @@ public final Builder source(Function * API name: {@code _source_excludes} *

@@ -375,7 +380,7 @@ public final Builder sourceExcludes(List list) { } /** - * A list of fields to exclude from the returned _source field + * A comma-separated list of source fields to exclude from the response. *

* API name: {@code _source_excludes} *

@@ -387,7 +392,7 @@ public final Builder sourceExcludes(String value, String... values) { } /** - * A list of fields to extract and return from the _source field + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} *

@@ -399,7 +404,7 @@ public final Builder sourceIncludes(List list) { } /** - * A list of fields to extract and return from the _source field + * A comma-separated list of source fields to include in the response. *

* API name: {@code _source_includes} *

@@ -411,8 +416,7 @@ public final Builder sourceIncludes(String value, String... values) { } /** - * Specify whether wildcards and prefix queries in the query string query should - * be analyzed (default: false) + * If true, wildcard and prefix queries are analyzed. *

* API name: {@code analyze_wildcard} */ @@ -422,7 +426,8 @@ public final Builder analyzeWildcard(@Nullable Boolean value) { } /** - * The analyzer for the query string query + * Analyzer to use for the query string. This parameter can only be used when + * the q query string parameter is specified. *

* API name: {@code analyzer} */ @@ -432,7 +437,8 @@ public final Builder analyzer(@Nullable String value) { } /** - * The default operator for query string query (AND or OR) + * The default operator for query string query: AND or + * OR. *

* API name: {@code default_operator} */ @@ -442,7 +448,7 @@ public final Builder defaultOperator(@Nullable Operator value) { } /** - * The default field for query string query (default: _all) + * Field to use as default where no field prefix is given in the query string. *

* API name: {@code df} */ @@ -452,7 +458,7 @@ public final Builder df(@Nullable String value) { } /** - * Required - The document ID + * Required - Defines the document ID. *

* API name: {@code id} */ @@ -462,7 +468,8 @@ public final Builder id(String value) { } /** - * Required - The name of the index + * Required - Index names used to limit the request. Only a single index name + * can be provided to this parameter. *

* API name: {@code index} */ @@ -472,8 +479,8 @@ public final Builder index(String value) { } /** - * Specify whether format-based query failures (such as providing text to a - * numeric field) should be ignored + * If true, format-based query failures (such as providing text to + * a numeric field) in the query string will be ignored. *

* API name: {@code lenient} */ @@ -483,8 +490,8 @@ public final Builder lenient(@Nullable Boolean value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -494,7 +501,7 @@ public final Builder preference(@Nullable String value) { } /** - * Query in the Lucene query string syntax + * Query in the Lucene query string syntax. *

* API name: {@code q} */ @@ -504,6 +511,8 @@ public final Builder q(@Nullable String value) { } /** + * Defines the search definition using the Query DSL. + *

* API name: {@code query} */ public final Builder query(@Nullable Query value) { @@ -512,6 +521,8 @@ public final Builder query(@Nullable Query value) { } /** + * Defines the search definition using the Query DSL. + *

* API name: {@code query} */ public final Builder query(Function> fn) { @@ -519,7 +530,7 @@ public final Builder query(Function> fn) { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -529,7 +540,7 @@ public final Builder routing(@Nullable String value) { } /** - * A comma-separated list of stored fields to return in the response + * A comma-separated list of stored fields to return in the response. *

* API name: {@code stored_fields} *

@@ -541,7 +552,7 @@ public final Builder storedFields(List list) { } /** - * A comma-separated list of stored fields to return in the response + * A comma-separated list of stored fields to return in the response. *

* API name: {@code stored_fields} *

diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetRequest.java index 8b40ddae4..afec0bd70 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetRequest.java @@ -170,7 +170,7 @@ public final String preference() { } /** - * Boolean) If true, the request is real-time as opposed to near-real-time. + * If true, the request is real-time as opposed to near-real-time. *

* API name: {@code realtime} */ @@ -201,7 +201,9 @@ public final String routing() { } /** - * A comma-separated list of stored fields to return in the response + * List of stored fields to return as part of a hit. If no fields are specified, + * no stored fields are included in the response. If this field is specified, + * the _source parameter defaults to false. *

* API name: {@code stored_fields} */ @@ -372,7 +374,7 @@ public final Builder preference(@Nullable String value) { } /** - * Boolean) If true, the request is real-time as opposed to near-real-time. + * If true, the request is real-time as opposed to near-real-time. *

* API name: {@code realtime} */ @@ -403,7 +405,9 @@ public final Builder routing(@Nullable String value) { } /** - * A comma-separated list of stored fields to return in the response + * List of stored fields to return as part of a hit. If no fields are specified, + * no stored fields are included in the response. If this field is specified, + * the _source parameter defaults to false. *

* API name: {@code stored_fields} *

@@ -415,7 +419,9 @@ public final Builder storedFields(List list) { } /** - * A comma-separated list of stored fields to return in the response + * List of stored fields to return as part of a hit. If no fields are specified, + * no stored fields are included in the response. If this field is specified, + * the _source parameter defaults to false. *

* API name: {@code stored_fields} *

diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptRequest.java index 65d057ae2..72da3f3bd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptRequest.java @@ -45,7 +45,7 @@ // typedef: _global.get_script.Request /** - * Returns a script. + * Retrieves a stored script or search template. * * @see API * specification @@ -71,7 +71,7 @@ public static GetScriptRequest of(Function * API name: {@code id} */ @@ -104,7 +104,7 @@ public static class Builder extends RequestBase.AbstractBuilder private Time masterTimeout; /** - * Required - Script ID + * Required - Identifier for the stored script or search template. *

* API name: {@code id} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/IndexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/IndexRequest.java index 4ea3ab8f2..1960e402e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/IndexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/IndexRequest.java @@ -58,7 +58,9 @@ // typedef: _global.index.Request /** - * Creates or updates a document in an index. + * Adds a JSON document to the specified data stream or index and makes it + * searchable. If the target is an index and the document already exists, the + * request updates the document and increments its version. * * @see API * specification @@ -136,7 +138,7 @@ public static IndexRequest of( } /** - * Document ID + * Unique identifier for the document. *

* API name: {@code id} */ @@ -146,8 +148,7 @@ public final String id() { } /** - * only perform the index operation if the last operation that has changed the - * document has the specified primary term + * Only perform the operation if the document has this primary term. *

* API name: {@code if_primary_term} */ @@ -157,8 +158,7 @@ public final Long ifPrimaryTerm() { } /** - * only perform the index operation if the last operation that has changed the - * document has the specified sequence number + * Only perform the operation if the document has this sequence number. *

* API name: {@code if_seq_no} */ @@ -168,7 +168,7 @@ public final Long ifSeqNo() { } /** - * Required - The name of the index + * Required - Name of the data stream or index to target. *

* API name: {@code index} */ @@ -177,9 +177,13 @@ public final String index() { } /** - * Explicit operation type. Defaults to index for requests with an - * explicit document ID, and to createfor requests without an - * explicit document ID + * Set to create to only index the document if it does not already exist (put if + * absent). If a document with the specified _id already exists, + * the indexing operation will fail. Same as using the + * <index>/_create endpoint. Valid values: + * index, create. If document id is specified, it + * defaults to index. Otherwise, it defaults to + * create. *

* API name: {@code op_type} */ @@ -189,7 +193,11 @@ public final OpType opType() { } /** - * The pipeline id to preprocess incoming documents with + * ID of the pipeline to use to preprocess incoming documents. If the index has + * a default ingest pipeline specified, then setting the value to + * _none disables the default ingest pipeline for this request. If + * a final pipeline is configured it will always run, regardless of the value of + * this parameter. *

* API name: {@code pipeline} */ @@ -199,10 +207,11 @@ public final String pipeline() { } /** - * If true then refresh the affected shards to make this operation - * visible to search, if wait_for then wait for a refresh to make - * this operation visible to search, if false (the default) then do - * nothing with refreshes. + * If true, Elasticsearch refreshes the affected shards to make + * this operation visible to search, if wait_for then wait for a + * refresh to make this operation visible to search, if false do + * nothing with refreshes. Valid values: true, false, + * wait_for. *

* API name: {@code refresh} */ @@ -212,7 +221,7 @@ public final Refresh refresh() { } /** - * When true, requires destination to be an alias. Default is false + * If true, the destination must be an index alias. *

* API name: {@code require_alias} */ @@ -222,7 +231,7 @@ public final Boolean requireAlias() { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -232,7 +241,8 @@ public final String routing() { } /** - * Explicit operation timeout + * Period the request waits for the following operations: automatic index + * creation, dynamic mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -242,7 +252,8 @@ public final Time timeout() { } /** - * Explicit version number for concurrency control + * Explicit version number for concurrency control. The specified version must + * match the current version of the document for the request to succeed. *

* API name: {@code version} */ @@ -252,7 +263,7 @@ public final Long version() { } /** - * Specific version type + * Specific version type: external, external_gte. *

* API name: {@code version_type} */ @@ -262,11 +273,9 @@ public final VersionType versionType() { } /** - * Sets the number of shard copies that must be active before proceeding with - * the index operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total number of + * shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -343,7 +352,7 @@ public static class Builder extends RequestBase.AbstractBuilder tDocumentSerializer; /** - * Document ID + * Unique identifier for the document. *

* API name: {@code id} */ @@ -353,8 +362,7 @@ public final Builder id(@Nullable String value) { } /** - * only perform the index operation if the last operation that has changed the - * document has the specified primary term + * Only perform the operation if the document has this primary term. *

* API name: {@code if_primary_term} */ @@ -364,8 +372,7 @@ public final Builder ifPrimaryTerm(@Nullable Long value) { } /** - * only perform the index operation if the last operation that has changed the - * document has the specified sequence number + * Only perform the operation if the document has this sequence number. *

* API name: {@code if_seq_no} */ @@ -375,7 +382,7 @@ public final Builder ifSeqNo(@Nullable Long value) { } /** - * Required - The name of the index + * Required - Name of the data stream or index to target. *

* API name: {@code index} */ @@ -385,9 +392,13 @@ public final Builder index(String value) { } /** - * Explicit operation type. Defaults to index for requests with an - * explicit document ID, and to createfor requests without an - * explicit document ID + * Set to create to only index the document if it does not already exist (put if + * absent). If a document with the specified _id already exists, + * the indexing operation will fail. Same as using the + * <index>/_create endpoint. Valid values: + * index, create. If document id is specified, it + * defaults to index. Otherwise, it defaults to + * create. *

* API name: {@code op_type} */ @@ -397,7 +408,11 @@ public final Builder opType(@Nullable OpType value) { } /** - * The pipeline id to preprocess incoming documents with + * ID of the pipeline to use to preprocess incoming documents. If the index has + * a default ingest pipeline specified, then setting the value to + * _none disables the default ingest pipeline for this request. If + * a final pipeline is configured it will always run, regardless of the value of + * this parameter. *

* API name: {@code pipeline} */ @@ -407,10 +422,11 @@ public final Builder pipeline(@Nullable String value) { } /** - * If true then refresh the affected shards to make this operation - * visible to search, if wait_for then wait for a refresh to make - * this operation visible to search, if false (the default) then do - * nothing with refreshes. + * If true, Elasticsearch refreshes the affected shards to make + * this operation visible to search, if wait_for then wait for a + * refresh to make this operation visible to search, if false do + * nothing with refreshes. Valid values: true, false, + * wait_for. *

* API name: {@code refresh} */ @@ -420,7 +436,7 @@ public final Builder refresh(@Nullable Refresh value) { } /** - * When true, requires destination to be an alias. Default is false + * If true, the destination must be an index alias. *

* API name: {@code require_alias} */ @@ -430,7 +446,7 @@ public final Builder requireAlias(@Nullable Boolean value) { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -440,7 +456,8 @@ public final Builder routing(@Nullable String value) { } /** - * Explicit operation timeout + * Period the request waits for the following operations: automatic index + * creation, dynamic mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -450,7 +467,8 @@ public final Builder timeout(@Nullable Time value) { } /** - * Explicit operation timeout + * Period the request waits for the following operations: automatic index + * creation, dynamic mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -459,7 +477,8 @@ public final Builder timeout(Function * API name: {@code version} */ @@ -469,7 +488,7 @@ public final Builder version(@Nullable Long value) { } /** - * Specific version type + * Specific version type: external, external_gte. *

* API name: {@code version_type} */ @@ -479,11 +498,9 @@ public final Builder versionType(@Nullable VersionType value) { } /** - * Sets the number of shard copies that must be active before proceeding with - * the index operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total number of + * shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -493,11 +510,9 @@ public final Builder waitForActiveShards(@Nullable WaitForActiveShard } /** - * Sets the number of shard copies that must be active before proceeding with - * the index operation. Defaults to 1, meaning the primary shard only. Set to - * all for all shard copies, otherwise set to any non-negative - * value less than or equal to the total number of copies for the shard (number - * of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total number of + * shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchTemplateRequest.java index 722f286c3..b9eddf814 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchTemplateRequest.java @@ -96,8 +96,8 @@ public Iterator _serializables() { return this.searchTemplates.iterator(); } /** - * Indicates whether network round-trips should be minimized as part of - * cross-cluster search requests execution + * If true, network round-trips are minimized for cross-cluster + * search requests. *

* API name: {@code ccs_minimize_roundtrips} */ @@ -107,7 +107,9 @@ public final Boolean ccsMinimizeRoundtrips() { } /** - * A comma-separated list of index names to use as default + * Comma-separated list of data streams, indices, and aliases to search. + * Supports wildcards (*). To search all data streams and indices, + * omit this parameter or use *. *

* API name: {@code index} */ @@ -116,8 +118,7 @@ public final List index() { } /** - * Controls the maximum number of concurrent searches the multi search api will - * execute + * Maximum number of concurrent searches the API can run. *

* API name: {@code max_concurrent_searches} */ @@ -127,7 +128,8 @@ public final Long maxConcurrentSearches() { } /** - * Search operation type + * The type of the search operation. Available options: + * query_then_fetch, dfs_query_then_fetch. *

* API name: {@code search_type} */ @@ -180,8 +182,8 @@ public static class Builder extends RequestBase.AbstractBuilder private List searchTemplates; /** - * Indicates whether network round-trips should be minimized as part of - * cross-cluster search requests execution + * If true, network round-trips are minimized for cross-cluster + * search requests. *

* API name: {@code ccs_minimize_roundtrips} */ @@ -191,7 +193,9 @@ public final Builder ccsMinimizeRoundtrips(@Nullable Boolean value) { } /** - * A comma-separated list of index names to use as default + * Comma-separated list of data streams, indices, and aliases to search. + * Supports wildcards (*). To search all data streams and indices, + * omit this parameter or use *. *

* API name: {@code index} *

@@ -203,7 +207,9 @@ public final Builder index(List list) { } /** - * A comma-separated list of index names to use as default + * Comma-separated list of data streams, indices, and aliases to search. + * Supports wildcards (*). To search all data streams and indices, + * omit this parameter or use *. *

* API name: {@code index} *

@@ -215,8 +221,7 @@ public final Builder index(String value, String... values) { } /** - * Controls the maximum number of concurrent searches the multi search api will - * execute + * Maximum number of concurrent searches the API can run. *

* API name: {@code max_concurrent_searches} */ @@ -226,7 +231,8 @@ public final Builder maxConcurrentSearches(@Nullable Long value) { } /** - * Search operation type + * The type of the search operation. Available options: + * query_then_fetch, dfs_query_then_fetch. *

* API name: {@code search_type} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MtermvectorsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MtermvectorsRequest.java index 6b9a77957..0e2d4e629 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MtermvectorsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MtermvectorsRequest.java @@ -124,6 +124,8 @@ public static MtermvectorsRequest of(Function * API name: {@code docs} */ public final List docs() { @@ -131,9 +133,8 @@ public final List docs() { } /** - * Specifies if document count, sum of document frequencies and sum of total - * term frequencies should be returned. Applies to all returned documents unless - * otherwise specified in body "params" or "docs". + * If true, the response includes the document count, sum of + * document frequencies, and sum of total term frequencies. *

* API name: {@code field_statistics} */ @@ -143,8 +144,10 @@ public final Boolean fieldStatistics() { } /** - * A comma-separated list of fields to return. Applies to all returned documents - * unless otherwise specified in body "params" or "docs". + * Comma-separated list or wildcard expressions of fields to include in the + * statistics. Used as the default list unless a specific field list is provided + * in the completion_fields or fielddata_fields + * parameters. *

* API name: {@code fields} */ @@ -153,6 +156,9 @@ public final List fields() { } /** + * Simplified syntax to specify documents by their ID if they're in the same + * index. + *

* API name: {@code ids} */ public final List ids() { @@ -160,7 +166,7 @@ public final List ids() { } /** - * The index in which the document resides. + * Name of the index that contains the documents. *

* API name: {@code index} */ @@ -170,9 +176,7 @@ public final String index() { } /** - * Specifies if term offsets should be returned. Applies to all returned - * documents unless otherwise specified in body "params" or - * "docs". + * If true, the response includes term offsets. *

* API name: {@code offsets} */ @@ -182,9 +186,7 @@ public final Boolean offsets() { } /** - * Specifies if term payloads should be returned. Applies to all returned - * documents unless otherwise specified in body "params" or - * "docs". + * If true, the response includes term payloads. *

* API name: {@code payloads} */ @@ -194,9 +196,7 @@ public final Boolean payloads() { } /** - * Specifies if term positions should be returned. Applies to all returned - * documents unless otherwise specified in body "params" or - * "docs". + * If true, the response includes term positions. *

* API name: {@code positions} */ @@ -206,9 +206,8 @@ public final Boolean positions() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) .Applies to all returned documents unless otherwise specified in body - * "params" or "docs". + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -218,8 +217,7 @@ public final String preference() { } /** - * Specifies if requests are real-time as opposed to near-real-time (default: - * true). + * If true, the request is real-time as opposed to near-real-time. *

* API name: {@code realtime} */ @@ -229,8 +227,7 @@ public final Boolean realtime() { } /** - * Specific routing value. Applies to all returned documents unless otherwise - * specified in body "params" or "docs". + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -240,9 +237,7 @@ public final String routing() { } /** - * Specifies if total term frequency and document frequency should be returned. - * Applies to all returned documents unless otherwise specified in body - * "params" or "docs". + * If true, the response includes term frequency and document frequency. *

* API name: {@code term_statistics} */ @@ -252,7 +247,7 @@ public final Boolean termStatistics() { } /** - * Explicit version number for concurrency control + * If true, returns the document version as part of a hit. *

* API name: {@code version} */ @@ -262,7 +257,7 @@ public final Long version() { } /** - * Specific version type + * Specific version type. *

* API name: {@code version_type} */ @@ -357,6 +352,8 @@ public static class Builder extends RequestBase.AbstractBuilder private VersionType versionType; /** + * Array of existing or artificial documents. + *

* API name: {@code docs} *

* Adds all elements of list to docs. @@ -367,6 +364,8 @@ public final Builder docs(List list) { } /** + * Array of existing or artificial documents. + *

* API name: {@code docs} *

* Adds one or more values to docs. @@ -377,6 +376,8 @@ public final Builder docs(MultiTermVectorsOperation value, MultiTermVectorsOpera } /** + * Array of existing or artificial documents. + *

* API name: {@code docs} *

* Adds a value to docs using a builder lambda. @@ -387,9 +388,8 @@ public final Builder docs( } /** - * Specifies if document count, sum of document frequencies and sum of total - * term frequencies should be returned. Applies to all returned documents unless - * otherwise specified in body "params" or "docs". + * If true, the response includes the document count, sum of + * document frequencies, and sum of total term frequencies. *

* API name: {@code field_statistics} */ @@ -399,8 +399,10 @@ public final Builder fieldStatistics(@Nullable Boolean value) { } /** - * A comma-separated list of fields to return. Applies to all returned documents - * unless otherwise specified in body "params" or "docs". + * Comma-separated list or wildcard expressions of fields to include in the + * statistics. Used as the default list unless a specific field list is provided + * in the completion_fields or fielddata_fields + * parameters. *

* API name: {@code fields} *

@@ -412,8 +414,10 @@ public final Builder fields(List list) { } /** - * A comma-separated list of fields to return. Applies to all returned documents - * unless otherwise specified in body "params" or "docs". + * Comma-separated list or wildcard expressions of fields to include in the + * statistics. Used as the default list unless a specific field list is provided + * in the completion_fields or fielddata_fields + * parameters. *

* API name: {@code fields} *

@@ -425,6 +429,9 @@ public final Builder fields(String value, String... values) { } /** + * Simplified syntax to specify documents by their ID if they're in the same + * index. + *

* API name: {@code ids} *

* Adds all elements of list to ids. @@ -435,6 +442,9 @@ public final Builder ids(List list) { } /** + * Simplified syntax to specify documents by their ID if they're in the same + * index. + *

* API name: {@code ids} *

* Adds one or more values to ids. @@ -445,7 +455,7 @@ public final Builder ids(String value, String... values) { } /** - * The index in which the document resides. + * Name of the index that contains the documents. *

* API name: {@code index} */ @@ -455,9 +465,7 @@ public final Builder index(@Nullable String value) { } /** - * Specifies if term offsets should be returned. Applies to all returned - * documents unless otherwise specified in body "params" or - * "docs". + * If true, the response includes term offsets. *

* API name: {@code offsets} */ @@ -467,9 +475,7 @@ public final Builder offsets(@Nullable Boolean value) { } /** - * Specifies if term payloads should be returned. Applies to all returned - * documents unless otherwise specified in body "params" or - * "docs". + * If true, the response includes term payloads. *

* API name: {@code payloads} */ @@ -479,9 +485,7 @@ public final Builder payloads(@Nullable Boolean value) { } /** - * Specifies if term positions should be returned. Applies to all returned - * documents unless otherwise specified in body "params" or - * "docs". + * If true, the response includes term positions. *

* API name: {@code positions} */ @@ -491,9 +495,8 @@ public final Builder positions(@Nullable Boolean value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) .Applies to all returned documents unless otherwise specified in body - * "params" or "docs". + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -503,8 +506,7 @@ public final Builder preference(@Nullable String value) { } /** - * Specifies if requests are real-time as opposed to near-real-time (default: - * true). + * If true, the request is real-time as opposed to near-real-time. *

* API name: {@code realtime} */ @@ -514,8 +516,7 @@ public final Builder realtime(@Nullable Boolean value) { } /** - * Specific routing value. Applies to all returned documents unless otherwise - * specified in body "params" or "docs". + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -525,9 +526,7 @@ public final Builder routing(@Nullable String value) { } /** - * Specifies if total term frequency and document frequency should be returned. - * Applies to all returned documents unless otherwise specified in body - * "params" or "docs". + * If true, the response includes term frequency and document frequency. *

* API name: {@code term_statistics} */ @@ -537,7 +536,7 @@ public final Builder termStatistics(@Nullable Boolean value) { } /** - * Explicit version number for concurrency control + * If true, returns the document version as part of a hit. *

* API name: {@code version} */ @@ -547,7 +546,7 @@ public final Builder version(@Nullable Long value) { } /** - * Specific version type + * Specific version type. *

* API name: {@code version_type} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java index 0a60e2767..5d71ac588 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java @@ -97,8 +97,12 @@ public static OpenPointInTimeRequest of(Function

* API name: {@code expand_wildcards} */ @@ -107,8 +111,8 @@ public final List expandWildcards() { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -128,7 +132,7 @@ public final List index() { } /** - * Required - Specific the time to live for the point in time + * Required - Extends the time to live of the corresponding point in time. *

* API name: {@code keep_alive} */ @@ -137,8 +141,8 @@ public final Time keepAlive() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -148,7 +152,7 @@ public final String preference() { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -183,8 +187,12 @@ public static class Builder extends RequestBase.AbstractBuilder private String routing; /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} *

@@ -196,8 +204,12 @@ public final Builder expandWildcards(List list) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} *

@@ -209,8 +221,8 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -246,7 +258,7 @@ public final Builder index(String value, String... values) { } /** - * Required - Specific the time to live for the point in time + * Required - Extends the time to live of the corresponding point in time. *

* API name: {@code keep_alive} */ @@ -256,7 +268,7 @@ public final Builder keepAlive(Time value) { } /** - * Required - Specific the time to live for the point in time + * Required - Extends the time to live of the corresponding point in time. *

* API name: {@code keep_alive} */ @@ -265,8 +277,8 @@ public final Builder keepAlive(Function> fn) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -276,7 +288,7 @@ public final Builder preference(@Nullable String value) { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/PutScriptRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/PutScriptRequest.java index 69998a95d..1ef9c2032 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/PutScriptRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/PutScriptRequest.java @@ -48,7 +48,7 @@ // typedef: _global.put_script.Request /** - * Creates or updates a script. + * Creates or updates a stored script or search template. * * @see API * specification @@ -85,7 +85,8 @@ public static PutScriptRequest of(Function * API name: {@code context} */ @@ -95,7 +96,8 @@ public final String context() { } /** - * Required - Script ID + * Required - Identifier for the stored script or search template. Must be + * unique within the cluster. *

* API name: {@code id} */ @@ -104,7 +106,8 @@ public final String id() { } /** - * Specify timeout for connection to master + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. *

* API name: {@code master_timeout} */ @@ -114,14 +117,18 @@ public final Time masterTimeout() { } /** - * Required - API name: {@code script} + * Required - Contains the script or search template, its parameters, and its + * language. + *

+ * API name: {@code script} */ public final StoredScript script() { return this.script; } /** - * Explicit operation timeout + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. *

* API name: {@code timeout} */ @@ -169,7 +176,8 @@ public static class Builder extends RequestBase.AbstractBuilder private Time timeout; /** - * Script context + * Context in which the script or search template should run. To prevent errors, + * the API immediately compiles the script or template in this context. *

* API name: {@code context} */ @@ -179,7 +187,8 @@ public final Builder context(@Nullable String value) { } /** - * Required - Script ID + * Required - Identifier for the stored script or search template. Must be + * unique within the cluster. *

* API name: {@code id} */ @@ -189,7 +198,8 @@ public final Builder id(String value) { } /** - * Specify timeout for connection to master + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. *

* API name: {@code master_timeout} */ @@ -199,7 +209,8 @@ public final Builder masterTimeout(@Nullable Time value) { } /** - * Specify timeout for connection to master + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. *

* API name: {@code master_timeout} */ @@ -208,7 +219,10 @@ public final Builder masterTimeout(Function> f } /** - * Required - API name: {@code script} + * Required - Contains the script or search template, its parameters, and its + * language. + *

+ * API name: {@code script} */ public final Builder script(StoredScript value) { this.script = value; @@ -216,14 +230,18 @@ public final Builder script(StoredScript value) { } /** - * Required - API name: {@code script} + * Required - Contains the script or search template, its parameters, and its + * language. + *

+ * API name: {@code script} */ public final Builder script(Function> fn) { return this.script(fn.apply(new StoredScript.Builder()).build()); } /** - * Explicit operation timeout + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. *

* API name: {@code timeout} */ @@ -233,7 +251,8 @@ public final Builder timeout(@Nullable Time value) { } /** - * Explicit operation timeout + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. *

* API name: {@code timeout} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java index a957fe1d8..889460b7c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java @@ -45,7 +45,7 @@ // typedef: _global.reindex_rethrottle.Request /** - * Changes the number of requests per second for a particular Reindex operation. + * Copies documents from a source to a destination. * * @see API @@ -72,8 +72,7 @@ public static ReindexRethrottleRequest of(Function * API name: {@code requests_per_second} */ @@ -83,7 +82,7 @@ public final Float requestsPerSecond() { } /** - * Required - The task id to rethrottle + * Required - Identifier for the task. *

* API name: {@code task_id} */ @@ -106,8 +105,7 @@ public static class Builder extends RequestBase.AbstractBuilder private String taskId; /** - * The throttle to set on this request in floating sub-requests per second. -1 - * means set no throttle. + * The throttle for this request in sub-requests per second. *

* API name: {@code requests_per_second} */ @@ -117,7 +115,7 @@ public final Builder requestsPerSecond(@Nullable Float value) { } /** - * Required - The task id to rethrottle + * Required - Identifier for the task. *

* API name: {@code task_id} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RenderSearchTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RenderSearchTemplateRequest.java index b7c559c64..a2cf55031 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RenderSearchTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RenderSearchTemplateRequest.java @@ -48,7 +48,7 @@ // typedef: _global.render_search_template.Request /** - * Allows to use the Mustache language to pre-render a search definition. + * Renders a search template as a search request body. * * @see API @@ -91,7 +91,8 @@ public final String file() { } /** - * The id of the stored search template + * ID of the search template to render. If no source is specified, + * this or the id request body parameter is required. *

* API name: {@code id} */ @@ -101,6 +102,9 @@ public final String id() { } /** + * Key-value pairs used to replace Mustache variables in the template. The key + * is the variable name. The value is the variable value. + *

* API name: {@code params} */ public final Map params() { @@ -108,6 +112,11 @@ public final Map params() { } /** + * An inline search template. Supports the same parameters as the search API's + * request body. These parameters also support Mustache variables. If no + * id or <templated-id> is specified, this + * parameter is required. + *

* API name: {@code source} */ @Nullable @@ -180,7 +189,8 @@ public final Builder file(@Nullable String value) { } /** - * The id of the stored search template + * ID of the search template to render. If no source is specified, + * this or the id request body parameter is required. *

* API name: {@code id} */ @@ -190,6 +200,9 @@ public final Builder id(@Nullable String value) { } /** + * Key-value pairs used to replace Mustache variables in the template. The key + * is the variable name. The value is the variable value. + *

* API name: {@code params} *

* Adds all entries of map to params. @@ -200,6 +213,9 @@ public final Builder params(Map map) { } /** + * Key-value pairs used to replace Mustache variables in the template. The key + * is the variable name. The value is the variable value. + *

* API name: {@code params} *

* Adds an entry to params. @@ -210,6 +226,11 @@ public final Builder params(String key, JsonData value) { } /** + * An inline search template. Supports the same parameters as the search API's + * request body. These parameters also support Mustache variables. If no + * id or <templated-id> is specified, this + * parameter is required. + *

* API name: {@code source} */ public final Builder source(@Nullable String value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScriptsPainlessExecuteRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScriptsPainlessExecuteRequest.java index ddd8f6834..276adfaea 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScriptsPainlessExecuteRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScriptsPainlessExecuteRequest.java @@ -46,7 +46,7 @@ // typedef: _global.scripts_painless_execute.Request /** - * Allows an arbitrary script to be executed and a result to be returned + * Runs a script and returns a result. * * @see API @@ -78,6 +78,8 @@ public static ScriptsPainlessExecuteRequest of(Function * API name: {@code context} */ @Nullable @@ -86,6 +88,8 @@ public final String context() { } /** + * Additional parameters for the context. + *

* API name: {@code context_setup} */ @Nullable @@ -94,6 +98,8 @@ public final PainlessContextSetup contextSetup() { } /** + * The Painless script to execute. + *

* API name: {@code script} */ @Nullable @@ -149,6 +155,8 @@ public static class Builder extends RequestBase.AbstractBuilder private InlineScript script; /** + * The context that the script should run in. + *

* API name: {@code context} */ public final Builder context(@Nullable String value) { @@ -157,6 +165,8 @@ public final Builder context(@Nullable String value) { } /** + * Additional parameters for the context. + *

* API name: {@code context_setup} */ public final Builder contextSetup(@Nullable PainlessContextSetup value) { @@ -165,6 +175,8 @@ public final Builder contextSetup(@Nullable PainlessContextSetup value) { } /** + * Additional parameters for the context. + *

* API name: {@code context_setup} */ public final Builder contextSetup( @@ -173,6 +185,8 @@ public final Builder contextSetup( } /** + * The Painless script to execute. + *

* API name: {@code script} */ public final Builder script(@Nullable InlineScript value) { @@ -181,6 +195,8 @@ public final Builder script(@Nullable InlineScript value) { } /** + * The Painless script to execute. + *

* API name: {@code script} */ public final Builder script(Function> fn) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsRequest.java index bcf0eead0..f16b482cc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsRequest.java @@ -94,9 +94,12 @@ public static SearchShardsRequest of(Function_all string or when no indices have been - * specified) + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. For example, a request targeting foo*,bar* returns an + * error if an index starts with foo but no index starts with + * bar. *

* API name: {@code allow_no_indices} */ @@ -106,8 +109,12 @@ public final Boolean allowNoIndices() { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} */ @@ -116,8 +123,8 @@ public final List expandWildcards() { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -127,8 +134,8 @@ public final Boolean ignoreUnavailable() { } /** - * A comma-separated list of index names to search; use _all or - * empty string to perform the operation on all indices + * Returns the indices and shards that a search request would be executed + * against. *

* API name: {@code index} */ @@ -137,8 +144,8 @@ public final List index() { } /** - * Return local information, do not retrieve the state from master node - * (default: false) + * If true, the request retrieves information from the local node + * only. *

* API name: {@code local} */ @@ -148,8 +155,8 @@ public final Boolean local() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -159,7 +166,7 @@ public final String preference() { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -199,9 +206,12 @@ public static class Builder extends RequestBase.AbstractBuilder private String routing; /** - * Whether to ignore if a wildcard indices expression resolves into no concrete - * indices. (This includes _all string or when no indices have been - * specified) + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. For example, a request targeting foo*,bar* returns an + * error if an index starts with foo but no index starts with + * bar. *

* API name: {@code allow_no_indices} */ @@ -211,8 +221,12 @@ public final Builder allowNoIndices(@Nullable Boolean value) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} *

@@ -224,8 +238,12 @@ public final Builder expandWildcards(List list) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} *

@@ -237,8 +255,8 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -248,8 +266,8 @@ public final Builder ignoreUnavailable(@Nullable Boolean value) { } /** - * A comma-separated list of index names to search; use _all or - * empty string to perform the operation on all indices + * Returns the indices and shards that a search request would be executed + * against. *

* API name: {@code index} *

@@ -261,8 +279,8 @@ public final Builder index(List list) { } /** - * A comma-separated list of index names to search; use _all or - * empty string to perform the operation on all indices + * Returns the indices and shards that a search request would be executed + * against. *

* API name: {@code index} *

@@ -274,8 +292,8 @@ public final Builder index(String value, String... values) { } /** - * Return local information, do not retrieve the state from master node - * (default: false) + * If true, the request retrieves information from the local node + * only. *

* API name: {@code local} */ @@ -285,8 +303,8 @@ public final Builder local(@Nullable Boolean value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -296,7 +314,7 @@ public final Builder preference(@Nullable String value) { } /** - * Specific routing value + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateRequest.java index 4c8f997f2..65941ee11 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateRequest.java @@ -53,7 +53,7 @@ // typedef: _global.search_template.Request /** - * Allows to use the Mustache language to pre-render a search definition. + * Runs a search with a search template. * * @see API * specification @@ -129,9 +129,12 @@ public static SearchTemplateRequest of(Function_all string or when no indices have been - * specified) + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. For example, a request targeting foo*,bar* returns an + * error if an index starts with foo but no index starts with + * bar. *

* API name: {@code allow_no_indices} */ @@ -141,8 +144,8 @@ public final Boolean allowNoIndices() { } /** - * Indicates whether network round-trips should be minimized as part of - * cross-cluster search requests execution + * If true, network round-trips are minimized for cross-cluster + * search requests. *

* API name: {@code ccs_minimize_roundtrips} */ @@ -152,8 +155,12 @@ public final Boolean ccsMinimizeRoundtrips() { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} */ @@ -162,6 +169,9 @@ public final List expandWildcards() { } /** + * If true, returns detailed information about score calculation as + * part of each hit. + *

* API name: {@code explain} */ @Nullable @@ -181,8 +191,8 @@ public final String id() { } /** - * Whether specified concrete, expanded or aliased indices should be ignored - * when throttled + * If true, specified concrete, expanded, or aliased indices are + * not included in the response when throttled. *

* API name: {@code ignore_throttled} */ @@ -192,8 +202,8 @@ public final Boolean ignoreThrottled() { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -213,6 +223,9 @@ public final List index() { } /** + * Key-value pairs used to replace Mustache variables in the template. The key + * is the variable name. The value is the variable value. + *

* API name: {@code params} */ public final Map params() { @@ -220,8 +233,8 @@ public final Map params() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -231,6 +244,8 @@ public final String preference() { } /** + * If true, the query execution is profiled. + *

* API name: {@code profile} */ @Nullable @@ -381,9 +396,12 @@ public static class Builder extends RequestBase.AbstractBuilder private String source; /** - * Whether to ignore if a wildcard indices expression resolves into no concrete - * indices. (This includes _all string or when no indices have been - * specified) + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. For example, a request targeting foo*,bar* returns an + * error if an index starts with foo but no index starts with + * bar. *

* API name: {@code allow_no_indices} */ @@ -393,8 +411,8 @@ public final Builder allowNoIndices(@Nullable Boolean value) { } /** - * Indicates whether network round-trips should be minimized as part of - * cross-cluster search requests execution + * If true, network round-trips are minimized for cross-cluster + * search requests. *

* API name: {@code ccs_minimize_roundtrips} */ @@ -404,8 +422,12 @@ public final Builder ccsMinimizeRoundtrips(@Nullable Boolean value) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} *

@@ -417,8 +439,12 @@ public final Builder expandWildcards(List list) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} *

@@ -430,6 +456,9 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** + * If true, returns detailed information about score calculation as + * part of each hit. + *

* API name: {@code explain} */ public final Builder explain(@Nullable Boolean value) { @@ -449,8 +478,8 @@ public final Builder id(@Nullable String value) { } /** - * Whether specified concrete, expanded or aliased indices should be ignored - * when throttled + * If true, specified concrete, expanded, or aliased indices are + * not included in the response when throttled. *

* API name: {@code ignore_throttled} */ @@ -460,8 +489,8 @@ public final Builder ignoreThrottled(@Nullable Boolean value) { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -497,6 +526,9 @@ public final Builder index(String value, String... values) { } /** + * Key-value pairs used to replace Mustache variables in the template. The key + * is the variable name. The value is the variable value. + *

* API name: {@code params} *

* Adds all entries of map to params. @@ -507,6 +539,9 @@ public final Builder params(Map map) { } /** + * Key-value pairs used to replace Mustache variables in the template. The key + * is the variable name. The value is the variable value. + *

* API name: {@code params} *

* Adds an entry to params. @@ -517,8 +552,8 @@ public final Builder params(String key, JsonData value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -528,6 +563,8 @@ public final Builder preference(@Nullable String value) { } /** + * If true, the query execution is profiled. + *

* API name: {@code profile} */ public final Builder profile(@Nullable Boolean value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsRequest.java index 2e9cc837e..457629028 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsRequest.java @@ -142,6 +142,9 @@ public static TermvectorsRequest of( } /** + * An artificial document (a document not present in the index) for which you + * want to retrieve term vectors. + *

* API name: {@code doc} */ @Nullable @@ -150,8 +153,8 @@ public final TDocument doc() { } /** - * Specifies if document count, sum of document frequencies and sum of total - * term frequencies should be returned. + * If true, the response includes the document count, sum of + * document frequencies, and sum of total term frequencies. *

* API name: {@code field_statistics} */ @@ -161,7 +164,10 @@ public final Boolean fieldStatistics() { } /** - * A comma-separated list of fields to return. + * Comma-separated list or wildcard expressions of fields to include in the + * statistics. Used as the default list unless a specific field list is provided + * in the completion_fields or fielddata_fields + * parameters. *

* API name: {@code fields} */ @@ -170,6 +176,8 @@ public final List fields() { } /** + * Filter terms based on their tf-idf scores. + *

* API name: {@code filter} */ @Nullable @@ -178,7 +186,7 @@ public final Filter filter() { } /** - * The id of the document, when not specified a doc param should be supplied. + * Unique identifier of the document. *

* API name: {@code id} */ @@ -188,7 +196,7 @@ public final String id() { } /** - * Required - The index in which the document resides. + * Required - Name of the index that contains the document. *

* API name: {@code index} */ @@ -197,7 +205,7 @@ public final String index() { } /** - * Specifies if term offsets should be returned. + * If true, the response includes term offsets. *

* API name: {@code offsets} */ @@ -207,7 +215,7 @@ public final Boolean offsets() { } /** - * Specifies if term payloads should be returned. + * If true, the response includes term payloads. *

* API name: {@code payloads} */ @@ -217,6 +225,8 @@ public final Boolean payloads() { } /** + * Overrides the default per-field analyzer. + *

* API name: {@code per_field_analyzer} */ public final Map perFieldAnalyzer() { @@ -224,7 +234,7 @@ public final Map perFieldAnalyzer() { } /** - * Specifies if term positions should be returned. + * If true, the response includes term positions. *

* API name: {@code positions} */ @@ -234,8 +244,8 @@ public final Boolean positions() { } /** - * Specify the node or shard the operation should be performed on (default: - * random). + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -245,8 +255,7 @@ public final String preference() { } /** - * Specifies if request is real-time as opposed to near-real-time (default: - * true). + * If true, the request is real-time as opposed to near-real-time. *

* API name: {@code realtime} */ @@ -256,7 +265,7 @@ public final Boolean realtime() { } /** - * Specific routing value. + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -266,7 +275,8 @@ public final String routing() { } /** - * Specifies if total term frequency and document frequency should be returned. + * If true, the response includes term frequency and document + * frequency. *

* API name: {@code term_statistics} */ @@ -276,7 +286,7 @@ public final Boolean termStatistics() { } /** - * Explicit version number for concurrency control + * If true, returns the document version as part of a hit. *

* API name: {@code version} */ @@ -286,7 +296,7 @@ public final Long version() { } /** - * Specific version type + * Specific version type. *

* API name: {@code version_type} */ @@ -390,6 +400,9 @@ public static class Builder extends RequestBase.AbstractBuilder tDocumentSerializer; /** + * An artificial document (a document not present in the index) for which you + * want to retrieve term vectors. + *

* API name: {@code doc} */ public final Builder doc(@Nullable TDocument value) { @@ -398,8 +411,8 @@ public final Builder doc(@Nullable TDocument value) { } /** - * Specifies if document count, sum of document frequencies and sum of total - * term frequencies should be returned. + * If true, the response includes the document count, sum of + * document frequencies, and sum of total term frequencies. *

* API name: {@code field_statistics} */ @@ -409,7 +422,10 @@ public final Builder fieldStatistics(@Nullable Boolean value) { } /** - * A comma-separated list of fields to return. + * Comma-separated list or wildcard expressions of fields to include in the + * statistics. Used as the default list unless a specific field list is provided + * in the completion_fields or fielddata_fields + * parameters. *

* API name: {@code fields} *

@@ -421,7 +437,10 @@ public final Builder fields(List list) { } /** - * A comma-separated list of fields to return. + * Comma-separated list or wildcard expressions of fields to include in the + * statistics. Used as the default list unless a specific field list is provided + * in the completion_fields or fielddata_fields + * parameters. *

* API name: {@code fields} *

@@ -433,6 +452,8 @@ public final Builder fields(String value, String... values) { } /** + * Filter terms based on their tf-idf scores. + *

* API name: {@code filter} */ public final Builder filter(@Nullable Filter value) { @@ -441,6 +462,8 @@ public final Builder filter(@Nullable Filter value) { } /** + * Filter terms based on their tf-idf scores. + *

* API name: {@code filter} */ public final Builder filter(Function> fn) { @@ -448,7 +471,7 @@ public final Builder filter(Function * API name: {@code id} */ @@ -458,7 +481,7 @@ public final Builder id(@Nullable String value) { } /** - * Required - The index in which the document resides. + * Required - Name of the index that contains the document. *

* API name: {@code index} */ @@ -468,7 +491,7 @@ public final Builder index(String value) { } /** - * Specifies if term offsets should be returned. + * If true, the response includes term offsets. *

* API name: {@code offsets} */ @@ -478,7 +501,7 @@ public final Builder offsets(@Nullable Boolean value) { } /** - * Specifies if term payloads should be returned. + * If true, the response includes term payloads. *

* API name: {@code payloads} */ @@ -488,6 +511,8 @@ public final Builder payloads(@Nullable Boolean value) { } /** + * Overrides the default per-field analyzer. + *

* API name: {@code per_field_analyzer} *

* Adds all entries of map to perFieldAnalyzer. @@ -498,6 +523,8 @@ public final Builder perFieldAnalyzer(Map map) { } /** + * Overrides the default per-field analyzer. + *

* API name: {@code per_field_analyzer} *

* Adds an entry to perFieldAnalyzer. @@ -508,7 +535,7 @@ public final Builder perFieldAnalyzer(String key, String value) { } /** - * Specifies if term positions should be returned. + * If true, the response includes term positions. *

* API name: {@code positions} */ @@ -518,8 +545,8 @@ public final Builder positions(@Nullable Boolean value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random). + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -529,8 +556,7 @@ public final Builder preference(@Nullable String value) { } /** - * Specifies if request is real-time as opposed to near-real-time (default: - * true). + * If true, the request is real-time as opposed to near-real-time. *

* API name: {@code realtime} */ @@ -540,7 +566,7 @@ public final Builder realtime(@Nullable Boolean value) { } /** - * Specific routing value. + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -550,7 +576,8 @@ public final Builder routing(@Nullable String value) { } /** - * Specifies if total term frequency and document frequency should be returned. + * If true, the response includes term frequency and document + * frequency. *

* API name: {@code term_statistics} */ @@ -560,7 +587,7 @@ public final Builder termStatistics(@Nullable Boolean value) { } /** - * Explicit version number for concurrency control + * If true, returns the document version as part of a hit. *

* API name: {@code version} */ @@ -570,7 +597,7 @@ public final Builder version(@Nullable Long value) { } /** - * Specific version type + * Specific version type. *

* API name: {@code version_type} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java index a9ee3638f..12b4817a7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java @@ -61,8 +61,9 @@ // typedef: _global.update_by_query.Request /** - * Performs an update on every document in the index without changing the - * source, for example to pick up a mapping change. + * Updates documents that match the specified query. If no query is specified, + * performs an update on every document in the data stream or index without + * modifying the source, which is useful for picking up mapping changes. * * @see API * specification @@ -213,9 +214,12 @@ public static UpdateByQueryRequest of(Function_all string or when no indices have been - * specified) + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. For example, a request targeting foo*,bar* returns an + * error if an index starts with foo but no index starts with + * bar. *

* API name: {@code allow_no_indices} */ @@ -225,8 +229,7 @@ public final Boolean allowNoIndices() { } /** - * Specify whether wildcard and prefix queries should be analyzed (default: - * false) + * If true, wildcard and prefix queries are analyzed. *

* API name: {@code analyze_wildcard} */ @@ -236,7 +239,7 @@ public final Boolean analyzeWildcard() { } /** - * The analyzer to use for the query string + * Analyzer to use for the query string. *

* API name: {@code analyzer} */ @@ -246,6 +249,9 @@ public final String analyzer() { } /** + * What to do if update by query hits version conflicts: abort or + * proceed. + *

* API name: {@code conflicts} */ @Nullable @@ -254,7 +260,8 @@ public final Conflicts conflicts() { } /** - * The default operator for query string query (AND or OR) + * The default operator for query string query: AND or + * OR. *

* API name: {@code default_operator} */ @@ -264,8 +271,7 @@ public final Operator defaultOperator() { } /** - * The field to use as default where no field prefix is given in the query - * string + * Field to use as default where no field prefix is given in the query string. *

* API name: {@code df} */ @@ -275,8 +281,12 @@ public final String df() { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} */ @@ -295,8 +305,8 @@ public final Long from() { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -306,8 +316,9 @@ public final Boolean ignoreUnavailable() { } /** - * Required - A comma-separated list of index names to search; use - * _all or empty string to perform the operation on all indices + * Required - Comma-separated list of data streams, indices, and aliases to + * search. Supports wildcards (*). To search all data streams or + * indices, omit this parameter or use * or _all. *

* API name: {@code index} */ @@ -316,8 +327,8 @@ public final List index() { } /** - * Specify whether format-based query failures (such as providing text to a - * numeric field) should be ignored + * If true, format-based query failures (such as providing text to + * a numeric field) in the query string will be ignored. *

* API name: {@code lenient} */ @@ -327,6 +338,8 @@ public final Boolean lenient() { } /** + * The maximum number of documents to update. + *

* API name: {@code max_docs} */ @Nullable @@ -335,7 +348,11 @@ public final Long maxDocs() { } /** - * Ingest pipeline to set on index requests made by this action. (default: none) + * ID of the pipeline to use to preprocess incoming documents. If the index has + * a default ingest pipeline specified, then setting the value to + * _none disables the default ingest pipeline for this request. If + * a final pipeline is configured it will always run, regardless of the value of + * this parameter. *

* API name: {@code pipeline} */ @@ -345,8 +362,8 @@ public final String pipeline() { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -356,6 +373,8 @@ public final String preference() { } /** + * Specifies the documents to update using the Query DSL. + *

* API name: {@code query} */ @Nullable @@ -364,7 +383,8 @@ public final Query query() { } /** - * Should the affected indexes be refreshed? + * If true, Elasticsearch refreshes affected shards to make the + * operation visible to search. *

* API name: {@code refresh} */ @@ -374,8 +394,7 @@ public final Boolean refresh() { } /** - * Specify if request cache should be used for this request or not, defaults to - * index level setting + * If true, the request cache is used for this request. *

* API name: {@code request_cache} */ @@ -385,8 +404,7 @@ public final Boolean requestCache() { } /** - * The throttle to set on this request in sub-requests per second. -1 means no - * throttle. + * The throttle for this request in sub-requests per second. *

* API name: {@code requests_per_second} */ @@ -396,7 +414,7 @@ public final Float requestsPerSecond() { } /** - * A comma-separated list of specific routing values + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -406,6 +424,8 @@ public final String routing() { } /** + * The script to run to update the document source or metadata when updating. + *

* API name: {@code script} */ @Nullable @@ -414,8 +434,7 @@ public final Script script() { } /** - * Specify how long a consistent view of the index should be maintained for - * scrolled search + * Period to retain the search context for scrolling. *

* API name: {@code scroll} */ @@ -425,7 +444,7 @@ public final Time scroll() { } /** - * Size on the scroll request powering the update by query + * Size of the scroll request that powers the operation. *

* API name: {@code scroll_size} */ @@ -435,7 +454,7 @@ public final Long scrollSize() { } /** - * Explicit timeout for each search request. Defaults to no timeout. + * Explicit timeout for each search request. *

* API name: {@code search_timeout} */ @@ -445,7 +464,8 @@ public final Time searchTimeout() { } /** - * Search operation type + * The type of the search operation. Available options: + * query_then_fetch, dfs_query_then_fetch. *

* API name: {@code search_type} */ @@ -455,6 +475,9 @@ public final SearchType searchType() { } /** + * Slice the request manually using the provided slice ID and total number of + * slices. + *

* API name: {@code slice} */ @Nullable @@ -463,8 +486,7 @@ public final SlicedScroll slice() { } /** - * The number of slices this task should be divided into. Defaults to 1, meaning - * the task isn't sliced into subtasks. Can be set to auto. + * The number of slices this task should be divided into. *

* API name: {@code slices} */ @@ -474,7 +496,7 @@ public final Slices slices() { } /** - * A comma-separated list of <field>:<direction> pairs + * A comma-separated list of <field>:<direction> pairs. *

* API name: {@code sort} */ @@ -483,7 +505,8 @@ public final List sort() { } /** - * Specific 'tag' of the request for logging and statistical purposes + * Specific tag of the request for logging and statistical + * purposes. *

* API name: {@code stats} */ @@ -492,8 +515,13 @@ public final List stats() { } /** - * The maximum number of documents to collect for each shard, upon reaching - * which the query execution will terminate early. + * Maximum number of documents to collect for each shard. If a query reaches + * this limit, Elasticsearch terminates the query early. Elasticsearch collects + * documents before sorting. Use with caution. Elasticsearch applies this + * parameter to each shard handling the request. When possible, let + * Elasticsearch perform early termination automatically. Avoid specifying this + * parameter for requests that target data streams with backing indices across + * multiple data tiers. *

* API name: {@code terminate_after} */ @@ -503,8 +531,8 @@ public final Long terminateAfter() { } /** - * Time each individual bulk request should wait for shards that are - * unavailable. + * Period each update request waits for the following operations: dynamic + * mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -514,7 +542,7 @@ public final Time timeout() { } /** - * Specify whether to return document version as part of a hit + * If true, returns the document version as part of a hit. *

* API name: {@code version} */ @@ -535,11 +563,9 @@ public final Boolean versionType() { } /** - * Sets the number of shard copies that must be active before proceeding with - * the update by query operation. Defaults to 1, meaning the primary shard only. - * Set to all for all shard copies, otherwise set to any - * non-negative value less than or equal to the total number of copies for the - * shard (number of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total + * number of shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -549,8 +575,7 @@ public final WaitForActiveShards waitForActiveShards() { } /** - * Should the request should block until the update by query operation is - * complete. + * If true, the request blocks until the operation is complete. *

* API name: {@code wait_for_completion} */ @@ -708,9 +733,12 @@ public static class Builder extends RequestBase.AbstractBuilder private Boolean waitForCompletion; /** - * Whether to ignore if a wildcard indices expression resolves into no concrete - * indices. (This includes _all string or when no indices have been - * specified) + * If false, the request returns an error if any wildcard + * expression, index alias, or _all value targets only missing or + * closed indices. This behavior applies even if the request targets other open + * indices. For example, a request targeting foo*,bar* returns an + * error if an index starts with foo but no index starts with + * bar. *

* API name: {@code allow_no_indices} */ @@ -720,8 +748,7 @@ public final Builder allowNoIndices(@Nullable Boolean value) { } /** - * Specify whether wildcard and prefix queries should be analyzed (default: - * false) + * If true, wildcard and prefix queries are analyzed. *

* API name: {@code analyze_wildcard} */ @@ -731,7 +758,7 @@ public final Builder analyzeWildcard(@Nullable Boolean value) { } /** - * The analyzer to use for the query string + * Analyzer to use for the query string. *

* API name: {@code analyzer} */ @@ -741,6 +768,9 @@ public final Builder analyzer(@Nullable String value) { } /** + * What to do if update by query hits version conflicts: abort or + * proceed. + *

* API name: {@code conflicts} */ public final Builder conflicts(@Nullable Conflicts value) { @@ -749,7 +779,8 @@ public final Builder conflicts(@Nullable Conflicts value) { } /** - * The default operator for query string query (AND or OR) + * The default operator for query string query: AND or + * OR. *

* API name: {@code default_operator} */ @@ -759,8 +790,7 @@ public final Builder defaultOperator(@Nullable Operator value) { } /** - * The field to use as default where no field prefix is given in the query - * string + * Field to use as default where no field prefix is given in the query string. *

* API name: {@code df} */ @@ -770,8 +800,12 @@ public final Builder df(@Nullable String value) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} *

@@ -783,8 +817,12 @@ public final Builder expandWildcards(List list) { } /** - * Whether to expand wildcard expression to concrete indices that are open, - * closed or both. + * Type of index that wildcard patterns can match. If the request can target + * data streams, this argument determines whether wildcard expressions match + * hidden data streams. Supports comma-separated values, such as + * open,hidden. Valid values are: all, + * open, closed, hidden, + * none. *

* API name: {@code expand_wildcards} *

@@ -806,8 +844,8 @@ public final Builder from(@Nullable Long value) { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a missing + * or closed index. *

* API name: {@code ignore_unavailable} */ @@ -817,8 +855,9 @@ public final Builder ignoreUnavailable(@Nullable Boolean value) { } /** - * Required - A comma-separated list of index names to search; use - * _all or empty string to perform the operation on all indices + * Required - Comma-separated list of data streams, indices, and aliases to + * search. Supports wildcards (*). To search all data streams or + * indices, omit this parameter or use * or _all. *

* API name: {@code index} *

@@ -830,8 +869,9 @@ public final Builder index(List list) { } /** - * Required - A comma-separated list of index names to search; use - * _all or empty string to perform the operation on all indices + * Required - Comma-separated list of data streams, indices, and aliases to + * search. Supports wildcards (*). To search all data streams or + * indices, omit this parameter or use * or _all. *

* API name: {@code index} *

@@ -843,8 +883,8 @@ public final Builder index(String value, String... values) { } /** - * Specify whether format-based query failures (such as providing text to a - * numeric field) should be ignored + * If true, format-based query failures (such as providing text to + * a numeric field) in the query string will be ignored. *

* API name: {@code lenient} */ @@ -854,6 +894,8 @@ public final Builder lenient(@Nullable Boolean value) { } /** + * The maximum number of documents to update. + *

* API name: {@code max_docs} */ public final Builder maxDocs(@Nullable Long value) { @@ -862,7 +904,11 @@ public final Builder maxDocs(@Nullable Long value) { } /** - * Ingest pipeline to set on index requests made by this action. (default: none) + * ID of the pipeline to use to preprocess incoming documents. If the index has + * a default ingest pipeline specified, then setting the value to + * _none disables the default ingest pipeline for this request. If + * a final pipeline is configured it will always run, regardless of the value of + * this parameter. *

* API name: {@code pipeline} */ @@ -872,8 +918,8 @@ public final Builder pipeline(@Nullable String value) { } /** - * Specify the node or shard the operation should be performed on (default: - * random) + * Specifies the node or shard the operation should be performed on. Random by + * default. *

* API name: {@code preference} */ @@ -883,6 +929,8 @@ public final Builder preference(@Nullable String value) { } /** + * Specifies the documents to update using the Query DSL. + *

* API name: {@code query} */ public final Builder query(@Nullable Query value) { @@ -891,6 +939,8 @@ public final Builder query(@Nullable Query value) { } /** + * Specifies the documents to update using the Query DSL. + *

* API name: {@code query} */ public final Builder query(Function> fn) { @@ -898,7 +948,8 @@ public final Builder query(Function> fn) { } /** - * Should the affected indexes be refreshed? + * If true, Elasticsearch refreshes affected shards to make the + * operation visible to search. *

* API name: {@code refresh} */ @@ -908,8 +959,7 @@ public final Builder refresh(@Nullable Boolean value) { } /** - * Specify if request cache should be used for this request or not, defaults to - * index level setting + * If true, the request cache is used for this request. *

* API name: {@code request_cache} */ @@ -919,8 +969,7 @@ public final Builder requestCache(@Nullable Boolean value) { } /** - * The throttle to set on this request in sub-requests per second. -1 means no - * throttle. + * The throttle for this request in sub-requests per second. *

* API name: {@code requests_per_second} */ @@ -930,7 +979,7 @@ public final Builder requestsPerSecond(@Nullable Float value) { } /** - * A comma-separated list of specific routing values + * Custom value used to route operations to a specific shard. *

* API name: {@code routing} */ @@ -940,6 +989,8 @@ public final Builder routing(@Nullable String value) { } /** + * The script to run to update the document source or metadata when updating. + *

* API name: {@code script} */ public final Builder script(@Nullable Script value) { @@ -948,6 +999,8 @@ public final Builder script(@Nullable Script value) { } /** + * The script to run to update the document source or metadata when updating. + *

* API name: {@code script} */ public final Builder script(Function> fn) { @@ -955,8 +1008,7 @@ public final Builder script(Function> fn) } /** - * Specify how long a consistent view of the index should be maintained for - * scrolled search + * Period to retain the search context for scrolling. *

* API name: {@code scroll} */ @@ -966,8 +1018,7 @@ public final Builder scroll(@Nullable Time value) { } /** - * Specify how long a consistent view of the index should be maintained for - * scrolled search + * Period to retain the search context for scrolling. *

* API name: {@code scroll} */ @@ -976,7 +1027,7 @@ public final Builder scroll(Function> fn) { } /** - * Size on the scroll request powering the update by query + * Size of the scroll request that powers the operation. *

* API name: {@code scroll_size} */ @@ -986,7 +1037,7 @@ public final Builder scrollSize(@Nullable Long value) { } /** - * Explicit timeout for each search request. Defaults to no timeout. + * Explicit timeout for each search request. *

* API name: {@code search_timeout} */ @@ -996,7 +1047,7 @@ public final Builder searchTimeout(@Nullable Time value) { } /** - * Explicit timeout for each search request. Defaults to no timeout. + * Explicit timeout for each search request. *

* API name: {@code search_timeout} */ @@ -1005,7 +1056,8 @@ public final Builder searchTimeout(Function> f } /** - * Search operation type + * The type of the search operation. Available options: + * query_then_fetch, dfs_query_then_fetch. *

* API name: {@code search_type} */ @@ -1015,6 +1067,9 @@ public final Builder searchType(@Nullable SearchType value) { } /** + * Slice the request manually using the provided slice ID and total number of + * slices. + *

* API name: {@code slice} */ public final Builder slice(@Nullable SlicedScroll value) { @@ -1023,6 +1078,9 @@ public final Builder slice(@Nullable SlicedScroll value) { } /** + * Slice the request manually using the provided slice ID and total number of + * slices. + *

* API name: {@code slice} */ public final Builder slice(Function> fn) { @@ -1030,8 +1088,7 @@ public final Builder slice(Functionauto. + * The number of slices this task should be divided into. *

* API name: {@code slices} */ @@ -1041,8 +1098,7 @@ public final Builder slices(@Nullable Slices value) { } /** - * The number of slices this task should be divided into. Defaults to 1, meaning - * the task isn't sliced into subtasks. Can be set to auto. + * The number of slices this task should be divided into. *

* API name: {@code slices} */ @@ -1051,7 +1107,7 @@ public final Builder slices(Function> fn) } /** - * A comma-separated list of <field>:<direction> pairs + * A comma-separated list of <field>:<direction> pairs. *

* API name: {@code sort} *

@@ -1063,7 +1119,7 @@ public final Builder sort(List list) { } /** - * A comma-separated list of <field>:<direction> pairs + * A comma-separated list of <field>:<direction> pairs. *

* API name: {@code sort} *

@@ -1075,7 +1131,8 @@ public final Builder sort(String value, String... values) { } /** - * Specific 'tag' of the request for logging and statistical purposes + * Specific tag of the request for logging and statistical + * purposes. *

* API name: {@code stats} *

@@ -1087,7 +1144,8 @@ public final Builder stats(List list) { } /** - * Specific 'tag' of the request for logging and statistical purposes + * Specific tag of the request for logging and statistical + * purposes. *

* API name: {@code stats} *

@@ -1099,8 +1157,13 @@ public final Builder stats(String value, String... values) { } /** - * The maximum number of documents to collect for each shard, upon reaching - * which the query execution will terminate early. + * Maximum number of documents to collect for each shard. If a query reaches + * this limit, Elasticsearch terminates the query early. Elasticsearch collects + * documents before sorting. Use with caution. Elasticsearch applies this + * parameter to each shard handling the request. When possible, let + * Elasticsearch perform early termination automatically. Avoid specifying this + * parameter for requests that target data streams with backing indices across + * multiple data tiers. *

* API name: {@code terminate_after} */ @@ -1110,8 +1173,8 @@ public final Builder terminateAfter(@Nullable Long value) { } /** - * Time each individual bulk request should wait for shards that are - * unavailable. + * Period each update request waits for the following operations: dynamic + * mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -1121,8 +1184,8 @@ public final Builder timeout(@Nullable Time value) { } /** - * Time each individual bulk request should wait for shards that are - * unavailable. + * Period each update request waits for the following operations: dynamic + * mapping updates, waiting for active shards. *

* API name: {@code timeout} */ @@ -1131,7 +1194,7 @@ public final Builder timeout(Function> fn) { } /** - * Specify whether to return document version as part of a hit + * If true, returns the document version as part of a hit. *

* API name: {@code version} */ @@ -1152,11 +1215,9 @@ public final Builder versionType(@Nullable Boolean value) { } /** - * Sets the number of shard copies that must be active before proceeding with - * the update by query operation. Defaults to 1, meaning the primary shard only. - * Set to all for all shard copies, otherwise set to any - * non-negative value less than or equal to the total number of copies for the - * shard (number of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total + * number of shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -1166,11 +1227,9 @@ public final Builder waitForActiveShards(@Nullable WaitForActiveShards value) { } /** - * Sets the number of shard copies that must be active before proceeding with - * the update by query operation. Defaults to 1, meaning the primary shard only. - * Set to all for all shard copies, otherwise set to any - * non-negative value less than or equal to the total number of copies for the - * shard (number of replicas + 1) + * The number of shard copies that must be active before proceeding with the + * operation. Set to all or any positive integer up to the total + * number of shards in the index (number_of_replicas+1). *

* API name: {@code wait_for_active_shards} */ @@ -1180,8 +1239,7 @@ public final Builder waitForActiveShards( } /** - * Should the request should block until the update by query operation is - * complete. + * If true, the request blocks until the operation is complete. *

* API name: {@code wait_for_completion} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java index dce0a8722..29fb50045 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java @@ -74,8 +74,7 @@ public static UpdateByQueryRethrottleRequest of( } /** - * The throttle to set on this request in floating sub-requests per second. -1 - * means set no throttle. + * The throttle for this request in sub-requests per second. *

* API name: {@code requests_per_second} */ @@ -85,7 +84,7 @@ public final Float requestsPerSecond() { } /** - * Required - The task id to rethrottle + * Required - The ID for the task. *

* API name: {@code task_id} */ @@ -108,8 +107,7 @@ public static class Builder extends RequestBase.AbstractBuilder private String taskId; /** - * The throttle to set on this request in floating sub-requests per second. -1 - * means set no throttle. + * The throttle for this request in sub-requests per second. *

* API name: {@code requests_per_second} */ @@ -119,7 +117,7 @@ public final Builder requestsPerSecond(@Nullable Float value) { } /** - * Required - The task id to rethrottle + * Required - The ID for the task. *

* API name: {@code task_id} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkOperationBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkOperationBase.java index 3fb805975..e2f2da686 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkOperationBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkOperationBase.java @@ -84,6 +84,8 @@ protected BulkOperationBase(AbstractBuilder builder) { } /** + * The document ID. + *

* API name: {@code _id} */ @Nullable @@ -92,6 +94,8 @@ public final String id() { } /** + * Name of the index or index alias to perform the action on. + *

* API name: {@code _index} */ @Nullable @@ -100,6 +104,8 @@ public final String index() { } /** + * Custom value used to route operations to a specific shard. + *

* API name: {@code routing} */ @Nullable @@ -217,6 +223,8 @@ public abstract static class AbstractBuilder * API name: {@code _id} */ public final BuilderT id(@Nullable String value) { @@ -225,6 +233,8 @@ public final BuilderT id(@Nullable String value) { } /** + * Name of the index or index alias to perform the action on. + *

* API name: {@code _index} */ public final BuilderT index(@Nullable String value) { @@ -233,6 +243,8 @@ public final BuilderT index(@Nullable String value) { } /** + * Custom value used to route operations to a specific shard. + *

* API name: {@code routing} */ public final BuilderT routing(@Nullable String value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkResponseItem.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkResponseItem.java index c1be6b1b5..2ac67ec8e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkResponseItem.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkResponseItem.java @@ -122,6 +122,8 @@ public final OperationType operationType() { } /** + * The document ID associated with the operation. + *

* API name: {@code _id} */ @Nullable @@ -130,20 +132,29 @@ public final String id() { } /** - * Required - API name: {@code _index} + * Required - Name of the index associated with the operation. If the operation + * targeted a data stream, this is the backing index into which the document was + * written. + *

+ * API name: {@code _index} */ public final String index() { return this.index; } /** - * Required - API name: {@code status} + * Required - HTTP status code returned for the operation. + *

+ * API name: {@code status} */ public final int status() { return this.status; } /** + * Contains additional information about the failed operation. The parameter is + * only returned for failed operations. + *

* API name: {@code error} */ @Nullable @@ -152,6 +163,8 @@ public final ErrorCause error() { } /** + * The primary term assigned to the document for the operation. + *

* API name: {@code _primary_term} */ @Nullable @@ -160,6 +173,9 @@ public final Long primaryTerm() { } /** + * Result of the operation. Successful values are created, + * deleted, and updated. + *

* API name: {@code result} */ @Nullable @@ -168,6 +184,10 @@ public final String result() { } /** + * The sequence number assigned to the document for the operation. Sequence + * numbers are used to ensure an older version of a document doesn’t overwrite a + * newer version. + *

* API name: {@code _seq_no} */ @Nullable @@ -176,6 +196,8 @@ public final Long seqNo() { } /** + * Contains shard information for the operation. + *

* API name: {@code _shards} */ @Nullable @@ -184,6 +206,9 @@ public final ShardStatistics shards() { } /** + * The document version associated with the operation. The document version is + * incremented each time the document is updated. + *

* API name: {@code _version} */ @Nullable @@ -329,6 +354,8 @@ public final Builder operationType(OperationType value) { private InlineGet> get; /** + * The document ID associated with the operation. + *

* API name: {@code _id} */ public final Builder id(@Nullable String value) { @@ -337,7 +364,11 @@ public final Builder id(@Nullable String value) { } /** - * Required - API name: {@code _index} + * Required - Name of the index associated with the operation. If the operation + * targeted a data stream, this is the backing index into which the document was + * written. + *

+ * API name: {@code _index} */ public final Builder index(String value) { this.index = value; @@ -345,7 +376,9 @@ public final Builder index(String value) { } /** - * Required - API name: {@code status} + * Required - HTTP status code returned for the operation. + *

+ * API name: {@code status} */ public final Builder status(int value) { this.status = value; @@ -353,6 +386,9 @@ public final Builder status(int value) { } /** + * Contains additional information about the failed operation. The parameter is + * only returned for failed operations. + *

* API name: {@code error} */ public final Builder error(@Nullable ErrorCause value) { @@ -361,6 +397,9 @@ public final Builder error(@Nullable ErrorCause value) { } /** + * Contains additional information about the failed operation. The parameter is + * only returned for failed operations. + *

* API name: {@code error} */ public final Builder error(Function> fn) { @@ -368,6 +407,8 @@ public final Builder error(Function * API name: {@code _primary_term} */ public final Builder primaryTerm(@Nullable Long value) { @@ -376,6 +417,9 @@ public final Builder primaryTerm(@Nullable Long value) { } /** + * Result of the operation. Successful values are created, + * deleted, and updated. + *

* API name: {@code result} */ public final Builder result(@Nullable String value) { @@ -384,6 +428,10 @@ public final Builder result(@Nullable String value) { } /** + * The sequence number assigned to the document for the operation. Sequence + * numbers are used to ensure an older version of a document doesn’t overwrite a + * newer version. + *

* API name: {@code _seq_no} */ public final Builder seqNo(@Nullable Long value) { @@ -392,6 +440,8 @@ public final Builder seqNo(@Nullable Long value) { } /** + * Contains shard information for the operation. + *

* API name: {@code _shards} */ public final Builder shards(@Nullable ShardStatistics value) { @@ -400,6 +450,8 @@ public final Builder shards(@Nullable ShardStatistics value) { } /** + * Contains shard information for the operation. + *

* API name: {@code _shards} */ public final Builder shards(Function> fn) { @@ -407,6 +459,9 @@ public final Builder shards(Function * API name: {@code _version} */ public final Builder version(@Nullable Long value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/UpdateOperation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/UpdateOperation.java index 425f9757d..160834c67 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/UpdateOperation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/UpdateOperation.java @@ -126,6 +126,8 @@ public Iterator _serializables() { } /** + * If true, the request’s actions must target an index alias. + *

* API name: {@code require_alias} */ @Nullable @@ -220,6 +222,8 @@ public final Builder binaryAction(@Nullable BinaryD private JsonpSerializer tPartialDocumentSerializer; /** + * If true, the request’s actions must target an index alias. + *

* API name: {@code require_alias} */ public final Builder requireAlias(@Nullable Boolean value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/WriteOperation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/WriteOperation.java index 00e98102f..454df8920 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/WriteOperation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/WriteOperation.java @@ -67,6 +67,12 @@ protected WriteOperation(AbstractBuilder builder) { } /** + * A map from the full name of fields to the name of dynamic templates. Defaults + * to an empty map. If a name matches a dynamic template, then that template + * will be applied regardless of other match predicates defined in the template. + * If a field is already defined in the mapping, then this parameter won’t be + * used. + *

* API name: {@code dynamic_templates} */ public final Map dynamicTemplates() { @@ -74,6 +80,12 @@ public final Map dynamicTemplates() { } /** + * ID of the pipeline to use to preprocess incoming documents. If the index has + * a default ingest pipeline specified, then setting the value to + * _none disables the default ingest pipeline for this request. If + * a final pipeline is configured it will always run, regardless of the value of + * this parameter. + *

* API name: {@code pipeline} */ @Nullable @@ -82,6 +94,8 @@ public final String pipeline() { } /** + * If true, the request’s actions must target an index alias. + *

* API name: {@code require_alias} */ @Nullable @@ -129,6 +143,12 @@ public abstract static class AbstractBuilder * API name: {@code dynamic_templates} *

* Adds all entries of map to dynamicTemplates. @@ -139,6 +159,12 @@ public final BuilderT dynamicTemplates(Map map) { } /** + * A map from the full name of fields to the name of dynamic templates. Defaults + * to an empty map. If a name matches a dynamic template, then that template + * will be applied regardless of other match predicates defined in the template. + * If a field is already defined in the mapping, then this parameter won’t be + * used. + *

* API name: {@code dynamic_templates} *

* Adds an entry to dynamicTemplates. @@ -149,6 +175,12 @@ public final BuilderT dynamicTemplates(String key, String value) { } /** + * ID of the pipeline to use to preprocess incoming documents. If the index has + * a default ingest pipeline specified, then setting the value to + * _none disables the default ingest pipeline for this request. If + * a final pipeline is configured it will always run, regardless of the value of + * this parameter. + *

* API name: {@code pipeline} */ public final BuilderT pipeline(@Nullable String value) { @@ -157,6 +189,8 @@ public final BuilderT pipeline(@Nullable String value) { } /** + * If true, the request’s actions must target an index alias. + *

* API name: {@code require_alias} */ public final BuilderT requireAlias(@Nullable Boolean value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch_template/TemplateConfig.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch_template/TemplateConfig.java index 389cabb37..d5048c2b4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch_template/TemplateConfig.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch_template/TemplateConfig.java @@ -83,6 +83,9 @@ public static TemplateConfig of(Function> } /** + * If true, returns detailed information about score calculation as + * part of each hit. + *

* API name: {@code explain} */ @Nullable @@ -102,6 +105,9 @@ public final String id() { } /** + * Key-value pairs used to replace Mustache variables in the template. The key + * is the variable name. The value is the variable value. + *

* API name: {@code params} */ public final Map params() { @@ -109,6 +115,8 @@ public final Map params() { } /** + * If true, the query execution is profiled. + *

* API name: {@code profile} */ @Nullable @@ -201,6 +209,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement private String source; /** + * If true, returns detailed information about score calculation as + * part of each hit. + *

* API name: {@code explain} */ public final Builder explain(@Nullable Boolean value) { @@ -220,6 +231,9 @@ public final Builder id(@Nullable String value) { } /** + * Key-value pairs used to replace Mustache variables in the template. The key + * is the variable name. The value is the variable value. + *

* API name: {@code params} *

* Adds all entries of map to params. @@ -230,6 +244,9 @@ public final Builder params(Map map) { } /** + * Key-value pairs used to replace Mustache variables in the template. The key + * is the variable name. The value is the variable value. + *

* API name: {@code params} *

* Adds an entry to params. @@ -240,6 +257,8 @@ public final Builder params(String key, JsonData value) { } /** + * If true, the query execution is profiled. + *

* API name: {@code profile} */ public final Builder profile(@Nullable Boolean value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mtermvectors/MultiTermVectorsOperation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mtermvectors/MultiTermVectorsOperation.java index c558e85e7..92f8abe3d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mtermvectors/MultiTermVectorsOperation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mtermvectors/MultiTermVectorsOperation.java @@ -117,13 +117,17 @@ public static MultiTermVectorsOperation of(Function + * API name: {@code _id} */ public final String id() { return this.id; } /** + * The index of the document. + *

* API name: {@code _index} */ @Nullable @@ -132,6 +136,9 @@ public final String index() { } /** + * An artificial document (a document not present in the index) for which you + * want to retrieve term vectors. + *

* API name: {@code doc} */ @Nullable @@ -140,6 +147,11 @@ public final JsonData doc() { } /** + * Comma-separated list or wildcard expressions of fields to include in the + * statistics. Used as the default list unless a specific field list is provided + * in the completion_fields or fielddata_fields + * parameters. + *

* API name: {@code fields} */ public final List fields() { @@ -147,6 +159,9 @@ public final List fields() { } /** + * If true, the response includes the document count, sum of + * document frequencies, and sum of total term frequencies. + *

* API name: {@code field_statistics} */ @Nullable @@ -155,6 +170,8 @@ public final Boolean fieldStatistics() { } /** + * Filter terms based on their tf-idf scores. + *

* API name: {@code filter} */ @Nullable @@ -163,6 +180,8 @@ public final Filter filter() { } /** + * If true, the response includes term offsets. + *

* API name: {@code offsets} */ @Nullable @@ -171,6 +190,8 @@ public final Boolean offsets() { } /** + * If true, the response includes term payloads. + *

* API name: {@code payloads} */ @Nullable @@ -179,6 +200,8 @@ public final Boolean payloads() { } /** + * If true, the response includes term positions. + *

* API name: {@code positions} */ @Nullable @@ -187,6 +210,8 @@ public final Boolean positions() { } /** + * Custom value used to route operations to a specific shard. + *

* API name: {@code routing} */ @Nullable @@ -195,6 +220,8 @@ public final String routing() { } /** + * If true, the response includes term frequency and document frequency. + *

* API name: {@code term_statistics} */ @Nullable @@ -203,6 +230,8 @@ public final Boolean termStatistics() { } /** + * If true, returns the document version as part of a hit. + *

* API name: {@code version} */ @Nullable @@ -211,6 +240,8 @@ public final Long version() { } /** + * Specific version type. + *

* API name: {@code version_type} */ @Nullable @@ -352,7 +383,9 @@ public static class Builder extends WithJsonObjectBuilderBase private VersionType versionType; /** - * Required - API name: {@code _id} + * Required - The ID of the document. + *

+ * API name: {@code _id} */ public final Builder id(String value) { this.id = value; @@ -360,6 +393,8 @@ public final Builder id(String value) { } /** + * The index of the document. + *

* API name: {@code _index} */ public final Builder index(@Nullable String value) { @@ -368,6 +403,9 @@ public final Builder index(@Nullable String value) { } /** + * An artificial document (a document not present in the index) for which you + * want to retrieve term vectors. + *

* API name: {@code doc} */ public final Builder doc(@Nullable JsonData value) { @@ -376,6 +414,11 @@ public final Builder doc(@Nullable JsonData value) { } /** + * Comma-separated list or wildcard expressions of fields to include in the + * statistics. Used as the default list unless a specific field list is provided + * in the completion_fields or fielddata_fields + * parameters. + *

* API name: {@code fields} *

* Adds all elements of list to fields. @@ -386,6 +429,11 @@ public final Builder fields(List list) { } /** + * Comma-separated list or wildcard expressions of fields to include in the + * statistics. Used as the default list unless a specific field list is provided + * in the completion_fields or fielddata_fields + * parameters. + *

* API name: {@code fields} *

* Adds one or more values to fields. @@ -396,6 +444,9 @@ public final Builder fields(String value, String... values) { } /** + * If true, the response includes the document count, sum of + * document frequencies, and sum of total term frequencies. + *

* API name: {@code field_statistics} */ public final Builder fieldStatistics(@Nullable Boolean value) { @@ -404,6 +455,8 @@ public final Builder fieldStatistics(@Nullable Boolean value) { } /** + * Filter terms based on their tf-idf scores. + *

* API name: {@code filter} */ public final Builder filter(@Nullable Filter value) { @@ -412,6 +465,8 @@ public final Builder filter(@Nullable Filter value) { } /** + * Filter terms based on their tf-idf scores. + *

* API name: {@code filter} */ public final Builder filter(Function> fn) { @@ -419,6 +474,8 @@ public final Builder filter(Function> fn) } /** + * If true, the response includes term offsets. + *

* API name: {@code offsets} */ public final Builder offsets(@Nullable Boolean value) { @@ -427,6 +484,8 @@ public final Builder offsets(@Nullable Boolean value) { } /** + * If true, the response includes term payloads. + *

* API name: {@code payloads} */ public final Builder payloads(@Nullable Boolean value) { @@ -435,6 +494,8 @@ public final Builder payloads(@Nullable Boolean value) { } /** + * If true, the response includes term positions. + *

* API name: {@code positions} */ public final Builder positions(@Nullable Boolean value) { @@ -443,6 +504,8 @@ public final Builder positions(@Nullable Boolean value) { } /** + * Custom value used to route operations to a specific shard. + *

* API name: {@code routing} */ public final Builder routing(@Nullable String value) { @@ -451,6 +514,8 @@ public final Builder routing(@Nullable String value) { } /** + * If true, the response includes term frequency and document frequency. + *

* API name: {@code term_statistics} */ public final Builder termStatistics(@Nullable Boolean value) { @@ -459,6 +524,8 @@ public final Builder termStatistics(@Nullable Boolean value) { } /** + * If true, returns the document version as part of a hit. + *

* API name: {@code version} */ public final Builder version(@Nullable Long value) { @@ -467,6 +534,8 @@ public final Builder version(@Nullable Long value) { } /** + * Specific version type. + *

* API name: {@code version_type} */ public final Builder versionType(@Nullable VersionType value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexStatus.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexStatus.java index a29eece28..65310c56e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexStatus.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexStatus.java @@ -106,42 +106,58 @@ public static ReindexStatus of(Function> f } /** - * Required - API name: {@code batches} + * Required - The number of scroll responses pulled back by the reindex. + *

+ * API name: {@code batches} */ public final long batches() { return this.batches; } /** - * Required - API name: {@code created} + * Required - The number of documents that were successfully created. + *

+ * API name: {@code created} */ public final long created() { return this.created; } /** - * Required - API name: {@code deleted} + * Required - The number of documents that were successfully deleted. + *

+ * API name: {@code deleted} */ public final long deleted() { return this.deleted; } /** - * Required - API name: {@code noops} + * Required - The number of documents that were ignored because the script used + * for the reindex returned a noop value for ctx.op. + *

+ * API name: {@code noops} */ public final long noops() { return this.noops; } /** - * Required - API name: {@code requests_per_second} + * Required - The number of requests per second effectively executed during the + * reindex. + *

+ * API name: {@code requests_per_second} */ public final float requestsPerSecond() { return this.requestsPerSecond; } /** - * Required - API name: {@code retries} + * Required - The number of retries attempted by reindex. bulk is + * the number of bulk actions retried and search is the number of + * search actions retried. + *

+ * API name: {@code retries} */ public final Retries retries() { return this.retries; @@ -156,7 +172,10 @@ public final Time throttled() { } /** - * Required - API name: {@code throttled_millis} + * Required - Number of milliseconds the request slept to conform to + * requests_per_second. + *

+ * API name: {@code throttled_millis} */ public final long throttledMillis() { return this.throttledMillis; @@ -171,28 +190,42 @@ public final Time throttledUntil() { } /** - * Required - API name: {@code throttled_until_millis} + * Required - This field should always be equal to zero in a + * _reindex response. It only has meaning when using the Task API, + * where it indicates the next time (in milliseconds since epoch) a throttled + * request will be executed again in order to conform to + * requests_per_second. + *

+ * API name: {@code throttled_until_millis} */ public final long throttledUntilMillis() { return this.throttledUntilMillis; } /** - * Required - API name: {@code total} + * Required - The number of documents that were successfully processed. + *

+ * API name: {@code total} */ public final long total() { return this.total; } /** - * Required - API name: {@code updated} + * Required - The number of documents that were successfully updated, for + * example, a document with same ID already existed prior to reindex updating + * it. + *

+ * API name: {@code updated} */ public final long updated() { return this.updated; } /** - * Required - API name: {@code version_conflicts} + * Required - The number of version conflicts that reindex hits. + *

+ * API name: {@code version_conflicts} */ public final long versionConflicts() { return this.versionConflicts; @@ -295,7 +328,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement private Long versionConflicts; /** - * Required - API name: {@code batches} + * Required - The number of scroll responses pulled back by the reindex. + *

+ * API name: {@code batches} */ public final Builder batches(long value) { this.batches = value; @@ -303,7 +338,9 @@ public final Builder batches(long value) { } /** - * Required - API name: {@code created} + * Required - The number of documents that were successfully created. + *

+ * API name: {@code created} */ public final Builder created(long value) { this.created = value; @@ -311,7 +348,9 @@ public final Builder created(long value) { } /** - * Required - API name: {@code deleted} + * Required - The number of documents that were successfully deleted. + *

+ * API name: {@code deleted} */ public final Builder deleted(long value) { this.deleted = value; @@ -319,7 +358,10 @@ public final Builder deleted(long value) { } /** - * Required - API name: {@code noops} + * Required - The number of documents that were ignored because the script used + * for the reindex returned a noop value for ctx.op. + *

+ * API name: {@code noops} */ public final Builder noops(long value) { this.noops = value; @@ -327,7 +369,10 @@ public final Builder noops(long value) { } /** - * Required - API name: {@code requests_per_second} + * Required - The number of requests per second effectively executed during the + * reindex. + *

+ * API name: {@code requests_per_second} */ public final Builder requestsPerSecond(float value) { this.requestsPerSecond = value; @@ -335,7 +380,11 @@ public final Builder requestsPerSecond(float value) { } /** - * Required - API name: {@code retries} + * Required - The number of retries attempted by reindex. bulk is + * the number of bulk actions retried and search is the number of + * search actions retried. + *

+ * API name: {@code retries} */ public final Builder retries(Retries value) { this.retries = value; @@ -343,7 +392,11 @@ public final Builder retries(Retries value) { } /** - * Required - API name: {@code retries} + * Required - The number of retries attempted by reindex. bulk is + * the number of bulk actions retried and search is the number of + * search actions retried. + *

+ * API name: {@code retries} */ public final Builder retries(Function> fn) { return this.retries(fn.apply(new Retries.Builder()).build()); @@ -365,7 +418,10 @@ public final Builder throttled(Function> fn) { } /** - * Required - API name: {@code throttled_millis} + * Required - Number of milliseconds the request slept to conform to + * requests_per_second. + *

+ * API name: {@code throttled_millis} */ public final Builder throttledMillis(long value) { this.throttledMillis = value; @@ -388,7 +444,13 @@ public final Builder throttledUntil(Function> } /** - * Required - API name: {@code throttled_until_millis} + * Required - This field should always be equal to zero in a + * _reindex response. It only has meaning when using the Task API, + * where it indicates the next time (in milliseconds since epoch) a throttled + * request will be executed again in order to conform to + * requests_per_second. + *

+ * API name: {@code throttled_until_millis} */ public final Builder throttledUntilMillis(long value) { this.throttledUntilMillis = value; @@ -396,7 +458,9 @@ public final Builder throttledUntilMillis(long value) { } /** - * Required - API name: {@code total} + * Required - The number of documents that were successfully processed. + *

+ * API name: {@code total} */ public final Builder total(long value) { this.total = value; @@ -404,7 +468,11 @@ public final Builder total(long value) { } /** - * Required - API name: {@code updated} + * Required - The number of documents that were successfully updated, for + * example, a document with same ID already existed prior to reindex updating + * it. + *

+ * API name: {@code updated} */ public final Builder updated(long value) { this.updated = value; @@ -412,7 +480,9 @@ public final Builder updated(long value) { } /** - * Required - API name: {@code version_conflicts} + * Required - The number of version conflicts that reindex hits. + *

+ * API name: {@code version_conflicts} */ public final Builder versionConflicts(long value) { this.versionConflicts = value; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/scripts_painless_execute/PainlessContextSetup.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/scripts_painless_execute/PainlessContextSetup.java index c02e4904c..dfeb83ae9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/scripts_painless_execute/PainlessContextSetup.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/scripts_painless_execute/PainlessContextSetup.java @@ -72,21 +72,30 @@ public static PainlessContextSetup of(Function + * API name: {@code document} */ public final JsonData document() { return this.document; } /** - * Required - API name: {@code index} + * Required - Index containing a mapping that’s compatible with the indexed + * document. You may specify a remote index by prefixing the index with the + * remote cluster alias. + *

+ * API name: {@code index} */ public final String index() { return this.index; } /** - * Required - API name: {@code query} + * Required - Use this parameter to specify a query for computing a score. + *

+ * API name: {@code query} */ public final Query query() { return this.query; @@ -135,7 +144,10 @@ public static class Builder extends WithJsonObjectBuilderBase private Query query; /** - * Required - API name: {@code document} + * Required - Document that’s temporarily indexed in-memory and accessible from + * the script. + *

+ * API name: {@code document} */ public final Builder document(JsonData value) { this.document = value; @@ -143,7 +155,11 @@ public final Builder document(JsonData value) { } /** - * Required - API name: {@code index} + * Required - Index containing a mapping that’s compatible with the indexed + * document. You may specify a remote index by prefixing the index with the + * remote cluster alias. + *

+ * API name: {@code index} */ public final Builder index(String value) { this.index = value; @@ -151,7 +167,9 @@ public final Builder index(String value) { } /** - * Required - API name: {@code query} + * Required - Use this parameter to specify a query for computing a score. + *

+ * API name: {@code query} */ public final Builder query(Query value) { this.query = value; @@ -159,7 +177,9 @@ public final Builder query(Query value) { } /** - * Required - API name: {@code query} + * Required - Use this parameter to specify a query for computing a score. + *

+ * API name: {@code query} */ public final Builder query(Function> fn) { return this.query(fn.apply(new Query.Builder()).build()); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/Filter.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/Filter.java index 812e16bfc..a153ad790 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/Filter.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/Filter.java @@ -87,6 +87,8 @@ public static Filter of(Function> fn) { } /** + * Ignore words which occur in more than this many docs. Defaults to unbounded. + *

* API name: {@code max_doc_freq} */ @Nullable @@ -95,6 +97,8 @@ public final Integer maxDocFreq() { } /** + * Maximum number of terms that must be returned per field. + *

* API name: {@code max_num_terms} */ @Nullable @@ -103,6 +107,9 @@ public final Integer maxNumTerms() { } /** + * Ignore words with more than this frequency in the source doc. Defaults to + * unbounded. + *

* API name: {@code max_term_freq} */ @Nullable @@ -111,6 +118,9 @@ public final Integer maxTermFreq() { } /** + * The maximum word length above which words will be ignored. Defaults to + * unbounded. + *

* API name: {@code max_word_length} */ @Nullable @@ -119,6 +129,8 @@ public final Integer maxWordLength() { } /** + * Ignore terms which do not occur in at least this many docs. + *

* API name: {@code min_doc_freq} */ @Nullable @@ -127,6 +139,8 @@ public final Integer minDocFreq() { } /** + * Ignore words with less than this frequency in the source doc. + *

* API name: {@code min_term_freq} */ @Nullable @@ -135,6 +149,8 @@ public final Integer minTermFreq() { } /** + * The minimum word length below which words will be ignored. + *

* API name: {@code min_word_length} */ @Nullable @@ -225,6 +241,8 @@ public static class Builder extends WithJsonObjectBuilderBase implement private Integer minWordLength; /** + * Ignore words which occur in more than this many docs. Defaults to unbounded. + *

* API name: {@code max_doc_freq} */ public final Builder maxDocFreq(@Nullable Integer value) { @@ -233,6 +251,8 @@ public final Builder maxDocFreq(@Nullable Integer value) { } /** + * Maximum number of terms that must be returned per field. + *

* API name: {@code max_num_terms} */ public final Builder maxNumTerms(@Nullable Integer value) { @@ -241,6 +261,9 @@ public final Builder maxNumTerms(@Nullable Integer value) { } /** + * Ignore words with more than this frequency in the source doc. Defaults to + * unbounded. + *

* API name: {@code max_term_freq} */ public final Builder maxTermFreq(@Nullable Integer value) { @@ -249,6 +272,9 @@ public final Builder maxTermFreq(@Nullable Integer value) { } /** + * The maximum word length above which words will be ignored. Defaults to + * unbounded. + *

* API name: {@code max_word_length} */ public final Builder maxWordLength(@Nullable Integer value) { @@ -257,6 +283,8 @@ public final Builder maxWordLength(@Nullable Integer value) { } /** + * Ignore terms which do not occur in at least this many docs. + *

* API name: {@code min_doc_freq} */ public final Builder minDocFreq(@Nullable Integer value) { @@ -265,6 +293,8 @@ public final Builder minDocFreq(@Nullable Integer value) { } /** + * Ignore words with less than this frequency in the source doc. + *

* API name: {@code min_term_freq} */ public final Builder minTermFreq(@Nullable Integer value) { @@ -273,6 +303,8 @@ public final Builder minTermFreq(@Nullable Integer value) { } /** + * The minimum word length below which words will be ignored. + *

* API name: {@code min_word_length} */ public final Builder minWordLength(@Nullable Integer value) { 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 f9da24a2b..ef3a34c30 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 @@ -4,47 +4,47 @@ Elasticsearch API specification - 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/DataLifecycle.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataLifecycle.java deleted file mode 100644 index 25ac7f4ae..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataLifecycle.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * 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. - */ - -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - -package co.elastic.clients.elasticsearch.indices; - -import co.elastic.clients.elasticsearch._types.Time; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -// typedef: indices._types.DataLifecycle - -/** - * Data lifecycle denotes that a data stream is managed by DLM and contains the - * configuration. - * - * @see API - * specification - */ -@JsonpDeserializable -public class DataLifecycle implements JsonpSerializable { - @Nullable - private final Time dataRetention; - - // --------------------------------------------------------------------------------------------- - - private DataLifecycle(Builder builder) { - - this.dataRetention = builder.dataRetention; - - } - - public static DataLifecycle of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code data_retention} - */ - @Nullable - public final Time dataRetention() { - return this.dataRetention; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.dataRetention != null) { - generator.writeKey("data_retention"); - this.dataRetention.serialize(generator, mapper); - - } - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link DataLifecycle}. - */ - - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - @Nullable - private Time dataRetention; - - /** - * API name: {@code data_retention} - */ - public final Builder dataRetention(@Nullable Time value) { - this.dataRetention = value; - return this; - } - - /** - * API name: {@code data_retention} - */ - public final Builder dataRetention(Function> fn) { - return this.dataRetention(fn.apply(new Time.Builder()).build()); - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link DataLifecycle}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public DataLifecycle build() { - _checkSingleUse(); - - return new DataLifecycle(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link DataLifecycle} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - DataLifecycle::setupDataLifecycleDeserializer); - - protected static void setupDataLifecycleDeserializer(ObjectDeserializer op) { - - op.add(Builder::dataRetention, Time._DESERIALIZER, "data_retention"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataLifecycleWithRollover.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataLifecycleWithRollover.java deleted file mode 100644 index b7ada17fb..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataLifecycleWithRollover.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 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. - */ - -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - -package co.elastic.clients.elasticsearch.indices; - -import co.elastic.clients.elasticsearch._types.Time; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -import jakarta.json.stream.JsonGenerator; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -// typedef: indices._types.DataLifecycleWithRollover - -/** - * Data lifecycle with rollover can be used to display the configuration - * including the default rollover conditions, if asked. - * - * @see API - * specification - */ -@JsonpDeserializable -public class DataLifecycleWithRollover implements JsonpSerializable { - @Nullable - private final Time dataRetention; - - @Nullable - private final DlmRolloverConditions rollover; - - // --------------------------------------------------------------------------------------------- - - private DataLifecycleWithRollover(Builder builder) { - - this.dataRetention = builder.dataRetention; - this.rollover = builder.rollover; - - } - - public static DataLifecycleWithRollover of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * If defined, every document added to this data stream will be stored at least - * for this time frame. Any time after this duration the document could be - * deleted. When empty, every document in this data stream will be stored - * indefinitely. - *

- * API name: {@code data_retention} - */ - @Nullable - public final Time dataRetention() { - return this.dataRetention; - } - - /** - * The conditions which will trigger the rollover of a backing index as - * configured by the cluster setting - * cluster.lifecycle.default.rollover. This property is an - * implementation detail and it will only be retrieved when the query param - * include_defaults is set to true. The contents of this field are - * subject to change. - *

- * API name: {@code rollover} - */ - @Nullable - public final DlmRolloverConditions rollover() { - return this.rollover; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.dataRetention != null) { - generator.writeKey("data_retention"); - this.dataRetention.serialize(generator, mapper); - - } - if (this.rollover != null) { - generator.writeKey("rollover"); - this.rollover.serialize(generator, mapper); - - } - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link DataLifecycleWithRollover}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - @Nullable - private Time dataRetention; - - @Nullable - private DlmRolloverConditions rollover; - - /** - * If defined, every document added to this data stream will be stored at least - * for this time frame. Any time after this duration the document could be - * deleted. When empty, every document in this data stream will be stored - * indefinitely. - *

- * API name: {@code data_retention} - */ - public final Builder dataRetention(@Nullable Time value) { - this.dataRetention = value; - return this; - } - - /** - * If defined, every document added to this data stream will be stored at least - * for this time frame. Any time after this duration the document could be - * deleted. When empty, every document in this data stream will be stored - * indefinitely. - *

- * API name: {@code data_retention} - */ - public final Builder dataRetention(Function> fn) { - return this.dataRetention(fn.apply(new Time.Builder()).build()); - } - - /** - * The conditions which will trigger the rollover of a backing index as - * configured by the cluster setting - * cluster.lifecycle.default.rollover. This property is an - * implementation detail and it will only be retrieved when the query param - * include_defaults is set to true. The contents of this field are - * subject to change. - *

- * API name: {@code rollover} - */ - public final Builder rollover(@Nullable DlmRolloverConditions value) { - this.rollover = value; - return this; - } - - /** - * The conditions which will trigger the rollover of a backing index as - * configured by the cluster setting - * cluster.lifecycle.default.rollover. This property is an - * implementation detail and it will only be retrieved when the query param - * include_defaults is set to true. The contents of this field are - * subject to change. - *

- * API name: {@code rollover} - */ - public final Builder rollover( - Function> fn) { - return this.rollover(fn.apply(new DlmRolloverConditions.Builder()).build()); - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link DataLifecycleWithRollover}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public DataLifecycleWithRollover build() { - _checkSingleUse(); - - return new DataLifecycleWithRollover(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link DataLifecycleWithRollover} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, DataLifecycleWithRollover::setupDataLifecycleWithRolloverDeserializer); - - protected static void setupDataLifecycleWithRolloverDeserializer( - ObjectDeserializer op) { - - op.add(Builder::dataRetention, Time._DESERIALIZER, "data_retention"); - op.add(Builder::rollover, DlmRolloverConditions._DESERIALIZER, "rollover"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DlmRolloverConditions.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DlmRolloverConditions.java deleted file mode 100644 index 7b88799be..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DlmRolloverConditions.java +++ /dev/null @@ -1,420 +0,0 @@ -/* - * 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. - */ - -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - -package co.elastic.clients.elasticsearch.indices; - -import co.elastic.clients.elasticsearch._types.Time; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -import co.elastic.clients.json.JsonpUtils; -import co.elastic.clients.json.ObjectBuilderDeserializer; -import co.elastic.clients.json.ObjectDeserializer; -import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.WithJsonObjectBuilderBase; -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; - -// typedef: indices._types.DlmRolloverConditions - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class DlmRolloverConditions implements JsonpSerializable { - @Nullable - private final Time minAge; - - @Nullable - private final String maxAge; - - @Nullable - private final Long minDocs; - - @Nullable - private final Long maxDocs; - - @Nullable - private final String minSize; - - @Nullable - private final String maxSize; - - @Nullable - private final String minPrimaryShardSize; - - @Nullable - private final String maxPrimaryShardSize; - - @Nullable - private final Long minPrimaryShardDocs; - - @Nullable - private final Long maxPrimaryShardDocs; - - // --------------------------------------------------------------------------------------------- - - private DlmRolloverConditions(Builder builder) { - - this.minAge = builder.minAge; - this.maxAge = builder.maxAge; - this.minDocs = builder.minDocs; - this.maxDocs = builder.maxDocs; - this.minSize = builder.minSize; - this.maxSize = builder.maxSize; - this.minPrimaryShardSize = builder.minPrimaryShardSize; - this.maxPrimaryShardSize = builder.maxPrimaryShardSize; - this.minPrimaryShardDocs = builder.minPrimaryShardDocs; - this.maxPrimaryShardDocs = builder.maxPrimaryShardDocs; - - } - - public static DlmRolloverConditions of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * API name: {@code min_age} - */ - @Nullable - public final Time minAge() { - return this.minAge; - } - - /** - * API name: {@code max_age} - */ - @Nullable - public final String maxAge() { - return this.maxAge; - } - - /** - * API name: {@code min_docs} - */ - @Nullable - public final Long minDocs() { - return this.minDocs; - } - - /** - * API name: {@code max_docs} - */ - @Nullable - public final Long maxDocs() { - return this.maxDocs; - } - - /** - * API name: {@code min_size} - */ - @Nullable - public final String minSize() { - return this.minSize; - } - - /** - * API name: {@code max_size} - */ - @Nullable - public final String maxSize() { - return this.maxSize; - } - - /** - * API name: {@code min_primary_shard_size} - */ - @Nullable - public final String minPrimaryShardSize() { - return this.minPrimaryShardSize; - } - - /** - * API name: {@code max_primary_shard_size} - */ - @Nullable - public final String maxPrimaryShardSize() { - return this.maxPrimaryShardSize; - } - - /** - * API name: {@code min_primary_shard_docs} - */ - @Nullable - public final Long minPrimaryShardDocs() { - return this.minPrimaryShardDocs; - } - - /** - * API name: {@code max_primary_shard_docs} - */ - @Nullable - public final Long maxPrimaryShardDocs() { - return this.maxPrimaryShardDocs; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - if (this.minAge != null) { - generator.writeKey("min_age"); - this.minAge.serialize(generator, mapper); - - } - if (this.maxAge != null) { - generator.writeKey("max_age"); - generator.write(this.maxAge); - - } - if (this.minDocs != null) { - generator.writeKey("min_docs"); - generator.write(this.minDocs); - - } - if (this.maxDocs != null) { - generator.writeKey("max_docs"); - generator.write(this.maxDocs); - - } - if (this.minSize != null) { - generator.writeKey("min_size"); - generator.write(this.minSize); - - } - if (this.maxSize != null) { - generator.writeKey("max_size"); - generator.write(this.maxSize); - - } - if (this.minPrimaryShardSize != null) { - generator.writeKey("min_primary_shard_size"); - generator.write(this.minPrimaryShardSize); - - } - if (this.maxPrimaryShardSize != null) { - generator.writeKey("max_primary_shard_size"); - generator.write(this.maxPrimaryShardSize); - - } - if (this.minPrimaryShardDocs != null) { - generator.writeKey("min_primary_shard_docs"); - generator.write(this.minPrimaryShardDocs); - - } - if (this.maxPrimaryShardDocs != null) { - generator.writeKey("max_primary_shard_docs"); - generator.write(this.maxPrimaryShardDocs); - - } - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link DlmRolloverConditions}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - @Nullable - private Time minAge; - - @Nullable - private String maxAge; - - @Nullable - private Long minDocs; - - @Nullable - private Long maxDocs; - - @Nullable - private String minSize; - - @Nullable - private String maxSize; - - @Nullable - private String minPrimaryShardSize; - - @Nullable - private String maxPrimaryShardSize; - - @Nullable - private Long minPrimaryShardDocs; - - @Nullable - private Long maxPrimaryShardDocs; - - /** - * API name: {@code min_age} - */ - public final Builder minAge(@Nullable Time value) { - this.minAge = value; - return this; - } - - /** - * API name: {@code min_age} - */ - public final Builder minAge(Function> fn) { - return this.minAge(fn.apply(new Time.Builder()).build()); - } - - /** - * API name: {@code max_age} - */ - public final Builder maxAge(@Nullable String value) { - this.maxAge = value; - return this; - } - - /** - * API name: {@code min_docs} - */ - public final Builder minDocs(@Nullable Long value) { - this.minDocs = value; - return this; - } - - /** - * API name: {@code max_docs} - */ - public final Builder maxDocs(@Nullable Long value) { - this.maxDocs = value; - return this; - } - - /** - * API name: {@code min_size} - */ - public final Builder minSize(@Nullable String value) { - this.minSize = value; - return this; - } - - /** - * API name: {@code max_size} - */ - public final Builder maxSize(@Nullable String value) { - this.maxSize = value; - return this; - } - - /** - * API name: {@code min_primary_shard_size} - */ - public final Builder minPrimaryShardSize(@Nullable String value) { - this.minPrimaryShardSize = value; - return this; - } - - /** - * API name: {@code max_primary_shard_size} - */ - public final Builder maxPrimaryShardSize(@Nullable String value) { - this.maxPrimaryShardSize = value; - return this; - } - - /** - * API name: {@code min_primary_shard_docs} - */ - public final Builder minPrimaryShardDocs(@Nullable Long value) { - this.minPrimaryShardDocs = value; - return this; - } - - /** - * API name: {@code max_primary_shard_docs} - */ - public final Builder maxPrimaryShardDocs(@Nullable Long value) { - this.maxPrimaryShardDocs = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link DlmRolloverConditions}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public DlmRolloverConditions build() { - _checkSingleUse(); - - return new DlmRolloverConditions(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link DlmRolloverConditions} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, DlmRolloverConditions::setupDlmRolloverConditionsDeserializer); - - protected static void setupDlmRolloverConditionsDeserializer(ObjectDeserializer op) { - - op.add(Builder::minAge, Time._DESERIALIZER, "min_age"); - op.add(Builder::maxAge, JsonpDeserializer.stringDeserializer(), "max_age"); - op.add(Builder::minDocs, JsonpDeserializer.longDeserializer(), "min_docs"); - op.add(Builder::maxDocs, JsonpDeserializer.longDeserializer(), "max_docs"); - op.add(Builder::minSize, JsonpDeserializer.stringDeserializer(), "min_size"); - op.add(Builder::maxSize, JsonpDeserializer.stringDeserializer(), "max_size"); - op.add(Builder::minPrimaryShardSize, JsonpDeserializer.stringDeserializer(), "min_primary_shard_size"); - op.add(Builder::maxPrimaryShardSize, JsonpDeserializer.stringDeserializer(), "max_primary_shard_size"); - op.add(Builder::minPrimaryShardDocs, JsonpDeserializer.longDeserializer(), "min_primary_shard_docs"); - op.add(Builder::maxPrimaryShardDocs, JsonpDeserializer.longDeserializer(), "max_primary_shard_docs"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/explain_data_lifecycle/DataLifecycleExplain.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/explain_data_lifecycle/DataLifecycleExplain.java deleted file mode 100644 index 013169b6e..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/explain_data_lifecycle/DataLifecycleExplain.java +++ /dev/null @@ -1,406 +0,0 @@ -/* - * 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. - */ - -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - -package co.elastic.clients.elasticsearch.indices.explain_data_lifecycle; - -import co.elastic.clients.elasticsearch._types.Time; -import co.elastic.clients.elasticsearch.indices.DataLifecycleWithRollover; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -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.Boolean; -import java.lang.Long; -import java.lang.String; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -// typedef: indices.explain_data_lifecycle.DataLifecycleExplain - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class DataLifecycleExplain implements JsonpSerializable { - private final String index; - - private final boolean managedByDlm; - - @Nullable - private final Long indexCreationDateMillis; - - @Nullable - private final Time timeSinceIndexCreation; - - @Nullable - private final Long rolloverDateMillis; - - @Nullable - private final Time timeSinceRollover; - - @Nullable - private final DataLifecycleWithRollover lifecycle; - - @Nullable - private final Time generationTime; - - @Nullable - private final String error; - - // --------------------------------------------------------------------------------------------- - - private DataLifecycleExplain(Builder builder) { - - this.index = ApiTypeHelper.requireNonNull(builder.index, this, "index"); - this.managedByDlm = ApiTypeHelper.requireNonNull(builder.managedByDlm, this, "managedByDlm"); - this.indexCreationDateMillis = builder.indexCreationDateMillis; - this.timeSinceIndexCreation = builder.timeSinceIndexCreation; - this.rolloverDateMillis = builder.rolloverDateMillis; - this.timeSinceRollover = builder.timeSinceRollover; - this.lifecycle = builder.lifecycle; - this.generationTime = builder.generationTime; - this.error = builder.error; - - } - - public static DataLifecycleExplain of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code index} - */ - public final String index() { - return this.index; - } - - /** - * Required - API name: {@code managed_by_dlm} - */ - public final boolean managedByDlm() { - return this.managedByDlm; - } - - /** - * API name: {@code index_creation_date_millis} - */ - @Nullable - public final Long indexCreationDateMillis() { - return this.indexCreationDateMillis; - } - - /** - * API name: {@code time_since_index_creation} - */ - @Nullable - public final Time timeSinceIndexCreation() { - return this.timeSinceIndexCreation; - } - - /** - * API name: {@code rollover_date_millis} - */ - @Nullable - public final Long rolloverDateMillis() { - return this.rolloverDateMillis; - } - - /** - * API name: {@code time_since_rollover} - */ - @Nullable - public final Time timeSinceRollover() { - return this.timeSinceRollover; - } - - /** - * API name: {@code lifecycle} - */ - @Nullable - public final DataLifecycleWithRollover lifecycle() { - return this.lifecycle; - } - - /** - * API name: {@code generation_time} - */ - @Nullable - public final Time generationTime() { - return this.generationTime; - } - - /** - * API name: {@code error} - */ - @Nullable - public final String error() { - return this.error; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("index"); - generator.write(this.index); - - generator.writeKey("managed_by_dlm"); - generator.write(this.managedByDlm); - - if (this.indexCreationDateMillis != null) { - generator.writeKey("index_creation_date_millis"); - generator.write(this.indexCreationDateMillis); - - } - if (this.timeSinceIndexCreation != null) { - generator.writeKey("time_since_index_creation"); - this.timeSinceIndexCreation.serialize(generator, mapper); - - } - if (this.rolloverDateMillis != null) { - generator.writeKey("rollover_date_millis"); - generator.write(this.rolloverDateMillis); - - } - if (this.timeSinceRollover != null) { - generator.writeKey("time_since_rollover"); - this.timeSinceRollover.serialize(generator, mapper); - - } - if (this.lifecycle != null) { - generator.writeKey("lifecycle"); - this.lifecycle.serialize(generator, mapper); - - } - if (this.generationTime != null) { - generator.writeKey("generation_time"); - this.generationTime.serialize(generator, mapper); - - } - if (this.error != null) { - generator.writeKey("error"); - generator.write(this.error); - - } - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link DataLifecycleExplain}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private String index; - - private Boolean managedByDlm; - - @Nullable - private Long indexCreationDateMillis; - - @Nullable - private Time timeSinceIndexCreation; - - @Nullable - private Long rolloverDateMillis; - - @Nullable - private Time timeSinceRollover; - - @Nullable - private DataLifecycleWithRollover lifecycle; - - @Nullable - private Time generationTime; - - @Nullable - private String error; - - /** - * Required - API name: {@code index} - */ - public final Builder index(String value) { - this.index = value; - return this; - } - - /** - * Required - API name: {@code managed_by_dlm} - */ - public final Builder managedByDlm(boolean value) { - this.managedByDlm = value; - return this; - } - - /** - * API name: {@code index_creation_date_millis} - */ - public final Builder indexCreationDateMillis(@Nullable Long value) { - this.indexCreationDateMillis = value; - return this; - } - - /** - * API name: {@code time_since_index_creation} - */ - public final Builder timeSinceIndexCreation(@Nullable Time value) { - this.timeSinceIndexCreation = value; - return this; - } - - /** - * API name: {@code time_since_index_creation} - */ - public final Builder timeSinceIndexCreation(Function> fn) { - return this.timeSinceIndexCreation(fn.apply(new Time.Builder()).build()); - } - - /** - * API name: {@code rollover_date_millis} - */ - public final Builder rolloverDateMillis(@Nullable Long value) { - this.rolloverDateMillis = value; - return this; - } - - /** - * API name: {@code time_since_rollover} - */ - public final Builder timeSinceRollover(@Nullable Time value) { - this.timeSinceRollover = value; - return this; - } - - /** - * API name: {@code time_since_rollover} - */ - public final Builder timeSinceRollover(Function> fn) { - return this.timeSinceRollover(fn.apply(new Time.Builder()).build()); - } - - /** - * API name: {@code lifecycle} - */ - public final Builder lifecycle(@Nullable DataLifecycleWithRollover value) { - this.lifecycle = value; - return this; - } - - /** - * API name: {@code lifecycle} - */ - public final Builder lifecycle( - Function> fn) { - return this.lifecycle(fn.apply(new DataLifecycleWithRollover.Builder()).build()); - } - - /** - * API name: {@code generation_time} - */ - public final Builder generationTime(@Nullable Time value) { - this.generationTime = value; - return this; - } - - /** - * API name: {@code generation_time} - */ - public final Builder generationTime(Function> fn) { - return this.generationTime(fn.apply(new Time.Builder()).build()); - } - - /** - * API name: {@code error} - */ - public final Builder error(@Nullable String value) { - this.error = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link DataLifecycleExplain}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public DataLifecycleExplain build() { - _checkSingleUse(); - - return new DataLifecycleExplain(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link DataLifecycleExplain} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, DataLifecycleExplain::setupDataLifecycleExplainDeserializer); - - protected static void setupDataLifecycleExplainDeserializer(ObjectDeserializer op) { - - op.add(Builder::index, JsonpDeserializer.stringDeserializer(), "index"); - op.add(Builder::managedByDlm, JsonpDeserializer.booleanDeserializer(), "managed_by_dlm"); - op.add(Builder::indexCreationDateMillis, JsonpDeserializer.longDeserializer(), "index_creation_date_millis"); - op.add(Builder::timeSinceIndexCreation, Time._DESERIALIZER, "time_since_index_creation"); - op.add(Builder::rolloverDateMillis, JsonpDeserializer.longDeserializer(), "rollover_date_millis"); - op.add(Builder::timeSinceRollover, Time._DESERIALIZER, "time_since_rollover"); - op.add(Builder::lifecycle, DataLifecycleWithRollover._DESERIALIZER, "lifecycle"); - op.add(Builder::generationTime, Time._DESERIALIZER, "generation_time"); - op.add(Builder::error, JsonpDeserializer.stringDeserializer(), "error"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_data_lifecycle/DataStreamLifecycle.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_data_lifecycle/DataStreamLifecycle.java deleted file mode 100644 index 3abac00cc..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_data_lifecycle/DataStreamLifecycle.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * 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. - */ - -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - -package co.elastic.clients.elasticsearch.indices.get_data_lifecycle; - -import co.elastic.clients.elasticsearch.indices.DataLifecycle; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -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.String; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -// typedef: indices.get_data_lifecycle.DataStreamLifecycle - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class DataStreamLifecycle implements JsonpSerializable { - private final String name; - - @Nullable - private final DataLifecycle lifecycle; - - // --------------------------------------------------------------------------------------------- - - private DataStreamLifecycle(Builder builder) { - - this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); - this.lifecycle = builder.lifecycle; - - } - - public static DataStreamLifecycle of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code name} - */ - public final String name() { - return this.name; - } - - /** - * API name: {@code lifecycle} - */ - @Nullable - public final DataLifecycle lifecycle() { - return this.lifecycle; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("name"); - generator.write(this.name); - - if (this.lifecycle != null) { - generator.writeKey("lifecycle"); - this.lifecycle.serialize(generator, mapper); - - } - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link DataStreamLifecycle}. - */ - - public static class Builder extends WithJsonObjectBuilderBase - implements - ObjectBuilder { - private String name; - - @Nullable - private DataLifecycle lifecycle; - - /** - * Required - API name: {@code name} - */ - public final Builder name(String value) { - this.name = value; - return this; - } - - /** - * API name: {@code lifecycle} - */ - public final Builder lifecycle(@Nullable DataLifecycle value) { - this.lifecycle = value; - return this; - } - - /** - * API name: {@code lifecycle} - */ - public final Builder lifecycle(Function> fn) { - return this.lifecycle(fn.apply(new DataLifecycle.Builder()).build()); - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link DataStreamLifecycle}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public DataStreamLifecycle build() { - _checkSingleUse(); - - return new DataStreamLifecycle(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link DataStreamLifecycle} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, DataStreamLifecycle::setupDataStreamLifecycleDeserializer); - - protected static void setupDataStreamLifecycleDeserializer(ObjectDeserializer op) { - - op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); - op.add(Builder::lifecycle, DataLifecycle._DESERIALIZER, "lifecycle"); - - } - -} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java index 392cb7db9..5b421462d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java @@ -89,6 +89,9 @@ public class PutTrainedModelRequest extends RequestBase implements JsonpSerializ @Nullable private final TrainedModelType modelType; + @Nullable + private final String platformArchitecture; + private final List tags; // --------------------------------------------------------------------------------------------- @@ -105,6 +108,7 @@ private PutTrainedModelRequest(Builder builder) { this.modelId = ApiTypeHelper.requireNonNull(builder.modelId, this, "modelId"); this.modelSizeBytes = builder.modelSizeBytes; this.modelType = builder.modelType; + this.platformArchitecture = builder.platformArchitecture; this.tags = ApiTypeHelper.unmodifiable(builder.tags); } @@ -222,6 +226,24 @@ public final TrainedModelType modelType() { return this.modelType; } + /** + * The platform architecture (if applicable) of the trained mode. If the model + * only works on one platform, because it is heavily optimized for a particular + * processor architecture and OS combination, then this field specifies which. + * The format of the string must match the platform identifiers used by + * Elasticsearch, so one of, linux-x86_64, + * linux-aarch64, darwin-x86_64, + * darwin-aarch64, or windows-x86_64. For portable + * models (those that work independent of processor architecture or OS + * features), leave this field unset. + *

+ * API name: {@code platform_architecture} + */ + @Nullable + public final String platformArchitecture() { + return this.platformArchitecture; + } + /** * An array of tags to organize the model. *

@@ -281,6 +303,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("model_type"); this.modelType.serialize(generator, mapper); } + if (this.platformArchitecture != null) { + generator.writeKey("platform_architecture"); + generator.write(this.platformArchitecture); + + } if (ApiTypeHelper.isDefined(this.tags)) { generator.writeKey("tags"); generator.writeStartArray(); @@ -332,6 +359,9 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private TrainedModelType modelType; + @Nullable + private String platformArchitecture; + @Nullable private List tags; @@ -477,6 +507,24 @@ public final Builder modelType(@Nullable TrainedModelType value) { return this; } + /** + * The platform architecture (if applicable) of the trained mode. If the model + * only works on one platform, because it is heavily optimized for a particular + * processor architecture and OS combination, then this field specifies which. + * The format of the string must match the platform identifiers used by + * Elasticsearch, so one of, linux-x86_64, + * linux-aarch64, darwin-x86_64, + * darwin-aarch64, or windows-x86_64. For portable + * models (those that work independent of processor architecture or OS + * features), leave this field unset. + *

+ * API name: {@code platform_architecture} + */ + public final Builder platformArchitecture(@Nullable String value) { + this.platformArchitecture = value; + return this; + } + /** * An array of tags to organize the model. *

@@ -538,6 +586,7 @@ protected static void setupPutTrainedModelRequestDeserializer( op.add(Builder::metadata, JsonData._DESERIALIZER, "metadata"); op.add(Builder::modelSizeBytes, JsonpDeserializer.longDeserializer(), "model_size_bytes"); op.add(Builder::modelType, TrainedModelType._DESERIALIZER, "model_type"); + op.add(Builder::platformArchitecture, JsonpDeserializer.stringDeserializer(), "platform_architecture"); op.add(Builder::tags, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "tags"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/PutRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/PutRequest.java index 9925d24b2..2a352bfdc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/PutRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/PutRequest.java @@ -36,10 +36,10 @@ import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; -import jakarta.json.stream.JsonParser; import java.lang.String; import java.util.Collections; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Objects; import java.util.function.Function; @@ -55,16 +55,16 @@ */ @JsonpDeserializable public class PutRequest extends RequestBase implements JsonpSerializable { - private final String rulesetId; + private final List rules; - private final QueryRuleset queryRuleset; + private final String rulesetId; // --------------------------------------------------------------------------------------------- private PutRequest(Builder builder) { + this.rules = ApiTypeHelper.unmodifiableRequired(builder.rules, this, "rules"); this.rulesetId = ApiTypeHelper.requireNonNull(builder.rulesetId, this, "rulesetId"); - this.queryRuleset = ApiTypeHelper.requireNonNull(builder.queryRuleset, this, "queryRuleset"); } @@ -72,6 +72,13 @@ public static PutRequest of(Function> fn) { return fn.apply(new Builder()).build(); } + /** + * Required - API name: {@code rules} + */ + public final List rules() { + return this.rules; + } + /** * Required - The unique identifier of the query ruleset to be created or * updated @@ -83,17 +90,26 @@ public final String rulesetId() { } /** - * Required - Request body. + * Serialize this object to JSON. */ - public final QueryRuleset queryRuleset() { - return this.queryRuleset; + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); } - /** - * Serialize this value to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - this.queryRuleset.serialize(generator, mapper); + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (ApiTypeHelper.isDefined(this.rules)) { + generator.writeKey("rules"); + generator.writeStartArray(); + for (QueryRule item0 : this.rules) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } } @@ -104,42 +120,48 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { */ public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { - private String rulesetId; + private List rules; - private QueryRuleset queryRuleset; + private String rulesetId; /** - * Required - The unique identifier of the query ruleset to be created or - * updated + * Required - API name: {@code rules} *

- * API name: {@code ruleset_id} + * Adds all elements of list to rules. */ - public final Builder rulesetId(String value) { - this.rulesetId = value; + public final Builder rules(List list) { + this.rules = _listAddAll(this.rules, list); return this; } /** - * Required - Request body. + * Required - API name: {@code rules} + *

+ * Adds one or more values to rules. */ - public final Builder queryRuleset(QueryRuleset value) { - this.queryRuleset = value; + public final Builder rules(QueryRule value, QueryRule... values) { + this.rules = _listAdd(this.rules, value, values); return this; } /** - * Required - Request body. + * Required - API name: {@code rules} + *

+ * Adds a value to rules using a builder lambda. */ - public final Builder queryRuleset(Function> fn) { - return this.queryRuleset(fn.apply(new QueryRuleset.Builder()).build()); + public final Builder rules(Function> fn) { + return rules(fn.apply(new QueryRule.Builder()).build()); } - @Override - public Builder withJson(JsonParser parser, JsonpMapper mapper) { - - @SuppressWarnings("unchecked") - QueryRuleset value = (QueryRuleset) QueryRuleset._DESERIALIZER.deserialize(parser, mapper); - return this.queryRuleset(value); + /** + * Required - The unique identifier of the query ruleset to be created or + * updated + *

+ * API name: {@code ruleset_id} + */ + public final Builder rulesetId(String value) { + this.rulesetId = value; + return this; } @Override @@ -160,13 +182,18 @@ public PutRequest build() { } } - public static final JsonpDeserializer _DESERIALIZER = createPutRequestDeserializer(); - protected static JsonpDeserializer createPutRequestDeserializer() { + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link PutRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + PutRequest::setupPutRequestDeserializer); + + protected static void setupPutRequestDeserializer(ObjectDeserializer op) { - JsonpDeserializer valueDeserializer = QueryRuleset._DESERIALIZER; + op.add(Builder::rules, JsonpDeserializer.arrayDeserializer(QueryRule._DESERIALIZER), "rules"); - return JsonpDeserializer.of(valueDeserializer.acceptedEvents(), (parser, mapper, event) -> new Builder() - .queryRuleset(valueDeserializer.deserialize(parser, mapper, event)).build()); } // --------------------------------------------------------------------------------------------- diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/QueryRuleset.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/QueryRuleset.java index 7162e5a12..9e2bf508d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/QueryRuleset.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/QueryRuleset.java @@ -48,8 +48,8 @@ * "../doc-files/api-spec.html#query_ruleset._types.QueryRuleset">API * specification */ -@JsonpDeserializable -public class QueryRuleset implements JsonpSerializable { + +public abstract class QueryRuleset implements JsonpSerializable { private final String rulesetId; private final List rules; @@ -63,10 +63,6 @@ protected QueryRuleset(AbstractBuilder builder) { } - public static QueryRuleset queryRulesetOf(Function> fn) { - return fn.apply(new Builder()).build(); - } - /** * Required - Query Ruleset unique identifier *

@@ -117,31 +113,6 @@ public String toString() { return JsonpUtils.toString(this); } - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link QueryRuleset}. - */ - - public static class Builder extends QueryRuleset.AbstractBuilder implements ObjectBuilder { - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link QueryRuleset}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public QueryRuleset build() { - _checkSingleUse(); - - return new QueryRuleset(this); - } - } - public abstract static class AbstractBuilder> extends WithJsonObjectBuilderBase { @@ -199,13 +170,6 @@ public final BuilderT rules(Function } // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link QueryRuleset} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - QueryRuleset::setupQueryRulesetDeserializer); - protected static > void setupQueryRulesetDeserializer( ObjectDeserializer op) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/AnalyticsCollection.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/AnalyticsCollection.java index 5e9ed8b9a..bddf4ff7b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/AnalyticsCollection.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/AnalyticsCollection.java @@ -63,7 +63,7 @@ public static AnalyticsCollection of(Function * API name: {@code event_data_stream} */ @@ -104,7 +104,7 @@ public static class Builder extends WithJsonObjectBuilderBase private EventDataStream eventDataStream; /** - * Required - Data stream for the collection + * Required - Data stream for the collection. *

* API name: {@code event_data_stream} */ @@ -114,7 +114,7 @@ public final Builder eventDataStream(EventDataStream value) { } /** - * Required - Data stream for the collection + * Required - Data stream for the collection. *

* API name: {@code event_data_stream} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/ListRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/ListRequest.java index 13f63afca..48eeb11a2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/ListRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/ListRequest.java @@ -76,7 +76,7 @@ public static ListRequest of(Function> fn) { } /** - * Starting offset (default: 0) + * Starting offset. *

* API name: {@code from} */ @@ -86,7 +86,7 @@ public final Integer from() { } /** - * Query in the Lucene query string syntax" + * Query in the Lucene query string syntax. *

* API name: {@code q} */ @@ -96,7 +96,7 @@ public final String q() { } /** - * specifies a max number of results to get + * Specifies a max number of results to get. *

* API name: {@code size} */ @@ -122,7 +122,7 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private Integer size; /** - * Starting offset (default: 0) + * Starting offset. *

* API name: {@code from} */ @@ -132,7 +132,7 @@ public final Builder from(@Nullable Integer value) { } /** - * Query in the Lucene query string syntax" + * Query in the Lucene query string syntax. *

* API name: {@code q} */ @@ -142,7 +142,7 @@ public final Builder q(@Nullable String value) { } /** - * specifies a max number of results to get + * Specifies a max number of results to get. *

* API name: {@code size} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutBehavioralAnalyticsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutBehavioralAnalyticsRequest.java index 08f2ff35b..31e16253d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutBehavioralAnalyticsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutBehavioralAnalyticsRequest.java @@ -45,7 +45,7 @@ // typedef: search_application.put_behavioral_analytics.Request /** - * Creates a behavioral analytics collection + * Creates a behavioral analytics collection. * * @see API @@ -68,7 +68,7 @@ public static PutBehavioralAnalyticsRequest of(Function * API name: {@code name} */ @@ -88,7 +88,7 @@ public static class Builder extends RequestBase.AbstractBuilder private String name; /** - * Required - The name of the analytics collection to be created or updated + * Required - The name of the analytics collection to be created or updated. *

* API name: {@code name} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutRequest.java index 9f89595fa..0f69e5734 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutRequest.java @@ -77,8 +77,8 @@ public static PutRequest of(Function> fn) { } /** - * If true, requires that a search application with the specified resource_id - * does not already exist. (default: false) + * If true, this request cannot replace or update existing Search + * Applications. *

* API name: {@code create} */ @@ -88,7 +88,7 @@ public final Boolean create() { } /** - * Required - The name of the search application to be created or updated + * Required - The name of the search application to be created or updated. *

* API name: {@code name} */ @@ -126,8 +126,8 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private SearchApplication searchApplication; /** - * If true, requires that a search application with the specified resource_id - * does not already exist. (default: false) + * If true, this request cannot replace or update existing Search + * Applications. *

* API name: {@code create} */ @@ -137,7 +137,7 @@ public final Builder create(@Nullable Boolean value) { } /** - * Required - The name of the search application to be created or updated + * Required - The name of the search application to be created or updated. *

* API name: {@code name} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplication.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplication.java index fe8664b8f..4afca4f0b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplication.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplication.java @@ -80,7 +80,7 @@ public static SearchApplication searchApplicationOf(Function * API name: {@code name} */ @@ -89,7 +89,7 @@ public final String name() { } /** - * Required - Indices that are part of the Search Application + * Required - Indices that are part of the Search Application. *

* API name: {@code indices} */ @@ -98,7 +98,7 @@ public final List indices() { } /** - * Required - Last time the Search Application was updated + * Required - Last time the Search Application was updated. *

* API name: {@code updated_at_millis} */ @@ -107,7 +107,7 @@ public final long updatedAtMillis() { } /** - * Analytics collection associated to the Search Application + * Analytics collection associated to the Search Application. *

* API name: {@code analytics_collection_name} */ @@ -117,7 +117,7 @@ public final String analyticsCollectionName() { } /** - * Search template to use on search operations + * Search template to use on search operations. *

* API name: {@code template} */ @@ -214,7 +214,7 @@ public abstract static class AbstractBuilder * API name: {@code name} */ @@ -224,7 +224,7 @@ public final BuilderT name(String value) { } /** - * Required - Indices that are part of the Search Application + * Required - Indices that are part of the Search Application. *

* API name: {@code indices} *

@@ -236,7 +236,7 @@ public final BuilderT indices(List list) { } /** - * Required - Indices that are part of the Search Application + * Required - Indices that are part of the Search Application. *

* API name: {@code indices} *

@@ -248,7 +248,7 @@ public final BuilderT indices(String value, String... values) { } /** - * Required - Last time the Search Application was updated + * Required - Last time the Search Application was updated. *

* API name: {@code updated_at_millis} */ @@ -258,7 +258,7 @@ public final BuilderT updatedAtMillis(long value) { } /** - * Analytics collection associated to the Search Application + * Analytics collection associated to the Search Application. *

* API name: {@code analytics_collection_name} */ @@ -268,7 +268,7 @@ public final BuilderT analyticsCollectionName(@Nullable String value) { } /** - * Search template to use on search operations + * Search template to use on search operations. *

* API name: {@code template} */ @@ -278,7 +278,7 @@ public final BuilderT template(@Nullable SearchApplicationTemplate value) { } /** - * Search template to use on search operations + * Search template to use on search operations. *

* API name: {@code template} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplicationSearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplicationSearchRequest.java index 17923d133..76c879464 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplicationSearchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplicationSearchRequest.java @@ -48,7 +48,7 @@ // typedef: search_application.search.Request /** - * Perform a search against a search application + * Perform a search against a search application. * * @see API @@ -75,7 +75,7 @@ public static SearchApplicationSearchRequest of( } /** - * Required - The name of the search application to be searched + * Required - The name of the search application to be searched. *

* API name: {@code name} */ @@ -84,6 +84,9 @@ public final String name() { } /** + * Query parameters specific to this request, which will override any defaults + * specified in the template. + *

* API name: {@code params} */ public final Map params() { @@ -130,7 +133,7 @@ public static class Builder extends RequestBase.AbstractBuilder private Map params; /** - * Required - The name of the search application to be searched + * Required - The name of the search application to be searched. *

* API name: {@code name} */ @@ -140,6 +143,9 @@ public final Builder name(String value) { } /** + * Query parameters specific to this request, which will override any defaults + * specified in the template. + *

* API name: {@code params} *

* Adds all entries of map to params. @@ -150,6 +156,9 @@ public final Builder params(Map map) { } /** + * Query parameters specific to this request, which will override any defaults + * specified in the template. + *

* API name: {@code params} *

* Adds an entry to params. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplicationTemplate.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplicationTemplate.java index 42c886117..b3211c1cb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplicationTemplate.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplicationTemplate.java @@ -64,7 +64,9 @@ public static SearchApplicationTemplate of(Function + * API name: {@code script} */ public final InlineScript script() { return this.script; @@ -103,7 +105,9 @@ public static class Builder extends WithJsonObjectBuilderBase private InlineScript script; /** - * Required - API name: {@code script} + * Required - The associated mustache template. + *

+ * API name: {@code script} */ public final Builder script(InlineScript value) { this.script = value; @@ -111,7 +115,9 @@ public final Builder script(InlineScript value) { } /** - * Required - API name: {@code script} + * Required - The associated mustache template. + *

+ * API name: {@code script} */ public final Builder script(Function> fn) { return this.script(fn.apply(new InlineScript.Builder()).build()); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ClearCursorRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ClearCursorRequest.java index 4063ceeb5..e7e992bb2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ClearCursorRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ClearCursorRequest.java @@ -67,7 +67,9 @@ public static ClearCursorRequest of(Function + * API name: {@code cursor} */ public final String cursor() { return this.cursor; @@ -101,7 +103,9 @@ public static class Builder extends RequestBase.AbstractBuilder private String cursor; /** - * Required - API name: {@code cursor} + * Required - Cursor to clear. + *

+ * API name: {@code cursor} */ public final Builder cursor(String value) { this.cursor = value; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/DeleteAsyncRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/DeleteAsyncRequest.java index 44ed8cfcb..ab0bba51c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/DeleteAsyncRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/DeleteAsyncRequest.java @@ -68,7 +68,7 @@ public static DeleteAsyncRequest of(Function * API name: {@code id} */ @@ -88,7 +88,7 @@ public static class Builder extends RequestBase.AbstractBuilder private String id; /** - * Required - The async search ID + * Required - Identifier for the search. *

* API name: {@code id} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncRequest.java index c77995ef4..417e81860 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncRequest.java @@ -106,7 +106,7 @@ public final String format() { } /** - * Required - The async search ID + * Required - Identifier for the search. *

* API name: {@code id} */ @@ -180,7 +180,7 @@ public final Builder format(@Nullable String value) { } /** - * Required - The async search ID + * Required - Identifier for the search. *

* API name: {@code id} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncStatusRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncStatusRequest.java index 751783f75..2d1ac49c3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncStatusRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncStatusRequest.java @@ -68,7 +68,7 @@ public static GetAsyncStatusRequest of(Function * API name: {@code id} */ @@ -88,7 +88,7 @@ public static class Builder extends RequestBase.AbstractBuilder private String id; /** - * Required - The async search ID + * Required - Identifier for the search. *

* API name: {@code id} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/QueryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/QueryRequest.java index 72e567ebe..3f652dec8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/QueryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/QueryRequest.java @@ -160,6 +160,10 @@ public final Boolean columnar() { } /** + * Cursor used to retrieve a set of paginated results. If you specify a cursor, + * the API only uses the columnar and time_zone + * request body parameters. It ignores other request body parameters. + *

* API name: {@code cursor} */ @Nullable @@ -190,7 +194,7 @@ public final Boolean fieldMultiValueLeniency() { } /** - * Optional Elasticsearch query DSL for additional filtering. + * Elasticsearch query DSL for additional filtering. *

* API name: {@code filter} */ @@ -200,7 +204,7 @@ public final Query filter() { } /** - * a short version of the Accept header, e.g. json, yaml + * Format for the response. *

* API name: {@code format} */ @@ -261,7 +265,7 @@ public final Map params() { } /** - * SQL query to execute + * SQL query to run. *

* API name: {@code query} */ @@ -291,8 +295,7 @@ public final Map runtimeMappings() { } /** - * Time-zone in ISO 8601 used for executing the query on the server. More - * information available here. + * ISO-8601 time zone ID for the search. *

* API name: {@code time_zone} */ @@ -500,6 +503,10 @@ public final Builder columnar(@Nullable Boolean value) { } /** + * Cursor used to retrieve a set of paginated results. If you specify a cursor, + * the API only uses the columnar and time_zone + * request body parameters. It ignores other request body parameters. + *

* API name: {@code cursor} */ public final Builder cursor(@Nullable String value) { @@ -530,7 +537,7 @@ public final Builder fieldMultiValueLeniency(@Nullable Boolean value) { } /** - * Optional Elasticsearch query DSL for additional filtering. + * Elasticsearch query DSL for additional filtering. *

* API name: {@code filter} */ @@ -540,7 +547,7 @@ public final Builder filter(@Nullable Query value) { } /** - * Optional Elasticsearch query DSL for additional filtering. + * Elasticsearch query DSL for additional filtering. *

* API name: {@code filter} */ @@ -549,7 +556,7 @@ public final Builder filter(Function> fn) { } /** - * a short version of the Accept header, e.g. json, yaml + * Format for the response. *

* API name: {@code format} */ @@ -643,7 +650,7 @@ public final Builder params(String key, JsonData value) { } /** - * SQL query to execute + * SQL query to run. *

* API name: {@code query} */ @@ -711,8 +718,7 @@ public final Builder runtimeMappings(String key, } /** - * Time-zone in ISO 8601 used for executing the query on the server. More - * information available here. + * ISO-8601 time zone ID for the search. *

* API name: {@code time_zone} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/TranslateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/TranslateRequest.java index 23d1c0d17..ef254bdf6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/TranslateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/TranslateRequest.java @@ -81,6 +81,8 @@ public static TranslateRequest of(Function * API name: {@code fetch_size} */ @Nullable @@ -89,6 +91,8 @@ public final Integer fetchSize() { } /** + * Elasticsearch query DSL for additional filtering. + *

* API name: {@code filter} */ @Nullable @@ -97,13 +101,17 @@ public final Query filter() { } /** - * Required - API name: {@code query} + * Required - SQL query to run. + *

+ * API name: {@code query} */ public final String query() { return this.query; } /** + * ISO-8601 time zone ID for the search. + *

* API name: {@code time_zone} */ @Nullable @@ -164,6 +172,8 @@ public static class Builder extends RequestBase.AbstractBuilder private String timeZone; /** + * The maximum number of rows (or entries) to return in one response. + *

* API name: {@code fetch_size} */ public final Builder fetchSize(@Nullable Integer value) { @@ -172,6 +182,8 @@ public final Builder fetchSize(@Nullable Integer value) { } /** + * Elasticsearch query DSL for additional filtering. + *

* API name: {@code filter} */ public final Builder filter(@Nullable Query value) { @@ -180,6 +192,8 @@ public final Builder filter(@Nullable Query value) { } /** + * Elasticsearch query DSL for additional filtering. + *

* API name: {@code filter} */ public final Builder filter(Function> fn) { @@ -187,7 +201,9 @@ public final Builder filter(Function> fn) { } /** - * Required - API name: {@code query} + * Required - SQL query to run. + *

+ * API name: {@code query} */ public final Builder query(String value) { this.query = value; @@ -195,6 +211,8 @@ public final Builder query(String value) { } /** + * ISO-8601 time zone ID for the search. + *

* API name: {@code time_zone} */ public final Builder timeZone(@Nullable String value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/CancelRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/CancelRequest.java index 007779343..68a17a507 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/CancelRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/CancelRequest.java @@ -84,8 +84,8 @@ public static CancelRequest of(Function> f } /** - * A comma-separated list of actions that should be cancelled. Leave empty to - * cancel all. + * Comma-separated list or wildcard expression of actions used to limit the + * request. *

* API name: {@code actions} */ @@ -94,9 +94,7 @@ public final List actions() { } /** - * A comma-separated list of node IDs or names to limit the returned - * information; use _local to return information from the node - * you're connecting to, leave empty to get information from all nodes + * Comma-separated list of node IDs or names used to limit the request. *

* API name: {@code nodes} */ @@ -105,8 +103,7 @@ public final List nodes() { } /** - * Cancel tasks with specified parent task id (node_id:task_number). Set to -1 - * to cancel all. + * Parent task ID used to limit the tasks. *

* API name: {@code parent_task_id} */ @@ -116,7 +113,7 @@ public final String parentTaskId() { } /** - * Cancel the task with specified task id (node_id:task_number) + * ID of the task. *

* API name: {@code task_id} */ @@ -159,8 +156,8 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private Boolean waitForCompletion; /** - * A comma-separated list of actions that should be cancelled. Leave empty to - * cancel all. + * Comma-separated list or wildcard expression of actions used to limit the + * request. *

* API name: {@code actions} *

@@ -172,8 +169,8 @@ public final Builder actions(List list) { } /** - * A comma-separated list of actions that should be cancelled. Leave empty to - * cancel all. + * Comma-separated list or wildcard expression of actions used to limit the + * request. *

* API name: {@code actions} *

@@ -185,9 +182,7 @@ public final Builder actions(String value, String... values) { } /** - * A comma-separated list of node IDs or names to limit the returned - * information; use _local to return information from the node - * you're connecting to, leave empty to get information from all nodes + * Comma-separated list of node IDs or names used to limit the request. *

* API name: {@code nodes} *

@@ -199,9 +194,7 @@ public final Builder nodes(List list) { } /** - * A comma-separated list of node IDs or names to limit the returned - * information; use _local to return information from the node - * you're connecting to, leave empty to get information from all nodes + * Comma-separated list of node IDs or names used to limit the request. *

* API name: {@code nodes} *

@@ -213,8 +206,7 @@ public final Builder nodes(String value, String... values) { } /** - * Cancel tasks with specified parent task id (node_id:task_number). Set to -1 - * to cancel all. + * Parent task ID used to limit the tasks. *

* API name: {@code parent_task_id} */ @@ -224,7 +216,7 @@ public final Builder parentTaskId(@Nullable String value) { } /** - * Cancel the task with specified task id (node_id:task_number) + * ID of the task. *

* API name: {@code task_id} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/GetTasksRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/GetTasksRequest.java index 11c0556f0..325342cc3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/GetTasksRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/GetTasksRequest.java @@ -76,7 +76,7 @@ public static GetTasksRequest of(Function * API name: {@code task_id} */ @@ -85,7 +85,8 @@ public final String taskId() { } /** - * Explicit operation timeout + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. *

* API name: {@code timeout} */ @@ -95,7 +96,7 @@ public final Time timeout() { } /** - * Wait for the matching tasks to complete (default: false) + * If true, the request blocks until the task has completed. *

* API name: {@code wait_for_completion} */ @@ -120,7 +121,7 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private Boolean waitForCompletion; /** - * Required - Return the task with specified id (node_id:task_number) + * Required - ID of the task. *

* API name: {@code task_id} */ @@ -130,7 +131,8 @@ public final Builder taskId(String value) { } /** - * Explicit operation timeout + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. *

* API name: {@code timeout} */ @@ -140,7 +142,8 @@ public final Builder timeout(@Nullable Time value) { } /** - * Explicit operation timeout + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. *

* API name: {@code timeout} */ @@ -149,7 +152,7 @@ public final Builder timeout(Function> fn) { } /** - * Wait for the matching tasks to complete (default: false) + * If true, the request blocks until the task has completed. *

* API name: {@code wait_for_completion} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/TaskStatus.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/TaskStatus.java deleted file mode 100644 index b63c341f6..000000000 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/TaskStatus.java +++ /dev/null @@ -1,600 +0,0 @@ -/* - * 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. - */ - -//---------------------------------------------------- -// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. -//---------------------------------------------------- - -package co.elastic.clients.elasticsearch.tasks; - -import co.elastic.clients.elasticsearch._types.Retries; -import co.elastic.clients.elasticsearch._types.Time; -import co.elastic.clients.json.JsonpDeserializable; -import co.elastic.clients.json.JsonpDeserializer; -import co.elastic.clients.json.JsonpMapper; -import co.elastic.clients.json.JsonpSerializable; -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.Boolean; -import java.lang.Float; -import java.lang.Long; -import java.lang.String; -import java.util.List; -import java.util.Objects; -import java.util.function.Function; -import javax.annotation.Nullable; - -// typedef: tasks._types.TaskStatus - -/** - * - * @see API - * specification - */ -@JsonpDeserializable -public class TaskStatus implements JsonpSerializable { - private final long batches; - - @Nullable - private final String canceled; - - private final long created; - - private final long deleted; - - private final long noops; - - private final List failures; - - private final float requestsPerSecond; - - private final Retries retries; - - @Nullable - private final Time throttled; - - private final long throttledMillis; - - @Nullable - private final Time throttledUntil; - - private final long throttledUntilMillis; - - @Nullable - private final Boolean timedOut; - - @Nullable - private final Long took; - - private final long total; - - private final long updated; - - private final long versionConflicts; - - // --------------------------------------------------------------------------------------------- - - private TaskStatus(Builder builder) { - - this.batches = ApiTypeHelper.requireNonNull(builder.batches, this, "batches"); - this.canceled = builder.canceled; - this.created = ApiTypeHelper.requireNonNull(builder.created, this, "created"); - this.deleted = ApiTypeHelper.requireNonNull(builder.deleted, this, "deleted"); - this.noops = ApiTypeHelper.requireNonNull(builder.noops, this, "noops"); - this.failures = ApiTypeHelper.unmodifiable(builder.failures); - this.requestsPerSecond = ApiTypeHelper.requireNonNull(builder.requestsPerSecond, this, "requestsPerSecond"); - this.retries = ApiTypeHelper.requireNonNull(builder.retries, this, "retries"); - this.throttled = builder.throttled; - this.throttledMillis = ApiTypeHelper.requireNonNull(builder.throttledMillis, this, "throttledMillis"); - this.throttledUntil = builder.throttledUntil; - this.throttledUntilMillis = ApiTypeHelper.requireNonNull(builder.throttledUntilMillis, this, - "throttledUntilMillis"); - this.timedOut = builder.timedOut; - this.took = builder.took; - this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total"); - this.updated = ApiTypeHelper.requireNonNull(builder.updated, this, "updated"); - this.versionConflicts = ApiTypeHelper.requireNonNull(builder.versionConflicts, this, "versionConflicts"); - - } - - public static TaskStatus of(Function> fn) { - return fn.apply(new Builder()).build(); - } - - /** - * Required - API name: {@code batches} - */ - public final long batches() { - return this.batches; - } - - /** - * API name: {@code canceled} - */ - @Nullable - public final String canceled() { - return this.canceled; - } - - /** - * Required - API name: {@code created} - */ - public final long created() { - return this.created; - } - - /** - * Required - API name: {@code deleted} - */ - public final long deleted() { - return this.deleted; - } - - /** - * Required - API name: {@code noops} - */ - public final long noops() { - return this.noops; - } - - /** - * API name: {@code failures} - */ - public final List failures() { - return this.failures; - } - - /** - * Required - API name: {@code requests_per_second} - */ - public final float requestsPerSecond() { - return this.requestsPerSecond; - } - - /** - * Required - API name: {@code retries} - */ - public final Retries retries() { - return this.retries; - } - - /** - * API name: {@code throttled} - */ - @Nullable - public final Time throttled() { - return this.throttled; - } - - /** - * Required - API name: {@code throttled_millis} - */ - public final long throttledMillis() { - return this.throttledMillis; - } - - /** - * API name: {@code throttled_until} - */ - @Nullable - public final Time throttledUntil() { - return this.throttledUntil; - } - - /** - * Required - API name: {@code throttled_until_millis} - */ - public final long throttledUntilMillis() { - return this.throttledUntilMillis; - } - - /** - * API name: {@code timed_out} - */ - @Nullable - public final Boolean timedOut() { - return this.timedOut; - } - - /** - * API name: {@code took} - */ - @Nullable - public final Long took() { - return this.took; - } - - /** - * Required - API name: {@code total} - */ - public final long total() { - return this.total; - } - - /** - * Required - API name: {@code updated} - */ - public final long updated() { - return this.updated; - } - - /** - * Required - API name: {@code version_conflicts} - */ - public final long versionConflicts() { - return this.versionConflicts; - } - - /** - * Serialize this object to JSON. - */ - public void serialize(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(); - serializeInternal(generator, mapper); - generator.writeEnd(); - } - - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("batches"); - generator.write(this.batches); - - if (this.canceled != null) { - generator.writeKey("canceled"); - generator.write(this.canceled); - - } - generator.writeKey("created"); - generator.write(this.created); - - generator.writeKey("deleted"); - generator.write(this.deleted); - - generator.writeKey("noops"); - generator.write(this.noops); - - if (ApiTypeHelper.isDefined(this.failures)) { - generator.writeKey("failures"); - generator.writeStartArray(); - for (String item0 : this.failures) { - generator.write(item0); - - } - generator.writeEnd(); - - } - generator.writeKey("requests_per_second"); - generator.write(this.requestsPerSecond); - - generator.writeKey("retries"); - this.retries.serialize(generator, mapper); - - if (this.throttled != null) { - generator.writeKey("throttled"); - this.throttled.serialize(generator, mapper); - - } - generator.writeKey("throttled_millis"); - generator.write(this.throttledMillis); - - if (this.throttledUntil != null) { - generator.writeKey("throttled_until"); - this.throttledUntil.serialize(generator, mapper); - - } - generator.writeKey("throttled_until_millis"); - generator.write(this.throttledUntilMillis); - - if (this.timedOut != null) { - generator.writeKey("timed_out"); - generator.write(this.timedOut); - - } - if (this.took != null) { - generator.writeKey("took"); - generator.write(this.took); - - } - generator.writeKey("total"); - generator.write(this.total); - - generator.writeKey("updated"); - generator.write(this.updated); - - generator.writeKey("version_conflicts"); - generator.write(this.versionConflicts); - - } - - @Override - public String toString() { - return JsonpUtils.toString(this); - } - - // --------------------------------------------------------------------------------------------- - - /** - * Builder for {@link TaskStatus}. - */ - - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private Long batches; - - @Nullable - private String canceled; - - private Long created; - - private Long deleted; - - private Long noops; - - @Nullable - private List failures; - - private Float requestsPerSecond; - - private Retries retries; - - @Nullable - private Time throttled; - - private Long throttledMillis; - - @Nullable - private Time throttledUntil; - - private Long throttledUntilMillis; - - @Nullable - private Boolean timedOut; - - @Nullable - private Long took; - - private Long total; - - private Long updated; - - private Long versionConflicts; - - /** - * Required - API name: {@code batches} - */ - public final Builder batches(long value) { - this.batches = value; - return this; - } - - /** - * API name: {@code canceled} - */ - public final Builder canceled(@Nullable String value) { - this.canceled = value; - return this; - } - - /** - * Required - API name: {@code created} - */ - public final Builder created(long value) { - this.created = value; - return this; - } - - /** - * Required - API name: {@code deleted} - */ - public final Builder deleted(long value) { - this.deleted = value; - return this; - } - - /** - * Required - API name: {@code noops} - */ - public final Builder noops(long value) { - this.noops = value; - return this; - } - - /** - * API name: {@code failures} - *

- * Adds all elements of list to failures. - */ - public final Builder failures(List list) { - this.failures = _listAddAll(this.failures, list); - return this; - } - - /** - * API name: {@code failures} - *

- * Adds one or more values to failures. - */ - public final Builder failures(String value, String... values) { - this.failures = _listAdd(this.failures, value, values); - return this; - } - - /** - * Required - API name: {@code requests_per_second} - */ - public final Builder requestsPerSecond(float value) { - this.requestsPerSecond = value; - return this; - } - - /** - * Required - API name: {@code retries} - */ - public final Builder retries(Retries value) { - this.retries = value; - return this; - } - - /** - * Required - API name: {@code retries} - */ - public final Builder retries(Function> fn) { - return this.retries(fn.apply(new Retries.Builder()).build()); - } - - /** - * API name: {@code throttled} - */ - public final Builder throttled(@Nullable Time value) { - this.throttled = value; - return this; - } - - /** - * API name: {@code throttled} - */ - public final Builder throttled(Function> fn) { - return this.throttled(fn.apply(new Time.Builder()).build()); - } - - /** - * Required - API name: {@code throttled_millis} - */ - public final Builder throttledMillis(long value) { - this.throttledMillis = value; - return this; - } - - /** - * API name: {@code throttled_until} - */ - public final Builder throttledUntil(@Nullable Time value) { - this.throttledUntil = value; - return this; - } - - /** - * API name: {@code throttled_until} - */ - public final Builder throttledUntil(Function> fn) { - return this.throttledUntil(fn.apply(new Time.Builder()).build()); - } - - /** - * Required - API name: {@code throttled_until_millis} - */ - public final Builder throttledUntilMillis(long value) { - this.throttledUntilMillis = value; - return this; - } - - /** - * API name: {@code timed_out} - */ - public final Builder timedOut(@Nullable Boolean value) { - this.timedOut = value; - return this; - } - - /** - * API name: {@code took} - */ - public final Builder took(@Nullable Long value) { - this.took = value; - return this; - } - - /** - * Required - API name: {@code total} - */ - public final Builder total(long value) { - this.total = value; - return this; - } - - /** - * Required - API name: {@code updated} - */ - public final Builder updated(long value) { - this.updated = value; - return this; - } - - /** - * Required - API name: {@code version_conflicts} - */ - public final Builder versionConflicts(long value) { - this.versionConflicts = value; - return this; - } - - @Override - protected Builder self() { - return this; - } - - /** - * Builds a {@link TaskStatus}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public TaskStatus build() { - _checkSingleUse(); - - return new TaskStatus(this); - } - } - - // --------------------------------------------------------------------------------------------- - - /** - * Json deserializer for {@link TaskStatus} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, - TaskStatus::setupTaskStatusDeserializer); - - protected static void setupTaskStatusDeserializer(ObjectDeserializer op) { - - op.add(Builder::batches, JsonpDeserializer.longDeserializer(), "batches"); - op.add(Builder::canceled, JsonpDeserializer.stringDeserializer(), "canceled"); - op.add(Builder::created, JsonpDeserializer.longDeserializer(), "created"); - op.add(Builder::deleted, JsonpDeserializer.longDeserializer(), "deleted"); - op.add(Builder::noops, JsonpDeserializer.longDeserializer(), "noops"); - op.add(Builder::failures, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), - "failures"); - op.add(Builder::requestsPerSecond, JsonpDeserializer.floatDeserializer(), "requests_per_second"); - op.add(Builder::retries, Retries._DESERIALIZER, "retries"); - op.add(Builder::throttled, Time._DESERIALIZER, "throttled"); - op.add(Builder::throttledMillis, JsonpDeserializer.longDeserializer(), "throttled_millis"); - op.add(Builder::throttledUntil, Time._DESERIALIZER, "throttled_until"); - op.add(Builder::throttledUntilMillis, JsonpDeserializer.longDeserializer(), "throttled_until_millis"); - op.add(Builder::timedOut, JsonpDeserializer.booleanDeserializer(), "timed_out"); - op.add(Builder::took, JsonpDeserializer.longDeserializer(), "took"); - op.add(Builder::total, JsonpDeserializer.longDeserializer(), "total"); - op.add(Builder::updated, JsonpDeserializer.longDeserializer(), "updated"); - op.add(Builder::versionConflicts, JsonpDeserializer.longDeserializer(), "version_conflicts"); - - } - -} diff --git a/java-client/src/test/java/co/elastic/clients/elasticsearch/model/UnionTests.java b/java-client/src/test/java/co/elastic/clients/elasticsearch/model/UnionTests.java index 71807dd73..1e1b299b9 100644 --- a/java-client/src/test/java/co/elastic/clients/elasticsearch/model/UnionTests.java +++ b/java-client/src/test/java/co/elastic/clients/elasticsearch/model/UnionTests.java @@ -23,8 +23,6 @@ import co.elastic.clients.elasticsearch._types.aggregations.Aggregate; import co.elastic.clients.elasticsearch._types.mapping.Property; import co.elastic.clients.elasticsearch._types.query_dsl.Query; -import co.elastic.clients.elasticsearch._types.query_dsl.SimpleQueryStringFlag; -import co.elastic.clients.elasticsearch._types.query_dsl.SimpleQueryStringFlags; import co.elastic.clients.elasticsearch.core.SearchResponse; import co.elastic.clients.testkit.ModelTestCase; import jakarta.json.Json; @@ -66,19 +64,6 @@ public void testScriptDeserializer() { } } - @Test - public void testSimpleQueryStringFlag() { - // Ambiguous union on strings - - SimpleQueryStringFlags f; - - f= fromJson("\"OR\"", SimpleQueryStringFlags.class); - assertEquals(SimpleQueryStringFlag.Or, f.single()); - - f = fromJson("\"OR|AND\"", SimpleQueryStringFlags.class); - assertEquals("OR|AND", f.multiple()); - } - @Test public void testOpenContainer() { String json = "{\"foo\":{\"bar\":42}}";