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 088b41ef12..abb4b5b1eb 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 @@ -1592,14 +1592,14 @@ 'indices._types.FielddataFrequencyFilter': 'indices/_types/FielddataFrequencyFilter.ts#L22-L26', 'indices._types.IndexCheckOnStartup': 'indices/_types/IndexSettings.ts#L291-L298', 'indices._types.IndexMode': 'indices/_types/DataStream.ts#L42-L47', -'indices._types.IndexRouting': 'indices/_types/IndexRouting.ts#L22-L25', -'indices._types.IndexRoutingAllocation': 'indices/_types/IndexRouting.ts#L27-L32', -'indices._types.IndexRoutingAllocationDisk': 'indices/_types/IndexRouting.ts#L62-L65', -'indices._types.IndexRoutingAllocationInclude': 'indices/_types/IndexRouting.ts#L52-L55', -'indices._types.IndexRoutingAllocationInitialRecovery': 'indices/_types/IndexRouting.ts#L57-L59', -'indices._types.IndexRoutingAllocationOptions': 'indices/_types/IndexRouting.ts#L38-L43', -'indices._types.IndexRoutingRebalance': 'indices/_types/IndexRouting.ts#L34-L36', -'indices._types.IndexRoutingRebalanceOptions': 'indices/_types/IndexRouting.ts#L45-L50', +'indices._types.IndexRouting': 'indices/_types/IndexRouting.ts#L23-L26', +'indices._types.IndexRoutingAllocation': 'indices/_types/IndexRouting.ts#L28-L39', +'indices._types.IndexRoutingAllocationDisk': 'indices/_types/IndexRouting.ts#L74-L77', +'indices._types.IndexRoutingAllocationInclude': 'indices/_types/IndexRouting.ts#L64-L67', +'indices._types.IndexRoutingAllocationInitialRecovery': 'indices/_types/IndexRouting.ts#L69-L71', +'indices._types.IndexRoutingAllocationOptions': 'indices/_types/IndexRouting.ts#L50-L55', +'indices._types.IndexRoutingRebalance': 'indices/_types/IndexRouting.ts#L46-L48', +'indices._types.IndexRoutingRebalanceOptions': 'indices/_types/IndexRouting.ts#L57-L62', 'indices._types.IndexSegmentSort': 'indices/_types/IndexSegmentSort.ts#L22-L27', 'indices._types.IndexSettingBlocks': 'indices/_types/IndexSettings.ts#L272-L278', 'indices._types.IndexSettings': 'indices/_types/IndexSettings.ts#L71-L186', @@ -2245,20 +2245,20 @@ 'ingest._types.RedactProcessor': 'ingest/_types/Processors.ts#L1355-L1396', 'ingest._types.RegisteredDomainProcessor': 'ingest/_types/Processors.ts#L1398-L1414', 'ingest._types.RemoveProcessor': 'ingest/_types/Processors.ts#L1416-L1430', -'ingest._types.RenameProcessor': 'ingest/_types/Processors.ts#L1432-L1448', -'ingest._types.RerouteProcessor': 'ingest/_types/Processors.ts#L1450-L1478', -'ingest._types.ScriptProcessor': 'ingest/_types/Processors.ts#L1480-L1500', -'ingest._types.SetProcessor': 'ingest/_types/Processors.ts#L1502-L1537', -'ingest._types.SetSecurityUserProcessor': 'ingest/_types/Processors.ts#L1539-L1548', -'ingest._types.ShapeType': 'ingest/_types/Processors.ts#L1550-L1553', +'ingest._types.RenameProcessor': 'ingest/_types/Processors.ts#L1432-L1454', +'ingest._types.RerouteProcessor': 'ingest/_types/Processors.ts#L1456-L1484', +'ingest._types.ScriptProcessor': 'ingest/_types/Processors.ts#L1486-L1506', +'ingest._types.SetProcessor': 'ingest/_types/Processors.ts#L1508-L1543', +'ingest._types.SetSecurityUserProcessor': 'ingest/_types/Processors.ts#L1545-L1554', +'ingest._types.ShapeType': 'ingest/_types/Processors.ts#L1556-L1559', 'ingest._types.SimulateDocumentResult': 'ingest/_types/Simulation.ts#L45-L49', -'ingest._types.SortProcessor': 'ingest/_types/Processors.ts#L1555-L1571', -'ingest._types.SplitProcessor': 'ingest/_types/Processors.ts#L1573-L1598', -'ingest._types.TerminateProcessor': 'ingest/_types/Processors.ts#L1600-L1600', -'ingest._types.TrimProcessor': 'ingest/_types/Processors.ts#L1602-L1618', -'ingest._types.UppercaseProcessor': 'ingest/_types/Processors.ts#L1620-L1636', -'ingest._types.UriPartsProcessor': 'ingest/_types/Processors.ts#L1656-L1682', -'ingest._types.UrlDecodeProcessor': 'ingest/_types/Processors.ts#L1638-L1654', +'ingest._types.SortProcessor': 'ingest/_types/Processors.ts#L1561-L1577', +'ingest._types.SplitProcessor': 'ingest/_types/Processors.ts#L1579-L1604', +'ingest._types.TerminateProcessor': 'ingest/_types/Processors.ts#L1606-L1606', +'ingest._types.TrimProcessor': 'ingest/_types/Processors.ts#L1608-L1624', +'ingest._types.UppercaseProcessor': 'ingest/_types/Processors.ts#L1626-L1642', +'ingest._types.UriPartsProcessor': 'ingest/_types/Processors.ts#L1662-L1688', +'ingest._types.UrlDecodeProcessor': 'ingest/_types/Processors.ts#L1644-L1660', 'ingest._types.UserAgentProcessor': 'ingest/_types/Processors.ts#L537-L568', 'ingest._types.UserAgentProperty': 'ingest/_types/Processors.ts#L570-L576', 'ingest._types.Web': 'ingest/_types/Database.ts#L61-L61', @@ -3321,10 +3321,10 @@ 'transform._types.PivotGroupByContainer': 'transform/_types/Transform.ts#L101-L109', 'transform._types.RetentionPolicy': 'transform/_types/Transform.ts#L119-L127', 'transform._types.RetentionPolicyContainer': 'transform/_types/Transform.ts#L111-L117', -'transform._types.Settings': 'transform/_types/Transform.ts#L129-L196', -'transform._types.Source': 'transform/_types/Transform.ts#L198-L229', -'transform._types.SyncContainer': 'transform/_types/Transform.ts#L233-L239', -'transform._types.TimeSync': 'transform/_types/Transform.ts#L241-L253', +'transform._types.Settings': 'transform/_types/Transform.ts#L129-L207', +'transform._types.Source': 'transform/_types/Transform.ts#L209-L240', +'transform._types.SyncContainer': 'transform/_types/Transform.ts#L244-L250', +'transform._types.TimeSync': 'transform/_types/Transform.ts#L252-L264', 'transform.delete_transform.Request': 'transform/delete_transform/DeleteTransformRequest.ts#L24-L66', 'transform.delete_transform.Response': 'transform/delete_transform/DeleteTransformResponse.ts#L22-L25', 'transform.get_node_stats.Request': 'transform/get_node_stats/GetNodeStatsRequest.ts#L23-L40', @@ -3571,10 +3571,10 @@ if (hash.length > 1) { hash = hash.substring(1); } - window.location = "https://github.com/elastic/elasticsearch-specification/tree/1fd90d0d3bddf481cce98d9127fa0f0718fbc5bb/specification/" + (paths[hash] || ""); + window.location = "https://github.com/elastic/elasticsearch-specification/tree/bf3a5277393ad27b525301ce712a8fad5cc9aaf4/specification/" + (paths[hash] || ""); - Please see the Elasticsearch API specification. + Please see the Elasticsearch API specification. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingAllocation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingAllocation.java index 907ec08af7..edf10f2441 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingAllocation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingAllocation.java @@ -26,9 +26,13 @@ import co.elastic.clients.json.JsonpUtils; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -64,6 +68,8 @@ public class IndexRoutingAllocation implements JsonpSerializable { @Nullable private final IndexRoutingAllocationInclude include; + private final Map> require; + @Nullable private final IndexRoutingAllocationInitialRecovery initialRecovery; @@ -76,6 +82,7 @@ private IndexRoutingAllocation(Builder builder) { this.enable = builder.enable; this.include = builder.include; + this.require = ApiTypeHelper.unmodifiable(builder.require); this.initialRecovery = builder.initialRecovery; this.disk = builder.disk; @@ -101,6 +108,20 @@ public final IndexRoutingAllocationInclude include() { return this.include; } + /** + * Assign the index to a node whose attribute has all of the given values. Each + * key is a node attribute: one of the built-in attributes _name, + * _host_ip, _publish_ip, _ip, + * _host, _id and _tier, or a custom node + * attribute. Each value is a comma-separated string or an array of strings, and + * can use wildcards. + *

+ * API name: {@code require} + */ + public final Map> require() { + return this.require; + } + /** * API name: {@code initial_recovery} */ @@ -136,6 +157,24 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("include"); this.include.serialize(generator, mapper); + } + if (ApiTypeHelper.isDefined(this.require)) { + generator.writeKey("require"); + generator.writeStartObject(); + for (Map.Entry> item0 : this.require.entrySet()) { + generator.writeKey(item0.getKey()); + generator.writeStartArray(); + if (item0.getValue() != null) { + for (String item1 : item0.getValue()) { + generator.write(item1); + + } + } + generator.writeEnd(); + + } + generator.writeEnd(); + } if (this.initialRecovery != null) { generator.writeKey("initial_recovery"); @@ -170,6 +209,9 @@ public static class Builder extends WithJsonObjectBuilderBase @Nullable private IndexRoutingAllocationInclude include; + @Nullable + private Map> require; + @Nullable private IndexRoutingAllocationInitialRecovery initialRecovery; @@ -181,6 +223,7 @@ public Builder() { private Builder(IndexRoutingAllocation instance) { this.enable = instance.enable; this.include = instance.include; + this.require = instance.require; this.initialRecovery = instance.initialRecovery; this.disk = instance.disk; @@ -209,6 +252,40 @@ public final Builder include( return this.include(fn.apply(new IndexRoutingAllocationInclude.Builder()).build()); } + /** + * Assign the index to a node whose attribute has all of the given values. Each + * key is a node attribute: one of the built-in attributes _name, + * _host_ip, _publish_ip, _ip, + * _host, _id and _tier, or a custom node + * attribute. Each value is a comma-separated string or an array of strings, and + * can use wildcards. + *

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

+ * Adds all entries of map to require. + */ + public final Builder require(Map> map) { + this.require = _mapPutAll(this.require, map); + return this; + } + + /** + * Assign the index to a node whose attribute has all of the given values. Each + * key is a node attribute: one of the built-in attributes _name, + * _host_ip, _publish_ip, _ip, + * _host, _id and _tier, or a custom node + * attribute. Each value is a comma-separated string or an array of strings, and + * can use wildcards. + *

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

+ * Adds an entry to require. + */ + public final Builder require(String key, List value) { + this.require = _mapPut(this.require, key, value); + return this; + } + /** * API name: {@code initial_recovery} */ @@ -278,6 +355,8 @@ protected static void setupIndexRoutingAllocationDeserializer( op.add(Builder::enable, IndexRoutingAllocationOptions._DESERIALIZER, "enable"); op.add(Builder::include, IndexRoutingAllocationInclude._DESERIALIZER, "include"); + op.add(Builder::require, JsonpDeserializer.stringMapDeserializer( + JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer())), "require"); op.add(Builder::initialRecovery, IndexRoutingAllocationInitialRecovery._DESERIALIZER, "initial_recovery"); op.add(Builder::disk, IndexRoutingAllocationDisk._DESERIALIZER, "disk"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/RenameProcessor.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/RenameProcessor.java index 9a32b5b493..970359d0d4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/RenameProcessor.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/RenameProcessor.java @@ -62,6 +62,9 @@ public class RenameProcessor extends ProcessorBase implements ProcessorVariant { @Nullable private final Boolean ignoreMissing; + @Nullable + private final Boolean override; + private final String targetField; // --------------------------------------------------------------------------------------------- @@ -71,6 +74,7 @@ private RenameProcessor(Builder builder) { this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); this.ignoreMissing = builder.ignoreMissing; + this.override = builder.override; this.targetField = ApiTypeHelper.requireNonNull(builder.targetField, this, "targetField"); } @@ -107,6 +111,18 @@ public final Boolean ignoreMissing() { return this.ignoreMissing; } + /** + * If true, the processor overwrites target_field if + * it already exists. If false, the processor fails when + * target_field already exists. + *

+ * API name: {@code override} + */ + @Nullable + public final Boolean override() { + return this.override; + } + /** * Required - The new name of the field. Supports template snippets. *

@@ -126,6 +142,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("ignore_missing"); generator.write(this.ignoreMissing); + } + if (this.override != null) { + generator.writeKey("override"); + generator.write(this.override); + } generator.writeKey("target_field"); generator.write(this.targetField); @@ -146,6 +167,9 @@ public static class Builder extends ProcessorBase.AbstractBuilder @Nullable private Boolean ignoreMissing; + @Nullable + private Boolean override; + private String targetField; public Builder() { @@ -153,6 +177,7 @@ public Builder() { private Builder(RenameProcessor instance) { this.field = instance.field; this.ignoreMissing = instance.ignoreMissing; + this.override = instance.override; this.targetField = instance.targetField; } @@ -177,6 +202,18 @@ public final Builder ignoreMissing(@Nullable Boolean value) { return this; } + /** + * If true, the processor overwrites target_field if + * it already exists. If false, the processor fails when + * target_field already exists. + *

+ * API name: {@code override} + */ + public final Builder override(@Nullable Boolean value) { + this.override = value; + return this; + } + /** * Required - The new name of the field. Supports template snippets. *

@@ -223,6 +260,7 @@ protected static void setupRenameProcessorDeserializer(ObjectDeserializer12h. The minimum value is 1ms and the + * maximum is 12h. + *

+ * API name: {@code indexer_request_timeout} + */ + @Nullable + public final Time indexerRequestTimeout() { + return this.indexerRequestTimeout; + } + /** * Serialize this object to JSON. */ @@ -266,6 +284,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.unattended); } + if (this.indexerRequestTimeout != null) { + generator.writeKey("indexer_request_timeout"); + this.indexerRequestTimeout.serialize(generator, mapper); + + } } @@ -305,6 +328,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private Boolean unattended; + @Nullable + private Time indexerRequestTimeout; + public Builder() { } private Builder(Settings instance) { @@ -316,6 +342,7 @@ private Builder(Settings instance) { this.usePointInTime = instance.usePointInTime; this.numFailureRetries = instance.numFailureRetries; this.unattended = instance.unattended; + this.indexerRequestTimeout = instance.indexerRequestTimeout; } /** @@ -429,6 +456,31 @@ public final Builder unattended(@Nullable Boolean value) { return this; } + /** + * The initial timeout for the requests the transform sends to nodes to retrieve + * checkpoint information. Each consecutive failure doubles the timeout, up to a + * maximum of 12h. The minimum value is 1ms and the + * maximum is 12h. + *

+ * API name: {@code indexer_request_timeout} + */ + public final Builder indexerRequestTimeout(@Nullable Time value) { + this.indexerRequestTimeout = value; + return this; + } + + /** + * The initial timeout for the requests the transform sends to nodes to retrieve + * checkpoint information. Each consecutive failure doubles the timeout, up to a + * maximum of 12h. The minimum value is 1ms and the + * maximum is 12h. + *

+ * API name: {@code indexer_request_timeout} + */ + public final Builder indexerRequestTimeout(Function> fn) { + return this.indexerRequestTimeout(fn.apply(new Time.Builder()).build()); + } + @Override protected Builder self() { return this; @@ -471,6 +523,7 @@ protected static void setupSettingsDeserializer(ObjectDeserializer