diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.Converters.g.cs index 6c7ce0cc3d7..f4ce50aa4ab 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.Converters.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRe { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDataRetention = default; - LocalJsonValue propDownsampling = default; + LocalJsonValue?> propDownsampling = default; LocalJsonValue propEnabled = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRe continue; } - if (propDownsampling.TryReadProperty(ref reader, options, PropDownsampling, null)) + if (propDownsampling.TryReadProperty(ref reader, options, PropDownsampling, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDataRetention, value.DataRetention, null, null); - writer.WriteProperty(options, PropDownsampling, value.Downsampling, null, null); + writer.WriteProperty(options, PropDownsampling, value.Downsampling, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs index 4f5e0da14ec..ded1340e63a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs @@ -135,7 +135,7 @@ internal PutDataLifecycleRequest(Elastic.Clients.Elasticsearch.Serialization.Jso /// The downsampling configuration to execute for the managed backing index after rollover. /// /// - public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsampling? Downsampling { get; set; } + public System.Collections.Generic.ICollection? Downsampling { get; set; } /// /// @@ -256,7 +256,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDesc /// The downsampling configuration to execute for the managed backing index after rollover. /// /// - public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDescriptor Downsampling(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsampling? value) + public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDescriptor Downsampling(System.Collections.Generic.ICollection? value) { Instance.Downsampling = value; return this; @@ -267,9 +267,26 @@ public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDesc /// The downsampling configuration to execute for the managed backing index after rollover. /// /// - public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDescriptor Downsampling(System.Action action) + public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDescriptor Downsampling(params Elastic.Clients.Elasticsearch.IndexManagement.DownsamplingRound[] values) { - Instance.Downsampling = Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsamplingDescriptor.Build(action); + Instance.Downsampling = [.. values]; + return this; + } + + /// + /// + /// The downsampling configuration to execute for the managed backing index after rollover. + /// + /// + public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDescriptor Downsampling(params System.Action[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.IndexManagement.DownsamplingRoundDescriptor.Build(action)); + } + + Instance.Downsampling = items; return this; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAi21Response.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAi21Response.g.cs index d3343766b50..757accbbd82 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAi21Response.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAi21Response.g.cs @@ -39,7 +39,9 @@ internal PutAi21Response(Elastic.Clients.Elasticsearch.Serialization.JsonConstru /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAlibabacloudResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAlibabacloudResponse.g.cs index d1504d27c9e..ddb1325c3b4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAlibabacloudResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAlibabacloudResponse.g.cs @@ -39,7 +39,9 @@ internal PutAlibabacloudResponse(Elastic.Clients.Elasticsearch.Serialization.Jso /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockResponse.g.cs index 11c8ee2afb7..878b9adef3f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockResponse.g.cs @@ -39,7 +39,9 @@ internal PutAmazonbedrockResponse(Elastic.Clients.Elasticsearch.Serialization.Js /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonsagemakerResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonsagemakerResponse.g.cs index fee3fb58939..e7da6e0afe8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonsagemakerResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonsagemakerResponse.g.cs @@ -39,7 +39,9 @@ internal PutAmazonsagemakerResponse(Elastic.Clients.Elasticsearch.Serialization. /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAnthropicResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAnthropicResponse.g.cs index 50ae139fce7..675e6c24ee6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAnthropicResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAnthropicResponse.g.cs @@ -39,7 +39,9 @@ internal PutAnthropicResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureaistudioResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureaistudioResponse.g.cs index b4967652f38..48765668a03 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureaistudioResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureaistudioResponse.g.cs @@ -39,7 +39,9 @@ internal PutAzureaistudioResponse(Elastic.Clients.Elasticsearch.Serialization.Js /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureopenaiResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureopenaiResponse.g.cs index fae6875a1fa..83144eaa37a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureopenaiResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAzureopenaiResponse.g.cs @@ -39,7 +39,9 @@ internal PutAzureopenaiResponse(Elastic.Clients.Elasticsearch.Serialization.Json /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCohereResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCohereResponse.g.cs index 268698bc595..5bc540d541a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCohereResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCohereResponse.g.cs @@ -39,7 +39,9 @@ internal PutCohereResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConst /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutContextualaiResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutContextualaiResponse.g.cs index 1a32738e990..4c8ad8a5151 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutContextualaiResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutContextualaiResponse.g.cs @@ -39,7 +39,9 @@ internal PutContextualaiResponse(Elastic.Clients.Elasticsearch.Serialization.Jso /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCustomResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCustomResponse.g.cs index c2c6d953823..73fef358ca3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCustomResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutCustomResponse.g.cs @@ -39,7 +39,9 @@ internal PutCustomResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConst /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutDeepseekResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutDeepseekResponse.g.cs index 0e893dddcfa..8e2c02ce62c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutDeepseekResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutDeepseekResponse.g.cs @@ -39,7 +39,9 @@ internal PutDeepseekResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCon /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElasticsearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElasticsearchRequest.g.cs index 2c83850ee6f..cbb12b6dc77 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElasticsearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElasticsearchRequest.g.cs @@ -124,6 +124,8 @@ internal PutElasticsearchRequest(Elastic.Clients.Elasticsearch.Serialization.Jso /// /// /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } @@ -243,6 +245,8 @@ public Elastic.Clients.Elasticsearch.Inference.PutElasticsearchRequestDescriptor /// /// /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.PutElasticsearchRequestDescriptor ChunkingSettings(Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? value) @@ -254,6 +258,8 @@ public Elastic.Clients.Elasticsearch.Inference.PutElasticsearchRequestDescriptor /// /// /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.PutElasticsearchRequestDescriptor ChunkingSettings() @@ -265,6 +271,8 @@ public Elastic.Clients.Elasticsearch.Inference.PutElasticsearchRequestDescriptor /// /// /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.PutElasticsearchRequestDescriptor ChunkingSettings(System.Action? action) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElasticsearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElasticsearchResponse.g.cs index 3054748c539..1707bce50d2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElasticsearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElasticsearchResponse.g.cs @@ -39,7 +39,9 @@ internal PutElasticsearchResponse(Elastic.Clients.Elasticsearch.Serialization.Js /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElserResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElserResponse.g.cs index d69730c79f3..49bacdc8fb4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElserResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutElserResponse.g.cs @@ -39,7 +39,9 @@ internal PutElserResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstr /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGoogleaistudioResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGoogleaistudioResponse.g.cs index 86b904dcdaf..5c27ad4450f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGoogleaistudioResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGoogleaistudioResponse.g.cs @@ -39,7 +39,9 @@ internal PutGoogleaistudioResponse(Elastic.Clients.Elasticsearch.Serialization.J /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGooglevertexaiResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGooglevertexaiResponse.g.cs index 3a561386256..65292f3f04a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGooglevertexaiResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutGooglevertexaiResponse.g.cs @@ -39,7 +39,9 @@ internal PutGooglevertexaiResponse(Elastic.Clients.Elasticsearch.Serialization.J /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutHuggingFaceResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutHuggingFaceResponse.g.cs index 2153e94cf83..b30f343991c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutHuggingFaceResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutHuggingFaceResponse.g.cs @@ -39,7 +39,9 @@ internal PutHuggingFaceResponse(Elastic.Clients.Elasticsearch.Serialization.Json /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutInferenceResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutInferenceResponse.g.cs index 37d019001b6..570cef2af3c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutInferenceResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutInferenceResponse.g.cs @@ -39,7 +39,9 @@ internal PutInferenceResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutJinaaiResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutJinaaiResponse.g.cs index c133d5c110a..5b9d3d9240d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutJinaaiResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutJinaaiResponse.g.cs @@ -39,7 +39,9 @@ internal PutJinaaiResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConst /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutLlamaResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutLlamaResponse.g.cs index bbd2e051009..dd1c75813eb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutLlamaResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutLlamaResponse.g.cs @@ -39,7 +39,9 @@ internal PutLlamaResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstr /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutMistralResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutMistralResponse.g.cs index 8820aa14703..d1d96117fcc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutMistralResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutMistralResponse.g.cs @@ -39,7 +39,9 @@ internal PutMistralResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutOpenaiResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutOpenaiResponse.g.cs index b5460cba600..169ddfcab4c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutOpenaiResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutOpenaiResponse.g.cs @@ -39,7 +39,9 @@ internal PutOpenaiResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConst /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutVoyageaiResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutVoyageaiResponse.g.cs index 061a54ac556..adcd4cc3336 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutVoyageaiResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutVoyageaiResponse.g.cs @@ -39,7 +39,9 @@ internal PutVoyageaiResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCon /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutWatsonxResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutWatsonxResponse.g.cs index 831ecd98de8..dfbadbe5629 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutWatsonxResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutWatsonxResponse.g.cs @@ -39,7 +39,9 @@ internal PutWatsonxResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/UpdateInferenceResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/UpdateInferenceResponse.g.cs index d56778ec721..38914e99550 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/UpdateInferenceResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/UpdateInferenceResponse.g.cs @@ -39,7 +39,9 @@ internal UpdateInferenceResponse(Elastic.Clients.Elasticsearch.Serialization.Jso /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryRoleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryRoleRequest.g.cs index f8117558f63..0fae97c0318 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryRoleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryRoleRequest.g.cs @@ -108,7 +108,8 @@ internal QueryRoleRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstr /// /// /// The sort definition. - /// You can sort on username, roles, or enabled. + /// You can sort on name, description, metadata, applications.application, applications.privileges, + /// and applications.resources. /// In addition, sort can also be applied to the _doc field to sort by index order. /// /// @@ -246,7 +247,8 @@ public Elastic.Clients.Elasticsearch.Security.QueryRoleRequestDescriptor Size(in /// /// /// The sort definition. - /// You can sort on username, roles, or enabled. + /// You can sort on name, description, metadata, applications.application, applications.privileges, + /// and applications.resources. /// In addition, sort can also be applied to the _doc field to sort by index order. /// /// @@ -259,7 +261,8 @@ public Elastic.Clients.Elasticsearch.Security.QueryRoleRequestDescriptor Sort(Sy /// /// /// The sort definition. - /// You can sort on username, roles, or enabled. + /// You can sort on name, description, metadata, applications.application, applications.privileges, + /// and applications.resources. /// In addition, sort can also be applied to the _doc field to sort by index order. /// /// @@ -272,7 +275,8 @@ public Elastic.Clients.Elasticsearch.Security.QueryRoleRequestDescriptor Sort(pa /// /// /// The sort definition. - /// You can sort on username, roles, or enabled. + /// You can sort on name, description, metadata, applications.application, applications.privileges, + /// and applications.resources. /// In addition, sort can also be applied to the _doc field to sort by index order. /// /// @@ -291,7 +295,8 @@ public Elastic.Clients.Elasticsearch.Security.QueryRoleRequestDescriptor Sort(pa /// /// /// The sort definition. - /// You can sort on username, roles, or enabled. + /// You can sort on name, description, metadata, applications.application, applications.privileges, + /// and applications.resources. /// In addition, sort can also be applied to the _doc field to sort by index order. /// /// @@ -478,7 +483,8 @@ public Elastic.Clients.Elasticsearch.Security.QueryRoleRequestDescriptor /// /// The sort definition. - /// You can sort on username, roles, or enabled. + /// You can sort on name, description, metadata, applications.application, applications.privileges, + /// and applications.resources. /// In addition, sort can also be applied to the _doc field to sort by index order. /// /// @@ -491,7 +497,8 @@ public Elastic.Clients.Elasticsearch.Security.QueryRoleRequestDescriptor /// /// The sort definition. - /// You can sort on username, roles, or enabled. + /// You can sort on name, description, metadata, applications.application, applications.privileges, + /// and applications.resources. /// In addition, sort can also be applied to the _doc field to sort by index order. /// /// @@ -504,7 +511,8 @@ public Elastic.Clients.Elasticsearch.Security.QueryRoleRequestDescriptor /// /// The sort definition. - /// You can sort on username, roles, or enabled. + /// You can sort on name, description, metadata, applications.application, applications.privileges, + /// and applications.resources. /// In addition, sort can also be applied to the _doc field to sort by index order. /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesAggregation.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesAggregation.Converters.g.cs index 27d6eaf17cf..d34856d9be2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesAggregation.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesAggregation.Converters.g.cs @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.PercentilesAggregatio continue; } - if (propPercents.TryReadProperty(ref reader, options, PropPercents, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) + if (propPercents.TryReadProperty(ref reader, options, PropPercents, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null))) { continue; } @@ -117,7 +117,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropHdr, value.Hdr, null, null); writer.WriteProperty(options, PropKeyed, value.Keyed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMissing, value.Missing, null, null); - writer.WriteProperty(options, PropPercents, value.Percents, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); + writer.WriteProperty(options, PropPercents, value.Percents, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteProperty(options, PropTDigest, value.TDigest, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/NodeAllocationExplanation.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/NodeAllocationExplanation.Converters.g.cs index c3751b34710..a0c3659a901 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/NodeAllocationExplanation.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/NodeAllocationExplanation.Converters.g.cs @@ -38,7 +38,7 @@ public sealed partial class NodeAllocationExplanationConverter : System.Text.Jso public override Elastic.Clients.Elasticsearch.Cluster.NodeAllocationExplanation Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue> propDeciders = default; + LocalJsonValue?> propDeciders = default; LocalJsonValue> propNodeAttributes = default; LocalJsonValue propNodeDecision = default; LocalJsonValue propNodeId = default; @@ -46,10 +46,10 @@ public override Elastic.Clients.Elasticsearch.Cluster.NodeAllocationExplanation LocalJsonValue> propRoles = default; LocalJsonValue propStore = default; LocalJsonValue propTransportAddress = default; - LocalJsonValue propWeightRanking = default; + LocalJsonValue propWeightRanking = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDeciders.TryReadProperty(ref reader, options, PropDeciders, static System.Collections.Generic.IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) + if (propDeciders.TryReadProperty(ref reader, options, PropDeciders, static System.Collections.Generic.IReadOnlyCollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.NodeAllocationExplanation continue; } - if (propWeightRanking.TryReadProperty(ref reader, options, PropWeightRanking, null)) + if (propWeightRanking.TryReadProperty(ref reader, options, PropWeightRanking, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -121,7 +121,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.NodeAllocationExplanation public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.NodeAllocationExplanation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDeciders, value.Deciders, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); + writer.WriteProperty(options, PropDeciders, value.Deciders, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropNodeAttributes, value.NodeAttributes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropNodeDecision, value.NodeDecision, null, null); writer.WriteProperty(options, PropNodeId, value.NodeId, null, null); @@ -129,7 +129,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropRoles, value.Roles, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropStore, value.Store, null, null); writer.WriteProperty(options, PropTransportAddress, value.TransportAddress, null, null); - writer.WriteProperty(options, PropWeightRanking, value.WeightRanking, null, null); + writer.WriteProperty(options, PropWeightRanking, value.WeightRanking, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/NodeAllocationExplanation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/NodeAllocationExplanation.g.cs index 2cf26319516..ebcb8852259 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/NodeAllocationExplanation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/NodeAllocationExplanation.g.cs @@ -27,16 +27,14 @@ namespace Elastic.Clients.Elasticsearch.Cluster; public sealed partial class NodeAllocationExplanation { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public NodeAllocationExplanation(System.Collections.Generic.IReadOnlyCollection deciders, System.Collections.Generic.IReadOnlyDictionary nodeAttributes, Elastic.Clients.Elasticsearch.Cluster.Decision nodeDecision, string nodeId, string nodeName, System.Collections.Generic.IReadOnlyCollection roles, string transportAddress, int weightRanking) + public NodeAllocationExplanation(System.Collections.Generic.IReadOnlyDictionary nodeAttributes, Elastic.Clients.Elasticsearch.Cluster.Decision nodeDecision, string nodeId, string nodeName, System.Collections.Generic.IReadOnlyCollection roles, string transportAddress) { - Deciders = deciders; NodeAttributes = nodeAttributes; NodeDecision = nodeDecision; NodeId = nodeId; NodeName = nodeName; Roles = roles; TransportAddress = transportAddress; - WeightRanking = weightRanking; } #if NET7_0_OR_GREATER public NodeAllocationExplanation() @@ -55,11 +53,7 @@ internal NodeAllocationExplanation(Elastic.Clients.Elasticsearch.Serialization.J _ = sentinel; } - public -#if NET7_0_OR_GREATER - required -#endif - System.Collections.Generic.IReadOnlyCollection Deciders { get; set; } + public System.Collections.Generic.IReadOnlyCollection? Deciders { get; set; } public #if NET7_0_OR_GREATER required @@ -91,9 +85,5 @@ internal NodeAllocationExplanation(Elastic.Clients.Elasticsearch.Serialization.J required #endif string TransportAddress { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - int WeightRanking { get; set; } + public int? WeightRanking { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CustomServiceSettings.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CustomServiceSettings.Converters.g.cs index 4a9aefc6d37..e679eb54d9e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CustomServiceSettings.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CustomServiceSettings.Converters.g.cs @@ -25,6 +25,7 @@ namespace Elastic.Clients.Elasticsearch.Inference.Json; public sealed partial class CustomServiceSettingsConverter : System.Text.Json.Serialization.JsonConverter { + private static readonly System.Text.Json.JsonEncodedText PropBatchSize = System.Text.Json.JsonEncodedText.Encode("batch_size"); private static readonly System.Text.Json.JsonEncodedText PropHeaders = System.Text.Json.JsonEncodedText.Encode("headers"); private static readonly System.Text.Json.JsonEncodedText PropInputType = System.Text.Json.JsonEncodedText.Encode("input_type"); private static readonly System.Text.Json.JsonEncodedText PropQueryParameters = System.Text.Json.JsonEncodedText.Encode("query_parameters"); @@ -36,6 +37,7 @@ public sealed partial class CustomServiceSettingsConverter : System.Text.Json.Se public override Elastic.Clients.Elasticsearch.Inference.CustomServiceSettings Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propBatchSize = default; LocalJsonValue propHeaders = default; LocalJsonValue propInputType = default; LocalJsonValue propQueryParameters = default; @@ -45,6 +47,11 @@ public override Elastic.Clients.Elasticsearch.Inference.CustomServiceSettings Re LocalJsonValue propUrl = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { + if (propBatchSize.TryReadProperty(ref reader, options, PropBatchSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + if (propHeaders.TryReadProperty(ref reader, options, PropHeaders, static object? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker)))) { continue; @@ -92,6 +99,7 @@ public override Elastic.Clients.Elasticsearch.Inference.CustomServiceSettings Re reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); return new Elastic.Clients.Elasticsearch.Inference.CustomServiceSettings(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { + BatchSize = propBatchSize.Value, Headers = propHeaders.Value, InputType = propInputType.Value, QueryParameters = propQueryParameters.Value, @@ -105,6 +113,7 @@ public override Elastic.Clients.Elasticsearch.Inference.CustomServiceSettings Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.CustomServiceSettings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); + writer.WriteProperty(options, PropBatchSize, value.BatchSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHeaders, value.Headers, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, object? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); writer.WriteProperty(options, PropInputType, value.InputType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, object? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); writer.WriteProperty(options, PropQueryParameters, value.QueryParameters, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, object? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CustomServiceSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CustomServiceSettings.g.cs index 525f8154ec9..86189fce0ee 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CustomServiceSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CustomServiceSettings.g.cs @@ -50,6 +50,15 @@ internal CustomServiceSettings(Elastic.Clients.Elasticsearch.Serialization.JsonC _ = sentinel; } + /// + /// + /// Specifies the batch size used for the semantic_text field. If the field is not provided, the default is 10. + /// The batch size is the maximum number of inputs in a single request to the upstream service. + /// The chunk within the batch are controlled by the selected chunking strategy for the semantic_text field. + /// + /// + public int? BatchSize { get; set; } + /// /// /// Specifies the HTTP header parameters – such as Authentication or Content-Type – that are required to access the custom service. @@ -192,6 +201,19 @@ public CustomServiceSettingsDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Inference.CustomServiceSettingsDescriptor(Elastic.Clients.Elasticsearch.Inference.CustomServiceSettings instance) => new Elastic.Clients.Elasticsearch.Inference.CustomServiceSettingsDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Inference.CustomServiceSettings(Elastic.Clients.Elasticsearch.Inference.CustomServiceSettingsDescriptor descriptor) => descriptor.Instance; + /// + /// + /// Specifies the batch size used for the semantic_text field. If the field is not provided, the default is 10. + /// The batch size is the maximum number of inputs in a single request to the upstream service. + /// The chunk within the batch are controlled by the selected chunking strategy for the semantic_text field. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.CustomServiceSettingsDescriptor BatchSize(int? value) + { + Instance.BatchSize = value; + return this; + } + /// /// /// Specifies the HTTP header parameters – such as Authentication or Content-Type – that are required to access the custom service. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchServiceSettings.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchServiceSettings.Converters.g.cs index 40958d927a5..bb145c2372c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchServiceSettings.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchServiceSettings.Converters.g.cs @@ -27,6 +27,8 @@ public sealed partial class ElasticsearchServiceSettingsConverter : System.Text. { private static readonly System.Text.Json.JsonEncodedText PropAdaptiveAllocations = System.Text.Json.JsonEncodedText.Encode("adaptive_allocations"); private static readonly System.Text.Json.JsonEncodedText PropDeploymentId = System.Text.Json.JsonEncodedText.Encode("deployment_id"); + private static readonly System.Text.Json.JsonEncodedText PropLongDocumentStrategy = System.Text.Json.JsonEncodedText.Encode("long_document_strategy"); + private static readonly System.Text.Json.JsonEncodedText PropMaxChunksPerDoc = System.Text.Json.JsonEncodedText.Encode("max_chunks_per_doc"); private static readonly System.Text.Json.JsonEncodedText PropModelId = System.Text.Json.JsonEncodedText.Encode("model_id"); private static readonly System.Text.Json.JsonEncodedText PropNumAllocations = System.Text.Json.JsonEncodedText.Encode("num_allocations"); private static readonly System.Text.Json.JsonEncodedText PropNumThreads = System.Text.Json.JsonEncodedText.Encode("num_threads"); @@ -36,6 +38,8 @@ public override Elastic.Clients.Elasticsearch.Inference.ElasticsearchServiceSett reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propAdaptiveAllocations = default; LocalJsonValue propDeploymentId = default; + LocalJsonValue propLongDocumentStrategy = default; + LocalJsonValue propMaxChunksPerDoc = default; LocalJsonValue propModelId = default; LocalJsonValue propNumAllocations = default; LocalJsonValue propNumThreads = default; @@ -51,6 +55,16 @@ public override Elastic.Clients.Elasticsearch.Inference.ElasticsearchServiceSett continue; } + if (propLongDocumentStrategy.TryReadProperty(ref reader, options, PropLongDocumentStrategy, null)) + { + continue; + } + + if (propMaxChunksPerDoc.TryReadProperty(ref reader, options, PropMaxChunksPerDoc, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + if (propModelId.TryReadProperty(ref reader, options, PropModelId, null)) { continue; @@ -80,6 +94,8 @@ public override Elastic.Clients.Elasticsearch.Inference.ElasticsearchServiceSett { AdaptiveAllocations = propAdaptiveAllocations.Value, DeploymentId = propDeploymentId.Value, + LongDocumentStrategy = propLongDocumentStrategy.Value, + MaxChunksPerDoc = propMaxChunksPerDoc.Value, ModelId = propModelId.Value, NumAllocations = propNumAllocations.Value, NumThreads = propNumThreads.Value @@ -91,6 +107,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAdaptiveAllocations, value.AdaptiveAllocations, null, null); writer.WriteProperty(options, PropDeploymentId, value.DeploymentId, null, null); + writer.WriteProperty(options, PropLongDocumentStrategy, value.LongDocumentStrategy, null, null); + writer.WriteProperty(options, PropMaxChunksPerDoc, value.MaxChunksPerDoc, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModelId, value.ModelId, null, null); writer.WriteProperty(options, PropNumAllocations, value.NumAllocations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNumThreads, value.NumThreads, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchServiceSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchServiceSettings.g.cs index 759c0887af1..a9a69908b06 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchServiceSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchServiceSettings.g.cs @@ -68,6 +68,42 @@ internal ElasticsearchServiceSettings(Elastic.Clients.Elasticsearch.Serializatio /// public string? DeploymentId { get; set; } + /// + /// + /// Available only for the rerank task type using the Elastic reranker model. + /// Controls the strategy used for processing long documents during inference. + /// + /// + /// Possible values: + /// + /// + /// + /// + /// truncate (default): Processes only the beginning of each document. + /// + /// + /// + /// + /// chunk: Splits long documents into smaller parts (chunks) before inference. + /// + /// + /// + /// + /// When long_document_strategy is set to chunk, Elasticsearch splits each document into smaller parts but still returns a single score per document. + /// That score reflects the highest relevance score among all chunks. + /// + /// + public string? LongDocumentStrategy { get; set; } + + /// + /// + /// Only for the rerank task type. + /// Limits the number of chunks per document that are sent for inference when chunking is enabled. + /// If not set, all chunks generated for the document are processed. + /// + /// + public int? MaxChunksPerDoc { get; set; } + /// /// /// The name of the model to use for the inference task. @@ -181,6 +217,50 @@ public Elastic.Clients.Elasticsearch.Inference.ElasticsearchServiceSettingsDescr return this; } + /// + /// + /// Available only for the rerank task type using the Elastic reranker model. + /// Controls the strategy used for processing long documents during inference. + /// + /// + /// Possible values: + /// + /// + /// + /// + /// truncate (default): Processes only the beginning of each document. + /// + /// + /// + /// + /// chunk: Splits long documents into smaller parts (chunks) before inference. + /// + /// + /// + /// + /// When long_document_strategy is set to chunk, Elasticsearch splits each document into smaller parts but still returns a single score per document. + /// That score reflects the highest relevance score among all chunks. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.ElasticsearchServiceSettingsDescriptor LongDocumentStrategy(string? value) + { + Instance.LongDocumentStrategy = value; + return this; + } + + /// + /// + /// Only for the rerank task type. + /// Limits the number of chunks per document that are sent for inference when chunking is enabled. + /// If not set, all chunks generated for the document are processed. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.ElasticsearchServiceSettingsDescriptor MaxChunksPerDoc(int? value) + { + Instance.MaxChunksPerDoc = value; + return this; + } + /// /// /// The name of the model to use for the inference task. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceEndpoint.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceEndpoint.g.cs index d889d77ac56..77e09cf00af 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceEndpoint.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceEndpoint.g.cs @@ -56,7 +56,9 @@ internal InferenceEndpoint(Elastic.Clients.Elasticsearch.Serialization.JsonConst /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } @@ -117,7 +119,9 @@ public InferenceEndpointDescriptor() /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceEndpointDescriptor ChunkingSettings(Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? value) @@ -128,7 +132,9 @@ public Elastic.Clients.Elasticsearch.Inference.InferenceEndpointDescriptor Chunk /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceEndpointDescriptor ChunkingSettings() @@ -139,7 +145,9 @@ public Elastic.Clients.Elasticsearch.Inference.InferenceEndpointDescriptor Chunk /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceEndpointDescriptor ChunkingSettings(System.Action? action) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceEndpointInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceEndpointInfo.g.cs index 3a6dae0bd94..c41201edef1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceEndpointInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceEndpointInfo.g.cs @@ -58,7 +58,9 @@ internal InferenceEndpointInfo(Elastic.Clients.Elasticsearch.Serialization.JsonC /// /// - /// Chunking configuration object + /// The chunking configuration object. + /// Applies only to the sparse_embedding and text_embedding task types. + /// Not applicable to the rerank, completion, or chat_completion task types. /// /// public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnQuery.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnQuery.Converters.g.cs index 02d9998069e..23e8ef5c6d5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnQuery.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnQuery.Converters.g.cs @@ -35,6 +35,7 @@ public sealed partial class KnnQueryConverter : System.Text.Json.Serialization.J private static readonly System.Text.Json.JsonEncodedText PropQueryVectorBuilder = System.Text.Json.JsonEncodedText.Encode("query_vector_builder"); private static readonly System.Text.Json.JsonEncodedText PropRescoreVector = System.Text.Json.JsonEncodedText.Encode("rescore_vector"); private static readonly System.Text.Json.JsonEncodedText PropSimilarity = System.Text.Json.JsonEncodedText.Encode("similarity"); + private static readonly System.Text.Json.JsonEncodedText PropVisitPercentage = System.Text.Json.JsonEncodedText.Encode("visit_percentage"); public override Elastic.Clients.Elasticsearch.KnnQuery Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { @@ -49,6 +50,7 @@ public override Elastic.Clients.Elasticsearch.KnnQuery Read(ref System.Text.Json LocalJsonValue propQueryVectorBuilder = default; LocalJsonValue propRescoreVector = default; LocalJsonValue propSimilarity = default; + LocalJsonValue propVisitPercentage = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) @@ -101,6 +103,11 @@ public override Elastic.Clients.Elasticsearch.KnnQuery Read(ref System.Text.Json continue; } + if (propVisitPercentage.TryReadProperty(ref reader, options, PropVisitPercentage, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) { reader.SafeSkip(); @@ -122,7 +129,8 @@ public override Elastic.Clients.Elasticsearch.KnnQuery Read(ref System.Text.Json QueryVector = propQueryVector.Value, QueryVectorBuilder = propQueryVectorBuilder.Value, RescoreVector = propRescoreVector.Value, - Similarity = propSimilarity.Value + Similarity = propSimilarity.Value, + VisitPercentage = propVisitPercentage.Value }; } @@ -139,6 +147,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropQueryVectorBuilder, value.QueryVectorBuilder, null, null); writer.WriteProperty(options, PropRescoreVector, value.RescoreVector, null, null); writer.WriteProperty(options, PropSimilarity, value.Similarity, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVisitPercentage, value.VisitPercentage, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnQuery.g.cs index a0e73f252e7..3a44f43a0c8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnQuery.g.cs @@ -118,6 +118,13 @@ internal KnnQuery(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSen /// /// public float? Similarity { get; set; } + + /// + /// + /// The percentage of vectors to explore per shard while doing knn search with bbq_disk + /// + /// + public float? VisitPercentage { get; set; } } public readonly partial struct KnnQueryDescriptor @@ -319,6 +326,17 @@ public Elastic.Clients.Elasticsearch.KnnQueryDescriptor Similarity(fl return this; } + /// + /// + /// The percentage of vectors to explore per shard while doing knn search with bbq_disk + /// + /// + public Elastic.Clients.Elasticsearch.KnnQueryDescriptor VisitPercentage(float? value) + { + Instance.VisitPercentage = value; + return this; + } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.KnnQuery Build(System.Action> action) { @@ -544,6 +562,17 @@ public Elastic.Clients.Elasticsearch.KnnQueryDescriptor Similarity(float? value) return this; } + /// + /// + /// The percentage of vectors to explore per shard while doing knn search with bbq_disk + /// + /// + public Elastic.Clients.Elasticsearch.KnnQueryDescriptor VisitPercentage(float? value) + { + Instance.VisitPercentage = value; + return this; + } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.KnnQuery Build(System.Action action) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnRetriever.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnRetriever.Converters.g.cs index 714be2dff6c..02ca4115ca9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnRetriever.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnRetriever.Converters.g.cs @@ -35,6 +35,7 @@ public sealed partial class KnnRetrieverConverter : System.Text.Json.Serializati private static readonly System.Text.Json.JsonEncodedText PropQueryVectorBuilder = System.Text.Json.JsonEncodedText.Encode("query_vector_builder"); private static readonly System.Text.Json.JsonEncodedText PropRescoreVector = System.Text.Json.JsonEncodedText.Encode("rescore_vector"); private static readonly System.Text.Json.JsonEncodedText PropSimilarity = System.Text.Json.JsonEncodedText.Encode("similarity"); + private static readonly System.Text.Json.JsonEncodedText PropVisitPercentage = System.Text.Json.JsonEncodedText.Encode("visit_percentage"); public override Elastic.Clients.Elasticsearch.KnnRetriever Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { @@ -49,6 +50,7 @@ public override Elastic.Clients.Elasticsearch.KnnRetriever Read(ref System.Text. LocalJsonValue propQueryVectorBuilder = default; LocalJsonValue propRescoreVector = default; LocalJsonValue propSimilarity = default; + LocalJsonValue propVisitPercentage = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propField.TryReadProperty(ref reader, options, PropField, null)) @@ -101,6 +103,11 @@ public override Elastic.Clients.Elasticsearch.KnnRetriever Read(ref System.Text. continue; } + if (propVisitPercentage.TryReadProperty(ref reader, options, PropVisitPercentage, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) { reader.SafeSkip(); @@ -122,7 +129,8 @@ public override Elastic.Clients.Elasticsearch.KnnRetriever Read(ref System.Text. QueryVector = propQueryVector.Value, QueryVectorBuilder = propQueryVectorBuilder.Value, RescoreVector = propRescoreVector.Value, - Similarity = propSimilarity.Value + Similarity = propSimilarity.Value, + VisitPercentage = propVisitPercentage.Value }; } @@ -139,6 +147,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropQueryVectorBuilder, value.QueryVectorBuilder, null, null); writer.WriteProperty(options, PropRescoreVector, value.RescoreVector, null, null); writer.WriteProperty(options, PropSimilarity, value.Similarity, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVisitPercentage, value.VisitPercentage, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnRetriever.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnRetriever.g.cs index 1b899698e2e..64cbfc3bb2e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnRetriever.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnRetriever.g.cs @@ -131,6 +131,13 @@ internal KnnRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructo /// /// public float? Similarity { get; set; } + + /// + /// + /// The percentage of vectors to explore per shard while doing knn search with bbq_disk + /// + /// + public float? VisitPercentage { get; set; } } public readonly partial struct KnnRetrieverDescriptor @@ -323,6 +330,17 @@ public Elastic.Clients.Elasticsearch.KnnRetrieverDescriptor Similarit return this; } + /// + /// + /// The percentage of vectors to explore per shard while doing knn search with bbq_disk + /// + /// + public Elastic.Clients.Elasticsearch.KnnRetrieverDescriptor VisitPercentage(float? value) + { + Instance.VisitPercentage = value; + return this; + } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.KnnRetriever Build(System.Action> action) { @@ -539,6 +557,17 @@ public Elastic.Clients.Elasticsearch.KnnRetrieverDescriptor Similarity(float? va return this; } + /// + /// + /// The percentage of vectors to explore per shard while doing knn search with bbq_disk + /// + /// + public Elastic.Clients.Elasticsearch.KnnRetrieverDescriptor VisitPercentage(float? value) + { + Instance.VisitPercentage = value; + return this; + } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.KnnRetriever Build(System.Action action) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnSearch.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnSearch.Converters.g.cs index 7cef81bdc28..9fd0cc41e03 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnSearch.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnSearch.Converters.g.cs @@ -35,6 +35,7 @@ public sealed partial class KnnSearchConverter : System.Text.Json.Serialization. private static readonly System.Text.Json.JsonEncodedText PropQueryVectorBuilder = System.Text.Json.JsonEncodedText.Encode("query_vector_builder"); private static readonly System.Text.Json.JsonEncodedText PropRescoreVector = System.Text.Json.JsonEncodedText.Encode("rescore_vector"); private static readonly System.Text.Json.JsonEncodedText PropSimilarity = System.Text.Json.JsonEncodedText.Encode("similarity"); + private static readonly System.Text.Json.JsonEncodedText PropVisitPercentage = System.Text.Json.JsonEncodedText.Encode("visit_percentage"); public override Elastic.Clients.Elasticsearch.KnnSearch Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { @@ -49,6 +50,7 @@ public override Elastic.Clients.Elasticsearch.KnnSearch Read(ref System.Text.Jso LocalJsonValue propQueryVectorBuilder = default; LocalJsonValue propRescoreVector = default; LocalJsonValue propSimilarity = default; + LocalJsonValue propVisitPercentage = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) @@ -101,6 +103,11 @@ public override Elastic.Clients.Elasticsearch.KnnSearch Read(ref System.Text.Jso continue; } + if (propVisitPercentage.TryReadProperty(ref reader, options, PropVisitPercentage, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) { reader.SafeSkip(); @@ -122,7 +129,8 @@ public override Elastic.Clients.Elasticsearch.KnnSearch Read(ref System.Text.Jso QueryVector = propQueryVector.Value, QueryVectorBuilder = propQueryVectorBuilder.Value, RescoreVector = propRescoreVector.Value, - Similarity = propSimilarity.Value + Similarity = propSimilarity.Value, + VisitPercentage = propVisitPercentage.Value }; } @@ -139,6 +147,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropQueryVectorBuilder, value.QueryVectorBuilder, null, null); writer.WriteProperty(options, PropRescoreVector, value.RescoreVector, null, null); writer.WriteProperty(options, PropSimilarity, value.Similarity, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVisitPercentage, value.VisitPercentage, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnSearch.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnSearch.g.cs index f86b5e8b2ee..f9f05187993 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnSearch.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnSearch.g.cs @@ -121,6 +121,13 @@ internal KnnSearch(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSe /// /// public float? Similarity { get; set; } + + /// + /// + /// The percentage of vectors to explore per shard while doing knn search with bbq_disk + /// + /// + public float? VisitPercentage { get; set; } } public readonly partial struct KnnSearchDescriptor @@ -346,6 +353,17 @@ public Elastic.Clients.Elasticsearch.KnnSearchDescriptor Similarity(f return this; } + /// + /// + /// The percentage of vectors to explore per shard while doing knn search with bbq_disk + /// + /// + public Elastic.Clients.Elasticsearch.KnnSearchDescriptor VisitPercentage(float? value) + { + Instance.VisitPercentage = value; + return this; + } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.KnnSearch Build(System.Action> action) { @@ -606,6 +624,17 @@ public Elastic.Clients.Elasticsearch.KnnSearchDescriptor Similarity(float? value return this; } + /// + /// + /// The percentage of vectors to explore per shard while doing knn search with bbq_disk + /// + /// + public Elastic.Clients.Elasticsearch.KnnSearchDescriptor VisitPercentage(float? value) + { + Instance.VisitPercentage = value; + return this; + } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.KnnSearch Build(System.Action action) {