diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ApiUrlLookup.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ApiUrlLookup.g.cs
index 4d7c69eba2d..f84886bf35a 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ApiUrlLookup.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ApiUrlLookup.g.cs
@@ -21,62 +21,45 @@ namespace Elastic.Clients.Elasticsearch.Serverless.Requests;
internal static class ApiUrlLookup
{
- internal static ApiUrls AsyncSearchStatus = new ApiUrls(new[] { "_async_search/status/{id}" });
internal static ApiUrls AsyncSearchDelete = new ApiUrls(new[] { "_async_search/{id}" });
internal static ApiUrls AsyncSearchGet = new ApiUrls(new[] { "_async_search/{id}" });
+ internal static ApiUrls AsyncSearchStatus = new ApiUrls(new[] { "_async_search/status/{id}" });
internal static ApiUrls AsyncSearchSubmit = new ApiUrls(new[] { "_async_search", "{index}/_async_search" });
- internal static ApiUrls NoNamespaceBulk = new ApiUrls(new[] { "_bulk", "{index}/_bulk" });
- internal static ApiUrls NoNamespaceClearScroll = new ApiUrls(new[] { "_search/scroll" });
- internal static ApiUrls NoNamespaceClosePointInTime = new ApiUrls(new[] { "_pit" });
internal static ApiUrls ClusterAllocationExplain = new ApiUrls(new[] { "_cluster/allocation/explain" });
- internal static ApiUrls ClusterStats = new ApiUrls(new[] { "_cluster/stats", "_cluster/stats/nodes/{node_id}" });
internal static ApiUrls ClusterGetSettings = new ApiUrls(new[] { "_cluster/settings" });
internal static ApiUrls ClusterHealth = new ApiUrls(new[] { "_cluster/health", "_cluster/health/{index}" });
internal static ApiUrls ClusterPendingTasks = new ApiUrls(new[] { "_cluster/pending_tasks" });
- internal static ApiUrls NoNamespaceCount = new ApiUrls(new[] { "_count", "{index}/_count" });
- internal static ApiUrls NoNamespaceCreate = new ApiUrls(new[] { "{index}/_create/{id}" });
- internal static ApiUrls NoNamespaceDeleteByQuery = new ApiUrls(new[] { "{index}/_delete_by_query" });
- internal static ApiUrls NoNamespaceDeleteByQueryRethrottle = new ApiUrls(new[] { "_delete_by_query/{task_id}/_rethrottle" });
- internal static ApiUrls NoNamespaceDelete = new ApiUrls(new[] { "{index}/_doc/{id}" });
- internal static ApiUrls NoNamespaceDeleteScript = new ApiUrls(new[] { "_scripts/{id}" });
+ internal static ApiUrls ClusterStats = new ApiUrls(new[] { "_cluster/stats", "_cluster/stats/nodes/{node_id}" });
internal static ApiUrls EnrichDeletePolicy = new ApiUrls(new[] { "_enrich/policy/{name}" });
- internal static ApiUrls EnrichStats = new ApiUrls(new[] { "_enrich/_stats" });
internal static ApiUrls EnrichExecutePolicy = new ApiUrls(new[] { "_enrich/policy/{name}/_execute" });
internal static ApiUrls EnrichGetPolicy = new ApiUrls(new[] { "_enrich/policy/{name}", "_enrich/policy" });
internal static ApiUrls EnrichPutPolicy = new ApiUrls(new[] { "_enrich/policy/{name}" });
+ internal static ApiUrls EnrichStats = new ApiUrls(new[] { "_enrich/_stats" });
internal static ApiUrls EqlDelete = new ApiUrls(new[] { "_eql/search/{id}" });
internal static ApiUrls EqlGet = new ApiUrls(new[] { "_eql/search/{id}" });
- internal static ApiUrls EqlSearch = new ApiUrls(new[] { "{index}/_eql/search" });
internal static ApiUrls EqlGetStatus = new ApiUrls(new[] { "_eql/search/status/{id}" });
- internal static ApiUrls NoNamespaceExists = new ApiUrls(new[] { "{index}/_doc/{id}" });
- internal static ApiUrls NoNamespaceExistsSource = new ApiUrls(new[] { "{index}/_source/{id}" });
- internal static ApiUrls NoNamespaceExplain = new ApiUrls(new[] { "{index}/_explain/{id}" });
- internal static ApiUrls NoNamespaceFieldCaps = new ApiUrls(new[] { "_field_caps", "{index}/_field_caps" });
- internal static ApiUrls NoNamespaceGet = new ApiUrls(new[] { "{index}/_doc/{id}" });
- internal static ApiUrls NoNamespaceGetScript = new ApiUrls(new[] { "_scripts/{id}" });
- internal static ApiUrls NoNamespaceGetSource = new ApiUrls(new[] { "{index}/_source/{id}" });
+ internal static ApiUrls EqlSearch = new ApiUrls(new[] { "{index}/_eql/search" });
internal static ApiUrls GraphExplore = new ApiUrls(new[] { "{index}/_graph/explore" });
internal static ApiUrls IndexManagementClose = new ApiUrls(new[] { "{index}/_close" });
- internal static ApiUrls IndexManagementCreateDataStream = new ApiUrls(new[] { "_data_stream/{name}" });
internal static ApiUrls IndexManagementCreate = new ApiUrls(new[] { "{index}" });
+ internal static ApiUrls IndexManagementCreateDataStream = new ApiUrls(new[] { "_data_stream/{name}" });
+ internal static ApiUrls IndexManagementDelete = new ApiUrls(new[] { "{index}" });
internal static ApiUrls IndexManagementDeleteAlias = new ApiUrls(new[] { "{index}/_alias/{name}" });
internal static ApiUrls IndexManagementDeleteDataLifecycle = new ApiUrls(new[] { "_data_stream/{name}/_lifecycle" });
internal static ApiUrls IndexManagementDeleteDataStream = new ApiUrls(new[] { "_data_stream/{name}" });
- internal static ApiUrls IndexManagementDelete = new ApiUrls(new[] { "{index}" });
internal static ApiUrls IndexManagementDeleteIndexTemplate = new ApiUrls(new[] { "_index_template/{name}" });
+ internal static ApiUrls IndexManagementExists = new ApiUrls(new[] { "{index}" });
internal static ApiUrls IndexManagementExistsAlias = new ApiUrls(new[] { "_alias/{name}", "{index}/_alias/{name}" });
internal static ApiUrls IndexManagementExistsIndexTemplate = new ApiUrls(new[] { "_index_template/{name}" });
- internal static ApiUrls IndexManagementExists = new ApiUrls(new[] { "{index}" });
internal static ApiUrls IndexManagementExplainDataLifecycle = new ApiUrls(new[] { "{index}/_lifecycle/explain" });
internal static ApiUrls IndexManagementFlush = new ApiUrls(new[] { "_flush", "{index}/_flush" });
internal static ApiUrls IndexManagementForcemerge = new ApiUrls(new[] { "_forcemerge", "{index}/_forcemerge" });
+ internal static ApiUrls IndexManagementGet = new ApiUrls(new[] { "{index}" });
internal static ApiUrls IndexManagementGetAlias = new ApiUrls(new[] { "_alias", "_alias/{name}", "{index}/_alias/{name}", "{index}/_alias" });
internal static ApiUrls IndexManagementGetDataLifecycle = new ApiUrls(new[] { "_data_stream/{name}/_lifecycle" });
internal static ApiUrls IndexManagementGetDataStream = new ApiUrls(new[] { "_data_stream", "_data_stream/{name}" });
- internal static ApiUrls IndexManagementGet = new ApiUrls(new[] { "{index}" });
internal static ApiUrls IndexManagementGetIndexTemplate = new ApiUrls(new[] { "_index_template", "_index_template/{name}" });
internal static ApiUrls IndexManagementGetMapping = new ApiUrls(new[] { "_mapping", "{index}/_mapping" });
- internal static ApiUrls IndexManagementStats = new ApiUrls(new[] { "_stats", "_stats/{metric}", "{index}/_stats", "{index}/_stats/{metric}" });
internal static ApiUrls IndexManagementMigrateToDataStream = new ApiUrls(new[] { "_data_stream/_migrate/{name}" });
internal static ApiUrls IndexManagementOpen = new ApiUrls(new[] { "{index}/_open" });
internal static ApiUrls IndexManagementPutAlias = new ApiUrls(new[] { "{index}/_alias/{name}" });
@@ -88,15 +71,32 @@ internal static class ApiUrlLookup
internal static ApiUrls IndexManagementRollover = new ApiUrls(new[] { "{alias}/_rollover", "{alias}/_rollover/{new_index}" });
internal static ApiUrls IndexManagementSimulateIndexTemplate = new ApiUrls(new[] { "_index_template/_simulate_index/{name}" });
internal static ApiUrls IndexManagementSimulateTemplate = new ApiUrls(new[] { "_index_template/_simulate", "_index_template/_simulate/{name}" });
+ internal static ApiUrls IndexManagementStats = new ApiUrls(new[] { "_stats", "_stats/{metric}", "{index}/_stats", "{index}/_stats/{metric}" });
internal static ApiUrls IndexManagementUpdateAliases = new ApiUrls(new[] { "_aliases" });
- internal static ApiUrls NoNamespaceIndex = new ApiUrls(new[] { "{index}/_doc/{id}", "{index}/_doc" });
- internal static ApiUrls NoNamespaceInfo = new ApiUrls(new[] { "" });
internal static ApiUrls IngestDeletePipeline = new ApiUrls(new[] { "_ingest/pipeline/{id}" });
internal static ApiUrls IngestGeoIpStats = new ApiUrls(new[] { "_ingest/geoip/stats" });
internal static ApiUrls IngestGetPipeline = new ApiUrls(new[] { "_ingest/pipeline", "_ingest/pipeline/{id}" });
internal static ApiUrls IngestProcessorGrok = new ApiUrls(new[] { "_ingest/processor/grok" });
internal static ApiUrls IngestPutPipeline = new ApiUrls(new[] { "_ingest/pipeline/{id}" });
internal static ApiUrls IngestSimulate = new ApiUrls(new[] { "_ingest/pipeline/_simulate", "_ingest/pipeline/{id}/_simulate" });
+ internal static ApiUrls NoNamespaceBulk = new ApiUrls(new[] { "_bulk", "{index}/_bulk" });
+ internal static ApiUrls NoNamespaceClearScroll = new ApiUrls(new[] { "_search/scroll" });
+ internal static ApiUrls NoNamespaceClosePointInTime = new ApiUrls(new[] { "_pit" });
+ internal static ApiUrls NoNamespaceCount = new ApiUrls(new[] { "_count", "{index}/_count" });
+ internal static ApiUrls NoNamespaceCreate = new ApiUrls(new[] { "{index}/_create/{id}" });
+ internal static ApiUrls NoNamespaceDelete = new ApiUrls(new[] { "{index}/_doc/{id}" });
+ internal static ApiUrls NoNamespaceDeleteByQuery = new ApiUrls(new[] { "{index}/_delete_by_query" });
+ internal static ApiUrls NoNamespaceDeleteByQueryRethrottle = new ApiUrls(new[] { "_delete_by_query/{task_id}/_rethrottle" });
+ internal static ApiUrls NoNamespaceDeleteScript = new ApiUrls(new[] { "_scripts/{id}" });
+ internal static ApiUrls NoNamespaceExists = new ApiUrls(new[] { "{index}/_doc/{id}" });
+ internal static ApiUrls NoNamespaceExistsSource = new ApiUrls(new[] { "{index}/_source/{id}" });
+ internal static ApiUrls NoNamespaceExplain = new ApiUrls(new[] { "{index}/_explain/{id}" });
+ internal static ApiUrls NoNamespaceFieldCaps = new ApiUrls(new[] { "_field_caps", "{index}/_field_caps" });
+ internal static ApiUrls NoNamespaceGet = new ApiUrls(new[] { "{index}/_doc/{id}" });
+ internal static ApiUrls NoNamespaceGetScript = new ApiUrls(new[] { "_scripts/{id}" });
+ internal static ApiUrls NoNamespaceGetSource = new ApiUrls(new[] { "{index}/_source/{id}" });
+ internal static ApiUrls NoNamespaceIndex = new ApiUrls(new[] { "{index}/_doc/{id}", "{index}/_doc" });
+ internal static ApiUrls NoNamespaceInfo = new ApiUrls(new[] { "" });
internal static ApiUrls NoNamespaceMget = new ApiUrls(new[] { "_mget", "{index}/_mget" });
internal static ApiUrls NoNamespaceMsearch = new ApiUrls(new[] { "_msearch", "{index}/_msearch" });
internal static ApiUrls NoNamespaceMsearchTemplate = new ApiUrls(new[] { "_msearch/template", "{index}/_msearch/template" });
@@ -111,6 +111,11 @@ internal static class ApiUrlLookup
internal static ApiUrls NoNamespaceScroll = new ApiUrls(new[] { "_search/scroll" });
internal static ApiUrls NoNamespaceSearch = new ApiUrls(new[] { "_search", "{index}/_search" });
internal static ApiUrls NoNamespaceSearchTemplate = new ApiUrls(new[] { "_search/template", "{index}/_search/template" });
+ internal static ApiUrls NoNamespaceTermsEnum = new ApiUrls(new[] { "{index}/_terms_enum" });
+ internal static ApiUrls NoNamespaceTermvectors = new ApiUrls(new[] { "{index}/_termvectors/{id}", "{index}/_termvectors" });
+ internal static ApiUrls NoNamespaceUpdate = new ApiUrls(new[] { "{index}/_update/{id}" });
+ internal static ApiUrls NoNamespaceUpdateByQuery = new ApiUrls(new[] { "{index}/_update_by_query" });
+ internal static ApiUrls NoNamespaceUpdateByQueryRethrottle = new ApiUrls(new[] { "_update_by_query/{task_id}/_rethrottle" });
internal static ApiUrls SqlClearCursor = new ApiUrls(new[] { "_sql/close" });
internal static ApiUrls SqlDeleteAsync = new ApiUrls(new[] { "_sql/async/delete/{id}" });
internal static ApiUrls SqlGetAsync = new ApiUrls(new[] { "_sql/async/{id}" });
@@ -119,9 +124,4 @@ internal static class ApiUrlLookup
internal static ApiUrls TasksCancel = new ApiUrls(new[] { "_tasks/_cancel", "_tasks/{task_id}/_cancel" });
internal static ApiUrls TasksGet = new ApiUrls(new[] { "_tasks/{task_id}" });
internal static ApiUrls TasksList = new ApiUrls(new[] { "_tasks" });
- internal static ApiUrls NoNamespaceTermsEnum = new ApiUrls(new[] { "{index}/_terms_enum" });
- internal static ApiUrls NoNamespaceTermvectors = new ApiUrls(new[] { "{index}/_termvectors/{id}", "{index}/_termvectors" });
- internal static ApiUrls NoNamespaceUpdateByQuery = new ApiUrls(new[] { "{index}/_update_by_query" });
- internal static ApiUrls NoNamespaceUpdateByQueryRethrottle = new ApiUrls(new[] { "_update_by_query/{task_id}/_rethrottle" });
- internal static ApiUrls NoNamespaceUpdate = new ApiUrls(new[] { "{index}/_update/{id}" });
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs
index d5d7c2b123a..c05a7af3e60 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs
@@ -31,21 +31,6 @@ namespace Elastic.Clients.Elasticsearch.Serverless.AsyncSearch;
public sealed class SubmitAsyncSearchRequestParameters : RequestParameters
{
- ///
- /// Blocks and waits until the search is completed up to a certain timeout.
When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.
- ///
- public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); }
-
- ///
- /// If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`.
- ///
- public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); }
-
- ///
- /// Specifies how long the async search needs to be available.
Ongoing async searches and any saved search results are deleted after this period.
- ///
- public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); }
-
///
/// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
///
@@ -101,6 +86,16 @@ public sealed class SubmitAsyncSearchRequestParameters : RequestParameters
///
public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); }
+ ///
+ /// Specifies how long the async search needs to be available.
Ongoing async searches and any saved search results are deleted after this period.
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); }
+
+ ///
+ /// If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`.
+ ///
+ public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); }
+
///
/// Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
///
@@ -122,10 +117,16 @@ public sealed class SubmitAsyncSearchRequestParameters : RequestParameters
///
public long? PreFilterShardSize { get => Q("pre_filter_shard_size"); set => Q("pre_filter_shard_size", value); }
+ ///
+ /// Query in the Lucene query string syntax
+ ///
+ public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); }
+
///
/// Specify if request cache should be used for this request or not, defaults to true
///
public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); }
+ public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); }
///
/// A comma-separated list of specific routing values
@@ -138,6 +139,16 @@ public sealed class SubmitAsyncSearchRequestParameters : RequestParameters
///
public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); }
+ ///
+ /// A list of fields to exclude from the returned _source field
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); }
+
+ ///
+ /// A list of fields to extract and return from the _source field
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); }
+
///
/// Specifies which field to use for suggestions.
///
@@ -162,22 +173,11 @@ public sealed class SubmitAsyncSearchRequestParameters : RequestParameters
/// Specify whether aggregation and suggester names should be prefixed by their respective types in the response
///
public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); }
- public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); }
-
- ///
- /// A list of fields to exclude from the returned _source field
- ///
- public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); }
-
- ///
- /// A list of fields to extract and return from the _source field
- ///
- public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); }
///
- /// Query in the Lucene query string syntax
+ /// Blocks and waits until the search is completed up to a certain timeout.
When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.
///
- public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); }
+ public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); }
}
internal sealed partial class SubmitAsyncSearchRequestConverter : JsonConverter
@@ -204,6 +204,12 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty
continue;
}
+ if (property == "docvalue_fields")
+ {
+ variant.DocvalueFields = JsonSerializer.Deserialize?>(ref reader, options);
+ continue;
+ }
+
if (property == "explain")
{
variant.Explain = JsonSerializer.Deserialize(ref reader, options);
@@ -216,21 +222,21 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty
continue;
}
- if (property == "from")
+ if (property == "fields")
{
- variant.From = JsonSerializer.Deserialize(ref reader, options);
+ variant.Fields = JsonSerializer.Deserialize?>(ref reader, options);
continue;
}
- if (property == "highlight")
+ if (property == "from")
{
- variant.Highlight = JsonSerializer.Deserialize(ref reader, options);
+ variant.From = JsonSerializer.Deserialize(ref reader, options);
continue;
}
- if (property == "track_total_hits")
+ if (property == "highlight")
{
- variant.TrackTotalHits = JsonSerializer.Deserialize(ref reader, options);
+ variant.Highlight = JsonSerializer.Deserialize(ref reader, options);
continue;
}
@@ -240,12 +246,6 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty
continue;
}
- if (property == "docvalue_fields")
- {
- variant.DocvalueFields = JsonSerializer.Deserialize?>(ref reader, options);
- continue;
- }
-
if (property == "knn")
{
variant.Knn = JsonSerializer.Deserialize?>(ref reader, options);
@@ -258,6 +258,12 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty
continue;
}
+ if (property == "pit")
+ {
+ variant.Pit = JsonSerializer.Deserialize(ref reader, options);
+ continue;
+ }
+
if (property == "post_filter")
{
variant.PostFilter = JsonSerializer.Deserialize(ref reader, options);
@@ -282,6 +288,12 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty
continue;
}
+ if (property == "runtime_mappings")
+ {
+ variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options);
+ continue;
+ }
+
if (property == "script_fields")
{
variant.ScriptFields = JsonSerializer.Deserialize?>(ref reader, options);
@@ -294,6 +306,12 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty
continue;
}
+ if (property == "seq_no_primary_term")
+ {
+ variant.SeqNoPrimaryTerm = JsonSerializer.Deserialize(ref reader, options);
+ continue;
+ }
+
if (property == "size")
{
variant.Size = JsonSerializer.Deserialize(ref reader, options);
@@ -318,9 +336,15 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty
continue;
}
- if (property == "fields")
+ if (property == "stats")
{
- variant.Fields = JsonSerializer.Deserialize?>(ref reader, options);
+ variant.Stats = JsonSerializer.Deserialize?>(ref reader, options);
+ continue;
+ }
+
+ if (property == "stored_fields")
+ {
+ variant.StoredFields = JsonSerializer.Deserialize(ref reader, options);
continue;
}
@@ -348,39 +372,15 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty
continue;
}
- if (property == "version")
- {
- variant.Version = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "seq_no_primary_term")
- {
- variant.SeqNoPrimaryTerm = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "stored_fields")
- {
- variant.StoredFields = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "pit")
- {
- variant.Pit = JsonSerializer.Deserialize(ref reader, options);
- continue;
- }
-
- if (property == "runtime_mappings")
+ if (property == "track_total_hits")
{
- variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options);
+ variant.TrackTotalHits = JsonSerializer.Deserialize(ref reader, options);
continue;
}
- if (property == "stats")
+ if (property == "version")
{
- variant.Stats = JsonSerializer.Deserialize?>(ref reader, options);
+ variant.Version = JsonSerializer.Deserialize(ref reader, options);
continue;
}
}
@@ -404,6 +404,12 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value
JsonSerializer.Serialize(writer, value.Collapse, options);
}
+ if (value.DocvalueFields is not null)
+ {
+ writer.WritePropertyName("docvalue_fields");
+ JsonSerializer.Serialize(writer, value.DocvalueFields, options);
+ }
+
if (value.Explain.HasValue)
{
writer.WritePropertyName("explain");
@@ -416,6 +422,12 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value
JsonSerializer.Serialize(writer, value.Ext, options);
}
+ if (value.Fields is not null)
+ {
+ writer.WritePropertyName("fields");
+ JsonSerializer.Serialize(writer, value.Fields, options);
+ }
+
if (value.From.HasValue)
{
writer.WritePropertyName("from");
@@ -428,24 +440,12 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value
JsonSerializer.Serialize(writer, value.Highlight, options);
}
- if (value.TrackTotalHits is not null)
- {
- writer.WritePropertyName("track_total_hits");
- JsonSerializer.Serialize(writer, value.TrackTotalHits, options);
- }
-
if (value.IndicesBoost is not null)
{
writer.WritePropertyName("indices_boost");
JsonSerializer.Serialize(writer, value.IndicesBoost, options);
}
- if (value.DocvalueFields is not null)
- {
- writer.WritePropertyName("docvalue_fields");
- JsonSerializer.Serialize(writer, value.DocvalueFields, options);
- }
-
if (value.Knn is not null)
{
writer.WritePropertyName("knn");
@@ -458,6 +458,12 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value
writer.WriteNumberValue(value.MinScore.Value);
}
+ if (value.Pit is not null)
+ {
+ writer.WritePropertyName("pit");
+ JsonSerializer.Serialize(writer, value.Pit, options);
+ }
+
if (value.PostFilter is not null)
{
writer.WritePropertyName("post_filter");
@@ -482,6 +488,12 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value
JsonSerializer.Serialize(writer, value.Rescore, options);
}
+ if (value.RuntimeMappings is not null)
+ {
+ writer.WritePropertyName("runtime_mappings");
+ JsonSerializer.Serialize(writer, value.RuntimeMappings, options);
+ }
+
if (value.ScriptFields is not null)
{
writer.WritePropertyName("script_fields");
@@ -494,6 +506,12 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value
JsonSerializer.Serialize(writer, value.SearchAfter, options);
}
+ if (value.SeqNoPrimaryTerm.HasValue)
+ {
+ writer.WritePropertyName("seq_no_primary_term");
+ writer.WriteBooleanValue(value.SeqNoPrimaryTerm.Value);
+ }
+
if (value.Size.HasValue)
{
writer.WritePropertyName("size");
@@ -518,10 +536,16 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value
JsonSerializer.Serialize(writer, value.Source, options);
}
- if (value.Fields is not null)
+ if (value.Stats is not null)
{
- writer.WritePropertyName("fields");
- JsonSerializer.Serialize(writer, value.Fields, options);
+ writer.WritePropertyName("stats");
+ JsonSerializer.Serialize(writer, value.Stats, options);
+ }
+
+ if (value.StoredFields is not null)
+ {
+ writer.WritePropertyName("stored_fields");
+ JsonSerializer.Serialize(writer, value.StoredFields, options);
}
if (value.Suggest is not null)
@@ -548,40 +572,16 @@ public override void Write(Utf8JsonWriter writer, SubmitAsyncSearchRequest value
writer.WriteBooleanValue(value.TrackScores.Value);
}
- if (value.Version.HasValue)
- {
- writer.WritePropertyName("version");
- writer.WriteBooleanValue(value.Version.Value);
- }
-
- if (value.SeqNoPrimaryTerm.HasValue)
- {
- writer.WritePropertyName("seq_no_primary_term");
- writer.WriteBooleanValue(value.SeqNoPrimaryTerm.Value);
- }
-
- if (value.StoredFields is not null)
- {
- writer.WritePropertyName("stored_fields");
- JsonSerializer.Serialize(writer, value.StoredFields, options);
- }
-
- if (value.Pit is not null)
- {
- writer.WritePropertyName("pit");
- JsonSerializer.Serialize(writer, value.Pit, options);
- }
-
- if (value.RuntimeMappings is not null)
+ if (value.TrackTotalHits is not null)
{
- writer.WritePropertyName("runtime_mappings");
- JsonSerializer.Serialize(writer, value.RuntimeMappings, options);
+ writer.WritePropertyName("track_total_hits");
+ JsonSerializer.Serialize(writer, value.TrackTotalHits, options);
}
- if (value.Stats is not null)
+ if (value.Version.HasValue)
{
- writer.WritePropertyName("stats");
- JsonSerializer.Serialize(writer, value.Stats, options);
+ writer.WritePropertyName("version");
+ writer.WriteBooleanValue(value.Version.Value);
}
writer.WriteEndObject();
@@ -610,24 +610,6 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices
internal override string OperationName => "async_search.submit";
- ///
- /// Blocks and waits until the search is completed up to a certain timeout.
When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.
- ///
- [JsonIgnore]
- public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); }
-
- ///
- /// If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`.
- ///
- [JsonIgnore]
- public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); }
-
- ///
- /// Specifies how long the async search needs to be available.
Ongoing async searches and any saved search results are deleted after this period.
- ///
- [JsonIgnore]
- public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); }
-
///
/// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
///
@@ -695,17 +677,29 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices
public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); }
///
- /// Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
+ /// Specifies how long the async search needs to be available.
Ongoing async searches and any saved search results are deleted after this period.
///
[JsonIgnore]
- public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); }
+ public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); }
///
- /// The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
+ /// If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`.
///
[JsonIgnore]
- public long? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); }
- [JsonIgnore]
+ public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); }
+
+ ///
+ /// Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
+ ///
+ [JsonIgnore]
+ public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); }
+
+ ///
+ /// The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
+ ///
+ [JsonIgnore]
+ public long? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); }
+ [JsonIgnore]
public string? MinCompatibleShardNode { get => Q("min_compatible_shard_node"); set => Q("min_compatible_shard_node", value); }
///
@@ -720,11 +714,19 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices
[JsonIgnore]
public long? PreFilterShardSize { get => Q("pre_filter_shard_size"); set => Q("pre_filter_shard_size", value); }
+ ///
+ /// Query in the Lucene query string syntax
+ ///
+ [JsonIgnore]
+ public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); }
+
///
/// Specify if request cache should be used for this request or not, defaults to true
///
[JsonIgnore]
public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); }
+ [JsonIgnore]
+ public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); }
///
/// A comma-separated list of specific routing values
@@ -740,6 +742,18 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Serverless.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); }
+ ///
+ /// A list of fields to exclude from the returned _source field
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); }
+
+ ///
+ /// A list of fields to extract and return from the _source field
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); }
+
///
/// Specifies which field to use for suggestions.
///
@@ -769,31 +783,23 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices
///
[JsonIgnore]
public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); }
- [JsonIgnore]
- public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", value); }
-
- ///
- /// A list of fields to exclude from the returned _source field
- ///
- [JsonIgnore]
- public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); }
-
- ///
- /// A list of fields to extract and return from the _source field
- ///
- [JsonIgnore]
- public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); }
///
- /// Query in the Lucene query string syntax
+ /// Blocks and waits until the search is completed up to a certain timeout.
When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.
///
[JsonIgnore]
- public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); }
+ public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); }
[JsonInclude, JsonPropertyName("aggregations")]
public Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationDictionary? Aggregations { get; set; }
[JsonInclude, JsonPropertyName("collapse")]
public Elastic.Clients.Elasticsearch.Serverless.Core.Search.FieldCollapse? Collapse { get; set; }
+ ///
+ /// Array of wildcard (*) patterns. The request returns doc values for field
names matching these patterns in the hits.fields property of the response.
+ ///
+ [JsonInclude, JsonPropertyName("docvalue_fields")]
+ public ICollection? DocvalueFields { get; set; }
+
///
/// If true, returns detailed information about score computation as part of a hit.
///
@@ -806,6 +812,12 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices
[JsonInclude, JsonPropertyName("ext")]
public IDictionary? Ext { get; set; }
+ ///
+ /// Array of wildcard (*) patterns. The request returns values for field names
matching these patterns in the hits.fields property of the response.
+ ///
+ [JsonInclude, JsonPropertyName("fields")]
+ public ICollection? Fields { get; set; }
+
///
/// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
///
@@ -814,28 +826,17 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices
[JsonInclude, JsonPropertyName("highlight")]
public Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? Highlight { get; set; }
- ///
- /// Number of hits matching the query to count accurately. If true, the exact
number of hits is returned at the cost of some performance. If false, the
response does not include the total number of hits matching the query.
Defaults to 10,000 hits.
- ///
- [JsonInclude, JsonPropertyName("track_total_hits")]
- public Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? TrackTotalHits { get; set; }
-
///
/// Boosts the _score of documents from specified indices.
///
[JsonInclude, JsonPropertyName("indices_boost")]
public ICollection>? IndicesBoost { get; set; }
- ///
- /// Array of wildcard (*) patterns. The request returns doc values for field
names matching these patterns in the hits.fields property of the response.
- ///
- [JsonInclude, JsonPropertyName("docvalue_fields")]
- public ICollection? DocvalueFields { get; set; }
-
///
/// Defines the approximate kNN search to run.
///
- [JsonInclude, JsonPropertyName("knn"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.KnnQuery))]
+ [JsonInclude, JsonPropertyName("knn")]
+ [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.KnnQuery))]
public ICollection? Knn { get; set; }
///
@@ -843,6 +844,12 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices
///
[JsonInclude, JsonPropertyName("min_score")]
public double? MinScore { get; set; }
+
+ ///
+ /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
+ ///
+ [JsonInclude, JsonPropertyName("pit")]
+ public Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? Pit { get; set; }
[JsonInclude, JsonPropertyName("post_filter")]
public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? PostFilter { get; set; }
[JsonInclude, JsonPropertyName("profile")]
@@ -853,9 +860,16 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices
///
[JsonInclude, JsonPropertyName("query")]
public Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? Query { get; set; }
- [JsonInclude, JsonPropertyName("rescore"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore))]
+ [JsonInclude, JsonPropertyName("rescore")]
+ [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore))]
public ICollection? Rescore { get; set; }
+ ///
+ /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
+ ///
+ [JsonInclude, JsonPropertyName("runtime_mappings")]
+ public IDictionary? RuntimeMappings { get; set; }
+
///
/// Retrieve a script evaluation (based on different fields) for each hit.
///
@@ -864,6 +878,12 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices
[JsonInclude, JsonPropertyName("search_after")]
public ICollection? SearchAfter { get; set; }
+ ///
+ /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
+ ///
+ [JsonInclude, JsonPropertyName("seq_no_primary_term")]
+ public bool? SeqNoPrimaryTerm { get; set; }
+
///
/// The number of hits to return. By default, you cannot page through more
than 10,000 hits using the from and size parameters. To page through more
hits, use the search_after parameter.
///
@@ -871,7 +891,8 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices
public int? Size { get; set; }
[JsonInclude, JsonPropertyName("slice")]
public Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? Slice { get; set; }
- [JsonInclude, JsonPropertyName("sort"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))]
+ [JsonInclude, JsonPropertyName("sort")]
+ [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.SortOptions))]
public ICollection? Sort { get; set; }
///
@@ -881,10 +902,16 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices
public Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? Source { get; set; }
///
- /// Array of wildcard (*) patterns. The request returns values for field names
matching these patterns in the hits.fields property of the response.
+ /// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
///
- [JsonInclude, JsonPropertyName("fields")]
- public ICollection? Fields { get; set; }
+ [JsonInclude, JsonPropertyName("stats")]
+ public ICollection? Stats { get; set; }
+
+ ///
+ /// 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. You can pass _source: true to return both source fields
and stored fields in the search response.
+ ///
+ [JsonInclude, JsonPropertyName("stored_fields")]
+ public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get; set; }
[JsonInclude, JsonPropertyName("suggest")]
public Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? Suggest { get; set; }
@@ -907,40 +934,16 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices
public bool? TrackScores { get; set; }
///
- /// If true, returns document version as part of a hit.
- ///
- [JsonInclude, JsonPropertyName("version")]
- public bool? Version { get; set; }
-
- ///
- /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
- ///
- [JsonInclude, JsonPropertyName("seq_no_primary_term")]
- public bool? SeqNoPrimaryTerm { get; set; }
-
- ///
- /// 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. You can pass _source: true to return both source fields
and stored fields in the search response.
- ///
- [JsonInclude, JsonPropertyName("stored_fields")]
- public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get; set; }
-
- ///
- /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
- ///
- [JsonInclude, JsonPropertyName("pit")]
- public Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? Pit { get; set; }
-
- ///
- /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
+ /// Number of hits matching the query to count accurately. If true, the exact
number of hits is returned at the cost of some performance. If false, the
response does not include the total number of hits matching the query.
Defaults to 10,000 hits.
///
- [JsonInclude, JsonPropertyName("runtime_mappings")]
- public IDictionary? RuntimeMappings { get; set; }
+ [JsonInclude, JsonPropertyName("track_total_hits")]
+ public Elastic.Clients.Elasticsearch.Serverless.Core.Search.TrackHits? TrackTotalHits { get; set; }
///
- /// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
+ /// If true, returns document version as part of a hit.
///
- [JsonInclude, JsonPropertyName("stats")]
- public ICollection? Stats { get; set; }
+ [JsonInclude, JsonPropertyName("version")]
+ public bool? Version { get; set; }
}
///
@@ -962,12 +965,10 @@ public SubmitAsyncSearchRequestDescriptor()
internal override string OperationName => "async_search.submit";
- public SubmitAsyncSearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes);
- public SubmitAsyncSearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes);
public SubmitAsyncSearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
public SubmitAsyncSearchRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) => Qs("allow_partial_search_results", allowPartialSearchResults);
- public SubmitAsyncSearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard);
public SubmitAsyncSearchRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer);
+ public SubmitAsyncSearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard);
public SubmitAsyncSearchRequestDescriptor BatchedReduceSize(long? batchedReduceSize) => Qs("batched_reduce_size", batchedReduceSize);
public SubmitAsyncSearchRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips);
public SubmitAsyncSearchRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator);
@@ -980,14 +981,16 @@ public SubmitAsyncSearchRequestDescriptor()
public SubmitAsyncSearchRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient);
public SubmitAsyncSearchRequestDescriptor MaxConcurrentShardRequests(long? maxConcurrentShardRequests) => Qs("max_concurrent_shard_requests", maxConcurrentShardRequests);
public SubmitAsyncSearchRequestDescriptor MinCompatibleShardNode(string? minCompatibleShardNode) => Qs("min_compatible_shard_node", minCompatibleShardNode);
- public SubmitAsyncSearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize);
public SubmitAsyncSearchRequestDescriptor Preference(string? preference) => Qs("preference", preference);
- public SubmitAsyncSearchRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q);
+ public SubmitAsyncSearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize);
+ public SubmitAsyncSearchRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax);
public SubmitAsyncSearchRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache);
public SubmitAsyncSearchRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt);
public SubmitAsyncSearchRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing);
public SubmitAsyncSearchRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Serverless.Duration? scroll) => Qs("scroll", scroll);
public SubmitAsyncSearchRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType);
+ public SubmitAsyncSearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes);
+ public SubmitAsyncSearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes);
public SubmitAsyncSearchRequestDescriptor SuggestField(Elastic.Clients.Elasticsearch.Serverless.Field? suggestField) => Qs("suggest_field", suggestField);
public SubmitAsyncSearchRequestDescriptor SuggestMode(Elastic.Clients.Elasticsearch.Serverless.SuggestMode? suggestMode) => Qs("suggest_mode", suggestMode);
public SubmitAsyncSearchRequestDescriptor SuggestSize(long? suggestSize) => Qs("suggest_size", suggestSize);
@@ -1011,20 +1014,29 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Ela
private QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; }
private Action> DocvalueFieldsDescriptorAction { get; set; }
private Action>[] DocvalueFieldsDescriptorActions { get; set; }
+ private bool? ExplainValue { get; set; }
+ private IDictionary? ExtValue { get; set; }
private ICollection? FieldsValue { get; set; }
private QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; }
private Action> FieldsDescriptorAction { get; set; }
private Action>[] FieldsDescriptorActions { get; set; }
+ private int? FromValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; }
private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; }
private Action> HighlightDescriptorAction { get; set; }
+ private ICollection>? IndicesBoostValue { get; set; }
private ICollection? KnnValue { get; set; }
private KnnQueryDescriptor KnnDescriptor { get; set; }
private Action> KnnDescriptorAction { get; set; }
private Action>[] KnnDescriptorActions { get; set; }
+ private double? MinScoreValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; }
+ private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; }
+ private Action PitDescriptorAction { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? PostFilterValue { get; set; }
private QueryDsl.QueryDescriptor PostFilterDescriptor { get; set; }
private Action> PostFilterDescriptorAction { get; set; }
+ private bool? ProfileValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; }
private QueryDsl.QueryDescriptor QueryDescriptor { get; set; }
private Action> QueryDescriptorAction { get; set; }
@@ -1032,6 +1044,11 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Ela
private Core.Search.RescoreDescriptor RescoreDescriptor { get; set; }
private Action> RescoreDescriptorAction { get; set; }
private Action>[] RescoreDescriptorActions { get; set; }
+ private IDictionary? RuntimeMappingsValue { get; set; }
+ private IDictionary? ScriptFieldsValue { get; set; }
+ private ICollection? SearchAfterValue { get; set; }
+ private bool? SeqNoPrimaryTermValue { get; set; }
+ private int? SizeValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; }
private SlicedScrollDescriptor SliceDescriptor { get; set; }
private Action> SliceDescriptorAction { get; set; }
@@ -1040,20 +1057,6 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Ela
private Action> SortDescriptorAction { get; set; }
private Action>[] SortDescriptorActions { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; }
- private bool? ExplainValue { get; set; }
- private IDictionary? ExtValue { get; set; }
- private int? FromValue { get; set; }
- private ICollection>? IndicesBoostValue { get; set; }
- private double? MinScoreValue { get; set; }
- private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; }
- private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; }
- private Action PitDescriptorAction { get; set; }
- private bool? ProfileValue { get; set; }
- private IDictionary? RuntimeMappingsValue { get; set; }
- private IDictionary? ScriptFieldsValue { get; set; }
- private ICollection? SearchAfterValue { get; set; }
- private bool? SeqNoPrimaryTermValue { get; set; }
- private int? SizeValue { get; set; }
private ICollection? StatsValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? SuggestValue { get; set; }
@@ -1152,6 +1155,24 @@ public SubmitAsyncSearchRequestDescriptor DocvalueFields(params Actio
return Self;
}
+ ///
+ /// If true, returns detailed information about score computation as part of a hit.
+ ///
+ public SubmitAsyncSearchRequestDescriptor Explain(bool? explain = true)
+ {
+ ExplainValue = explain;
+ return Self;
+ }
+
+ ///
+ /// Configuration of search extensions defined by Elasticsearch plugins.
+ ///
+ public SubmitAsyncSearchRequestDescriptor Ext(Func, FluentDictionary> selector)
+ {
+ ExtValue = selector?.Invoke(new FluentDictionary());
+ return Self;
+ }
+
///
/// Array of wildcard (*) patterns. The request returns values for field names
matching these patterns in the hits.fields property of the response.
///
@@ -1191,6 +1212,15 @@ public SubmitAsyncSearchRequestDescriptor Fields(params Action
+ /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
+ ///
+ public SubmitAsyncSearchRequestDescriptor From(int? from)
+ {
+ FromValue = from;
+ return Self;
+ }
+
public SubmitAsyncSearchRequestDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight)
{
HighlightDescriptor = null;
@@ -1215,6 +1245,15 @@ public SubmitAsyncSearchRequestDescriptor Highlight(Action
+ /// Boosts the _score of documents from specified indices.
+ ///
+ public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost)
+ {
+ IndicesBoostValue = indicesBoost;
+ return Self;
+ }
+
///
/// Defines the approximate kNN search to run.
///
@@ -1254,6 +1293,42 @@ public SubmitAsyncSearchRequestDescriptor Knn(params Action
+ /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
+ ///
+ public SubmitAsyncSearchRequestDescriptor MinScore(double? minScore)
+ {
+ MinScoreValue = minScore;
+ return Self;
+ }
+
+ ///
+ /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
+ ///
+ public SubmitAsyncSearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit)
+ {
+ PitDescriptor = null;
+ PitDescriptorAction = null;
+ PitValue = pit;
+ return Self;
+ }
+
+ public SubmitAsyncSearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor)
+ {
+ PitValue = null;
+ PitDescriptorAction = null;
+ PitDescriptor = descriptor;
+ return Self;
+ }
+
+ public SubmitAsyncSearchRequestDescriptor Pit(Action configure)
+ {
+ PitValue = null;
+ PitDescriptor = null;
+ PitDescriptorAction = configure;
+ return Self;
+ }
+
public SubmitAsyncSearchRequestDescriptor PostFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? postFilter)
{
PostFilterDescriptor = null;
@@ -1278,6 +1353,12 @@ public SubmitAsyncSearchRequestDescriptor PostFilter(Action Profile(bool? profile = true)
+ {
+ ProfileValue = profile;
+ return Self;
+ }
+
///
/// Defines the search definition using the Query DSL.
///
@@ -1341,6 +1422,48 @@ public SubmitAsyncSearchRequestDescriptor Rescore(params Action
+ /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
+ ///
+ public SubmitAsyncSearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector)
+ {
+ RuntimeMappingsValue = selector?.Invoke(new FluentDictionary());
+ return Self;
+ }
+
+ ///
+ /// Retrieve a script evaluation (based on different fields) for each hit.
+ ///
+ public SubmitAsyncSearchRequestDescriptor ScriptFields(Func, FluentDictionary> selector)
+ {
+ ScriptFieldsValue = selector?.Invoke(new FluentDictionary());
+ return Self;
+ }
+
+ public SubmitAsyncSearchRequestDescriptor SearchAfter(ICollection? searchAfter)
+ {
+ SearchAfterValue = searchAfter;
+ return Self;
+ }
+
+ ///
+ /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
+ ///
+ public SubmitAsyncSearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true)
+ {
+ SeqNoPrimaryTermValue = seqNoPrimaryTerm;
+ return Self;
+ }
+
+ ///
+ /// The number of hits to return. By default, you cannot page through more
than 10,000 hits using the from and size parameters. To page through more
hits, use the search_after parameter.
+ ///
+ public SubmitAsyncSearchRequestDescriptor Size(int? size)
+ {
+ SizeValue = size;
+ return Self;
+ }
+
public SubmitAsyncSearchRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? slice)
{
SliceDescriptor = null;
@@ -1410,126 +1533,6 @@ public SubmitAsyncSearchRequestDescriptor Source(Elastic.Clients.Elas
return Self;
}
- ///
- /// If true, returns detailed information about score computation as part of a hit.
- ///
- public SubmitAsyncSearchRequestDescriptor Explain(bool? explain = true)
- {
- ExplainValue = explain;
- return Self;
- }
-
- ///
- /// Configuration of search extensions defined by Elasticsearch plugins.
- ///
- public SubmitAsyncSearchRequestDescriptor Ext(Func, FluentDictionary> selector)
- {
- ExtValue = selector?.Invoke(new FluentDictionary());
- return Self;
- }
-
- ///
- /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
- ///
- public SubmitAsyncSearchRequestDescriptor From(int? from)
- {
- FromValue = from;
- return Self;
- }
-
- ///
- /// Boosts the _score of documents from specified indices.
- ///
- public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost)
- {
- IndicesBoostValue = indicesBoost;
- return Self;
- }
-
- ///
- /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
- ///
- public SubmitAsyncSearchRequestDescriptor MinScore(double? minScore)
- {
- MinScoreValue = minScore;
- return Self;
- }
-
- ///
- /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
- ///
- public SubmitAsyncSearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit)
- {
- PitDescriptor = null;
- PitDescriptorAction = null;
- PitValue = pit;
- return Self;
- }
-
- public SubmitAsyncSearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor)
- {
- PitValue = null;
- PitDescriptorAction = null;
- PitDescriptor = descriptor;
- return Self;
- }
-
- public SubmitAsyncSearchRequestDescriptor Pit(Action configure)
- {
- PitValue = null;
- PitDescriptor = null;
- PitDescriptorAction = configure;
- return Self;
- }
-
- public SubmitAsyncSearchRequestDescriptor Profile(bool? profile = true)
- {
- ProfileValue = profile;
- return Self;
- }
-
- ///
- /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
- ///
- public SubmitAsyncSearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector)
- {
- RuntimeMappingsValue = selector?.Invoke(new FluentDictionary());
- return Self;
- }
-
- ///
- /// Retrieve a script evaluation (based on different fields) for each hit.
- ///
- public SubmitAsyncSearchRequestDescriptor ScriptFields(Func, FluentDictionary> selector)
- {
- ScriptFieldsValue = selector?.Invoke(new FluentDictionary());
- return Self;
- }
-
- public SubmitAsyncSearchRequestDescriptor SearchAfter(ICollection? searchAfter)
- {
- SearchAfterValue = searchAfter;
- return Self;
- }
-
- ///
- /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
- ///
- public SubmitAsyncSearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true)
- {
- SeqNoPrimaryTermValue = seqNoPrimaryTerm;
- return Self;
- }
-
- ///
- /// The number of hits to return. By default, you cannot page through more
than 10,000 hits using the from and size parameters. To page through more
hits, use the search_after parameter.
- ///
- public SubmitAsyncSearchRequestDescriptor Size(int? size)
- {
- SizeValue = size;
- return Self;
- }
-
///
/// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
///
@@ -1683,6 +1686,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, DocvalueFieldsValue, options);
}
+ if (ExplainValue.HasValue)
+ {
+ writer.WritePropertyName("explain");
+ writer.WriteBooleanValue(ExplainValue.Value);
+ }
+
+ if (ExtValue is not null)
+ {
+ writer.WritePropertyName("ext");
+ JsonSerializer.Serialize(writer, ExtValue, options);
+ }
+
if (FieldsDescriptor is not null)
{
writer.WritePropertyName("fields");
@@ -1714,6 +1729,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, FieldsValue, options);
}
+ if (FromValue.HasValue)
+ {
+ writer.WritePropertyName("from");
+ writer.WriteNumberValue(FromValue.Value);
+ }
+
if (HighlightDescriptor is not null)
{
writer.WritePropertyName("highlight");
@@ -1730,6 +1751,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, HighlightValue, options);
}
+ if (IndicesBoostValue is not null)
+ {
+ writer.WritePropertyName("indices_boost");
+ JsonSerializer.Serialize(writer, IndicesBoostValue, options);
+ }
+
if (KnnDescriptor is not null)
{
writer.WritePropertyName("knn");
@@ -1759,6 +1786,28 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
SingleOrManySerializationHelper.Serialize(KnnValue, writer, options);
}
+ if (MinScoreValue.HasValue)
+ {
+ writer.WritePropertyName("min_score");
+ writer.WriteNumberValue(MinScoreValue.Value);
+ }
+
+ if (PitDescriptor is not null)
+ {
+ writer.WritePropertyName("pit");
+ JsonSerializer.Serialize(writer, PitDescriptor, options);
+ }
+ else if (PitDescriptorAction is not null)
+ {
+ writer.WritePropertyName("pit");
+ JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options);
+ }
+ else if (PitValue is not null)
+ {
+ writer.WritePropertyName("pit");
+ JsonSerializer.Serialize(writer, PitValue, options);
+ }
+
if (PostFilterDescriptor is not null)
{
writer.WritePropertyName("post_filter");
@@ -1775,6 +1824,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, PostFilterValue, options);
}
+ if (ProfileValue.HasValue)
+ {
+ writer.WritePropertyName("profile");
+ writer.WriteBooleanValue(ProfileValue.Value);
+ }
+
if (QueryDescriptor is not null)
{
writer.WritePropertyName("query");
@@ -1820,6 +1875,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
SingleOrManySerializationHelper.Serialize(RescoreValue, writer, options);
}
+ if (RuntimeMappingsValue is not null)
+ {
+ writer.WritePropertyName("runtime_mappings");
+ JsonSerializer.Serialize(writer, RuntimeMappingsValue, options);
+ }
+
+ if (ScriptFieldsValue is not null)
+ {
+ writer.WritePropertyName("script_fields");
+ JsonSerializer.Serialize(writer, ScriptFieldsValue, options);
+ }
+
+ if (SearchAfterValue is not null)
+ {
+ writer.WritePropertyName("search_after");
+ JsonSerializer.Serialize(writer, SearchAfterValue, options);
+ }
+
+ if (SeqNoPrimaryTermValue.HasValue)
+ {
+ writer.WritePropertyName("seq_no_primary_term");
+ writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value);
+ }
+
+ if (SizeValue.HasValue)
+ {
+ writer.WritePropertyName("size");
+ writer.WriteNumberValue(SizeValue.Value);
+ }
+
if (SliceDescriptor is not null)
{
writer.WritePropertyName("slice");
@@ -1871,98 +1956,16 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, SourceValue, options);
}
- if (ExplainValue.HasValue)
+ if (StatsValue is not null)
{
- writer.WritePropertyName("explain");
- writer.WriteBooleanValue(ExplainValue.Value);
+ writer.WritePropertyName("stats");
+ JsonSerializer.Serialize(writer, StatsValue, options);
}
- if (ExtValue is not null)
+ if (StoredFieldsValue is not null)
{
- writer.WritePropertyName("ext");
- JsonSerializer.Serialize(writer, ExtValue, options);
- }
-
- if (FromValue.HasValue)
- {
- writer.WritePropertyName("from");
- writer.WriteNumberValue(FromValue.Value);
- }
-
- if (IndicesBoostValue is not null)
- {
- writer.WritePropertyName("indices_boost");
- JsonSerializer.Serialize(writer, IndicesBoostValue, options);
- }
-
- if (MinScoreValue.HasValue)
- {
- writer.WritePropertyName("min_score");
- writer.WriteNumberValue(MinScoreValue.Value);
- }
-
- if (PitDescriptor is not null)
- {
- writer.WritePropertyName("pit");
- JsonSerializer.Serialize(writer, PitDescriptor, options);
- }
- else if (PitDescriptorAction is not null)
- {
- writer.WritePropertyName("pit");
- JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options);
- }
- else if (PitValue is not null)
- {
- writer.WritePropertyName("pit");
- JsonSerializer.Serialize(writer, PitValue, options);
- }
-
- if (ProfileValue.HasValue)
- {
- writer.WritePropertyName("profile");
- writer.WriteBooleanValue(ProfileValue.Value);
- }
-
- if (RuntimeMappingsValue is not null)
- {
- writer.WritePropertyName("runtime_mappings");
- JsonSerializer.Serialize(writer, RuntimeMappingsValue, options);
- }
-
- if (ScriptFieldsValue is not null)
- {
- writer.WritePropertyName("script_fields");
- JsonSerializer.Serialize(writer, ScriptFieldsValue, options);
- }
-
- if (SearchAfterValue is not null)
- {
- writer.WritePropertyName("search_after");
- JsonSerializer.Serialize(writer, SearchAfterValue, options);
- }
-
- if (SeqNoPrimaryTermValue.HasValue)
- {
- writer.WritePropertyName("seq_no_primary_term");
- writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value);
- }
-
- if (SizeValue.HasValue)
- {
- writer.WritePropertyName("size");
- writer.WriteNumberValue(SizeValue.Value);
- }
-
- if (StatsValue is not null)
- {
- writer.WritePropertyName("stats");
- JsonSerializer.Serialize(writer, StatsValue, options);
- }
-
- if (StoredFieldsValue is not null)
- {
- writer.WritePropertyName("stored_fields");
- JsonSerializer.Serialize(writer, StoredFieldsValue, options);
+ writer.WritePropertyName("stored_fields");
+ JsonSerializer.Serialize(writer, StoredFieldsValue, options);
}
if (SuggestDescriptor is not null)
@@ -2034,12 +2037,10 @@ public SubmitAsyncSearchRequestDescriptor()
internal override string OperationName => "async_search.submit";
- public SubmitAsyncSearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes);
- public SubmitAsyncSearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes);
public SubmitAsyncSearchRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
public SubmitAsyncSearchRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) => Qs("allow_partial_search_results", allowPartialSearchResults);
- public SubmitAsyncSearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard);
public SubmitAsyncSearchRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer);
+ public SubmitAsyncSearchRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard);
public SubmitAsyncSearchRequestDescriptor BatchedReduceSize(long? batchedReduceSize) => Qs("batched_reduce_size", batchedReduceSize);
public SubmitAsyncSearchRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips);
public SubmitAsyncSearchRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator);
@@ -2052,14 +2053,16 @@ public SubmitAsyncSearchRequestDescriptor()
public SubmitAsyncSearchRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient);
public SubmitAsyncSearchRequestDescriptor MaxConcurrentShardRequests(long? maxConcurrentShardRequests) => Qs("max_concurrent_shard_requests", maxConcurrentShardRequests);
public SubmitAsyncSearchRequestDescriptor MinCompatibleShardNode(string? minCompatibleShardNode) => Qs("min_compatible_shard_node", minCompatibleShardNode);
- public SubmitAsyncSearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize);
public SubmitAsyncSearchRequestDescriptor Preference(string? preference) => Qs("preference", preference);
- public SubmitAsyncSearchRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q);
+ public SubmitAsyncSearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize);
+ public SubmitAsyncSearchRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax);
public SubmitAsyncSearchRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache);
public SubmitAsyncSearchRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt);
public SubmitAsyncSearchRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing);
public SubmitAsyncSearchRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Serverless.Duration? scroll) => Qs("scroll", scroll);
public SubmitAsyncSearchRequestDescriptor SearchType(Elastic.Clients.Elasticsearch.Serverless.SearchType? searchType) => Qs("search_type", searchType);
+ public SubmitAsyncSearchRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes);
+ public SubmitAsyncSearchRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes);
public SubmitAsyncSearchRequestDescriptor SuggestField(Elastic.Clients.Elasticsearch.Serverless.Field? suggestField) => Qs("suggest_field", suggestField);
public SubmitAsyncSearchRequestDescriptor SuggestMode(Elastic.Clients.Elasticsearch.Serverless.SuggestMode? suggestMode) => Qs("suggest_mode", suggestMode);
public SubmitAsyncSearchRequestDescriptor SuggestSize(long? suggestSize) => Qs("suggest_size", suggestSize);
@@ -2083,20 +2086,29 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.
private QueryDsl.FieldAndFormatDescriptor DocvalueFieldsDescriptor { get; set; }
private Action DocvalueFieldsDescriptorAction { get; set; }
private Action[] DocvalueFieldsDescriptorActions { get; set; }
+ private bool? ExplainValue { get; set; }
+ private IDictionary? ExtValue { get; set; }
private ICollection? FieldsValue { get; set; }
private QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; }
private Action FieldsDescriptorAction { get; set; }
private Action[] FieldsDescriptorActions { get; set; }
+ private int? FromValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? HighlightValue { get; set; }
private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; }
private Action HighlightDescriptorAction { get; set; }
+ private ICollection>? IndicesBoostValue { get; set; }
private ICollection? KnnValue { get; set; }
private KnnQueryDescriptor KnnDescriptor { get; set; }
private Action KnnDescriptorAction { get; set; }
private Action[] KnnDescriptorActions { get; set; }
+ private double? MinScoreValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; }
+ private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; }
+ private Action PitDescriptorAction { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? PostFilterValue { get; set; }
private QueryDsl.QueryDescriptor PostFilterDescriptor { get; set; }
private Action PostFilterDescriptorAction { get; set; }
+ private bool? ProfileValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; }
private QueryDsl.QueryDescriptor QueryDescriptor { get; set; }
private Action QueryDescriptorAction { get; set; }
@@ -2104,6 +2116,11 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.
private Core.Search.RescoreDescriptor RescoreDescriptor { get; set; }
private Action RescoreDescriptorAction { get; set; }
private Action[] RescoreDescriptorActions { get; set; }
+ private IDictionary? RuntimeMappingsValue { get; set; }
+ private IDictionary? ScriptFieldsValue { get; set; }
+ private ICollection? SearchAfterValue { get; set; }
+ private bool? SeqNoPrimaryTermValue { get; set; }
+ private int? SizeValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; }
private SlicedScrollDescriptor SliceDescriptor { get; set; }
private Action SliceDescriptorAction { get; set; }
@@ -2112,20 +2129,6 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.
private Action SortDescriptorAction { get; set; }
private Action[] SortDescriptorActions { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfig? SourceValue { get; set; }
- private bool? ExplainValue { get; set; }
- private IDictionary? ExtValue { get; set; }
- private int? FromValue { get; set; }
- private ICollection>? IndicesBoostValue { get; set; }
- private double? MinScoreValue { get; set; }
- private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; }
- private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; }
- private Action PitDescriptorAction { get; set; }
- private bool? ProfileValue { get; set; }
- private IDictionary? RuntimeMappingsValue { get; set; }
- private IDictionary? ScriptFieldsValue { get; set; }
- private ICollection? SearchAfterValue { get; set; }
- private bool? SeqNoPrimaryTermValue { get; set; }
- private int? SizeValue { get; set; }
private ICollection? StatsValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFieldsValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? SuggestValue { get; set; }
@@ -2224,6 +2227,24 @@ public SubmitAsyncSearchRequestDescriptor DocvalueFields(params Action
+ /// If true, returns detailed information about score computation as part of a hit.
+ ///
+ public SubmitAsyncSearchRequestDescriptor Explain(bool? explain = true)
+ {
+ ExplainValue = explain;
+ return Self;
+ }
+
+ ///
+ /// Configuration of search extensions defined by Elasticsearch plugins.
+ ///
+ public SubmitAsyncSearchRequestDescriptor Ext(Func, FluentDictionary> selector)
+ {
+ ExtValue = selector?.Invoke(new FluentDictionary());
+ return Self;
+ }
+
///
/// Array of wildcard (*) patterns. The request returns values for field names
matching these patterns in the hits.fields property of the response.
///
@@ -2263,6 +2284,15 @@ public SubmitAsyncSearchRequestDescriptor Fields(params Action
+ /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
+ ///
+ public SubmitAsyncSearchRequestDescriptor From(int? from)
+ {
+ FromValue = from;
+ return Self;
+ }
+
public SubmitAsyncSearchRequestDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Highlight? highlight)
{
HighlightDescriptor = null;
@@ -2287,6 +2317,15 @@ public SubmitAsyncSearchRequestDescriptor Highlight(Action
+ /// Boosts the _score of documents from specified indices.
+ ///
+ public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost)
+ {
+ IndicesBoostValue = indicesBoost;
+ return Self;
+ }
+
///
/// Defines the approximate kNN search to run.
///
@@ -2326,6 +2365,42 @@ public SubmitAsyncSearchRequestDescriptor Knn(params Action[
return Self;
}
+ ///
+ /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
+ ///
+ public SubmitAsyncSearchRequestDescriptor MinScore(double? minScore)
+ {
+ MinScoreValue = minScore;
+ return Self;
+ }
+
+ ///
+ /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
+ ///
+ public SubmitAsyncSearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit)
+ {
+ PitDescriptor = null;
+ PitDescriptorAction = null;
+ PitValue = pit;
+ return Self;
+ }
+
+ public SubmitAsyncSearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor)
+ {
+ PitValue = null;
+ PitDescriptorAction = null;
+ PitDescriptor = descriptor;
+ return Self;
+ }
+
+ public SubmitAsyncSearchRequestDescriptor Pit(Action configure)
+ {
+ PitValue = null;
+ PitDescriptor = null;
+ PitDescriptorAction = configure;
+ return Self;
+ }
+
public SubmitAsyncSearchRequestDescriptor PostFilter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? postFilter)
{
PostFilterDescriptor = null;
@@ -2350,6 +2425,12 @@ public SubmitAsyncSearchRequestDescriptor PostFilter(Action
/// Defines the search definition using the Query DSL.
///
@@ -2413,6 +2494,48 @@ public SubmitAsyncSearchRequestDescriptor Rescore(params Action
+ /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
+ ///
+ public SubmitAsyncSearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector)
+ {
+ RuntimeMappingsValue = selector?.Invoke(new FluentDictionary());
+ return Self;
+ }
+
+ ///
+ /// Retrieve a script evaluation (based on different fields) for each hit.
+ ///
+ public SubmitAsyncSearchRequestDescriptor ScriptFields(Func, FluentDictionary> selector)
+ {
+ ScriptFieldsValue = selector?.Invoke(new FluentDictionary());
+ return Self;
+ }
+
+ public SubmitAsyncSearchRequestDescriptor SearchAfter(ICollection? searchAfter)
+ {
+ SearchAfterValue = searchAfter;
+ return Self;
+ }
+
+ ///
+ /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
+ ///
+ public SubmitAsyncSearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true)
+ {
+ SeqNoPrimaryTermValue = seqNoPrimaryTerm;
+ return Self;
+ }
+
+ ///
+ /// The number of hits to return. By default, you cannot page through more
than 10,000 hits using the from and size parameters. To page through more
hits, use the search_after parameter.
+ ///
+ public SubmitAsyncSearchRequestDescriptor Size(int? size)
+ {
+ SizeValue = size;
+ return Self;
+ }
+
public SubmitAsyncSearchRequestDescriptor Slice(Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? slice)
{
SliceDescriptor = null;
@@ -2483,144 +2606,24 @@ public SubmitAsyncSearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.S
}
///
- /// If true, returns detailed information about score computation as part of a hit.
+ /// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
///
- public SubmitAsyncSearchRequestDescriptor Explain(bool? explain = true)
+ public SubmitAsyncSearchRequestDescriptor Stats(ICollection? stats)
{
- ExplainValue = explain;
+ StatsValue = stats;
return Self;
}
///
- /// Configuration of search extensions defined by Elasticsearch plugins.
+ /// 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. You can pass _source: true to return both source fields
and stored fields in the search response.
///
- public SubmitAsyncSearchRequestDescriptor Ext(Func, FluentDictionary> selector)
+ public SubmitAsyncSearchRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields)
{
- ExtValue = selector?.Invoke(new FluentDictionary());
+ StoredFieldsValue = storedFields;
return Self;
}
- ///
- /// Starting document offset. By default, you cannot page through more than 10,000
hits using the from and size parameters. To page through more hits, use the
search_after parameter.
- ///
- public SubmitAsyncSearchRequestDescriptor From(int? from)
- {
- FromValue = from;
- return Self;
- }
-
- ///
- /// Boosts the _score of documents from specified indices.
- ///
- public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost)
- {
- IndicesBoostValue = indicesBoost;
- return Self;
- }
-
- ///
- /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
- ///
- public SubmitAsyncSearchRequestDescriptor MinScore(double? minScore)
- {
- MinScoreValue = minScore;
- return Self;
- }
-
- ///
- /// Limits the search to a point in time (PIT). If you provide a PIT, you
cannot specify an in the request path.
- ///
- public SubmitAsyncSearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? pit)
- {
- PitDescriptor = null;
- PitDescriptorAction = null;
- PitValue = pit;
- return Self;
- }
-
- public SubmitAsyncSearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor)
- {
- PitValue = null;
- PitDescriptorAction = null;
- PitDescriptor = descriptor;
- return Self;
- }
-
- public SubmitAsyncSearchRequestDescriptor Pit(Action configure)
- {
- PitValue = null;
- PitDescriptor = null;
- PitDescriptorAction = configure;
- return Self;
- }
-
- public SubmitAsyncSearchRequestDescriptor Profile(bool? profile = true)
- {
- ProfileValue = profile;
- return Self;
- }
-
- ///
- /// Defines one or more runtime fields in the search request. These fields take
precedence over mapped fields with the same name.
- ///
- public SubmitAsyncSearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector)
- {
- RuntimeMappingsValue = selector?.Invoke(new FluentDictionary());
- return Self;
- }
-
- ///
- /// Retrieve a script evaluation (based on different fields) for each hit.
- ///
- public SubmitAsyncSearchRequestDescriptor ScriptFields(Func, FluentDictionary> selector)
- {
- ScriptFieldsValue = selector?.Invoke(new FluentDictionary());
- return Self;
- }
-
- public SubmitAsyncSearchRequestDescriptor SearchAfter(ICollection? searchAfter)
- {
- SearchAfterValue = searchAfter;
- return Self;
- }
-
- ///
- /// If true, returns sequence number and primary term of the last modification
of each hit. See Optimistic concurrency control.
- ///
- public SubmitAsyncSearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true)
- {
- SeqNoPrimaryTermValue = seqNoPrimaryTerm;
- return Self;
- }
-
- ///
- /// The number of hits to return. By default, you cannot page through more
than 10,000 hits using the from and size parameters. To page through more
hits, use the search_after parameter.
- ///
- public SubmitAsyncSearchRequestDescriptor Size(int? size)
- {
- SizeValue = size;
- return Self;
- }
-
- ///
- /// Stats groups to associate with the search. Each group maintains a statistics
aggregation for its associated searches. You can retrieve these stats using
the indices stats API.
- ///
- public SubmitAsyncSearchRequestDescriptor Stats(ICollection? stats)
- {
- StatsValue = stats;
- return Self;
- }
-
- ///
- /// 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. You can pass _source: true to return both source fields
and stored fields in the search response.
- ///
- public SubmitAsyncSearchRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Serverless.Fields? storedFields)
- {
- StoredFieldsValue = storedFields;
- return Self;
- }
-
- public SubmitAsyncSearchRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? suggest)
+ public SubmitAsyncSearchRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? suggest)
{
SuggestDescriptor = null;
SuggestDescriptorAction = null;
@@ -2755,6 +2758,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, DocvalueFieldsValue, options);
}
+ if (ExplainValue.HasValue)
+ {
+ writer.WritePropertyName("explain");
+ writer.WriteBooleanValue(ExplainValue.Value);
+ }
+
+ if (ExtValue is not null)
+ {
+ writer.WritePropertyName("ext");
+ JsonSerializer.Serialize(writer, ExtValue, options);
+ }
+
if (FieldsDescriptor is not null)
{
writer.WritePropertyName("fields");
@@ -2786,6 +2801,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, FieldsValue, options);
}
+ if (FromValue.HasValue)
+ {
+ writer.WritePropertyName("from");
+ writer.WriteNumberValue(FromValue.Value);
+ }
+
if (HighlightDescriptor is not null)
{
writer.WritePropertyName("highlight");
@@ -2802,6 +2823,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, HighlightValue, options);
}
+ if (IndicesBoostValue is not null)
+ {
+ writer.WritePropertyName("indices_boost");
+ JsonSerializer.Serialize(writer, IndicesBoostValue, options);
+ }
+
if (KnnDescriptor is not null)
{
writer.WritePropertyName("knn");
@@ -2831,6 +2858,28 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
SingleOrManySerializationHelper.Serialize(KnnValue, writer, options);
}
+ if (MinScoreValue.HasValue)
+ {
+ writer.WritePropertyName("min_score");
+ writer.WriteNumberValue(MinScoreValue.Value);
+ }
+
+ if (PitDescriptor is not null)
+ {
+ writer.WritePropertyName("pit");
+ JsonSerializer.Serialize(writer, PitDescriptor, options);
+ }
+ else if (PitDescriptorAction is not null)
+ {
+ writer.WritePropertyName("pit");
+ JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options);
+ }
+ else if (PitValue is not null)
+ {
+ writer.WritePropertyName("pit");
+ JsonSerializer.Serialize(writer, PitValue, options);
+ }
+
if (PostFilterDescriptor is not null)
{
writer.WritePropertyName("post_filter");
@@ -2847,6 +2896,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, PostFilterValue, options);
}
+ if (ProfileValue.HasValue)
+ {
+ writer.WritePropertyName("profile");
+ writer.WriteBooleanValue(ProfileValue.Value);
+ }
+
if (QueryDescriptor is not null)
{
writer.WritePropertyName("query");
@@ -2892,6 +2947,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
SingleOrManySerializationHelper.Serialize(RescoreValue, writer, options);
}
+ if (RuntimeMappingsValue is not null)
+ {
+ writer.WritePropertyName("runtime_mappings");
+ JsonSerializer.Serialize(writer, RuntimeMappingsValue, options);
+ }
+
+ if (ScriptFieldsValue is not null)
+ {
+ writer.WritePropertyName("script_fields");
+ JsonSerializer.Serialize(writer, ScriptFieldsValue, options);
+ }
+
+ if (SearchAfterValue is not null)
+ {
+ writer.WritePropertyName("search_after");
+ JsonSerializer.Serialize(writer, SearchAfterValue, options);
+ }
+
+ if (SeqNoPrimaryTermValue.HasValue)
+ {
+ writer.WritePropertyName("seq_no_primary_term");
+ writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value);
+ }
+
+ if (SizeValue.HasValue)
+ {
+ writer.WritePropertyName("size");
+ writer.WriteNumberValue(SizeValue.Value);
+ }
+
if (SliceDescriptor is not null)
{
writer.WritePropertyName("slice");
@@ -2943,88 +3028,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, SourceValue, options);
}
- if (ExplainValue.HasValue)
- {
- writer.WritePropertyName("explain");
- writer.WriteBooleanValue(ExplainValue.Value);
- }
-
- if (ExtValue is not null)
- {
- writer.WritePropertyName("ext");
- JsonSerializer.Serialize(writer, ExtValue, options);
- }
-
- if (FromValue.HasValue)
- {
- writer.WritePropertyName("from");
- writer.WriteNumberValue(FromValue.Value);
- }
-
- if (IndicesBoostValue is not null)
- {
- writer.WritePropertyName("indices_boost");
- JsonSerializer.Serialize(writer, IndicesBoostValue, options);
- }
-
- if (MinScoreValue.HasValue)
- {
- writer.WritePropertyName("min_score");
- writer.WriteNumberValue(MinScoreValue.Value);
- }
-
- if (PitDescriptor is not null)
- {
- writer.WritePropertyName("pit");
- JsonSerializer.Serialize(writer, PitDescriptor, options);
- }
- else if (PitDescriptorAction is not null)
- {
- writer.WritePropertyName("pit");
- JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options);
- }
- else if (PitValue is not null)
- {
- writer.WritePropertyName("pit");
- JsonSerializer.Serialize(writer, PitValue, options);
- }
-
- if (ProfileValue.HasValue)
- {
- writer.WritePropertyName("profile");
- writer.WriteBooleanValue(ProfileValue.Value);
- }
-
- if (RuntimeMappingsValue is not null)
- {
- writer.WritePropertyName("runtime_mappings");
- JsonSerializer.Serialize(writer, RuntimeMappingsValue, options);
- }
-
- if (ScriptFieldsValue is not null)
- {
- writer.WritePropertyName("script_fields");
- JsonSerializer.Serialize(writer, ScriptFieldsValue, options);
- }
-
- if (SearchAfterValue is not null)
- {
- writer.WritePropertyName("search_after");
- JsonSerializer.Serialize(writer, SearchAfterValue, options);
- }
-
- if (SeqNoPrimaryTermValue.HasValue)
- {
- writer.WritePropertyName("seq_no_primary_term");
- writer.WriteBooleanValue(SeqNoPrimaryTermValue.Value);
- }
-
- if (SizeValue.HasValue)
- {
- writer.WritePropertyName("size");
- writer.WriteNumberValue(SizeValue.Value);
- }
-
if (StatsValue is not null)
{
writer.WritePropertyName("stats");
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/BulkRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/BulkRequest.g.cs
index d78c9ef5e29..a00356a5f82 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/BulkRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/BulkRequest.g.cs
@@ -41,6 +41,11 @@ public sealed class BulkRequestParameters : RequestParameters
///
public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+ ///
+ /// If `true`, the request’s actions must target an index alias.
+ ///
+ public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); }
+
///
/// Custom value used to route operations to a specific shard.
///
@@ -70,11 +75,6 @@ public sealed class BulkRequestParameters : RequestParameters
/// 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`).
///
public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); }
-
- ///
- /// If `true`, the request’s actions must target an index alias.
- ///
- public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); }
}
///
@@ -110,6 +110,12 @@ public BulkRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) :
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+ ///
+ /// If `true`, the request’s actions must target an index alias.
+ ///
+ [JsonIgnore]
+ public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); }
+
///
/// Custom value used to route operations to a specific shard.
///
@@ -145,12 +151,6 @@ public BulkRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName? index) :
///
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); }
-
- ///
- /// If `true`, the request’s actions must target an index alias.
- ///
- [JsonIgnore]
- public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); }
}
///
@@ -172,13 +172,13 @@ public BulkRequestDescriptor()
internal override string OperationName => "bulk";
- public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source);
- public BulkRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes);
- public BulkRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes);
public BulkRequestDescriptor Pipeline(string? pipeline) => Qs("pipeline", pipeline);
public BulkRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh);
public BulkRequestDescriptor RequireAlias(bool? requireAlias = true) => Qs("require_alias", requireAlias);
public BulkRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing);
+ public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source);
+ public BulkRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes);
+ public BulkRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes);
public BulkRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout);
public BulkRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards);
@@ -212,13 +212,13 @@ public BulkRequestDescriptor()
internal override string OperationName => "bulk";
- public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source);
- public BulkRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes);
- public BulkRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes);
public BulkRequestDescriptor Pipeline(string? pipeline) => Qs("pipeline", pipeline);
public BulkRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh);
public BulkRequestDescriptor RequireAlias(bool? requireAlias = true) => Qs("require_alias", requireAlias);
public BulkRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing);
+ public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.Serverless.Core.Search.SourceConfigParam? source) => Qs("_source", source);
+ public BulkRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes);
+ public BulkRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Serverless.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes);
public BulkRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout);
public BulkRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards);
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/HealthRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/HealthRequest.g.cs
index 066b713ff5d..038ee227a48 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/HealthRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/HealthRequest.g.cs
@@ -201,9 +201,9 @@ public HealthRequestDescriptor()
public HealthRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout);
public HealthRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards);
public HealthRequestDescriptor WaitForEvents(Elastic.Clients.Elasticsearch.Serverless.WaitForEvents? waitForEvents) => Qs("wait_for_events", waitForEvents);
+ public HealthRequestDescriptor WaitForNodes(Union? waitForNodes) => Qs("wait_for_nodes", waitForNodes);
public HealthRequestDescriptor WaitForNoInitializingShards(bool? waitForNoInitializingShards = true) => Qs("wait_for_no_initializing_shards", waitForNoInitializingShards);
public HealthRequestDescriptor WaitForNoRelocatingShards(bool? waitForNoRelocatingShards = true) => Qs("wait_for_no_relocating_shards", waitForNoRelocatingShards);
- public HealthRequestDescriptor WaitForNodes(Union? waitForNodes) => Qs("wait_for_nodes", waitForNodes);
public HealthRequestDescriptor WaitForStatus(Elastic.Clients.Elasticsearch.Serverless.HealthStatus? waitForStatus) => Qs("wait_for_status", waitForStatus);
public HealthRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices)
@@ -243,9 +243,9 @@ public HealthRequestDescriptor()
public HealthRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout);
public HealthRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards);
public HealthRequestDescriptor WaitForEvents(Elastic.Clients.Elasticsearch.Serverless.WaitForEvents? waitForEvents) => Qs("wait_for_events", waitForEvents);
+ public HealthRequestDescriptor WaitForNodes(Union? waitForNodes) => Qs("wait_for_nodes", waitForNodes);
public HealthRequestDescriptor WaitForNoInitializingShards(bool? waitForNoInitializingShards = true) => Qs("wait_for_no_initializing_shards", waitForNoInitializingShards);
public HealthRequestDescriptor WaitForNoRelocatingShards(bool? waitForNoRelocatingShards = true) => Qs("wait_for_no_relocating_shards", waitForNoRelocatingShards);
- public HealthRequestDescriptor WaitForNodes(Union? waitForNodes) => Qs("wait_for_nodes", waitForNodes);
public HealthRequestDescriptor WaitForStatus(Elastic.Clients.Elasticsearch.Serverless.HealthStatus? waitForStatus) => Qs("wait_for_status", waitForStatus);
public HealthRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.Indices? indices)
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CountRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CountRequest.g.cs
index 9f7368a5a2e..a97925dbd35 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CountRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CountRequest.g.cs
@@ -86,6 +86,11 @@ public sealed class CountRequestParameters : RequestParameters
///
public string? Preference { get => Q("preference"); set => Q("preference", value); }
+ ///
+ /// Query in the Lucene query string syntax.
+ ///
+ public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); }
+
///
/// Custom value used to route operations to a specific shard.
///
@@ -95,11 +100,6 @@ public sealed class CountRequestParameters : RequestParameters
/// 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.
///
public long? TerminateAfter { get => Q("terminate_after"); set => Q("terminate_after", value); }
-
- ///
- /// Query in the Lucene query string syntax.
- ///
- public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); }
}
///
@@ -190,22 +190,22 @@ public CountRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) :
public string? Preference { get => Q("preference"); set => Q("preference", value); }
///
- /// Custom value used to route operations to a specific shard.
+ /// Query in the Lucene query string syntax.
///
[JsonIgnore]
- public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); }
+ public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); }
///
- /// 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.
+ /// Custom value used to route operations to a specific shard.
///
[JsonIgnore]
- public long? TerminateAfter { get => Q("terminate_after"); set => Q("terminate_after", value); }
+ public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); }
///
- /// Query in the Lucene query string syntax.
+ /// 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.
///
[JsonIgnore]
- public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); }
+ public long? TerminateAfter { get => Q("terminate_after"); set => Q("terminate_after", value); }
///
/// Defines the search definition using the Query DSL.
@@ -238,8 +238,8 @@ public CountRequestDescriptor(Serverless.Indices? indices) : base(r => r.Optiona
internal override string OperationName => "count";
public CountRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
- public CountRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard);
public CountRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer);
+ public CountRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard);
public CountRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator);
public CountRequestDescriptor Df(string? df) => Qs("df", df);
public CountRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards);
@@ -248,7 +248,7 @@ public CountRequestDescriptor(Serverless.Indices? indices) : base(r => r.Optiona
public CountRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient);
public CountRequestDescriptor MinScore(double? minScore) => Qs("min_score", minScore);
public CountRequestDescriptor Preference(string? preference) => Qs("preference", preference);
- public CountRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q);
+ public CountRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax);
public CountRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing);
public CountRequestDescriptor TerminateAfter(long? terminateAfter) => Qs("terminate_after", terminateAfter);
@@ -336,8 +336,8 @@ public CountRequestDescriptor()
internal override string OperationName => "count";
public CountRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
- public CountRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard);
public CountRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer);
+ public CountRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard);
public CountRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator);
public CountRequestDescriptor Df(string? df) => Qs("df", df);
public CountRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards);
@@ -346,7 +346,7 @@ public CountRequestDescriptor()
public CountRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient);
public CountRequestDescriptor MinScore(double? minScore) => Qs("min_score", minScore);
public CountRequestDescriptor Preference(string? preference) => Qs("preference", preference);
- public CountRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q);
+ public CountRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax);
public CountRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.Routing? routing) => Qs("routing", routing);
public CountRequestDescriptor TerminateAfter(long? terminateAfter) => Qs("terminate_after", terminateAfter);
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryRequest.g.cs
index 01c1a3486b5..fe991951b21 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteByQueryRequest.g.cs
@@ -86,6 +86,11 @@ public sealed class DeleteByQueryRequestParameters : RequestParameters
///
public string? Preference { get => Q("preference"); set => Q("preference", value); }
+ ///
+ /// Query in the Lucene query string syntax.
+ ///
+ public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); }
+
///
/// If `true`, Elasticsearch refreshes all shards involved in the delete by query after the request completes.
///
@@ -106,11 +111,6 @@ public sealed class DeleteByQueryRequestParameters : RequestParameters
///
public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); }
- ///
- /// Query in the Lucene query string syntax.
- ///
- public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); }
-
///
/// Period to retain the search context for scrolling.
///
@@ -255,6 +255,12 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Serverless.Indices ind
[JsonIgnore]
public string? Preference { get => Q("preference"); set => Q("preference", value); }
+ ///
+ /// Query in the Lucene query string syntax.
+ ///
+ [JsonIgnore]
+ public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); }
+
///
/// If `true`, Elasticsearch refreshes all shards involved in the delete by query after the request completes.
///
@@ -279,12 +285,6 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Serverless.Indices ind
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Serverless.Routing? Routing { get => Q("routing"); set => Q("routing", value); }
- ///
- /// Query in the Lucene query string syntax.
- ///
- [JsonIgnore]
- public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); }
-
///
/// Period to retain the search context for scrolling.
///
@@ -400,8 +400,8 @@ internal DeleteByQueryRequestDescriptor()
internal override string OperationName => "delete_by_query";
public DeleteByQueryRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
- public DeleteByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard);
public DeleteByQueryRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer);
+ public DeleteByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard);
public DeleteByQueryRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Serverless.Conflicts? conflicts) => Qs("conflicts", conflicts);
public DeleteByQueryRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator);
public DeleteByQueryRequestDescriptor Df(string? df) => Qs("df", df);
@@ -410,7 +410,7 @@ internal DeleteByQueryRequestDescriptor()
public DeleteByQueryRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable);
public DeleteByQueryRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient);
public DeleteByQueryRequestDescriptor Preference(string? preference) => Qs("preference", preference);
- public DeleteByQueryRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q);
+ public DeleteByQueryRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax);
public DeleteByQueryRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh);
public DeleteByQueryRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache);
public DeleteByQueryRequestDescriptor RequestsPerSecond(float? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond);
@@ -434,13 +434,22 @@ public DeleteByQueryRequestDescriptor Indices(Elastic.Clients.Elastic
return Self;
}
+ private long? MaxDocsValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; }
private QueryDsl.QueryDescriptor QueryDescriptor { get; set; }
private Action> QueryDescriptorAction { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; }
private SlicedScrollDescriptor SliceDescriptor { get; set; }
private Action> SliceDescriptorAction { get; set; }
- private long? MaxDocsValue { get; set; }
+
+ ///
+ /// The maximum number of documents to delete.
+ ///
+ public DeleteByQueryRequestDescriptor MaxDocs(long? maxDocs)
+ {
+ MaxDocsValue = maxDocs;
+ return Self;
+ }
///
/// Specifies the documents to delete using the Query DSL.
@@ -496,18 +505,15 @@ public DeleteByQueryRequestDescriptor Slice(Action
- /// The maximum number of documents to delete.
- ///
- public DeleteByQueryRequestDescriptor MaxDocs(long? maxDocs)
- {
- MaxDocsValue = maxDocs;
- return Self;
- }
-
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
{
writer.WriteStartObject();
+ if (MaxDocsValue.HasValue)
+ {
+ writer.WritePropertyName("max_docs");
+ writer.WriteNumberValue(MaxDocsValue.Value);
+ }
+
if (QueryDescriptor is not null)
{
writer.WritePropertyName("query");
@@ -540,12 +546,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, SliceValue, options);
}
- if (MaxDocsValue.HasValue)
- {
- writer.WritePropertyName("max_docs");
- writer.WriteNumberValue(MaxDocsValue.Value);
- }
-
writer.WriteEndObject();
}
}
@@ -574,8 +574,8 @@ internal DeleteByQueryRequestDescriptor()
internal override string OperationName => "delete_by_query";
public DeleteByQueryRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
- public DeleteByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard);
public DeleteByQueryRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer);
+ public DeleteByQueryRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard);
public DeleteByQueryRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Serverless.Conflicts? conflicts) => Qs("conflicts", conflicts);
public DeleteByQueryRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator);
public DeleteByQueryRequestDescriptor Df(string? df) => Qs("df", df);
@@ -584,7 +584,7 @@ internal DeleteByQueryRequestDescriptor()
public DeleteByQueryRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable);
public DeleteByQueryRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient);
public DeleteByQueryRequestDescriptor Preference(string? preference) => Qs("preference", preference);
- public DeleteByQueryRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q);
+ public DeleteByQueryRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax);
public DeleteByQueryRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh);
public DeleteByQueryRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache);
public DeleteByQueryRequestDescriptor RequestsPerSecond(float? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond);
@@ -608,13 +608,22 @@ public DeleteByQueryRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serv
return Self;
}
+ private long? MaxDocsValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query? QueryValue { get; set; }
private QueryDsl.QueryDescriptor QueryDescriptor { get; set; }
private Action QueryDescriptorAction { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.SlicedScroll? SliceValue { get; set; }
private SlicedScrollDescriptor SliceDescriptor { get; set; }
private Action SliceDescriptorAction { get; set; }
- private long? MaxDocsValue { get; set; }
+
+ ///
+ /// The maximum number of documents to delete.
+ ///
+ public DeleteByQueryRequestDescriptor MaxDocs(long? maxDocs)
+ {
+ MaxDocsValue = maxDocs;
+ return Self;
+ }
///
/// Specifies the documents to delete using the Query DSL.
@@ -670,18 +679,15 @@ public DeleteByQueryRequestDescriptor Slice(Action confi
return Self;
}
- ///
- /// The maximum number of documents to delete.
- ///
- public DeleteByQueryRequestDescriptor MaxDocs(long? maxDocs)
- {
- MaxDocsValue = maxDocs;
- return Self;
- }
-
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
{
writer.WriteStartObject();
+ if (MaxDocsValue.HasValue)
+ {
+ writer.WritePropertyName("max_docs");
+ writer.WriteNumberValue(MaxDocsValue.Value);
+ }
+
if (QueryDescriptor is not null)
{
writer.WritePropertyName("query");
@@ -714,12 +720,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, SliceValue, options);
}
- if (MaxDocsValue.HasValue)
- {
- writer.WritePropertyName("max_docs");
- writer.WriteNumberValue(MaxDocsValue.Value);
- }
-
writer.WriteEndObject();
}
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlSearchRequest.g.cs
index 89eb39e8df3..fb522b3a973 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlSearchRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Eql/EqlSearchRequest.g.cs
@@ -67,12 +67,6 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices
///
[JsonIgnore]
public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); }
-
- ///
- /// EQL query you wish to run.
- ///
- [JsonInclude, JsonPropertyName("query")]
- public string Query { get; set; }
[JsonInclude, JsonPropertyName("case_sensitive")]
public bool? CaseSensitive { get; set; }
@@ -82,35 +76,39 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices
[JsonInclude, JsonPropertyName("event_category_field")]
public Elastic.Clients.Elasticsearch.Serverless.Field? EventCategoryField { get; set; }
- ///
- /// Field used to sort hits with the same timestamp in ascending order
- ///
- [JsonInclude, JsonPropertyName("tiebreaker_field")]
- public Elastic.Clients.Elasticsearch.Serverless.Field? TiebreakerField { get; set; }
-
- ///
- /// Field containing event timestamp. Default "@timestamp"
- ///
- [JsonInclude, JsonPropertyName("timestamp_field")]
- public Elastic.Clients.Elasticsearch.Serverless.Field? TimestampField { get; set; }
-
///
/// Maximum number of events to search at a time for sequence queries.
///
[JsonInclude, JsonPropertyName("fetch_size")]
public int? FetchSize { get; set; }
+ ///
+ /// Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit.
+ ///
+ [JsonInclude, JsonPropertyName("fields")]
+ [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormat))]
+ public ICollection? Fields { get; set; }
+
///
/// Query, written in Query DSL, used to filter the events on which the EQL query runs.
///
- [JsonInclude, JsonPropertyName("filter"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))]
+ [JsonInclude, JsonPropertyName("filter")]
+ [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))]
public ICollection? Filter { get; set; }
[JsonInclude, JsonPropertyName("keep_alive")]
public Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAlive { get; set; }
[JsonInclude, JsonPropertyName("keep_on_completion")]
public bool? KeepOnCompletion { get; set; }
- [JsonInclude, JsonPropertyName("wait_for_completion_timeout")]
- public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get; set; }
+
+ ///
+ /// EQL query you wish to run.
+ ///
+ [JsonInclude, JsonPropertyName("query")]
+ public string Query { get; set; }
+ [JsonInclude, JsonPropertyName("result_position")]
+ public Elastic.Clients.Elasticsearch.Serverless.Eql.ResultPosition? ResultPosition { get; set; }
+ [JsonInclude, JsonPropertyName("runtime_mappings")]
+ public IDictionary? RuntimeMappings { get; set; }
///
/// For basic queries, the maximum number of matching events to return. Defaults to 10
@@ -119,14 +117,18 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices
public int? Size { get; set; }
///
- /// Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit.
+ /// Field used to sort hits with the same timestamp in ascending order
///
- [JsonInclude, JsonPropertyName("fields"), SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.FieldAndFormat))]
- public ICollection? Fields { get; set; }
- [JsonInclude, JsonPropertyName("result_position")]
- public Elastic.Clients.Elasticsearch.Serverless.Eql.ResultPosition? ResultPosition { get; set; }
- [JsonInclude, JsonPropertyName("runtime_mappings")]
- public IDictionary? RuntimeMappings { get; set; }
+ [JsonInclude, JsonPropertyName("tiebreaker_field")]
+ public Elastic.Clients.Elasticsearch.Serverless.Field? TiebreakerField { get; set; }
+
+ ///
+ /// Field containing event timestamp. Default "@timestamp"
+ ///
+ [JsonInclude, JsonPropertyName("timestamp_field")]
+ public Elastic.Clients.Elasticsearch.Serverless.Field? TimestampField { get; set; }
+ [JsonInclude, JsonPropertyName("wait_for_completion_timeout")]
+ public Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeout { get; set; }
}
///
@@ -162,6 +164,9 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsear
return Self;
}
+ private bool? CaseSensitiveValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? EventCategoryFieldValue { get; set; }
+ private int? FetchSizeValue { get; set; }
private ICollection? FieldsValue { get; set; }
private QueryDsl.FieldAndFormatDescriptor FieldsDescriptor { get; set; }
private Action> FieldsDescriptorAction { get; set; }
@@ -170,9 +175,6 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsear
private QueryDsl.QueryDescriptor FilterDescriptor { get; set; }
private Action> FilterDescriptorAction { get; set; }
private Action>[] FilterDescriptorActions { get; set; }
- private bool? CaseSensitiveValue { get; set; }
- private Elastic.Clients.Elasticsearch.Serverless.Field? EventCategoryFieldValue { get; set; }
- private int? FetchSizeValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Duration? KeepAliveValue { get; set; }
private bool? KeepOnCompletionValue { get; set; }
private string QueryValue { get; set; }
@@ -183,6 +185,39 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsear
private Elastic.Clients.Elasticsearch.Serverless.Field? TimestampFieldValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Duration? WaitForCompletionTimeoutValue { get; set; }
+ public EqlSearchRequestDescriptor CaseSensitive(bool? caseSensitive = true)
+ {
+ CaseSensitiveValue = caseSensitive;
+ return Self;
+ }
+
+ ///
+ /// Field containing the event classification, such as process, file, or network.
+ ///
+ public EqlSearchRequestDescriptor EventCategoryField(Elastic.Clients.Elasticsearch.Serverless.Field? eventCategoryField)
+ {
+ EventCategoryFieldValue = eventCategoryField;
+ return Self;
+ }
+
+ ///
+ /// Field containing the event classification, such as process, file, or network.
+ ///
+ public EqlSearchRequestDescriptor EventCategoryField(Expression> eventCategoryField)
+ {
+ EventCategoryFieldValue = eventCategoryField;
+ return Self;
+ }
+
+ ///
+ /// Maximum number of events to search at a time for sequence queries.
+ ///
+ public EqlSearchRequestDescriptor FetchSize(int? fetchSize)
+ {
+ FetchSizeValue = fetchSize;
+ return Self;
+ }
+
///
/// Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit.
///
@@ -261,39 +296,6 @@ public EqlSearchRequestDescriptor Filter(params Action CaseSensitive(bool? caseSensitive = true)
- {
- CaseSensitiveValue = caseSensitive;
- return Self;
- }
-
- ///
- /// Field containing the event classification, such as process, file, or network.
- ///
- public EqlSearchRequestDescriptor EventCategoryField(Elastic.Clients.Elasticsearch.Serverless.Field? eventCategoryField)
- {
- EventCategoryFieldValue = eventCategoryField;
- return Self;
- }
-
- ///
- /// Field containing the event classification, such as process, file, or network.
- ///
- public EqlSearchRequestDescriptor EventCategoryField(Expression> eventCategoryField)
- {
- EventCategoryFieldValue = eventCategoryField;
- return Self;
- }
-
- ///
- /// Maximum number of events to search at a time for sequence queries.
- ///
- public EqlSearchRequestDescriptor FetchSize(int? fetchSize)
- {
- FetchSizeValue = fetchSize;
- return Self;
- }
-
public EqlSearchRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Serverless.Duration? keepAlive)
{
KeepAliveValue = keepAlive;
@@ -381,6 +383,24 @@ public EqlSearchRequestDescriptor WaitForCompletionTimeout(Elastic.Cl
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
{
writer.WriteStartObject();
+ if (CaseSensitiveValue.HasValue)
+ {
+ writer.WritePropertyName("case_sensitive");
+ writer.WriteBooleanValue(CaseSensitiveValue.Value);
+ }
+
+ if (EventCategoryFieldValue is not null)
+ {
+ writer.WritePropertyName("event_category_field");
+ JsonSerializer.Serialize(writer, EventCategoryFieldValue, options);
+ }
+
+ if (FetchSizeValue.HasValue)
+ {
+ writer.WritePropertyName("fetch_size");
+ writer.WriteNumberValue(FetchSizeValue.Value);
+ }
+
if (FieldsDescriptor is not null)
{
writer.WritePropertyName("fields");
@@ -439,24 +459,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
SingleOrManySerializationHelper.Serialize(FilterValue, writer, options);
}
- if (CaseSensitiveValue.HasValue)
- {
- writer.WritePropertyName("case_sensitive");
- writer.WriteBooleanValue(CaseSensitiveValue.Value);
- }
-
- if (EventCategoryFieldValue is not null)
- {
- writer.WritePropertyName("event_category_field");
- JsonSerializer.Serialize(writer, EventCategoryFieldValue, options);
- }
-
- if (FetchSizeValue.HasValue)
- {
- writer.WritePropertyName("fetch_size");
- writer.WriteNumberValue(FetchSizeValue.Value);
- }
-
if (KeepAliveValue is not null)
{
writer.WritePropertyName("keep_alive");
@@ -544,6 +546,9 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverle
return Self;
}
+ private bool? CaseSensitiveValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? EventCategoryFieldValue { get; set; }
+ private int? FetchSizeValue { get; set; }
private ICollection