diff --git a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj
index d21f64b5921..6ff6841ca78 100644
--- a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj
+++ b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj
@@ -18,7 +18,7 @@
annotations
-
+
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs
index 31fbe774bcc..0fbea097dfe 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs
@@ -60,6 +60,9 @@ internal static class ApiUrlLookup
internal static ApiUrls EqlGet = new ApiUrls(new[] { "_eql/search/{id}" });
internal static ApiUrls EqlGetStatus = new ApiUrls(new[] { "_eql/search/status/{id}" });
internal static ApiUrls EqlSearch = new ApiUrls(new[] { "{index}/_eql/search" });
+ internal static ApiUrls EsqlAsyncQuery = new ApiUrls(new[] { "_query/async" });
+ internal static ApiUrls EsqlAsyncQueryDelete = new ApiUrls(new[] { "_query/async/{id}" });
+ internal static ApiUrls EsqlAsyncQueryGet = new ApiUrls(new[] { "_query/async/{id}" });
internal static ApiUrls EsqlQuery = new ApiUrls(new[] { "_query" });
internal static ApiUrls FeaturesGetFeatures = new ApiUrls(new[] { "_features" });
internal static ApiUrls FeaturesResetFeatures = new ApiUrls(new[] { "_features/_reset" });
@@ -100,6 +103,7 @@ internal static class ApiUrlLookup
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 IndexManagementGetDataLifecycleStats = new ApiUrls(new[] { "_lifecycle/stats" });
internal static ApiUrls IndexManagementGetDataStream = new ApiUrls(new[] { "_data_stream", "_data_stream/{name}" });
internal static ApiUrls IndexManagementGetFieldMapping = new ApiUrls(new[] { "_mapping/field/{fields}", "{index}/_mapping/field/{fields}" });
internal static ApiUrls IndexManagementGetIndexTemplate = new ApiUrls(new[] { "_index_template", "_index_template/{name}" });
@@ -135,6 +139,8 @@ internal static class ApiUrlLookup
internal static ApiUrls InferenceGet = new ApiUrls(new[] { "_inference", "_inference/{inference_id}", "_inference/{task_type}/{inference_id}" });
internal static ApiUrls InferenceInference = new ApiUrls(new[] { "_inference/{inference_id}", "_inference/{task_type}/{inference_id}" });
internal static ApiUrls InferencePut = new ApiUrls(new[] { "_inference/{inference_id}", "_inference/{task_type}/{inference_id}" });
+ internal static ApiUrls InferenceStreamInference = new ApiUrls(new[] { "_inference/{inference_id}/_stream", "_inference/{task_type}/{inference_id}/_stream" });
+ internal static ApiUrls InferenceUpdate = new ApiUrls(new[] { "_inference/{inference_id}/_update", "_inference/{task_type}/{inference_id}/_update" });
internal static ApiUrls IngestDeleteGeoipDatabase = new ApiUrls(new[] { "_ingest/geoip/database/{id}" });
internal static ApiUrls IngestDeleteIpLocationDatabase = new ApiUrls(new[] { "_ingest/ip_location/database/{id}" });
internal static ApiUrls IngestDeletePipeline = new ApiUrls(new[] { "_ingest/pipeline/{id}" });
@@ -300,13 +306,16 @@ internal static class ApiUrlLookup
internal static ApiUrls SearchApplicationGet = new ApiUrls(new[] { "_application/search_application/{name}" });
internal static ApiUrls SearchApplicationGetBehavioralAnalytics = new ApiUrls(new[] { "_application/analytics", "_application/analytics/{name}" });
internal static ApiUrls SearchApplicationList = new ApiUrls(new[] { "_application/search_application" });
+ internal static ApiUrls SearchApplicationPostBehavioralAnalyticsEvent = new ApiUrls(new[] { "_application/analytics/{collection_name}/event/{event_type}" });
internal static ApiUrls SearchApplicationPut = new ApiUrls(new[] { "_application/search_application/{name}" });
internal static ApiUrls SearchApplicationPutBehavioralAnalytics = new ApiUrls(new[] { "_application/analytics/{name}" });
+ internal static ApiUrls SearchApplicationRenderQuery = new ApiUrls(new[] { "_application/search_application/{name}/_render_query" });
internal static ApiUrls SearchApplicationSearch = new ApiUrls(new[] { "_application/search_application/{name}/_search" });
internal static ApiUrls SecurityActivateUserProfile = new ApiUrls(new[] { "_security/profile/_activate" });
internal static ApiUrls SecurityAuthenticate = new ApiUrls(new[] { "_security/_authenticate" });
internal static ApiUrls SecurityBulkDeleteRole = new ApiUrls(new[] { "_security/role" });
internal static ApiUrls SecurityBulkPutRole = new ApiUrls(new[] { "_security/role" });
+ internal static ApiUrls SecurityBulkUpdateApiKeys = new ApiUrls(new[] { "_security/api_key/_bulk_update" });
internal static ApiUrls SecurityChangePassword = new ApiUrls(new[] { "_security/user/{username}/_password", "_security/user/_password" });
internal static ApiUrls SecurityClearApiKeyCache = new ApiUrls(new[] { "_security/api_key/{ids}/_clear_cache" });
internal static ApiUrls SecurityClearCachedPrivileges = new ApiUrls(new[] { "_security/privilege/{application}/_clear_cache" });
@@ -316,6 +325,7 @@ internal static class ApiUrlLookup
internal static ApiUrls SecurityCreateApiKey = new ApiUrls(new[] { "_security/api_key" });
internal static ApiUrls SecurityCreateCrossClusterApiKey = new ApiUrls(new[] { "_security/cross_cluster/api_key" });
internal static ApiUrls SecurityCreateServiceToken = new ApiUrls(new[] { "_security/service/{namespace}/{service}/credential/token/{name}", "_security/service/{namespace}/{service}/credential/token" });
+ internal static ApiUrls SecurityDelegatePki = new ApiUrls(new[] { "_security/delegate_pki" });
internal static ApiUrls SecurityDeletePrivileges = new ApiUrls(new[] { "_security/privilege/{application}/{name}" });
internal static ApiUrls SecurityDeleteRole = new ApiUrls(new[] { "_security/role/{name}" });
internal static ApiUrls SecurityDeleteRoleMapping = new ApiUrls(new[] { "_security/role_mapping/{name}" });
@@ -334,6 +344,7 @@ internal static class ApiUrlLookup
internal static ApiUrls SecurityGetRoleMapping = new ApiUrls(new[] { "_security/role_mapping/{name}", "_security/role_mapping" });
internal static ApiUrls SecurityGetServiceAccounts = new ApiUrls(new[] { "_security/service/{namespace}/{service}", "_security/service/{namespace}", "_security/service" });
internal static ApiUrls SecurityGetServiceCredentials = new ApiUrls(new[] { "_security/service/{namespace}/{service}/credential" });
+ internal static ApiUrls SecurityGetSettings = new ApiUrls(new[] { "_security/settings" });
internal static ApiUrls SecurityGetToken = new ApiUrls(new[] { "_security/oauth2/token" });
internal static ApiUrls SecurityGetUser = new ApiUrls(new[] { "_security/user/{username}", "_security/user" });
internal static ApiUrls SecurityGetUserPrivileges = new ApiUrls(new[] { "_security/user/_privileges" });
@@ -343,6 +354,9 @@ internal static class ApiUrlLookup
internal static ApiUrls SecurityHasPrivilegesUserProfile = new ApiUrls(new[] { "_security/profile/_has_privileges" });
internal static ApiUrls SecurityInvalidateApiKey = new ApiUrls(new[] { "_security/api_key" });
internal static ApiUrls SecurityInvalidateToken = new ApiUrls(new[] { "_security/oauth2/token" });
+ internal static ApiUrls SecurityOidcAuthenticate = new ApiUrls(new[] { "_security/oidc/authenticate" });
+ internal static ApiUrls SecurityOidcLogout = new ApiUrls(new[] { "_security/oidc/logout" });
+ internal static ApiUrls SecurityOidcPrepareAuthentication = new ApiUrls(new[] { "_security/oidc/prepare" });
internal static ApiUrls SecurityPutPrivileges = new ApiUrls(new[] { "_security/privilege" });
internal static ApiUrls SecurityPutRole = new ApiUrls(new[] { "_security/role/{name}" });
internal static ApiUrls SecurityPutRoleMapping = new ApiUrls(new[] { "_security/role_mapping/{name}" });
@@ -359,7 +373,9 @@ internal static class ApiUrlLookup
internal static ApiUrls SecuritySuggestUserProfiles = new ApiUrls(new[] { "_security/profile/_suggest" });
internal static ApiUrls SecurityUpdateApiKey = new ApiUrls(new[] { "_security/api_key/{id}" });
internal static ApiUrls SecurityUpdateCrossClusterApiKey = new ApiUrls(new[] { "_security/cross_cluster/api_key/{id}" });
+ internal static ApiUrls SecurityUpdateSettings = new ApiUrls(new[] { "_security/settings" });
internal static ApiUrls SecurityUpdateUserProfileData = new ApiUrls(new[] { "_security/profile/{uid}/_data" });
+ internal static ApiUrls SimulateIngest = new ApiUrls(new[] { "_ingest/_simulate", "_ingest/{index}/_simulate" });
internal static ApiUrls SnapshotCleanupRepository = new ApiUrls(new[] { "_snapshot/{repository}/_cleanup" });
internal static ApiUrls SnapshotClone = new ApiUrls(new[] { "_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}" });
internal static ApiUrls SnapshotCreate = new ApiUrls(new[] { "_snapshot/{repository}/{snapshot}" });
@@ -377,6 +393,7 @@ internal static class ApiUrlLookup
internal static ApiUrls SnapshotLifecycleManagementPutLifecycle = new ApiUrls(new[] { "_slm/policy/{policy_id}" });
internal static ApiUrls SnapshotLifecycleManagementStart = new ApiUrls(new[] { "_slm/start" });
internal static ApiUrls SnapshotLifecycleManagementStop = new ApiUrls(new[] { "_slm/stop" });
+ internal static ApiUrls SnapshotRepositoryAnalyze = new ApiUrls(new[] { "_snapshot/{repository}/_analyze" });
internal static ApiUrls SnapshotRepositoryVerifyIntegrity = new ApiUrls(new[] { "_snapshot/{repository}/_verify_integrity" });
internal static ApiUrls SnapshotRestore = new ApiUrls(new[] { "_snapshot/{repository}/{snapshot}/_restore" });
internal static ApiUrls SnapshotStatus = new ApiUrls(new[] { "_snapshot/_status", "_snapshot/{repository}/_status", "_snapshot/{repository}/{snapshot}/_status" });
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs
index db47e9c2ee2..d44016dcd11 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs
@@ -110,6 +110,14 @@ public sealed partial class SubmitAsyncSearchRequestParameters : RequestParamete
///
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.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.
@@ -130,6 +138,7 @@ public sealed partial class SubmitAsyncSearchRequestParameters : RequestParamete
///
///
public long? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); }
+ public string? MinCompatibleShardNode { get => Q("min_compatible_shard_node"); set => Q("min_compatible_shard_node", value); }
///
///
@@ -762,6 +771,15 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
[JsonIgnore]
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.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.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.
@@ -785,6 +803,8 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices)
///
[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); }
///
///
@@ -1169,9 +1189,11 @@ public SubmitAsyncSearchRequestDescriptor()
public SubmitAsyncSearchRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards);
public SubmitAsyncSearchRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled);
public SubmitAsyncSearchRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable);
+ public SubmitAsyncSearchRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? keepAlive) => Qs("keep_alive", keepAlive);
public SubmitAsyncSearchRequestDescriptor KeepOnCompletion(bool? keepOnCompletion = true) => Qs("keep_on_completion", keepOnCompletion);
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 Preference(string? preference) => Qs("preference", preference);
public SubmitAsyncSearchRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax);
public SubmitAsyncSearchRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache);
@@ -2290,9 +2312,11 @@ public SubmitAsyncSearchRequestDescriptor()
public SubmitAsyncSearchRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards);
public SubmitAsyncSearchRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled);
public SubmitAsyncSearchRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable);
+ public SubmitAsyncSearchRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? keepAlive) => Qs("keep_alive", keepAlive);
public SubmitAsyncSearchRequestDescriptor KeepOnCompletion(bool? keepOnCompletion = true) => Qs("keep_on_completion", keepOnCompletion);
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 Preference(string? preference) => Qs("preference", preference);
public SubmitAsyncSearchRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax);
public SubmitAsyncSearchRequestDescriptor RequestCache(bool? requestCache = true) => Qs("request_cache", requestCache);
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs
index 6e2ebd29f2a..ef6467a0c3a 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs
@@ -34,23 +34,25 @@ public sealed partial class BulkRequestParameters : RequestParameters
{
///
///
- /// If true, the response will include the ingest pipelines that were executed for each index or create.
+ /// If true, the response will include the ingest pipelines that were run for each index or create.
///
///
public bool? ListExecutedPipelines { get => Q("list_executed_pipelines"); set => Q("list_executed_pipelines", value); }
///
///
- /// ID of the pipeline to use to preprocess incoming documents.
- /// If the index has a default ingest pipeline specified, then setting the value to _none disables the default ingest pipeline for this request.
- /// If a final pipeline is configured it will always run, regardless of the value of this parameter.
+ /// The pipeline identifier to use to preprocess incoming documents.
+ /// If the index has a default ingest pipeline specified, setting the value to _none turns off the default ingest pipeline for this request.
+ /// If a final pipeline is configured, it will always run regardless of the value of this parameter.
///
///
public string? Pipeline { get => Q("pipeline"); set => Q("pipeline", value); }
///
///
- /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false do nothing with refreshes.
+ /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search.
+ /// If wait_for, wait for a refresh to make this operation visible to search.
+ /// If false, do nothing with refreshes.
/// Valid values: true, false, wait_for.
///
///
@@ -58,28 +60,28 @@ public sealed partial class BulkRequestParameters : RequestParameters
///
///
- /// If true, the request’s actions must target an index alias.
+ /// If true, the request's actions must target an index alias.
///
///
public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); }
///
///
- /// If true, the request's actions must target a data stream (existing or to-be-created).
+ /// If true, the request's actions must target a data stream (existing or to be created).
///
///
public bool? RequireDataStream { get => Q("require_data_stream"); set => Q("require_data_stream", value); }
///
///
- /// Custom value used to route operations to a specific shard.
+ /// A custom value that is used to route operations to a specific shard.
///
///
public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); }
///
///
- /// true or false to return the _source field or not, or a list of fields to return.
+ /// Indicates whether to return the _source field (true or false) or contains a list of fields to return.
///
///
public Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); }
@@ -87,6 +89,8 @@ public sealed partial class BulkRequestParameters : RequestParameters
///
///
/// A comma-separated list of source fields to exclude from the response.
+ /// You can also use this parameter to exclude fields from the subset specified in _source_includes query parameter.
+ /// If the _source parameter is false, this parameter is ignored.
///
///
public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); }
@@ -94,13 +98,18 @@ public sealed partial class BulkRequestParameters : RequestParameters
///
///
/// A comma-separated list of source fields to include in the response.
+ /// If this parameter is specified, only these source fields are returned.
+ /// You can exclude fields from this subset using the _source_excludes query parameter.
+ /// If the _source parameter is false, this parameter is ignored.
///
///
public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); }
///
///
- /// Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
+ /// The period each action waits for the following operations: automatic index creation, dynamic mapping updates, and waiting for active shards.
+ /// The default is 1m (one minute), which guarantees Elasticsearch waits for at least the timeout before failing.
+ /// The actual wait time could be longer, particularly when multiple waits occur.
///
///
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); }
@@ -108,7 +117,8 @@ public sealed partial 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).
+ /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1).
+ /// The default is 1, which waits for each primary shard to be active.
///
///
public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); }
@@ -117,9 +127,192 @@ public sealed partial class BulkRequestParameters : RequestParameters
///
///
/// Bulk index or delete documents.
-/// Performs multiple indexing or delete operations in a single API call.
+/// Perform multiple index, create, delete, and update actions in a single request.
/// This reduces overhead and can greatly increase indexing speed.
///
+///
+/// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:
+///
+///
+/// -
+///
+/// To use the create action, you must have the create_doc, create, index, or write index privilege. Data streams support only the create action.
+///
+///
+/// -
+///
+/// To use the index action, you must have the create, index, or write index privilege.
+///
+///
+/// -
+///
+/// To use the delete action, you must have the delete or write index privilege.
+///
+///
+/// -
+///
+/// To use the update action, you must have the index or write index privilege.
+///
+///
+/// -
+///
+/// To automatically create a data stream or index with a bulk API request, you must have the auto_configure, create_index, or manage index privilege.
+///
+///
+/// -
+///
+/// To make the result of a bulk operation visible to search using the refresh parameter, you must have the maintenance or manage index privilege.
+///
+///
+///
+///
+/// Automatic data stream creation requires a matching index template with data stream enabled.
+///
+///
+/// The actions are specified in the request body using a newline delimited JSON (NDJSON) structure:
+///
+///
+/// action_and_meta_data\n
+/// optional_source\n
+/// action_and_meta_data\n
+/// optional_source\n
+/// ....
+/// action_and_meta_data\n
+/// optional_source\n
+///
+///
+/// The index and create actions expect a source on the next line and have the same semantics as the op_type parameter in the standard index API.
+/// A create action fails if a document with the same ID already exists in the target
+/// An index action adds or replaces a document as necessary.
+///
+///
+/// NOTE: Data streams support only the create action.
+/// To update or delete a document in a data stream, you must target the backing index containing the document.
+///
+///
+/// An update action expects that the partial doc, upsert, and script and its options are specified on the next line.
+///
+///
+/// A delete action does not expect a source on the next line and has the same semantics as the standard delete API.
+///
+///
+/// NOTE: The final line of data must end with a newline character (\n).
+/// Each newline character may be preceded by a carriage return (\r).
+/// When sending NDJSON data to the _bulk endpoint, use a Content-Type header of application/json or application/x-ndjson.
+/// Because this format uses literal newline characters (\n) as delimiters, make sure that the JSON actions and sources are not pretty printed.
+///
+///
+/// If you provide a target in the request path, it is used for any actions that don't explicitly specify an _index argument.
+///
+///
+/// A note on the format: the idea here is to make processing as fast as possible.
+/// As some of the actions are redirected to other shards on other nodes, only action_meta_data is parsed on the receiving node side.
+///
+///
+/// Client libraries using this protocol should try and strive to do something similar on the client side, and reduce buffering as much as possible.
+///
+///
+/// There is no "correct" number of actions to perform in a single bulk request.
+/// Experiment with different settings to find the optimal size for your particular workload.
+/// Note that Elasticsearch limits the maximum size of a HTTP request to 100mb by default so clients must ensure that no request exceeds this size.
+/// It is not possible to index a single document that exceeds the size limit, so you must pre-process any such documents into smaller pieces before sending them to Elasticsearch.
+/// For instance, split documents into pages or chapters before indexing them, or store raw binary data in a system outside Elasticsearch and replace the raw data with a link to the external system in the documents that you send to Elasticsearch.
+///
+///
+/// Client suppport for bulk requests
+///
+///
+/// Some of the officially supported clients provide helpers to assist with bulk requests and reindexing:
+///
+///
+/// -
+///
+/// Go: Check out esutil.BulkIndexer
+///
+///
+/// -
+///
+/// Perl: Check out Search::Elasticsearch::Client::5_0::Bulk and Search::Elasticsearch::Client::5_0::Scroll
+///
+///
+/// -
+///
+/// Python: Check out elasticsearch.helpers.*
+///
+///
+/// -
+///
+/// JavaScript: Check out client.helpers.*
+///
+///
+/// -
+///
+/// .NET: Check out BulkAllObservable
+///
+///
+/// -
+///
+/// PHP: Check out bulk indexing.
+///
+///
+///
+///
+/// Submitting bulk requests with cURL
+///
+///
+/// If you're providing text file input to curl, you must use the --data-binary flag instead of plain -d.
+/// The latter doesn't preserve newlines. For example:
+///
+///
+/// $ cat requests
+/// { "index" : { "_index" : "test", "_id" : "1" } }
+/// { "field1" : "value1" }
+/// $ curl -s -H "Content-Type: application/x-ndjson" -XPOST localhost:9200/_bulk --data-binary "@requests"; echo
+/// {"took":7, "errors": false, "items":[{"index":{"_index":"test","_id":"1","_version":1,"result":"created","forced_refresh":false}}]}
+///
+///
+/// Optimistic concurrency control
+///
+///
+/// Each index and delete action within a bulk API call may include the if_seq_no and if_primary_term parameters in their respective action and meta data lines.
+/// The if_seq_no and if_primary_term parameters control how operations are run, based on the last modification to existing documents. See Optimistic concurrency control for more details.
+///
+///
+/// Versioning
+///
+///
+/// Each bulk item can include the version value using the version field.
+/// It automatically follows the behavior of the index or delete operation based on the _version mapping.
+/// It also support the version_type.
+///
+///
+/// Routing
+///
+///
+/// Each bulk item can include the routing value using the routing field.
+/// It automatically follows the behavior of the index or delete operation based on the _routing mapping.
+///
+///
+/// NOTE: Data streams do not support custom routing unless they were created with the allow_custom_routing setting enabled in the template.
+///
+///
+/// Wait for active shards
+///
+///
+/// When making bulk calls, you can set the wait_for_active_shards parameter to require a minimum number of shard copies to be active before starting to process the bulk request.
+///
+///
+/// Refresh
+///
+///
+/// Control when the changes made by this request are visible to search.
+///
+///
+/// NOTE: Only the shards that receive the bulk request will be affected by refresh.
+/// Imagine a _bulk?refresh=wait_for request with three documents in it that happen to be routed to different shards in an index with five shards.
+/// The request will only wait for those three shards to refresh.
+/// The other two shards that make up the index do not participate in the _bulk request at all.
+///
///
public sealed partial class BulkRequest : PlainRequest
{
@@ -141,7 +334,7 @@ public BulkRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r
///
///
- /// If true, the response will include the ingest pipelines that were executed for each index or create.
+ /// If true, the response will include the ingest pipelines that were run for each index or create.
///
///
[JsonIgnore]
@@ -149,9 +342,9 @@ public BulkRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r
///
///
- /// ID of the pipeline to use to preprocess incoming documents.
- /// If the index has a default ingest pipeline specified, then setting the value to _none disables the default ingest pipeline for this request.
- /// If a final pipeline is configured it will always run, regardless of the value of this parameter.
+ /// The pipeline identifier to use to preprocess incoming documents.
+ /// If the index has a default ingest pipeline specified, setting the value to _none turns off the default ingest pipeline for this request.
+ /// If a final pipeline is configured, it will always run regardless of the value of this parameter.
///
///
[JsonIgnore]
@@ -159,7 +352,9 @@ public BulkRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r
///
///
- /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false do nothing with refreshes.
+ /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search.
+ /// If wait_for, wait for a refresh to make this operation visible to search.
+ /// If false, do nothing with refreshes.
/// Valid values: true, false, wait_for.
///
///
@@ -168,7 +363,7 @@ public BulkRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r
///
///
- /// If true, the request’s actions must target an index alias.
+ /// If true, the request's actions must target an index alias.
///
///
[JsonIgnore]
@@ -176,7 +371,7 @@ public BulkRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r
///
///
- /// If true, the request's actions must target a data stream (existing or to-be-created).
+ /// If true, the request's actions must target a data stream (existing or to be created).
///
///
[JsonIgnore]
@@ -184,7 +379,7 @@ public BulkRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r
///
///
- /// Custom value used to route operations to a specific shard.
+ /// A custom value that is used to route operations to a specific shard.
///
///
[JsonIgnore]
@@ -192,7 +387,7 @@ public BulkRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r
///
///
- /// true or false to return the _source field or not, or a list of fields to return.
+ /// Indicates whether to return the _source field (true or false) or contains a list of fields to return.
///
///
[JsonIgnore]
@@ -201,6 +396,8 @@ public BulkRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r
///
///
/// A comma-separated list of source fields to exclude from the response.
+ /// You can also use this parameter to exclude fields from the subset specified in _source_includes query parameter.
+ /// If the _source parameter is false, this parameter is ignored.
///
///
[JsonIgnore]
@@ -209,6 +406,9 @@ public BulkRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r
///
///
/// A comma-separated list of source fields to include in the response.
+ /// If this parameter is specified, only these source fields are returned.
+ /// You can exclude fields from this subset using the _source_excludes query parameter.
+ /// If the _source parameter is false, this parameter is ignored.
///
///
[JsonIgnore]
@@ -216,7 +416,9 @@ public BulkRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r
///
///
- /// Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
+ /// The period each action waits for the following operations: automatic index creation, dynamic mapping updates, and waiting for active shards.
+ /// The default is 1m (one minute), which guarantees Elasticsearch waits for at least the timeout before failing.
+ /// The actual wait time could be longer, particularly when multiple waits occur.
///
///
[JsonIgnore]
@@ -225,7 +427,8 @@ public BulkRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r
///
///
/// 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).
+ /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1).
+ /// The default is 1, which waits for each primary shard to be active.
///
///
[JsonIgnore]
@@ -235,9 +438,192 @@ public BulkRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r
///
///
/// Bulk index or delete documents.
-/// Performs multiple indexing or delete operations in a single API call.
+/// Perform multiple index, create, delete, and update actions in a single request.
/// This reduces overhead and can greatly increase indexing speed.
///
+///
+/// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:
+///
+///
+/// -
+///
+/// To use the create action, you must have the create_doc, create, index, or write index privilege. Data streams support only the create action.
+///
+///
+/// -
+///
+/// To use the index action, you must have the create, index, or write index privilege.
+///
+///
+/// -
+///
+/// To use the delete action, you must have the delete or write index privilege.
+///
+///
+/// -
+///
+/// To use the update action, you must have the index or write index privilege.
+///
+///
+/// -
+///
+/// To automatically create a data stream or index with a bulk API request, you must have the auto_configure, create_index, or manage index privilege.
+///
+///
+/// -
+///
+/// To make the result of a bulk operation visible to search using the refresh parameter, you must have the maintenance or manage index privilege.
+///
+///
+///
+///
+/// Automatic data stream creation requires a matching index template with data stream enabled.
+///
+///
+/// The actions are specified in the request body using a newline delimited JSON (NDJSON) structure:
+///
+///
+/// action_and_meta_data\n
+/// optional_source\n
+/// action_and_meta_data\n
+/// optional_source\n
+/// ....
+/// action_and_meta_data\n
+/// optional_source\n
+///
+///
+/// The index and create actions expect a source on the next line and have the same semantics as the op_type parameter in the standard index API.
+/// A create action fails if a document with the same ID already exists in the target
+/// An index action adds or replaces a document as necessary.
+///
+///
+/// NOTE: Data streams support only the create action.
+/// To update or delete a document in a data stream, you must target the backing index containing the document.
+///
+///
+/// An update action expects that the partial doc, upsert, and script and its options are specified on the next line.
+///
+///
+/// A delete action does not expect a source on the next line and has the same semantics as the standard delete API.
+///
+///
+/// NOTE: The final line of data must end with a newline character (\n).
+/// Each newline character may be preceded by a carriage return (\r).
+/// When sending NDJSON data to the _bulk endpoint, use a Content-Type header of application/json or application/x-ndjson.
+/// Because this format uses literal newline characters (\n) as delimiters, make sure that the JSON actions and sources are not pretty printed.
+///
+///
+/// If you provide a target in the request path, it is used for any actions that don't explicitly specify an _index argument.
+///
+///
+/// A note on the format: the idea here is to make processing as fast as possible.
+/// As some of the actions are redirected to other shards on other nodes, only action_meta_data is parsed on the receiving node side.
+///
+///
+/// Client libraries using this protocol should try and strive to do something similar on the client side, and reduce buffering as much as possible.
+///
+///
+/// There is no "correct" number of actions to perform in a single bulk request.
+/// Experiment with different settings to find the optimal size for your particular workload.
+/// Note that Elasticsearch limits the maximum size of a HTTP request to 100mb by default so clients must ensure that no request exceeds this size.
+/// It is not possible to index a single document that exceeds the size limit, so you must pre-process any such documents into smaller pieces before sending them to Elasticsearch.
+/// For instance, split documents into pages or chapters before indexing them, or store raw binary data in a system outside Elasticsearch and replace the raw data with a link to the external system in the documents that you send to Elasticsearch.
+///
+///
+/// Client suppport for bulk requests
+///
+///
+/// Some of the officially supported clients provide helpers to assist with bulk requests and reindexing:
+///
+///
+/// -
+///
+/// Go: Check out esutil.BulkIndexer
+///
+///
+/// -
+///
+/// Perl: Check out Search::Elasticsearch::Client::5_0::Bulk and Search::Elasticsearch::Client::5_0::Scroll
+///
+///
+/// -
+///
+/// Python: Check out elasticsearch.helpers.*
+///
+///
+/// -
+///
+/// JavaScript: Check out client.helpers.*
+///
+///
+/// -
+///
+/// .NET: Check out BulkAllObservable
+///
+///
+/// -
+///
+/// PHP: Check out bulk indexing.
+///
+///
+///
+///
+/// Submitting bulk requests with cURL
+///
+///
+/// If you're providing text file input to curl, you must use the --data-binary flag instead of plain -d.
+/// The latter doesn't preserve newlines. For example:
+///
+///
+/// $ cat requests
+/// { "index" : { "_index" : "test", "_id" : "1" } }
+/// { "field1" : "value1" }
+/// $ curl -s -H "Content-Type: application/x-ndjson" -XPOST localhost:9200/_bulk --data-binary "@requests"; echo
+/// {"took":7, "errors": false, "items":[{"index":{"_index":"test","_id":"1","_version":1,"result":"created","forced_refresh":false}}]}
+///
+///
+/// Optimistic concurrency control
+///
+///
+/// Each index and delete action within a bulk API call may include the if_seq_no and if_primary_term parameters in their respective action and meta data lines.
+/// The if_seq_no and if_primary_term parameters control how operations are run, based on the last modification to existing documents. See Optimistic concurrency control for more details.
+///
+///
+/// Versioning
+///
+///
+/// Each bulk item can include the version value using the version field.
+/// It automatically follows the behavior of the index or delete operation based on the _version mapping.
+/// It also support the version_type.
+///
+///
+/// Routing
+///
+///
+/// Each bulk item can include the routing value using the routing field.
+/// It automatically follows the behavior of the index or delete operation based on the _routing mapping.
+///
+///
+/// NOTE: Data streams do not support custom routing unless they were created with the allow_custom_routing setting enabled in the template.
+///
+///
+/// Wait for active shards
+///
+///
+/// When making bulk calls, you can set the wait_for_active_shards parameter to require a minimum number of shard copies to be active before starting to process the bulk request.
+///
+///
+/// Refresh
+///
+///
+/// Control when the changes made by this request are visible to search.
+///
+///
+/// NOTE: Only the shards that receive the bulk request will be affected by refresh.
+/// Imagine a _bulk?refresh=wait_for request with three documents in it that happen to be routed to different shards in an index with five shards.
+/// The request will only wait for those three shards to refresh.
+/// The other two shards that make up the index do not participate in the _bulk request at all.
+///
///
public sealed partial class BulkRequestDescriptor : RequestDescriptor, BulkRequestParameters>
{
@@ -287,9 +673,192 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Bulk index or delete documents.
-/// Performs multiple indexing or delete operations in a single API call.
+/// Perform multiple index, create, delete, and update actions in a single request.
/// This reduces overhead and can greatly increase indexing speed.
///
+///
+/// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:
+///
+///
+/// -
+///
+/// To use the create action, you must have the create_doc, create, index, or write index privilege. Data streams support only the create action.
+///
+///
+/// -
+///
+/// To use the index action, you must have the create, index, or write index privilege.
+///
+///
+/// -
+///
+/// To use the delete action, you must have the delete or write index privilege.
+///
+///
+/// -
+///
+/// To use the update action, you must have the index or write index privilege.
+///
+///
+/// -
+///
+/// To automatically create a data stream or index with a bulk API request, you must have the auto_configure, create_index, or manage index privilege.
+///
+///
+/// -
+///
+/// To make the result of a bulk operation visible to search using the refresh parameter, you must have the maintenance or manage index privilege.
+///
+///
+///
+///
+/// Automatic data stream creation requires a matching index template with data stream enabled.
+///
+///
+/// The actions are specified in the request body using a newline delimited JSON (NDJSON) structure:
+///
+///
+/// action_and_meta_data\n
+/// optional_source\n
+/// action_and_meta_data\n
+/// optional_source\n
+/// ....
+/// action_and_meta_data\n
+/// optional_source\n
+///
+///
+/// The index and create actions expect a source on the next line and have the same semantics as the op_type parameter in the standard index API.
+/// A create action fails if a document with the same ID already exists in the target
+/// An index action adds or replaces a document as necessary.
+///
+///
+/// NOTE: Data streams support only the create action.
+/// To update or delete a document in a data stream, you must target the backing index containing the document.
+///
+///
+/// An update action expects that the partial doc, upsert, and script and its options are specified on the next line.
+///
+///
+/// A delete action does not expect a source on the next line and has the same semantics as the standard delete API.
+///
+///
+/// NOTE: The final line of data must end with a newline character (\n).
+/// Each newline character may be preceded by a carriage return (\r).
+/// When sending NDJSON data to the _bulk endpoint, use a Content-Type header of application/json or application/x-ndjson.
+/// Because this format uses literal newline characters (\n) as delimiters, make sure that the JSON actions and sources are not pretty printed.
+///
+///
+/// If you provide a target in the request path, it is used for any actions that don't explicitly specify an _index argument.
+///
+///
+/// A note on the format: the idea here is to make processing as fast as possible.
+/// As some of the actions are redirected to other shards on other nodes, only action_meta_data is parsed on the receiving node side.
+///
+///
+/// Client libraries using this protocol should try and strive to do something similar on the client side, and reduce buffering as much as possible.
+///
+///
+/// There is no "correct" number of actions to perform in a single bulk request.
+/// Experiment with different settings to find the optimal size for your particular workload.
+/// Note that Elasticsearch limits the maximum size of a HTTP request to 100mb by default so clients must ensure that no request exceeds this size.
+/// It is not possible to index a single document that exceeds the size limit, so you must pre-process any such documents into smaller pieces before sending them to Elasticsearch.
+/// For instance, split documents into pages or chapters before indexing them, or store raw binary data in a system outside Elasticsearch and replace the raw data with a link to the external system in the documents that you send to Elasticsearch.
+///
+///
+/// Client suppport for bulk requests
+///
+///
+/// Some of the officially supported clients provide helpers to assist with bulk requests and reindexing:
+///
+///
+/// -
+///
+/// Go: Check out esutil.BulkIndexer
+///
+///
+/// -
+///
+/// Perl: Check out Search::Elasticsearch::Client::5_0::Bulk and Search::Elasticsearch::Client::5_0::Scroll
+///
+///
+/// -
+///
+/// Python: Check out elasticsearch.helpers.*
+///
+///
+/// -
+///
+/// JavaScript: Check out client.helpers.*
+///
+///
+/// -
+///
+/// .NET: Check out BulkAllObservable
+///
+///
+/// -
+///
+/// PHP: Check out bulk indexing.
+///
+///
+///
+///
+/// Submitting bulk requests with cURL
+///
+///
+/// If you're providing text file input to curl, you must use the --data-binary flag instead of plain -d.
+/// The latter doesn't preserve newlines. For example:
+///
+///
+/// $ cat requests
+/// { "index" : { "_index" : "test", "_id" : "1" } }
+/// { "field1" : "value1" }
+/// $ curl -s -H "Content-Type: application/x-ndjson" -XPOST localhost:9200/_bulk --data-binary "@requests"; echo
+/// {"took":7, "errors": false, "items":[{"index":{"_index":"test","_id":"1","_version":1,"result":"created","forced_refresh":false}}]}
+///
+///
+/// Optimistic concurrency control
+///
+///
+/// Each index and delete action within a bulk API call may include the if_seq_no and if_primary_term parameters in their respective action and meta data lines.
+/// The if_seq_no and if_primary_term parameters control how operations are run, based on the last modification to existing documents. See Optimistic concurrency control for more details.
+///
+///
+/// Versioning
+///
+///
+/// Each bulk item can include the version value using the version field.
+/// It automatically follows the behavior of the index or delete operation based on the _version mapping.
+/// It also support the version_type.
+///
+///
+/// Routing
+///
+///
+/// Each bulk item can include the routing value using the routing field.
+/// It automatically follows the behavior of the index or delete operation based on the _routing mapping.
+///
+///
+/// NOTE: Data streams do not support custom routing unless they were created with the allow_custom_routing setting enabled in the template.
+///
+///
+/// Wait for active shards
+///
+///
+/// When making bulk calls, you can set the wait_for_active_shards parameter to require a minimum number of shard copies to be active before starting to process the bulk request.
+///
+///
+/// Refresh
+///
+///
+/// Control when the changes made by this request are visible to search.
+///
+///
+/// NOTE: Only the shards that receive the bulk request will be affected by refresh.
+/// Imagine a _bulk?refresh=wait_for request with three documents in it that happen to be routed to different shards in an index with five shards.
+/// The request will only wait for those three shards to refresh.
+/// The other two shards that make up the index do not participate in the _bulk request at all.
+///
///
public sealed partial class BulkRequestDescriptor : RequestDescriptor
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs
index a2c342a8ee7..9bb66902b31 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs
@@ -28,10 +28,21 @@ namespace Elastic.Clients.Elasticsearch;
public sealed partial class BulkResponse : ElasticsearchResponse
{
+ ///
+ ///
+ /// If true, one or more of the operations in the bulk request did not complete successfully.
+ ///
+ ///
[JsonInclude, JsonPropertyName("errors")]
public bool Errors { get; init; }
[JsonInclude, JsonPropertyName("ingest_took")]
public long? IngestTook { get; init; }
+
+ ///
+ ///
+ /// The length of time, in milliseconds, it took to process the bulk request.
+ ///
+ ///
[JsonInclude, JsonPropertyName("took")]
public long Took { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollRequest.g.cs
index 156d7b50847..1399f8ad99c 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollRequest.g.cs
@@ -37,8 +37,6 @@ public sealed partial class ClearScrollRequestParameters : RequestParameters
///
///
/// Clear a scrolling search.
-///
-///
/// Clear the search context and results for a scrolling search.
///
///
@@ -54,7 +52,7 @@ public sealed partial class ClearScrollRequest : PlainRequest
///
- /// Scroll IDs to clear.
+ /// The scroll IDs to clear.
/// To clear all scroll IDs, use _all.
///
///
@@ -65,8 +63,6 @@ public sealed partial class ClearScrollRequest : PlainRequest
///
/// Clear a scrolling search.
-///
-///
/// Clear the search context and results for a scrolling search.
///
///
@@ -90,7 +86,7 @@ public ClearScrollRequestDescriptor()
///
///
- /// Scroll IDs to clear.
+ /// The scroll IDs to clear.
/// To clear all scroll IDs, use _all.
///
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollResponse.g.cs
index 29bfde63e45..09f12a13975 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClearScrollResponse.g.cs
@@ -28,8 +28,20 @@ namespace Elastic.Clients.Elasticsearch;
public sealed partial class ClearScrollResponse : ElasticsearchResponse
{
+ ///
+ ///
+ /// The number of scrolling search requests cleared.
+ ///
+ ///
[JsonInclude, JsonPropertyName("num_freed")]
public int NumFreed { get; init; }
+
+ ///
+ ///
+ /// If true, the request succeeded.
+ /// This does not indicate whether any scrolling search requests were cleared.
+ ///
+ ///
[JsonInclude, JsonPropertyName("succeeded")]
public bool Succeeded { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeRequest.g.cs
index 4bc64124f7a..72511ba0d11 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeRequest.g.cs
@@ -37,8 +37,6 @@ public sealed partial class ClosePointInTimeRequestParameters : RequestParameter
///
///
/// Close a point in time.
-///
-///
/// A point in time must be opened explicitly before being used in search requests.
/// The keep_alive parameter tells Elasticsearch how long it should persist.
/// A point in time is automatically closed when the keep_alive period has elapsed.
@@ -67,8 +65,6 @@ public sealed partial class ClosePointInTimeRequest : PlainRequest
///
/// Close a point in time.
-///
-///
/// A point in time must be opened explicitly before being used in search requests.
/// The keep_alive parameter tells Elasticsearch how long it should persist.
/// A point in time is automatically closed when the keep_alive period has elapsed.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs
index 1fdf5b5b3ae..da1514d5bcc 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs
@@ -28,8 +28,19 @@ namespace Elastic.Clients.Elasticsearch;
public sealed partial class ClosePointInTimeResponse : ElasticsearchResponse
{
+ ///
+ ///
+ /// The number of search contexts that were successfully closed.
+ ///
+ ///
[JsonInclude, JsonPropertyName("num_freed")]
public int NumFreed { get; init; }
+
+ ///
+ ///
+ /// If true, all search contexts associated with the point-in-time ID were successfully closed.
+ ///
+ ///
[JsonInclude, JsonPropertyName("succeeded")]
public bool Succeeded { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/DeleteComponentTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/DeleteComponentTemplateRequest.g.cs
index b0db2cd21b4..c0ef544063c 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/DeleteComponentTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/DeleteComponentTemplateRequest.g.cs
@@ -52,7 +52,6 @@ public sealed partial class DeleteComponentTemplateRequestParameters : RequestPa
///
///
/// Delete component templates.
-/// Deletes component templates.
/// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.
///
///
@@ -92,7 +91,6 @@ public DeleteComponentTemplateRequest(Elastic.Clients.Elasticsearch.Names name)
///
///
/// Delete component templates.
-/// Deletes component templates.
/// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.
///
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs
index a344e42d854..15751974598 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs
@@ -66,7 +66,7 @@ public sealed partial class GetComponentTemplateRequestParameters : RequestParam
///
///
/// Get component templates.
-/// Retrieves information about component templates.
+/// Get information about component templates.
///
///
public sealed partial class GetComponentTemplateRequest : PlainRequest
@@ -125,7 +125,7 @@ public GetComponentTemplateRequest(Elastic.Clients.Elasticsearch.Name? name) : b
///
///
/// Get component templates.
-/// Retrieves information about component templates.
+/// Get information about component templates.
///
///
public sealed partial class GetComponentTemplateRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs
index 2670838909f..6189a98d131 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs
@@ -51,7 +51,6 @@ public sealed partial class PutComponentTemplateRequestParameters : RequestParam
///
///
/// Create or update a component template.
-/// Creates or updates a component template.
/// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.
///
///
@@ -71,6 +70,13 @@ public sealed partial class PutComponentTemplateRequestParameters : RequestParam
/// You can use C-style /* *\/ block comments in component templates.
/// You can include comments anywhere in the request body except before the opening curly bracket.
///
+///
+/// Applying component templates
+///
+///
+/// You cannot directly apply a component template to a data stream or index.
+/// To be applied, a component template must be included in an index template's composed_of list.
+///
///
public sealed partial class PutComponentTemplateRequest : PlainRequest
{
@@ -115,7 +121,7 @@ public PutComponentTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : ba
///
///
/// Optional user metadata about the component template.
- /// May have any contents. This map is not automatically generated by Elasticsearch.
+ /// It may have any contents. This map is not automatically generated by Elasticsearch.
/// This information is stored in the cluster state, so keeping it short is preferable.
/// To unset _meta, replace the template without specifying this information.
///
@@ -145,7 +151,6 @@ public PutComponentTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : ba
///
///
/// Create or update a component template.
-/// Creates or updates a component template.
/// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.
///
///
@@ -165,6 +170,13 @@ public PutComponentTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : ba
/// You can use C-style /* *\/ block comments in component templates.
/// You can include comments anywhere in the request body except before the opening curly bracket.
///
+///
+/// Applying component templates
+///
+///
+/// You cannot directly apply a component template to a data stream or index.
+/// To be applied, a component template must be included in an index template's composed_of list.
+///
///
public sealed partial class PutComponentTemplateRequestDescriptor : RequestDescriptor, PutComponentTemplateRequestParameters>
{
@@ -213,7 +225,7 @@ public PutComponentTemplateRequestDescriptor Deprecated(bool? depreca
///
///
/// Optional user metadata about the component template.
- /// May have any contents. This map is not automatically generated by Elasticsearch.
+ /// It may have any contents. This map is not automatically generated by Elasticsearch.
/// This information is stored in the cluster state, so keeping it short is preferable.
/// To unset _meta, replace the template without specifying this information.
///
@@ -310,7 +322,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Create or update a component template.
-/// Creates or updates a component template.
/// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.
///
///
@@ -330,6 +341,13 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
/// You can use C-style /* *\/ block comments in component templates.
/// You can include comments anywhere in the request body except before the opening curly bracket.
///
+///
+/// Applying component templates
+///
+///
+/// You cannot directly apply a component template to a data stream or index.
+/// To be applied, a component template must be included in an index template's composed_of list.
+///
///
public sealed partial class PutComponentTemplateRequestDescriptor : RequestDescriptor
{
@@ -378,7 +396,7 @@ public PutComponentTemplateRequestDescriptor Deprecated(bool? deprecated = true)
///
///
/// Optional user metadata about the component template.
- /// May have any contents. This map is not automatically generated by Elasticsearch.
+ /// It may have any contents. This map is not automatically generated by Elasticsearch.
/// This information is stored in the cluster state, so keeping it short is preferable.
/// To unset _meta, replace the template without specifying this information.
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs
index a6dcb0989ca..2ace77ec6b0 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountRequest.g.cs
@@ -36,14 +36,15 @@ public sealed partial class CountRequestParameters : RequestParameters
///
/// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices.
/// This behavior applies even if the request targets other open indices.
+ /// For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.
///
///
public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); }
///
///
- /// Analyzer to use for the query string.
- /// This parameter can only be used when the q query string parameter is specified.
+ /// The analyzer to use for the query string.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
public string? Analyzer { get => Q("analyzer"); set => Q("analyzer", value); }
@@ -51,7 +52,7 @@ public sealed partial class CountRequestParameters : RequestParameters
///
///
/// If true, wildcard and prefix queries are analyzed.
- /// This parameter can only be used when the q query string parameter is specified.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
public bool? AnalyzeWildcard { get => Q("analyze_wildcard"); set => Q("analyze_wildcard", value); }
@@ -59,35 +60,28 @@ public sealed partial class CountRequestParameters : RequestParameters
///
///
/// The default operator for query string query: AND or OR.
- /// This parameter can only be used when the q query string parameter is specified.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
public Elastic.Clients.Elasticsearch.QueryDsl.Operator? DefaultOperator { get => Q("default_operator"); set => Q("default_operator", value); }
///
///
- /// Field to use as default where no field prefix is given in the query string.
- /// This parameter can only be used when the q query string parameter is specified.
+ /// The field to use as a default when no field prefix is given in the query string.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
public string? Df { get => Q("df"); set => Q("df", value); }
///
///
- /// Type of index that wildcard patterns can match.
+ /// The type of index that wildcard patterns can match.
/// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
- /// Supports comma-separated values, such as open,hidden.
+ /// It supports comma-separated values, such as open,hidden.
///
///
public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); }
- ///
- ///
- /// If true, concrete, expanded or aliased indices are ignored when frozen.
- ///
- ///
- public bool? IgnoreThrottled { get => Q("ignore_throttled"); set => Q("ignore_throttled", value); }
-
///
///
/// If false, the request returns an error if it targets a missing or closed index.
@@ -98,45 +92,52 @@ public sealed partial class CountRequestParameters : RequestParameters
///
///
/// If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); }
///
///
- /// Sets the minimum _score value that documents must have to be included in the result.
+ /// The minimum _score value that documents must have to be included in the result.
///
///
public double? MinScore { get => Q("min_score"); set => Q("min_score", value); }
///
///
- /// Specifies the node or shard the operation should be performed on.
- /// Random by default.
+ /// The node or shard the operation should be performed on.
+ /// By default, it is random.
///
///
public string? Preference { get => Q("preference"); set => Q("preference", value); }
///
///
- /// Query in the Lucene query string syntax.
+ /// The query in Lucene query string syntax. This parameter cannot be used with a request body.
///
///
public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); }
///
///
- /// Custom value used to route operations to a specific shard.
+ /// A custom value used to route operations to a specific shard.
///
///
public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); }
///
///
- /// Maximum number of documents to collect for each shard.
+ /// The 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.
///
+ ///
+ /// IMPORTANT: Use with caution.
+ /// Elasticsearch applies this parameter to each shard handling the request.
+ /// When possible, let Elasticsearch perform early termination automatically.
+ /// Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.
+ ///
///
public long? TerminateAfter { get => Q("terminate_after"); set => Q("terminate_after", value); }
}
@@ -146,6 +147,18 @@ public sealed partial class CountRequestParameters : RequestParameters
/// Count search results.
/// Get the number of documents matching a query.
///
+///
+/// The query can be provided either by using a simple query string as a parameter, or by defining Query DSL within the request body.
+/// The query is optional. When no query is provided, the API uses match_all to count all the documents.
+///
+///
+/// The count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices.
+///
+///
+/// The operation is broadcast across all shards.
+/// For each shard ID group, a replica is chosen and the search is run against it.
+/// This means that replicas increase the scalability of the count.
+///
///
public partial class CountRequest : PlainRequest
{
@@ -169,6 +182,7 @@ public CountRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r =>
///
/// If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices.
/// This behavior applies even if the request targets other open indices.
+ /// For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.
///
///
[JsonIgnore]
@@ -176,8 +190,8 @@ public CountRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r =>
///
///
- /// Analyzer to use for the query string.
- /// This parameter can only be used when the q query string parameter is specified.
+ /// The analyzer to use for the query string.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
[JsonIgnore]
@@ -186,7 +200,7 @@ public CountRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r =>
///
///
/// If true, wildcard and prefix queries are analyzed.
- /// This parameter can only be used when the q query string parameter is specified.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
[JsonIgnore]
@@ -195,7 +209,7 @@ public CountRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r =>
///
///
/// The default operator for query string query: AND or OR.
- /// This parameter can only be used when the q query string parameter is specified.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
[JsonIgnore]
@@ -203,8 +217,8 @@ public CountRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r =>
///
///
- /// Field to use as default where no field prefix is given in the query string.
- /// This parameter can only be used when the q query string parameter is specified.
+ /// The field to use as a default when no field prefix is given in the query string.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
[JsonIgnore]
@@ -212,22 +226,14 @@ public CountRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r =>
///
///
- /// Type of index that wildcard patterns can match.
+ /// The type of index that wildcard patterns can match.
/// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
- /// Supports comma-separated values, such as open,hidden.
+ /// It supports comma-separated values, such as open,hidden.
///
///
[JsonIgnore]
public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); }
- ///
- ///
- /// If true, concrete, expanded or aliased indices are ignored when frozen.
- ///
- ///
- [JsonIgnore]
- public bool? IgnoreThrottled { get => Q("ignore_throttled"); set => Q("ignore_throttled", value); }
-
///
///
/// If false, the request returns an error if it targets a missing or closed index.
@@ -239,6 +245,7 @@ public CountRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r =>
///
///
/// If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
[JsonIgnore]
@@ -246,7 +253,7 @@ public CountRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r =>
///
///
- /// Sets the minimum _score value that documents must have to be included in the result.
+ /// The minimum _score value that documents must have to be included in the result.
///
///
[JsonIgnore]
@@ -254,8 +261,8 @@ public CountRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r =>
///
///
- /// Specifies the node or shard the operation should be performed on.
- /// Random by default.
+ /// The node or shard the operation should be performed on.
+ /// By default, it is random.
///
///
[JsonIgnore]
@@ -263,7 +270,7 @@ public CountRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r =>
///
///
- /// Query in the Lucene query string syntax.
+ /// The query in Lucene query string syntax. This parameter cannot be used with a request body.
///
///
[JsonIgnore]
@@ -271,7 +278,7 @@ public CountRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r =>
///
///
- /// Custom value used to route operations to a specific shard.
+ /// A custom value used to route operations to a specific shard.
///
///
[JsonIgnore]
@@ -279,17 +286,24 @@ public CountRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r =>
///
///
- /// Maximum number of documents to collect for each shard.
+ /// The 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.
///
+ ///
+ /// IMPORTANT: Use with caution.
+ /// Elasticsearch applies this parameter to each shard handling the request.
+ /// When possible, let Elasticsearch perform early termination automatically.
+ /// Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.
+ ///
///
[JsonIgnore]
public long? TerminateAfter { get => Q("terminate_after"); set => Q("terminate_after", value); }
///
///
- /// Defines the search definition using the Query DSL.
+ /// Defines the search query using Query DSL. A request body query cannot be used
+ /// with the q query string parameter.
///
///
[JsonInclude, JsonPropertyName("query")]
@@ -301,6 +315,18 @@ public CountRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r =>
/// Count search results.
/// Get the number of documents matching a query.
///
+///
+/// The query can be provided either by using a simple query string as a parameter, or by defining Query DSL within the request body.
+/// The query is optional. When no query is provided, the API uses match_all to count all the documents.
+///
+///
+/// The count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices.
+///
+///
+/// The operation is broadcast across all shards.
+/// For each shard ID group, a replica is chosen and the search is run against it.
+/// This means that replicas increase the scalability of the count.
+///
///
public sealed partial class CountRequestDescriptor : RequestDescriptor, CountRequestParameters>
{
@@ -328,7 +354,6 @@ public CountRequestDescriptor()
public CountRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator);
public CountRequestDescriptor Df(string? df) => Qs("df", df);
public CountRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards);
- public CountRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled);
public CountRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable);
public CountRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient);
public CountRequestDescriptor MinScore(double? minScore) => Qs("min_score", minScore);
@@ -349,7 +374,8 @@ public CountRequestDescriptor Indices(Elastic.Clients.Elasticsearch.I
///
///
- /// Defines the search definition using the Query DSL.
+ /// Defines the search query using Query DSL. A request body query cannot be used
+ /// with the q query string parameter.
///
///
public CountRequestDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? query)
@@ -404,6 +430,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
/// Count search results.
/// Get the number of documents matching a query.
///
+///
+/// The query can be provided either by using a simple query string as a parameter, or by defining Query DSL within the request body.
+/// The query is optional. When no query is provided, the API uses match_all to count all the documents.
+///
+///
+/// The count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices.
+///
+///
+/// The operation is broadcast across all shards.
+/// For each shard ID group, a replica is chosen and the search is run against it.
+/// This means that replicas increase the scalability of the count.
+///
///
public sealed partial class CountRequestDescriptor : RequestDescriptor
{
@@ -431,7 +469,6 @@ public CountRequestDescriptor()
public CountRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator);
public CountRequestDescriptor Df(string? df) => Qs("df", df);
public CountRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards);
- public CountRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled);
public CountRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable);
public CountRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient);
public CountRequestDescriptor MinScore(double? minScore) => Qs("min_score", minScore);
@@ -452,7 +489,8 @@ public CountRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? ind
///
///
- /// Defines the search definition using the Query DSL.
+ /// Defines the search query using Query DSL. A request body query cannot be used
+ /// with the q query string parameter.
///
///
public CountRequestDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? query)
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs
index e9cf25961c7..f477155194a 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateRequest.g.cs
@@ -34,46 +34,55 @@ public sealed partial class CreateRequestParameters : RequestParameters
{
///
///
- /// ID of the pipeline to use to preprocess incoming documents.
- /// If the index has a default ingest pipeline specified, then setting the value to _none disables the default ingest pipeline for this request.
- /// If a final pipeline is configured it will always run, regardless of the value of this parameter.
+ /// The ID of the pipeline to use to preprocess incoming documents.
+ /// If the index has a default ingest pipeline specified, setting the value to _none turns off the default ingest pipeline for this request.
+ /// If a final pipeline is configured, it will always run regardless of the value of this parameter.
///
///
public string? Pipeline { get => Q("pipeline"); set => Q("pipeline", value); }
///
///
- /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false do nothing with refreshes.
- /// Valid values: true, false, wait_for.
+ /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search.
+ /// If wait_for, it waits for a refresh to make this operation visible to search.
+ /// If false, it does nothing with refreshes.
///
///
public Elastic.Clients.Elasticsearch.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
///
///
- /// Custom value used to route operations to a specific shard.
+ /// A custom value that is used to route operations to a specific shard.
///
///
public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); }
///
///
- /// Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
+ /// The period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
+ /// Elasticsearch waits for at least the specified timeout period before failing.
+ /// The actual wait time could be longer, particularly when multiple waits occur.
+ ///
+ ///
+ /// This parameter is useful for situations where the primary shard assigned to perform the operation might not be available when the operation runs.
+ /// Some reasons for this might be that the primary shard is currently recovering from a gateway or undergoing relocation.
+ /// By default, the operation will wait on the primary shard to become available for at least 1 minute before failing and responding with an error.
+ /// The actual wait time could be longer, particularly when multiple waits occur.
///
///
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); }
///
///
- /// Explicit version number for concurrency control.
- /// The specified version must match the current version of the document for the request to succeed.
+ /// The explicit version number for concurrency control.
+ /// It must be a non-negative long number.
///
///
public long? Version { get => Q("version"); set => Q("version", value); }
///
///
- /// Specific version type: external, external_gte.
+ /// The version type.
///
///
public Elastic.Clients.Elasticsearch.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); }
@@ -81,7 +90,8 @@ public sealed partial class CreateRequestParameters : 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).
+ /// You can set it to all or any positive integer up to the total number of shards in the index (number_of_replicas+1).
+ /// The default value of 1 means it waits for each primary shard to be active.
///
///
public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); }
@@ -89,9 +99,108 @@ public sealed partial class CreateRequestParameters : RequestParameters
///
///
-/// Index a document.
-/// Adds a JSON document to the specified data stream or index and makes it searchable.
-/// If the target is an index and the document already exists, the request updates the document and increments its version.
+/// Create a new document in the index.
+///
+///
+/// You can index a new JSON document with the /<target>/_doc/ or /<target>/_create/<_id> APIs
+/// Using _create guarantees that the document is indexed only if it does not already exist.
+/// It returns a 409 response when a document with a same ID already exists in the index.
+/// To update an existing document, you must use the /<target>/_doc/ API.
+///
+///
+/// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:
+///
+///
+/// -
+///
+/// To add a document using the PUT /<target>/_create/<_id> or POST /<target>/_create/<_id> request formats, you must have the create_doc, create, index, or write index privilege.
+///
+///
+/// -
+///
+/// To automatically create a data stream or index with this API request, you must have the auto_configure, create_index, or manage index privilege.
+///
+///
+///
+///
+/// Automatic data stream creation requires a matching index template with data stream enabled.
+///
+///
+/// Automatically create data streams and indices
+///
+///
+/// If the request's target doesn't exist and matches an index template with a data_stream definition, the index operation automatically creates the data stream.
+///
+///
+/// If the target doesn't exist and doesn't match a data stream template, the operation automatically creates the index and applies any matching index templates.
+///
+///
+/// NOTE: Elasticsearch includes several built-in index templates. To avoid naming collisions with these templates, refer to index pattern documentation.
+///
+///
+/// If no mapping exists, the index operation creates a dynamic mapping.
+/// By default, new fields and objects are automatically added to the mapping if needed.
+///
+///
+/// Automatic index creation is controlled by the action.auto_create_index setting.
+/// If it is true, any index can be created automatically.
+/// You can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns or set it to false to turn off automatic index creation entirely.
+/// Specify a comma-separated list of patterns you want to allow or prefix each pattern with + or - to indicate whether it should be allowed or blocked.
+/// When a list is specified, the default behaviour is to disallow.
+///
+///
+/// NOTE: The action.auto_create_index setting affects the automatic creation of indices only.
+/// It does not affect the creation of data streams.
+///
+///
+/// Routing
+///
+///
+/// By default, shard placement — or routing — is controlled by using a hash of the document's ID value.
+/// For more explicit control, the value fed into the hash function used by the router can be directly specified on a per-operation basis using the routing parameter.
+///
+///
+/// When setting up explicit mapping, you can also use the _routing field to direct the index operation to extract the routing value from the document itself.
+/// This does come at the (very minimal) cost of an additional document parsing pass.
+/// If the _routing mapping is defined and set to be required, the index operation will fail if no routing value is provided or extracted.
+///
+///
+/// NOTE: Data streams do not support custom routing unless they were created with the allow_custom_routing setting enabled in the template.
+///
+///
+/// ** Distributed**
+///
+///
+/// The index operation is directed to the primary shard based on its route and performed on the actual node containing this shard.
+/// After the primary shard completes the operation, if needed, the update is distributed to applicable replicas.
+///
+///
+/// Active shards
+///
+///
+/// To improve the resiliency of writes to the system, indexing operations can be configured to wait for a certain number of active shard copies before proceeding with the operation.
+/// If the requisite number of active shard copies are not available, then the write operation must wait and retry, until either the requisite shard copies have started or a timeout occurs.
+/// By default, write operations only wait for the primary shards to be active before proceeding (that is to say wait_for_active_shards is 1).
+/// This default can be overridden in the index settings dynamically by setting index.write.wait_for_active_shards.
+/// To alter this behavior per operation, use the wait_for_active_shards request parameter.
+///
+///
+/// Valid values are all or any positive integer up to the total number of configured copies per shard in the index (which is number_of_replicas+1).
+/// Specifying a negative value or a number greater than the number of shard copies will throw an error.
+///
+///
+/// For example, suppose you have a cluster of three nodes, A, B, and C and you create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes).
+/// If you attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding.
+/// This means that even if B and C went down and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data.
+/// If wait_for_active_shards is set on the request to 3 (and all three nodes are up), the indexing operation will require 3 active shard copies before proceeding.
+/// This requirement should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard.
+/// However, if you set wait_for_active_shards to all (or to 4, which is the same in this situation), the indexing operation will not proceed as you do not have all 4 copies of each shard active in the index.
+/// The operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard.
+///
+///
+/// It is important to note that this setting greatly reduces the chances of the write operation not writing to the requisite number of shard copies, but it does not completely eliminate the possibility, because this check occurs before the write operation starts.
+/// After the write operation is underway, it is still possible for replication to fail on any number of shard copies but still succeed on the primary.
+/// The _shards section of the API response reveals the number of shard copies on which replication succeeded and failed.
///
///
public sealed partial class CreateRequest : PlainRequest, ISelfSerializable
@@ -110,9 +219,9 @@ public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
- /// ID of the pipeline to use to preprocess incoming documents.
- /// If the index has a default ingest pipeline specified, then setting the value to _none disables the default ingest pipeline for this request.
- /// If a final pipeline is configured it will always run, regardless of the value of this parameter.
+ /// The ID of the pipeline to use to preprocess incoming documents.
+ /// If the index has a default ingest pipeline specified, setting the value to _none turns off the default ingest pipeline for this request.
+ /// If a final pipeline is configured, it will always run regardless of the value of this parameter.
///
///
[JsonIgnore]
@@ -120,8 +229,9 @@ public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
- /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false do nothing with refreshes.
- /// Valid values: true, false, wait_for.
+ /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search.
+ /// If wait_for, it waits for a refresh to make this operation visible to search.
+ /// If false, it does nothing with refreshes.
///
///
[JsonIgnore]
@@ -129,7 +239,7 @@ public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
- /// Custom value used to route operations to a specific shard.
+ /// A custom value that is used to route operations to a specific shard.
///
///
[JsonIgnore]
@@ -137,7 +247,15 @@ public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
- /// Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
+ /// The period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
+ /// Elasticsearch waits for at least the specified timeout period before failing.
+ /// The actual wait time could be longer, particularly when multiple waits occur.
+ ///
+ ///
+ /// This parameter is useful for situations where the primary shard assigned to perform the operation might not be available when the operation runs.
+ /// Some reasons for this might be that the primary shard is currently recovering from a gateway or undergoing relocation.
+ /// By default, the operation will wait on the primary shard to become available for at least 1 minute before failing and responding with an error.
+ /// The actual wait time could be longer, particularly when multiple waits occur.
///
///
[JsonIgnore]
@@ -145,8 +263,8 @@ public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
- /// Explicit version number for concurrency control.
- /// The specified version must match the current version of the document for the request to succeed.
+ /// The explicit version number for concurrency control.
+ /// It must be a non-negative long number.
///
///
[JsonIgnore]
@@ -154,7 +272,7 @@ public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
- /// Specific version type: external, external_gte.
+ /// The version type.
///
///
[JsonIgnore]
@@ -163,7 +281,8 @@ public CreateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
/// 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).
+ /// You can set it to all or any positive integer up to the total number of shards in the index (number_of_replicas+1).
+ /// The default value of 1 means it waits for each primary shard to be active.
///
///
[JsonIgnore]
@@ -179,9 +298,108 @@ void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions op
///
///
-/// Index a document.
-/// Adds a JSON document to the specified data stream or index and makes it searchable.
-/// If the target is an index and the document already exists, the request updates the document and increments its version.
+/// Create a new document in the index.
+///
+///
+/// You can index a new JSON document with the /<target>/_doc/ or /<target>/_create/<_id> APIs
+/// Using _create guarantees that the document is indexed only if it does not already exist.
+/// It returns a 409 response when a document with a same ID already exists in the index.
+/// To update an existing document, you must use the /<target>/_doc/ API.
+///
+///
+/// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:
+///
+///
+/// -
+///
+/// To add a document using the PUT /<target>/_create/<_id> or POST /<target>/_create/<_id> request formats, you must have the create_doc, create, index, or write index privilege.
+///
+///
+/// -
+///
+/// To automatically create a data stream or index with this API request, you must have the auto_configure, create_index, or manage index privilege.
+///
+///
+///
+///
+/// Automatic data stream creation requires a matching index template with data stream enabled.
+///
+///
+/// Automatically create data streams and indices
+///
+///
+/// If the request's target doesn't exist and matches an index template with a data_stream definition, the index operation automatically creates the data stream.
+///
+///
+/// If the target doesn't exist and doesn't match a data stream template, the operation automatically creates the index and applies any matching index templates.
+///
+///
+/// NOTE: Elasticsearch includes several built-in index templates. To avoid naming collisions with these templates, refer to index pattern documentation.
+///
+///
+/// If no mapping exists, the index operation creates a dynamic mapping.
+/// By default, new fields and objects are automatically added to the mapping if needed.
+///
+///
+/// Automatic index creation is controlled by the action.auto_create_index setting.
+/// If it is true, any index can be created automatically.
+/// You can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns or set it to false to turn off automatic index creation entirely.
+/// Specify a comma-separated list of patterns you want to allow or prefix each pattern with + or - to indicate whether it should be allowed or blocked.
+/// When a list is specified, the default behaviour is to disallow.
+///
+///
+/// NOTE: The action.auto_create_index setting affects the automatic creation of indices only.
+/// It does not affect the creation of data streams.
+///
+///
+/// Routing
+///
+///
+/// By default, shard placement — or routing — is controlled by using a hash of the document's ID value.
+/// For more explicit control, the value fed into the hash function used by the router can be directly specified on a per-operation basis using the routing parameter.
+///
+///
+/// When setting up explicit mapping, you can also use the _routing field to direct the index operation to extract the routing value from the document itself.
+/// This does come at the (very minimal) cost of an additional document parsing pass.
+/// If the _routing mapping is defined and set to be required, the index operation will fail if no routing value is provided or extracted.
+///
+///
+/// NOTE: Data streams do not support custom routing unless they were created with the allow_custom_routing setting enabled in the template.
+///
+///
+/// ** Distributed**
+///
+///
+/// The index operation is directed to the primary shard based on its route and performed on the actual node containing this shard.
+/// After the primary shard completes the operation, if needed, the update is distributed to applicable replicas.
+///
+///
+/// Active shards
+///
+///
+/// To improve the resiliency of writes to the system, indexing operations can be configured to wait for a certain number of active shard copies before proceeding with the operation.
+/// If the requisite number of active shard copies are not available, then the write operation must wait and retry, until either the requisite shard copies have started or a timeout occurs.
+/// By default, write operations only wait for the primary shards to be active before proceeding (that is to say wait_for_active_shards is 1).
+/// This default can be overridden in the index settings dynamically by setting index.write.wait_for_active_shards.
+/// To alter this behavior per operation, use the wait_for_active_shards request parameter.
+///
+///
+/// Valid values are all or any positive integer up to the total number of configured copies per shard in the index (which is number_of_replicas+1).
+/// Specifying a negative value or a number greater than the number of shard copies will throw an error.
+///
+///
+/// For example, suppose you have a cluster of three nodes, A, B, and C and you create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes).
+/// If you attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding.
+/// This means that even if B and C went down and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data.
+/// If wait_for_active_shards is set on the request to 3 (and all three nodes are up), the indexing operation will require 3 active shard copies before proceeding.
+/// This requirement should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard.
+/// However, if you set wait_for_active_shards to all (or to 4, which is the same in this situation), the indexing operation will not proceed as you do not have all 4 copies of each shard active in the index.
+/// The operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard.
+///
+///
+/// It is important to note that this setting greatly reduces the chances of the write operation not writing to the requisite number of shard copies, but it does not completely eliminate the possibility, because this check occurs before the write operation starts.
+/// After the write operation is underway, it is still possible for replication to fail on any number of shard copies but still succeed on the primary.
+/// The _shards section of the API response reveals the number of shard copies on which replication succeeded and failed.
///
///
public sealed partial class CreateRequestDescriptor : RequestDescriptor, CreateRequestParameters>
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs
index edeaeb613d2..4f790c1c9c8 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs
@@ -30,18 +30,61 @@ public sealed partial class CreateResponse : ElasticsearchResponse
{
[JsonInclude, JsonPropertyName("forced_refresh")]
public bool? ForcedRefresh { get; init; }
+
+ ///
+ ///
+ /// The unique identifier for the added document.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_id")]
public string Id { get; init; }
+
+ ///
+ ///
+ /// The name of the index the document was added to.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_index")]
public string Index { get; init; }
+
+ ///
+ ///
+ /// The primary term assigned to the document for the indexing operation.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_primary_term")]
public long? PrimaryTerm { get; init; }
+
+ ///
+ ///
+ /// The result of the indexing operation: created or updated.
+ ///
+ ///
[JsonInclude, JsonPropertyName("result")]
public Elastic.Clients.Elasticsearch.Result Result { get; init; }
+
+ ///
+ ///
+ /// The sequence number assigned to the document for the indexing operation.
+ /// Sequence numbers are used to ensure an older version of a document doesn't overwrite a newer version.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_seq_no")]
public long? SeqNo { get; init; }
+
+ ///
+ ///
+ /// Information about the replication process of the operation.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_shards")]
public Elastic.Clients.Elasticsearch.ShardStatistics Shards { get; init; }
+
+ ///
+ ///
+ /// The document version, which is incremented each time the document is updated.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_version")]
public long Version { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowRequest.g.cs
index 713e143d421..bc1b6ba95fe 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowRequest.g.cs
@@ -34,10 +34,7 @@ public sealed partial class FollowRequestParameters : RequestParameters
{
///
///
- /// Specifies the number of shards to wait on being active before responding. This defaults to waiting on none of the shards to be
- /// active.
- /// A shard must be restored from the leader index before being active. Restoring a follower shard requires transferring all the
- /// remote Lucene segment files to the follower index.
+ /// Sets the number of shard copies that must be active before returning. Defaults to 0. Set to all for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
///
///
public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); }
@@ -66,131 +63,35 @@ public FollowRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r =>
///
///
- /// Specifies the number of shards to wait on being active before responding. This defaults to waiting on none of the shards to be
- /// active.
- /// A shard must be restored from the leader index before being active. Restoring a follower shard requires transferring all the
- /// remote Lucene segment files to the follower index.
+ /// Sets the number of shard copies that must be active before returning. Defaults to 0. Set to all for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
///
///
[JsonIgnore]
public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); }
-
- ///
- ///
- /// If the leader index is part of a data stream, the name to which the local data stream for the followed index should be renamed.
- ///
- ///
- [JsonInclude, JsonPropertyName("data_stream_name")]
- public string? DataStreamName { get; set; }
-
- ///
- ///
- /// The name of the index in the leader cluster to follow.
- ///
- ///
[JsonInclude, JsonPropertyName("leader_index")]
- public Elastic.Clients.Elasticsearch.IndexName LeaderIndex { get; set; }
-
- ///
- ///
- /// The maximum number of outstanding reads requests from the remote cluster.
- ///
- ///
+ public Elastic.Clients.Elasticsearch.IndexName? LeaderIndex { get; set; }
[JsonInclude, JsonPropertyName("max_outstanding_read_requests")]
public long? MaxOutstandingReadRequests { get; set; }
-
- ///
- ///
- /// The maximum number of outstanding write requests on the follower.
- ///
- ///
[JsonInclude, JsonPropertyName("max_outstanding_write_requests")]
- public int? MaxOutstandingWriteRequests { get; set; }
-
- ///
- ///
- /// The maximum number of operations to pull per read from the remote cluster.
- ///
- ///
+ public long? MaxOutstandingWriteRequests { get; set; }
[JsonInclude, JsonPropertyName("max_read_request_operation_count")]
- public int? MaxReadRequestOperationCount { get; set; }
-
- ///
- ///
- /// The maximum size in bytes of per read of a batch of operations pulled from the remote cluster.
- ///
- ///
+ public long? MaxReadRequestOperationCount { get; set; }
[JsonInclude, JsonPropertyName("max_read_request_size")]
- public Elastic.Clients.Elasticsearch.ByteSize? MaxReadRequestSize { get; set; }
-
- ///
- ///
- /// The maximum time to wait before retrying an operation that failed exceptionally. An exponential backoff strategy is employed when
- /// retrying.
- ///
- ///
+ public string? MaxReadRequestSize { get; set; }
[JsonInclude, JsonPropertyName("max_retry_delay")]
public Elastic.Clients.Elasticsearch.Duration? MaxRetryDelay { get; set; }
-
- ///
- ///
- /// The maximum number of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will be
- /// deferred until the number of queued operations goes below the limit.
- ///
- ///
[JsonInclude, JsonPropertyName("max_write_buffer_count")]
- public int? MaxWriteBufferCount { get; set; }
-
- ///
- ///
- /// The maximum total bytes of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will
- /// be deferred until the total bytes of queued operations goes below the limit.
- ///
- ///
+ public long? MaxWriteBufferCount { get; set; }
[JsonInclude, JsonPropertyName("max_write_buffer_size")]
- public Elastic.Clients.Elasticsearch.ByteSize? MaxWriteBufferSize { get; set; }
-
- ///
- ///
- /// The maximum number of operations per bulk write request executed on the follower.
- ///
- ///
+ public string? MaxWriteBufferSize { get; set; }
[JsonInclude, JsonPropertyName("max_write_request_operation_count")]
- public int? MaxWriteRequestOperationCount { get; set; }
-
- ///
- ///
- /// The maximum total bytes of operations per bulk write request executed on the follower.
- ///
- ///
+ public long? MaxWriteRequestOperationCount { get; set; }
[JsonInclude, JsonPropertyName("max_write_request_size")]
- public Elastic.Clients.Elasticsearch.ByteSize? MaxWriteRequestSize { get; set; }
-
- ///
- ///
- /// The maximum time to wait for new operations on the remote cluster when the follower index is synchronized with the leader index.
- /// When the timeout has elapsed, the poll for operations will return to the follower so that it can update some statistics.
- /// Then the follower will immediately attempt to read from the leader again.
- ///
- ///
+ public string? MaxWriteRequestSize { get; set; }
[JsonInclude, JsonPropertyName("read_poll_timeout")]
public Elastic.Clients.Elasticsearch.Duration? ReadPollTimeout { get; set; }
-
- ///
- ///
- /// The remote cluster containing the leader index.
- ///
- ///
[JsonInclude, JsonPropertyName("remote_cluster")]
- public string RemoteCluster { get; set; }
-
- ///
- ///
- /// Settings to override from the leader index.
- ///
- ///
- [JsonInclude, JsonPropertyName("settings")]
- public Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? Settings { get; set; }
+ public string? RemoteCluster { get; set; }
}
///
@@ -228,211 +129,100 @@ public FollowRequestDescriptor Index(Elastic.Clients.Elasticsearch.In
return Self;
}
- private string? DataStreamNameValue { get; set; }
- private Elastic.Clients.Elasticsearch.IndexName LeaderIndexValue { get; set; }
+ private Elastic.Clients.Elasticsearch.IndexName? LeaderIndexValue { get; set; }
private long? MaxOutstandingReadRequestsValue { get; set; }
- private int? MaxOutstandingWriteRequestsValue { get; set; }
- private int? MaxReadRequestOperationCountValue { get; set; }
- private Elastic.Clients.Elasticsearch.ByteSize? MaxReadRequestSizeValue { get; set; }
+ private long? MaxOutstandingWriteRequestsValue { get; set; }
+ private long? MaxReadRequestOperationCountValue { get; set; }
+ private string? MaxReadRequestSizeValue { get; set; }
private Elastic.Clients.Elasticsearch.Duration? MaxRetryDelayValue { get; set; }
- private int? MaxWriteBufferCountValue { get; set; }
- private Elastic.Clients.Elasticsearch.ByteSize? MaxWriteBufferSizeValue { get; set; }
- private int? MaxWriteRequestOperationCountValue { get; set; }
- private Elastic.Clients.Elasticsearch.ByteSize? MaxWriteRequestSizeValue { get; set; }
+ private long? MaxWriteBufferCountValue { get; set; }
+ private string? MaxWriteBufferSizeValue { get; set; }
+ private long? MaxWriteRequestOperationCountValue { get; set; }
+ private string? MaxWriteRequestSizeValue { get; set; }
private Elastic.Clients.Elasticsearch.Duration? ReadPollTimeoutValue { get; set; }
- private string RemoteClusterValue { get; set; }
- private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? SettingsValue { get; set; }
- private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor SettingsDescriptor { get; set; }
- private Action> SettingsDescriptorAction { get; set; }
+ private string? RemoteClusterValue { get; set; }
- ///
- ///
- /// If the leader index is part of a data stream, the name to which the local data stream for the followed index should be renamed.
- ///
- ///
- public FollowRequestDescriptor DataStreamName(string? dataStreamName)
- {
- DataStreamNameValue = dataStreamName;
- return Self;
- }
-
- ///
- ///
- /// The name of the index in the leader cluster to follow.
- ///
- ///
- public FollowRequestDescriptor LeaderIndex(Elastic.Clients.Elasticsearch.IndexName leaderIndex)
+ public FollowRequestDescriptor LeaderIndex(Elastic.Clients.Elasticsearch.IndexName? leaderIndex)
{
LeaderIndexValue = leaderIndex;
return Self;
}
- ///
- ///
- /// The maximum number of outstanding reads requests from the remote cluster.
- ///
- ///
public FollowRequestDescriptor MaxOutstandingReadRequests(long? maxOutstandingReadRequests)
{
MaxOutstandingReadRequestsValue = maxOutstandingReadRequests;
return Self;
}
- ///
- ///
- /// The maximum number of outstanding write requests on the follower.
- ///
- ///
- public FollowRequestDescriptor MaxOutstandingWriteRequests(int? maxOutstandingWriteRequests)
+ public FollowRequestDescriptor MaxOutstandingWriteRequests(long? maxOutstandingWriteRequests)
{
MaxOutstandingWriteRequestsValue = maxOutstandingWriteRequests;
return Self;
}
- ///
- ///
- /// The maximum number of operations to pull per read from the remote cluster.
- ///
- ///
- public FollowRequestDescriptor MaxReadRequestOperationCount(int? maxReadRequestOperationCount)
+ public FollowRequestDescriptor MaxReadRequestOperationCount(long? maxReadRequestOperationCount)
{
MaxReadRequestOperationCountValue = maxReadRequestOperationCount;
return Self;
}
- ///
- ///
- /// The maximum size in bytes of per read of a batch of operations pulled from the remote cluster.
- ///
- ///
- public FollowRequestDescriptor MaxReadRequestSize(Elastic.Clients.Elasticsearch.ByteSize? maxReadRequestSize)
+ public FollowRequestDescriptor MaxReadRequestSize(string? maxReadRequestSize)
{
MaxReadRequestSizeValue = maxReadRequestSize;
return Self;
}
- ///
- ///
- /// The maximum time to wait before retrying an operation that failed exceptionally. An exponential backoff strategy is employed when
- /// retrying.
- ///
- ///
public FollowRequestDescriptor MaxRetryDelay(Elastic.Clients.Elasticsearch.Duration? maxRetryDelay)
{
MaxRetryDelayValue = maxRetryDelay;
return Self;
}
- ///
- ///
- /// The maximum number of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will be
- /// deferred until the number of queued operations goes below the limit.
- ///
- ///
- public FollowRequestDescriptor MaxWriteBufferCount(int? maxWriteBufferCount)
+ public FollowRequestDescriptor MaxWriteBufferCount(long? maxWriteBufferCount)
{
MaxWriteBufferCountValue = maxWriteBufferCount;
return Self;
}
- ///
- ///
- /// The maximum total bytes of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will
- /// be deferred until the total bytes of queued operations goes below the limit.
- ///
- ///
- public FollowRequestDescriptor MaxWriteBufferSize(Elastic.Clients.Elasticsearch.ByteSize? maxWriteBufferSize)
+ public FollowRequestDescriptor MaxWriteBufferSize(string? maxWriteBufferSize)
{
MaxWriteBufferSizeValue = maxWriteBufferSize;
return Self;
}
- ///
- ///
- /// The maximum number of operations per bulk write request executed on the follower.
- ///
- ///
- public FollowRequestDescriptor MaxWriteRequestOperationCount(int? maxWriteRequestOperationCount)
+ public FollowRequestDescriptor MaxWriteRequestOperationCount(long? maxWriteRequestOperationCount)
{
MaxWriteRequestOperationCountValue = maxWriteRequestOperationCount;
return Self;
}
- ///
- ///
- /// The maximum total bytes of operations per bulk write request executed on the follower.
- ///
- ///
- public FollowRequestDescriptor MaxWriteRequestSize(Elastic.Clients.Elasticsearch.ByteSize? maxWriteRequestSize)
+ public FollowRequestDescriptor MaxWriteRequestSize(string? maxWriteRequestSize)
{
MaxWriteRequestSizeValue = maxWriteRequestSize;
return Self;
}
- ///
- ///
- /// The maximum time to wait for new operations on the remote cluster when the follower index is synchronized with the leader index.
- /// When the timeout has elapsed, the poll for operations will return to the follower so that it can update some statistics.
- /// Then the follower will immediately attempt to read from the leader again.
- ///
- ///
public FollowRequestDescriptor ReadPollTimeout(Elastic.Clients.Elasticsearch.Duration? readPollTimeout)
{
ReadPollTimeoutValue = readPollTimeout;
return Self;
}
- ///
- ///
- /// The remote cluster containing the leader index.
- ///
- ///
- public FollowRequestDescriptor RemoteCluster(string remoteCluster)
+ public FollowRequestDescriptor RemoteCluster(string? remoteCluster)
{
RemoteClusterValue = remoteCluster;
return Self;
}
- ///
- ///
- /// Settings to override from the leader index.
- ///
- ///
- public FollowRequestDescriptor Settings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? settings)
- {
- SettingsDescriptor = null;
- SettingsDescriptorAction = null;
- SettingsValue = settings;
- return Self;
- }
-
- public FollowRequestDescriptor Settings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor descriptor)
- {
- SettingsValue = null;
- SettingsDescriptorAction = null;
- SettingsDescriptor = descriptor;
- return Self;
- }
-
- public FollowRequestDescriptor Settings(Action> configure)
- {
- SettingsValue = null;
- SettingsDescriptor = null;
- SettingsDescriptorAction = configure;
- return Self;
- }
-
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
{
writer.WriteStartObject();
- if (!string.IsNullOrEmpty(DataStreamNameValue))
+ if (LeaderIndexValue is not null)
{
- writer.WritePropertyName("data_stream_name");
- writer.WriteStringValue(DataStreamNameValue);
+ writer.WritePropertyName("leader_index");
+ JsonSerializer.Serialize(writer, LeaderIndexValue, options);
}
- writer.WritePropertyName("leader_index");
- JsonSerializer.Serialize(writer, LeaderIndexValue, options);
if (MaxOutstandingReadRequestsValue.HasValue)
{
writer.WritePropertyName("max_outstanding_read_requests");
@@ -451,10 +241,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
writer.WriteNumberValue(MaxReadRequestOperationCountValue.Value);
}
- if (MaxReadRequestSizeValue is not null)
+ if (!string.IsNullOrEmpty(MaxReadRequestSizeValue))
{
writer.WritePropertyName("max_read_request_size");
- JsonSerializer.Serialize(writer, MaxReadRequestSizeValue, options);
+ writer.WriteStringValue(MaxReadRequestSizeValue);
}
if (MaxRetryDelayValue is not null)
@@ -469,10 +259,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
writer.WriteNumberValue(MaxWriteBufferCountValue.Value);
}
- if (MaxWriteBufferSizeValue is not null)
+ if (!string.IsNullOrEmpty(MaxWriteBufferSizeValue))
{
writer.WritePropertyName("max_write_buffer_size");
- JsonSerializer.Serialize(writer, MaxWriteBufferSizeValue, options);
+ writer.WriteStringValue(MaxWriteBufferSizeValue);
}
if (MaxWriteRequestOperationCountValue.HasValue)
@@ -481,10 +271,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
writer.WriteNumberValue(MaxWriteRequestOperationCountValue.Value);
}
- if (MaxWriteRequestSizeValue is not null)
+ if (!string.IsNullOrEmpty(MaxWriteRequestSizeValue))
{
writer.WritePropertyName("max_write_request_size");
- JsonSerializer.Serialize(writer, MaxWriteRequestSizeValue, options);
+ writer.WriteStringValue(MaxWriteRequestSizeValue);
}
if (ReadPollTimeoutValue is not null)
@@ -493,22 +283,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, ReadPollTimeoutValue, options);
}
- writer.WritePropertyName("remote_cluster");
- writer.WriteStringValue(RemoteClusterValue);
- if (SettingsDescriptor is not null)
- {
- writer.WritePropertyName("settings");
- JsonSerializer.Serialize(writer, SettingsDescriptor, options);
- }
- else if (SettingsDescriptorAction is not null)
- {
- writer.WritePropertyName("settings");
- JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor(SettingsDescriptorAction), options);
- }
- else if (SettingsValue is not null)
+ if (!string.IsNullOrEmpty(RemoteClusterValue))
{
- writer.WritePropertyName("settings");
- JsonSerializer.Serialize(writer, SettingsValue, options);
+ writer.WritePropertyName("remote_cluster");
+ writer.WriteStringValue(RemoteClusterValue);
}
writer.WriteEndObject();
@@ -546,211 +324,100 @@ public FollowRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName ind
return Self;
}
- private string? DataStreamNameValue { get; set; }
- private Elastic.Clients.Elasticsearch.IndexName LeaderIndexValue { get; set; }
+ private Elastic.Clients.Elasticsearch.IndexName? LeaderIndexValue { get; set; }
private long? MaxOutstandingReadRequestsValue { get; set; }
- private int? MaxOutstandingWriteRequestsValue { get; set; }
- private int? MaxReadRequestOperationCountValue { get; set; }
- private Elastic.Clients.Elasticsearch.ByteSize? MaxReadRequestSizeValue { get; set; }
+ private long? MaxOutstandingWriteRequestsValue { get; set; }
+ private long? MaxReadRequestOperationCountValue { get; set; }
+ private string? MaxReadRequestSizeValue { get; set; }
private Elastic.Clients.Elasticsearch.Duration? MaxRetryDelayValue { get; set; }
- private int? MaxWriteBufferCountValue { get; set; }
- private Elastic.Clients.Elasticsearch.ByteSize? MaxWriteBufferSizeValue { get; set; }
- private int? MaxWriteRequestOperationCountValue { get; set; }
- private Elastic.Clients.Elasticsearch.ByteSize? MaxWriteRequestSizeValue { get; set; }
+ private long? MaxWriteBufferCountValue { get; set; }
+ private string? MaxWriteBufferSizeValue { get; set; }
+ private long? MaxWriteRequestOperationCountValue { get; set; }
+ private string? MaxWriteRequestSizeValue { get; set; }
private Elastic.Clients.Elasticsearch.Duration? ReadPollTimeoutValue { get; set; }
- private string RemoteClusterValue { get; set; }
- private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? SettingsValue { get; set; }
- private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor SettingsDescriptor { get; set; }
- private Action SettingsDescriptorAction { get; set; }
-
- ///
- ///
- /// If the leader index is part of a data stream, the name to which the local data stream for the followed index should be renamed.
- ///
- ///
- public FollowRequestDescriptor DataStreamName(string? dataStreamName)
- {
- DataStreamNameValue = dataStreamName;
- return Self;
- }
+ private string? RemoteClusterValue { get; set; }
- ///
- ///
- /// The name of the index in the leader cluster to follow.
- ///
- ///
- public FollowRequestDescriptor LeaderIndex(Elastic.Clients.Elasticsearch.IndexName leaderIndex)
+ public FollowRequestDescriptor LeaderIndex(Elastic.Clients.Elasticsearch.IndexName? leaderIndex)
{
LeaderIndexValue = leaderIndex;
return Self;
}
- ///
- ///
- /// The maximum number of outstanding reads requests from the remote cluster.
- ///
- ///
public FollowRequestDescriptor MaxOutstandingReadRequests(long? maxOutstandingReadRequests)
{
MaxOutstandingReadRequestsValue = maxOutstandingReadRequests;
return Self;
}
- ///
- ///
- /// The maximum number of outstanding write requests on the follower.
- ///
- ///
- public FollowRequestDescriptor MaxOutstandingWriteRequests(int? maxOutstandingWriteRequests)
+ public FollowRequestDescriptor MaxOutstandingWriteRequests(long? maxOutstandingWriteRequests)
{
MaxOutstandingWriteRequestsValue = maxOutstandingWriteRequests;
return Self;
}
- ///
- ///
- /// The maximum number of operations to pull per read from the remote cluster.
- ///
- ///
- public FollowRequestDescriptor MaxReadRequestOperationCount(int? maxReadRequestOperationCount)
+ public FollowRequestDescriptor MaxReadRequestOperationCount(long? maxReadRequestOperationCount)
{
MaxReadRequestOperationCountValue = maxReadRequestOperationCount;
return Self;
}
- ///
- ///
- /// The maximum size in bytes of per read of a batch of operations pulled from the remote cluster.
- ///
- ///
- public FollowRequestDescriptor MaxReadRequestSize(Elastic.Clients.Elasticsearch.ByteSize? maxReadRequestSize)
+ public FollowRequestDescriptor MaxReadRequestSize(string? maxReadRequestSize)
{
MaxReadRequestSizeValue = maxReadRequestSize;
return Self;
}
- ///
- ///
- /// The maximum time to wait before retrying an operation that failed exceptionally. An exponential backoff strategy is employed when
- /// retrying.
- ///
- ///
public FollowRequestDescriptor MaxRetryDelay(Elastic.Clients.Elasticsearch.Duration? maxRetryDelay)
{
MaxRetryDelayValue = maxRetryDelay;
return Self;
}
- ///
- ///
- /// The maximum number of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will be
- /// deferred until the number of queued operations goes below the limit.
- ///
- ///
- public FollowRequestDescriptor MaxWriteBufferCount(int? maxWriteBufferCount)
+ public FollowRequestDescriptor MaxWriteBufferCount(long? maxWriteBufferCount)
{
MaxWriteBufferCountValue = maxWriteBufferCount;
return Self;
}
- ///
- ///
- /// The maximum total bytes of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will
- /// be deferred until the total bytes of queued operations goes below the limit.
- ///
- ///
- public FollowRequestDescriptor MaxWriteBufferSize(Elastic.Clients.Elasticsearch.ByteSize? maxWriteBufferSize)
+ public FollowRequestDescriptor MaxWriteBufferSize(string? maxWriteBufferSize)
{
MaxWriteBufferSizeValue = maxWriteBufferSize;
return Self;
}
- ///
- ///
- /// The maximum number of operations per bulk write request executed on the follower.
- ///
- ///
- public FollowRequestDescriptor MaxWriteRequestOperationCount(int? maxWriteRequestOperationCount)
+ public FollowRequestDescriptor MaxWriteRequestOperationCount(long? maxWriteRequestOperationCount)
{
MaxWriteRequestOperationCountValue = maxWriteRequestOperationCount;
return Self;
}
- ///
- ///
- /// The maximum total bytes of operations per bulk write request executed on the follower.
- ///
- ///
- public FollowRequestDescriptor MaxWriteRequestSize(Elastic.Clients.Elasticsearch.ByteSize? maxWriteRequestSize)
+ public FollowRequestDescriptor MaxWriteRequestSize(string? maxWriteRequestSize)
{
MaxWriteRequestSizeValue = maxWriteRequestSize;
return Self;
}
- ///
- ///
- /// The maximum time to wait for new operations on the remote cluster when the follower index is synchronized with the leader index.
- /// When the timeout has elapsed, the poll for operations will return to the follower so that it can update some statistics.
- /// Then the follower will immediately attempt to read from the leader again.
- ///
- ///
public FollowRequestDescriptor ReadPollTimeout(Elastic.Clients.Elasticsearch.Duration? readPollTimeout)
{
ReadPollTimeoutValue = readPollTimeout;
return Self;
}
- ///
- ///
- /// The remote cluster containing the leader index.
- ///
- ///
- public FollowRequestDescriptor RemoteCluster(string remoteCluster)
+ public FollowRequestDescriptor RemoteCluster(string? remoteCluster)
{
RemoteClusterValue = remoteCluster;
return Self;
}
- ///
- ///
- /// Settings to override from the leader index.
- ///
- ///
- public FollowRequestDescriptor Settings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? settings)
- {
- SettingsDescriptor = null;
- SettingsDescriptorAction = null;
- SettingsValue = settings;
- return Self;
- }
-
- public FollowRequestDescriptor Settings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor descriptor)
- {
- SettingsValue = null;
- SettingsDescriptorAction = null;
- SettingsDescriptor = descriptor;
- return Self;
- }
-
- public FollowRequestDescriptor Settings(Action configure)
- {
- SettingsValue = null;
- SettingsDescriptor = null;
- SettingsDescriptorAction = configure;
- return Self;
- }
-
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
{
writer.WriteStartObject();
- if (!string.IsNullOrEmpty(DataStreamNameValue))
+ if (LeaderIndexValue is not null)
{
- writer.WritePropertyName("data_stream_name");
- writer.WriteStringValue(DataStreamNameValue);
+ writer.WritePropertyName("leader_index");
+ JsonSerializer.Serialize(writer, LeaderIndexValue, options);
}
- writer.WritePropertyName("leader_index");
- JsonSerializer.Serialize(writer, LeaderIndexValue, options);
if (MaxOutstandingReadRequestsValue.HasValue)
{
writer.WritePropertyName("max_outstanding_read_requests");
@@ -769,10 +436,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
writer.WriteNumberValue(MaxReadRequestOperationCountValue.Value);
}
- if (MaxReadRequestSizeValue is not null)
+ if (!string.IsNullOrEmpty(MaxReadRequestSizeValue))
{
writer.WritePropertyName("max_read_request_size");
- JsonSerializer.Serialize(writer, MaxReadRequestSizeValue, options);
+ writer.WriteStringValue(MaxReadRequestSizeValue);
}
if (MaxRetryDelayValue is not null)
@@ -787,10 +454,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
writer.WriteNumberValue(MaxWriteBufferCountValue.Value);
}
- if (MaxWriteBufferSizeValue is not null)
+ if (!string.IsNullOrEmpty(MaxWriteBufferSizeValue))
{
writer.WritePropertyName("max_write_buffer_size");
- JsonSerializer.Serialize(writer, MaxWriteBufferSizeValue, options);
+ writer.WriteStringValue(MaxWriteBufferSizeValue);
}
if (MaxWriteRequestOperationCountValue.HasValue)
@@ -799,10 +466,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
writer.WriteNumberValue(MaxWriteRequestOperationCountValue.Value);
}
- if (MaxWriteRequestSizeValue is not null)
+ if (!string.IsNullOrEmpty(MaxWriteRequestSizeValue))
{
writer.WritePropertyName("max_write_request_size");
- JsonSerializer.Serialize(writer, MaxWriteRequestSizeValue, options);
+ writer.WriteStringValue(MaxWriteRequestSizeValue);
}
if (ReadPollTimeoutValue is not null)
@@ -811,22 +478,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, ReadPollTimeoutValue, options);
}
- writer.WritePropertyName("remote_cluster");
- writer.WriteStringValue(RemoteClusterValue);
- if (SettingsDescriptor is not null)
- {
- writer.WritePropertyName("settings");
- JsonSerializer.Serialize(writer, SettingsDescriptor, options);
- }
- else if (SettingsDescriptorAction is not null)
- {
- writer.WritePropertyName("settings");
- JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor(SettingsDescriptorAction), options);
- }
- else if (SettingsValue is not null)
+ if (!string.IsNullOrEmpty(RemoteClusterValue))
{
- writer.WritePropertyName("settings");
- JsonSerializer.Serialize(writer, SettingsValue, options);
+ writer.WritePropertyName("remote_cluster");
+ writer.WriteStringValue(RemoteClusterValue);
}
writer.WriteEndObject();
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs
index 34541aa28c1..69efb1ad911 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs
@@ -44,6 +44,7 @@ public sealed partial class DeleteByQueryRequestParameters : RequestParameters
///
///
/// Analyzer to use for the query string.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
public string? Analyzer { get => Q("analyzer"); set => Q("analyzer", value); }
@@ -51,6 +52,7 @@ public sealed partial class DeleteByQueryRequestParameters : RequestParameters
///
///
/// If true, wildcard and prefix queries are analyzed.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
public bool? AnalyzeWildcard { get => Q("analyze_wildcard"); set => Q("analyze_wildcard", value); }
@@ -65,22 +67,24 @@ public sealed partial class DeleteByQueryRequestParameters : RequestParameters
///
///
/// The default operator for query string query: AND or OR.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
public Elastic.Clients.Elasticsearch.QueryDsl.Operator? DefaultOperator { get => Q("default_operator"); set => Q("default_operator", value); }
///
///
- /// Field to use as default where no field prefix is given in the query string.
+ /// The field to use as default where no field prefix is given in the query string.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
public string? Df { get => Q("df"); set => Q("df", value); }
///
///
- /// Type of index that wildcard patterns can match.
+ /// The type of index that wildcard patterns can match.
/// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
- /// Supports comma-separated values, such as open,hidden. Valid values are: all, open, closed, hidden, none.
+ /// It supports comma-separated values, such as open,hidden.
///
///
public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); }
@@ -102,21 +106,22 @@ public sealed partial class DeleteByQueryRequestParameters : RequestParameters
///
///
/// If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); }
///
///
- /// Specifies the node or shard the operation should be performed on.
- /// Random by default.
+ /// The node or shard the operation should be performed on.
+ /// It is random by default.
///
///
public string? Preference { get => Q("preference"); set => Q("preference", value); }
///
///
- /// Query in the Lucene query string syntax.
+ /// A query in the Lucene query string syntax.
///
///
public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); }
@@ -124,6 +129,8 @@ public sealed partial class DeleteByQueryRequestParameters : RequestParameters
///
///
/// If true, Elasticsearch refreshes all shards involved in the delete by query after the request completes.
+ /// This is different than the delete API's refresh parameter, which causes just the shard that received the delete request to be refreshed.
+ /// Unlike the delete API, it does not support wait_for.
///
///
public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); }
@@ -145,29 +152,29 @@ public sealed partial class DeleteByQueryRequestParameters : RequestParameters
///
///
- /// Custom value used to route operations to a specific shard.
+ /// A custom value used to route operations to a specific shard.
///
///
public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); }
///
///
- /// Period to retain the search context for scrolling.
+ /// The period to retain the search context for scrolling.
///
///
public Elastic.Clients.Elasticsearch.Duration? Scroll { get => Q("scroll"); set => Q("scroll", value); }
///
///
- /// Size of the scroll request that powers the operation.
+ /// The size of the scroll request that powers the operation.
///
///
public long? ScrollSize { get => Q("scroll_size"); set => Q("scroll_size", value); }
///
///
- /// Explicit timeout for each search request.
- /// Defaults to no timeout.
+ /// The explicit timeout for each search request.
+ /// It defaults to no timeout.
///
///
public Elastic.Clients.Elasticsearch.Duration? SearchTimeout { get => Q("search_timeout"); set => Q("search_timeout", value); }
@@ -175,7 +182,7 @@ public sealed partial class DeleteByQueryRequestParameters : RequestParameters
///
///
/// The type of the search operation.
- /// Available options: query_then_fetch, dfs_query_then_fetch.
+ /// Available options include query_then_fetch and dfs_query_then_fetch.
///
///
public Elastic.Clients.Elasticsearch.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); }
@@ -189,23 +196,25 @@ public sealed partial class DeleteByQueryRequestParameters : RequestParameters
///
///
- /// A comma-separated list of <field>:<direction> pairs.
+ /// A comma-separated list of <field>:<direction> pairs.
///
///
public ICollection? Sort { get => Q?>("sort"); set => Q("sort", value); }
///
///
- /// Specific tag of the request for logging and statistical purposes.
+ /// The specific tag of the request for logging and statistical purposes.
///
///
public ICollection? Stats { get => Q?>("stats"); set => Q("stats", value); }
///
///
- /// Maximum number of documents to collect for each shard.
+ /// The maximum number of documents to collect for each shard.
/// If a query reaches this limit, Elasticsearch terminates the query early.
/// Elasticsearch collects documents before sorting.
+ ///
+ ///
/// Use with caution.
/// Elasticsearch applies this parameter to each shard handling the request.
/// When possible, let Elasticsearch perform early termination automatically.
@@ -216,7 +225,7 @@ public sealed partial class DeleteByQueryRequestParameters : RequestParameters
///
///
- /// Period each deletion request waits for active shards.
+ /// The period each deletion request waits for active shards.
///
///
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); }
@@ -231,7 +240,8 @@ public sealed partial class DeleteByQueryRequestParameters : 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).
+ /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1).
+ /// The timeout value controls how long each write request waits for unavailable shards to become available.
///
///
public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); }
@@ -239,6 +249,7 @@ public sealed partial class DeleteByQueryRequestParameters : RequestParameters
///
///
/// If true, the request blocks until the operation is complete.
+ /// If false, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to cancel or get the status of the task. Elasticsearch creates a record of this task as a document at .tasks/task/${taskId}. When you are done with a task, you should delete the task document so Elasticsearch can reclaim the space.
///
///
public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); }
@@ -247,8 +258,154 @@ public sealed partial class DeleteByQueryRequestParameters : RequestParameters
///
///
/// Delete documents.
+///
+///
/// Deletes documents that match the specified query.
///
+///
+/// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:
+///
+///
+/// -
+///
+/// read
+///
+///
+/// -
+///
+/// delete or write
+///
+///
+///
+///
+/// You can specify the query criteria in the request URI or the request body using the same syntax as the search API.
+/// When you submit a delete by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and deletes matching documents using internal versioning.
+/// If a document changes between the time that the snapshot is taken and the delete operation is processed, it results in a version conflict and the delete operation fails.
+///
+///
+/// NOTE: Documents with a version equal to 0 cannot be deleted using delete by query because internal versioning does not support 0 as a valid version number.
+///
+///
+/// While processing a delete by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents to delete.
+/// A bulk delete request is performed for each batch of matching documents.
+/// If a search or bulk request is rejected, the requests are retried up to 10 times, with exponential back off.
+/// If the maximum retry limit is reached, processing halts and all failed requests are returned in the response.
+/// Any delete requests that completed successfully still stick, they are not rolled back.
+///
+///
+/// You can opt to count version conflicts instead of halting and returning by setting conflicts to proceed.
+/// Note that if you opt to count version conflicts the operation could attempt to delete more documents from the source than max_docs until it has successfully deleted max_docs documents, or it has gone through every document in the source query.
+///
+///
+/// Throttling delete requests
+///
+///
+/// To control the rate at which delete by query issues batches of delete operations, you can set requests_per_second to any positive decimal number.
+/// This pads each batch with a wait time to throttle the rate.
+/// Set requests_per_second to -1 to disable throttling.
+///
+///
+/// Throttling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.
+/// The padding time is the difference between the batch size divided by the requests_per_second and the time spent writing.
+/// By default the batch size is 1000, so if requests_per_second is set to 500:
+///
+///
+/// target_time = 1000 / 500 per second = 2 seconds
+/// wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds
+///
+///
+/// Since the batch is issued as a single _bulk request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.
+/// This is "bursty" instead of "smooth".
+///
+///
+/// Slicing
+///
+///
+/// Delete by query supports sliced scroll to parallelize the delete process.
+/// This can improve efficiency and provide a convenient way to break the request down into smaller parts.
+///
+///
+/// Setting slices to auto lets Elasticsearch choose the number of slices to use.
+/// This setting will use one slice per shard, up to a certain limit.
+/// If there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.
+/// Adding slices to the delete by query operation creates sub-requests which means it has some quirks:
+///
+///
+/// -
+///
+/// You can see these requests in the tasks APIs. These sub-requests are "child" tasks of the task for the request with slices.
+///
+///
+/// -
+///
+/// Fetching the status of the task for the request with slices only contains the status of completed slices.
+///
+///
+/// -
+///
+/// These sub-requests are individually addressable for things like cancellation and rethrottling.
+///
+///
+/// -
+///
+/// Rethrottling the request with slices will rethrottle the unfinished sub-request proportionally.
+///
+///
+/// -
+///
+/// Canceling the request with slices will cancel each sub-request.
+///
+///
+/// -
+///
+/// Due to the nature of slices each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.
+///
+///
+/// -
+///
+/// Parameters like requests_per_second and max_docs on a request with slices are distributed proportionally to each sub-request. Combine that with the earlier point about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being deleted.
+///
+///
+/// -
+///
+/// Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.
+///
+///
+///
+///
+/// If you're slicing manually or otherwise tuning automatic slicing, keep in mind that:
+///
+///
+/// -
+///
+/// Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many slices hurts performance. Setting slices higher than the number of shards generally does not improve efficiency and adds overhead.
+///
+///
+/// -
+///
+/// Delete performance scales linearly across available resources with the number of slices.
+///
+///
+///
+///
+/// Whether query or delete performance dominates the runtime depends on the documents being reindexed and cluster resources.
+///
+///
+/// Cancel a delete by query operation
+///
+///
+/// Any delete by query can be canceled using the task cancel API. For example:
+///
+///
+/// POST _tasks/r1A2WoRbTwKZ516z6NEs5A:36619/_cancel
+///
+///
+/// The task ID can be found by using the get tasks API.
+///
+///
+/// Cancellation should happen quickly but might take a few seconds.
+/// The get task status API will continue to list the delete by query task until this task checks that it has been cancelled and terminates itself.
+///
///
public sealed partial class DeleteByQueryRequest : PlainRequest
{
@@ -277,6 +434,7 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
/// Analyzer to use for the query string.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
[JsonIgnore]
@@ -285,6 +443,7 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
/// If true, wildcard and prefix queries are analyzed.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
[JsonIgnore]
@@ -301,6 +460,7 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
/// The default operator for query string query: AND or OR.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
[JsonIgnore]
@@ -308,7 +468,8 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
- /// Field to use as default where no field prefix is given in the query string.
+ /// The field to use as default where no field prefix is given in the query string.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
[JsonIgnore]
@@ -316,9 +477,9 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
- /// Type of index that wildcard patterns can match.
+ /// The type of index that wildcard patterns can match.
/// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
- /// Supports comma-separated values, such as open,hidden. Valid values are: all, open, closed, hidden, none.
+ /// It supports comma-separated values, such as open,hidden.
///
///
[JsonIgnore]
@@ -343,6 +504,7 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
/// If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
[JsonIgnore]
@@ -350,8 +512,8 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
- /// Specifies the node or shard the operation should be performed on.
- /// Random by default.
+ /// The node or shard the operation should be performed on.
+ /// It is random by default.
///
///
[JsonIgnore]
@@ -359,7 +521,7 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
- /// Query in the Lucene query string syntax.
+ /// A query in the Lucene query string syntax.
///
///
[JsonIgnore]
@@ -368,6 +530,8 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
/// If true, Elasticsearch refreshes all shards involved in the delete by query after the request completes.
+ /// This is different than the delete API's refresh parameter, which causes just the shard that received the delete request to be refreshed.
+ /// Unlike the delete API, it does not support wait_for.
///
///
[JsonIgnore]
@@ -392,7 +556,7 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
- /// Custom value used to route operations to a specific shard.
+ /// A custom value used to route operations to a specific shard.
///
///
[JsonIgnore]
@@ -400,7 +564,7 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
- /// Period to retain the search context for scrolling.
+ /// The period to retain the search context for scrolling.
///
///
[JsonIgnore]
@@ -408,7 +572,7 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
- /// Size of the scroll request that powers the operation.
+ /// The size of the scroll request that powers the operation.
///
///
[JsonIgnore]
@@ -416,8 +580,8 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
- /// Explicit timeout for each search request.
- /// Defaults to no timeout.
+ /// The explicit timeout for each search request.
+ /// It defaults to no timeout.
///
///
[JsonIgnore]
@@ -426,7 +590,7 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
/// The type of the search operation.
- /// Available options: query_then_fetch, dfs_query_then_fetch.
+ /// Available options include query_then_fetch and dfs_query_then_fetch.
///
///
[JsonIgnore]
@@ -442,7 +606,7 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
- /// A comma-separated list of <field>:<direction> pairs.
+ /// A comma-separated list of <field>:<direction> pairs.
///
///
[JsonIgnore]
@@ -450,7 +614,7 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
- /// Specific tag of the request for logging and statistical purposes.
+ /// The specific tag of the request for logging and statistical purposes.
///
///
[JsonIgnore]
@@ -458,9 +622,11 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
- /// Maximum number of documents to collect for each shard.
+ /// The maximum number of documents to collect for each shard.
/// If a query reaches this limit, Elasticsearch terminates the query early.
/// Elasticsearch collects documents before sorting.
+ ///
+ ///
/// Use with caution.
/// Elasticsearch applies this parameter to each shard handling the request.
/// When possible, let Elasticsearch perform early termination automatically.
@@ -472,7 +638,7 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
- /// Period each deletion request waits for active shards.
+ /// The period each deletion request waits for active shards.
///
///
[JsonIgnore]
@@ -489,7 +655,8 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
/// 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).
+ /// Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1).
+ /// The timeout value controls how long each write request waits for unavailable shards to become available.
///
///
[JsonIgnore]
@@ -498,6 +665,7 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
/// If true, the request blocks until the operation is complete.
+ /// If false, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to cancel or get the status of the task. Elasticsearch creates a record of this task as a document at .tasks/task/${taskId}. When you are done with a task, you should delete the task document so Elasticsearch can reclaim the space.
///
///
[JsonIgnore]
@@ -513,7 +681,7 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
- /// Specifies the documents to delete using the Query DSL.
+ /// The documents to delete specified with Query DSL.
///
///
[JsonInclude, JsonPropertyName("query")]
@@ -531,8 +699,154 @@ public DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas
///
///
/// Delete documents.
+///
+///
/// Deletes documents that match the specified query.
///
+///
+/// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:
+///
+///
+/// -
+///
+/// read
+///
+///
+/// -
+///
+/// delete or write
+///
+///
+///
+///
+/// You can specify the query criteria in the request URI or the request body using the same syntax as the search API.
+/// When you submit a delete by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and deletes matching documents using internal versioning.
+/// If a document changes between the time that the snapshot is taken and the delete operation is processed, it results in a version conflict and the delete operation fails.
+///
+///
+/// NOTE: Documents with a version equal to 0 cannot be deleted using delete by query because internal versioning does not support 0 as a valid version number.
+///
+///
+/// While processing a delete by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents to delete.
+/// A bulk delete request is performed for each batch of matching documents.
+/// If a search or bulk request is rejected, the requests are retried up to 10 times, with exponential back off.
+/// If the maximum retry limit is reached, processing halts and all failed requests are returned in the response.
+/// Any delete requests that completed successfully still stick, they are not rolled back.
+///
+///
+/// You can opt to count version conflicts instead of halting and returning by setting conflicts to proceed.
+/// Note that if you opt to count version conflicts the operation could attempt to delete more documents from the source than max_docs until it has successfully deleted max_docs documents, or it has gone through every document in the source query.
+///
+///
+/// Throttling delete requests
+///
+///
+/// To control the rate at which delete by query issues batches of delete operations, you can set requests_per_second to any positive decimal number.
+/// This pads each batch with a wait time to throttle the rate.
+/// Set requests_per_second to -1 to disable throttling.
+///
+///
+/// Throttling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.
+/// The padding time is the difference between the batch size divided by the requests_per_second and the time spent writing.
+/// By default the batch size is 1000, so if requests_per_second is set to 500:
+///
+///
+/// target_time = 1000 / 500 per second = 2 seconds
+/// wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds
+///
+///
+/// Since the batch is issued as a single _bulk request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.
+/// This is "bursty" instead of "smooth".
+///
+///
+/// Slicing
+///
+///
+/// Delete by query supports sliced scroll to parallelize the delete process.
+/// This can improve efficiency and provide a convenient way to break the request down into smaller parts.
+///
+///
+/// Setting slices to auto lets Elasticsearch choose the number of slices to use.
+/// This setting will use one slice per shard, up to a certain limit.
+/// If there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.
+/// Adding slices to the delete by query operation creates sub-requests which means it has some quirks:
+///
+///
+/// -
+///
+/// You can see these requests in the tasks APIs. These sub-requests are "child" tasks of the task for the request with slices.
+///
+///
+/// -
+///
+/// Fetching the status of the task for the request with slices only contains the status of completed slices.
+///
+///
+/// -
+///
+/// These sub-requests are individually addressable for things like cancellation and rethrottling.
+///
+///
+/// -
+///
+/// Rethrottling the request with slices will rethrottle the unfinished sub-request proportionally.
+///
+///
+/// -
+///
+/// Canceling the request with slices will cancel each sub-request.
+///
+///
+/// -
+///
+/// Due to the nature of slices each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.
+///
+///
+/// -
+///
+/// Parameters like requests_per_second and max_docs on a request with slices are distributed proportionally to each sub-request. Combine that with the earlier point about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being deleted.
+///
+///
+/// -
+///
+/// Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.
+///
+///
+///
+///
+/// If you're slicing manually or otherwise tuning automatic slicing, keep in mind that:
+///
+///
+/// -
+///
+/// Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many slices hurts performance. Setting slices higher than the number of shards generally does not improve efficiency and adds overhead.
+///
+///
+/// -
+///
+/// Delete performance scales linearly across available resources with the number of slices.
+///
+///
+///
+///
+/// Whether query or delete performance dominates the runtime depends on the documents being reindexed and cluster resources.
+///
+///
+/// Cancel a delete by query operation
+///
+///
+/// Any delete by query can be canceled using the task cancel API. For example:
+///
+///
+/// POST _tasks/r1A2WoRbTwKZ516z6NEs5A:36619/_cancel
+///
+///
+/// The task ID can be found by using the get tasks API.
+///
+///
+/// Cancellation should happen quickly but might take a few seconds.
+/// The get task status API will continue to list the delete by query task until this task checks that it has been cancelled and terminates itself.
+///
///
public sealed partial class DeleteByQueryRequestDescriptor : RequestDescriptor, DeleteByQueryRequestParameters>
{
@@ -610,7 +924,7 @@ public DeleteByQueryRequestDescriptor MaxDocs(long? maxDocs)
///
///
- /// Specifies the documents to delete using the Query DSL.
+ /// The documents to delete specified with Query DSL.
///
///
public DeleteByQueryRequestDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? query)
@@ -714,8 +1028,154 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Delete documents.
+///
+///
/// Deletes documents that match the specified query.
///
+///
+/// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:
+///
+///
+/// -
+///
+/// read
+///
+///
+/// -
+///
+/// delete or write
+///
+///
+///
+///
+/// You can specify the query criteria in the request URI or the request body using the same syntax as the search API.
+/// When you submit a delete by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and deletes matching documents using internal versioning.
+/// If a document changes between the time that the snapshot is taken and the delete operation is processed, it results in a version conflict and the delete operation fails.
+///
+///
+/// NOTE: Documents with a version equal to 0 cannot be deleted using delete by query because internal versioning does not support 0 as a valid version number.
+///
+///
+/// While processing a delete by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents to delete.
+/// A bulk delete request is performed for each batch of matching documents.
+/// If a search or bulk request is rejected, the requests are retried up to 10 times, with exponential back off.
+/// If the maximum retry limit is reached, processing halts and all failed requests are returned in the response.
+/// Any delete requests that completed successfully still stick, they are not rolled back.
+///
+///
+/// You can opt to count version conflicts instead of halting and returning by setting conflicts to proceed.
+/// Note that if you opt to count version conflicts the operation could attempt to delete more documents from the source than max_docs until it has successfully deleted max_docs documents, or it has gone through every document in the source query.
+///
+///
+/// Throttling delete requests
+///
+///
+/// To control the rate at which delete by query issues batches of delete operations, you can set requests_per_second to any positive decimal number.
+/// This pads each batch with a wait time to throttle the rate.
+/// Set requests_per_second to -1 to disable throttling.
+///
+///
+/// Throttling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.
+/// The padding time is the difference between the batch size divided by the requests_per_second and the time spent writing.
+/// By default the batch size is 1000, so if requests_per_second is set to 500:
+///
+///
+/// target_time = 1000 / 500 per second = 2 seconds
+/// wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds
+///
+///
+/// Since the batch is issued as a single _bulk request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.
+/// This is "bursty" instead of "smooth".
+///
+///
+/// Slicing
+///
+///
+/// Delete by query supports sliced scroll to parallelize the delete process.
+/// This can improve efficiency and provide a convenient way to break the request down into smaller parts.
+///
+///
+/// Setting slices to auto lets Elasticsearch choose the number of slices to use.
+/// This setting will use one slice per shard, up to a certain limit.
+/// If there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.
+/// Adding slices to the delete by query operation creates sub-requests which means it has some quirks:
+///
+///
+/// -
+///
+/// You can see these requests in the tasks APIs. These sub-requests are "child" tasks of the task for the request with slices.
+///
+///
+/// -
+///
+/// Fetching the status of the task for the request with slices only contains the status of completed slices.
+///
+///
+/// -
+///
+/// These sub-requests are individually addressable for things like cancellation and rethrottling.
+///
+///
+/// -
+///
+/// Rethrottling the request with slices will rethrottle the unfinished sub-request proportionally.
+///
+///
+/// -
+///
+/// Canceling the request with slices will cancel each sub-request.
+///
+///
+/// -
+///
+/// Due to the nature of slices each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.
+///
+///
+/// -
+///
+/// Parameters like requests_per_second and max_docs on a request with slices are distributed proportionally to each sub-request. Combine that with the earlier point about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being deleted.
+///
+///
+/// -
+///
+/// Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.
+///
+///
+///
+///
+/// If you're slicing manually or otherwise tuning automatic slicing, keep in mind that:
+///
+///
+/// -
+///
+/// Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many slices hurts performance. Setting slices higher than the number of shards generally does not improve efficiency and adds overhead.
+///
+///
+/// -
+///
+/// Delete performance scales linearly across available resources with the number of slices.
+///
+///
+///
+///
+/// Whether query or delete performance dominates the runtime depends on the documents being reindexed and cluster resources.
+///
+///
+/// Cancel a delete by query operation
+///
+///
+/// Any delete by query can be canceled using the task cancel API. For example:
+///
+///
+/// POST _tasks/r1A2WoRbTwKZ516z6NEs5A:36619/_cancel
+///
+///
+/// The task ID can be found by using the get tasks API.
+///
+///
+/// Cancellation should happen quickly but might take a few seconds.
+/// The get task status API will continue to list the delete by query task until this task checks that it has been cancelled and terminates itself.
+///
///
public sealed partial class DeleteByQueryRequestDescriptor : RequestDescriptor
{
@@ -789,7 +1249,7 @@ public DeleteByQueryRequestDescriptor MaxDocs(long? maxDocs)
///
///
- /// Specifies the documents to delete using the Query DSL.
+ /// The documents to delete specified with Query DSL.
///
///
public DeleteByQueryRequestDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? query)
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs
index 04d1a451f0d..34d777cadbb 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs
@@ -28,16 +28,57 @@ namespace Elastic.Clients.Elasticsearch;
public sealed partial class DeleteByQueryResponse : ElasticsearchResponse
{
+ ///
+ ///
+ /// The number of scroll responses pulled back by the delete by query.
+ ///
+ ///
[JsonInclude, JsonPropertyName("batches")]
public long? Batches { get; init; }
+
+ ///
+ ///
+ /// The number of documents that were successfully deleted.
+ ///
+ ///
[JsonInclude, JsonPropertyName("deleted")]
public long? Deleted { get; init; }
+
+ ///
+ ///
+ /// An array of failures if there were any unrecoverable errors during the process.
+ /// If this array is not empty, the request ended abnormally because of those failures.
+ /// Delete by query is implemented using batches and any failures cause the entire process to end but all failures in the current batch are collected into the array.
+ /// You can use the conflicts option to prevent reindex from ending on version conflicts.
+ ///
+ ///
[JsonInclude, JsonPropertyName("failures")]
public IReadOnlyCollection? Failures { get; init; }
+
+ ///
+ ///
+ /// This field is always equal to zero for delete by query.
+ /// It exists only so that delete by query, update by query, and reindex APIs return responses with the same structure.
+ ///
+ ///
[JsonInclude, JsonPropertyName("noops")]
public long? Noops { get; init; }
+
+ ///
+ ///
+ /// The number of requests per second effectively run during the delete by query.
+ ///
+ ///
[JsonInclude, JsonPropertyName("requests_per_second")]
public float? RequestsPerSecond { get; init; }
+
+ ///
+ ///
+ /// The number of retries attempted by delete by query.
+ /// bulk is the number of bulk actions retried.
+ /// search is the number of search actions retried.
+ ///
+ ///
[JsonInclude, JsonPropertyName("retries")]
public Elastic.Clients.Elasticsearch.Retries? Retries { get; init; }
[JsonInclude, JsonPropertyName("slice_id")]
@@ -46,18 +87,55 @@ public sealed partial class DeleteByQueryResponse : ElasticsearchResponse
public Elastic.Clients.Elasticsearch.TaskId? Task { get; init; }
[JsonInclude, JsonPropertyName("throttled")]
public Elastic.Clients.Elasticsearch.Duration? Throttled { get; init; }
+
+ ///
+ ///
+ /// The number of milliseconds the request slept to conform to requests_per_second.
+ ///
+ ///
[JsonInclude, JsonPropertyName("throttled_millis")]
public long? ThrottledMillis { get; init; }
[JsonInclude, JsonPropertyName("throttled_until")]
public Elastic.Clients.Elasticsearch.Duration? ThrottledUntil { get; init; }
+
+ ///
+ ///
+ /// This field should always be equal to zero in a _delete_by_query response.
+ /// It has meaning only when using the task API, where it indicates the next time (in milliseconds since epoch) a throttled request will be run again in order to conform to requests_per_second.
+ ///
+ ///
[JsonInclude, JsonPropertyName("throttled_until_millis")]
public long? ThrottledUntilMillis { get; init; }
+
+ ///
+ ///
+ /// If true, some requests run during the delete by query operation timed out.
+ ///
+ ///
[JsonInclude, JsonPropertyName("timed_out")]
public bool? TimedOut { get; init; }
+
+ ///
+ ///
+ /// The number of milliseconds from start to end of the whole operation.
+ ///
+ ///
[JsonInclude, JsonPropertyName("took")]
public long? Took { get; init; }
+
+ ///
+ ///
+ /// The number of documents that were successfully processed.
+ ///
+ ///
[JsonInclude, JsonPropertyName("total")]
public long? Total { get; init; }
+
+ ///
+ ///
+ /// The number of version conflicts that the delete by query hit.
+ ///
+ ///
[JsonInclude, JsonPropertyName("version_conflicts")]
public long? VersionConflicts { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleRequest.g.cs
index 2b09f0d917c..20985a3d66d 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRethrottleRequest.g.cs
@@ -35,6 +35,7 @@ public sealed partial class DeleteByQueryRethrottleRequestParameters : RequestPa
///
///
/// The throttle for this request in sub-requests per second.
+ /// To disable throttling, set it to -1.
///
///
public float? RequestsPerSecond { get => Q("requests_per_second"); set => Q("requests_per_second", value); }
@@ -66,6 +67,7 @@ public DeleteByQueryRethrottleRequest(Elastic.Clients.Elasticsearch.TaskId taskI
///
///
/// The throttle for this request in sub-requests per second.
+ /// To disable throttling, set it to -1.
///
///
[JsonIgnore]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs
index 479d7e6c9a3..4eee442b580 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs
@@ -48,45 +48,52 @@ public sealed partial class DeleteRequestParameters : RequestParameters
///
///
- /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false do nothing with refreshes.
- /// Valid values: true, false, wait_for.
+ /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search.
+ /// If wait_for, it waits for a refresh to make this operation visible to search.
+ /// If false, it does nothing with refreshes.
///
///
public Elastic.Clients.Elasticsearch.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
///
///
- /// Custom value used to route operations to a specific shard.
+ /// A custom value used to route operations to a specific shard.
///
///
public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); }
///
///
- /// Period to wait for active shards.
+ /// The period to wait for active shards.
+ ///
+ ///
+ /// This parameter is useful for situations where the primary shard assigned to perform the delete operation might not be available when the delete operation runs.
+ /// Some reasons for this might be that the primary shard is currently recovering from a store or undergoing relocation.
+ /// By default, the delete operation will wait on the primary shard to become available for up to 1 minute before failing and responding with an error.
///
///
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); }
///
///
- /// Explicit version number for concurrency control.
- /// The specified version must match the current version of the document for the request to succeed.
+ /// An explicit version number for concurrency control.
+ /// It must match the current version of the document for the request to succeed.
///
///
public long? Version { get => Q("version"); set => Q("version", value); }
///
///
- /// Specific version type: external, external_gte.
+ /// The version type.
///
///
public Elastic.Clients.Elasticsearch.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); }
///
///
- /// 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).
+ /// The minimum number of shard copies that must be active before proceeding with the operation.
+ /// You can set it to all or any positive integer up to the total number of shards in the index (number_of_replicas+1).
+ /// The default value of 1 means it waits for each primary shard to be active.
///
///
public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); }
@@ -95,7 +102,56 @@ public sealed partial class DeleteRequestParameters : RequestParameters
///
///
/// Delete a document.
-/// Removes a JSON document from the specified index.
+///
+///
+/// Remove a JSON document from the specified index.
+///
+///
+/// NOTE: You cannot send deletion requests directly to a data stream.
+/// To delete a document in a data stream, you must target the backing index containing the document.
+///
+///
+/// Optimistic concurrency control
+///
+///
+/// Delete operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the if_seq_no and if_primary_term parameters.
+/// If a mismatch is detected, the operation will result in a VersionConflictException and a status code of 409.
+///
+///
+/// Versioning
+///
+///
+/// Each document indexed is versioned.
+/// When deleting a document, the version can be specified to make sure the relevant document you are trying to delete is actually being deleted and it has not changed in the meantime.
+/// Every write operation run on a document, deletes included, causes its version to be incremented.
+/// The version number of a deleted document remains available for a short time after deletion to allow for control of concurrent operations.
+/// The length of time for which a deleted document's version remains available is determined by the index.gc_deletes index setting.
+///
+///
+/// Routing
+///
+///
+/// If routing is used during indexing, the routing value also needs to be specified to delete a document.
+///
+///
+/// If the _routing mapping is set to required and no routing value is specified, the delete API throws a RoutingMissingException and rejects the request.
+///
+///
+/// For example:
+///
+///
+/// DELETE /my-index-000001/_doc/1?routing=shard-1
+///
+///
+/// This request deletes the document with ID 1, but it is routed based on the user.
+/// The document is not deleted if the correct routing is not specified.
+///
+///
+/// Distributed
+///
+///
+/// The delete operation gets hashed into a specific shard ID.
+/// It then gets redirected into the primary shard within that ID group and replicated (if needed) to shard replicas within that ID group.
///
///
public partial class DeleteRequest : PlainRequest
@@ -130,8 +186,9 @@ public DeleteRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
- /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false do nothing with refreshes.
- /// Valid values: true, false, wait_for.
+ /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search.
+ /// If wait_for, it waits for a refresh to make this operation visible to search.
+ /// If false, it does nothing with refreshes.
///
///
[JsonIgnore]
@@ -139,7 +196,7 @@ public DeleteRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
- /// Custom value used to route operations to a specific shard.
+ /// A custom value used to route operations to a specific shard.
///
///
[JsonIgnore]
@@ -147,7 +204,12 @@ public DeleteRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
- /// Period to wait for active shards.
+ /// The period to wait for active shards.
+ ///
+ ///
+ /// This parameter is useful for situations where the primary shard assigned to perform the delete operation might not be available when the delete operation runs.
+ /// Some reasons for this might be that the primary shard is currently recovering from a store or undergoing relocation.
+ /// By default, the delete operation will wait on the primary shard to become available for up to 1 minute before failing and responding with an error.
///
///
[JsonIgnore]
@@ -155,8 +217,8 @@ public DeleteRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
- /// Explicit version number for concurrency control.
- /// The specified version must match the current version of the document for the request to succeed.
+ /// An explicit version number for concurrency control.
+ /// It must match the current version of the document for the request to succeed.
///
///
[JsonIgnore]
@@ -164,7 +226,7 @@ public DeleteRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
- /// Specific version type: external, external_gte.
+ /// The version type.
///
///
[JsonIgnore]
@@ -172,8 +234,9 @@ public DeleteRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
- /// 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).
+ /// The minimum number of shard copies that must be active before proceeding with the operation.
+ /// You can set it to all or any positive integer up to the total number of shards in the index (number_of_replicas+1).
+ /// The default value of 1 means it waits for each primary shard to be active.
///
///
[JsonIgnore]
@@ -183,7 +246,56 @@ public DeleteRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
/// Delete a document.
-/// Removes a JSON document from the specified index.
+///
+///
+/// Remove a JSON document from the specified index.
+///
+///
+/// NOTE: You cannot send deletion requests directly to a data stream.
+/// To delete a document in a data stream, you must target the backing index containing the document.
+///
+///
+/// Optimistic concurrency control
+///
+///
+/// Delete operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the if_seq_no and if_primary_term parameters.
+/// If a mismatch is detected, the operation will result in a VersionConflictException and a status code of 409.
+///
+///
+/// Versioning
+///
+///
+/// Each document indexed is versioned.
+/// When deleting a document, the version can be specified to make sure the relevant document you are trying to delete is actually being deleted and it has not changed in the meantime.
+/// Every write operation run on a document, deletes included, causes its version to be incremented.
+/// The version number of a deleted document remains available for a short time after deletion to allow for control of concurrent operations.
+/// The length of time for which a deleted document's version remains available is determined by the index.gc_deletes index setting.
+///
+///
+/// Routing
+///
+///
+/// If routing is used during indexing, the routing value also needs to be specified to delete a document.
+///
+///
+/// If the _routing mapping is set to required and no routing value is specified, the delete API throws a RoutingMissingException and rejects the request.
+///
+///
+/// For example:
+///
+///
+/// DELETE /my-index-000001/_doc/1?routing=shard-1
+///
+///
+/// This request deletes the document with ID 1, but it is routed based on the user.
+/// The document is not deleted if the correct routing is not specified.
+///
+///
+/// Distributed
+///
+///
+/// The delete operation gets hashed into a specific shard ID.
+/// It then gets redirected into the primary shard within that ID group and replicated (if needed) to shard replicas within that ID group.
///
///
public sealed partial class DeleteRequestDescriptor : RequestDescriptor, DeleteRequestParameters>
@@ -247,7 +359,56 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Delete a document.
-/// Removes a JSON document from the specified index.
+///
+///
+/// Remove a JSON document from the specified index.
+///
+///
+/// NOTE: You cannot send deletion requests directly to a data stream.
+/// To delete a document in a data stream, you must target the backing index containing the document.
+///
+///
+/// Optimistic concurrency control
+///
+///
+/// Delete operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the if_seq_no and if_primary_term parameters.
+/// If a mismatch is detected, the operation will result in a VersionConflictException and a status code of 409.
+///
+///
+/// Versioning
+///
+///
+/// Each document indexed is versioned.
+/// When deleting a document, the version can be specified to make sure the relevant document you are trying to delete is actually being deleted and it has not changed in the meantime.
+/// Every write operation run on a document, deletes included, causes its version to be incremented.
+/// The version number of a deleted document remains available for a short time after deletion to allow for control of concurrent operations.
+/// The length of time for which a deleted document's version remains available is determined by the index.gc_deletes index setting.
+///
+///
+/// Routing
+///
+///
+/// If routing is used during indexing, the routing value also needs to be specified to delete a document.
+///
+///
+/// If the _routing mapping is set to required and no routing value is specified, the delete API throws a RoutingMissingException and rejects the request.
+///
+///
+/// For example:
+///
+///
+/// DELETE /my-index-000001/_doc/1?routing=shard-1
+///
+///
+/// This request deletes the document with ID 1, but it is routed based on the user.
+/// The document is not deleted if the correct routing is not specified.
+///
+///
+/// Distributed
+///
+///
+/// The delete operation gets hashed into a specific shard ID.
+/// It then gets redirected into the primary shard within that ID group and replicated (if needed) to shard replicas within that ID group.
///
///
public sealed partial class DeleteRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs
index 035076c71fd..8527471584b 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs
@@ -30,18 +30,61 @@ public sealed partial class DeleteResponse : ElasticsearchResponse
{
[JsonInclude, JsonPropertyName("forced_refresh")]
public bool? ForcedRefresh { get; init; }
+
+ ///
+ ///
+ /// The unique identifier for the added document.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_id")]
public string Id { get; init; }
+
+ ///
+ ///
+ /// The name of the index the document was added to.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_index")]
public string Index { get; init; }
+
+ ///
+ ///
+ /// The primary term assigned to the document for the indexing operation.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_primary_term")]
public long? PrimaryTerm { get; init; }
+
+ ///
+ ///
+ /// The result of the indexing operation: created or updated.
+ ///
+ ///
[JsonInclude, JsonPropertyName("result")]
public Elastic.Clients.Elasticsearch.Result Result { get; init; }
+
+ ///
+ ///
+ /// The sequence number assigned to the document for the indexing operation.
+ /// Sequence numbers are used to ensure an older version of a document doesn't overwrite a newer version.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_seq_no")]
public long? SeqNo { get; init; }
+
+ ///
+ ///
+ /// Information about the replication process of the operation.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_shards")]
public Elastic.Clients.Elasticsearch.ShardStatistics Shards { get; init; }
+
+ ///
+ ///
+ /// The document version, which is incremented each time the document is updated.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_version")]
public long Version { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptRequest.g.cs
index 42659a1f2b2..e435467e3a9 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteScriptRequest.g.cs
@@ -34,16 +34,18 @@ public sealed partial class DeleteScriptRequestParameters : RequestParameters
{
///
///
- /// Period to wait for a connection to the master node.
+ /// The period to wait for a connection to the master node.
/// If no response is received before the timeout expires, the request fails and returns an error.
+ /// It can also be set to -1 to indicate that the request should never timeout.
///
///
public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); }
///
///
- /// Period to wait for a response.
+ /// The period to wait for a response.
/// If no response is received before the timeout expires, the request fails and returns an error.
+ /// It can also be set to -1 to indicate that the request should never timeout.
///
///
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); }
@@ -71,8 +73,9 @@ public DeleteScriptRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Re
///
///
- /// Period to wait for a connection to the master node.
+ /// The period to wait for a connection to the master node.
/// If no response is received before the timeout expires, the request fails and returns an error.
+ /// It can also be set to -1 to indicate that the request should never timeout.
///
///
[JsonIgnore]
@@ -80,8 +83,9 @@ public DeleteScriptRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Re
///
///
- /// Period to wait for a response.
+ /// The period to wait for a response.
/// If no response is received before the timeout expires, the request fails and returns an error.
+ /// It can also be set to -1 to indicate that the request should never timeout.
///
///
[JsonIgnore]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetResponse.g.cs
index ccdd1f5ef9d..b808cd86302 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetResponse.g.cs
@@ -60,14 +60,6 @@ public sealed partial class EqlGetResponse : ElasticsearchResponse
[JsonInclude, JsonPropertyName("is_running")]
public bool? IsRunning { get; init; }
- ///
- ///
- /// Contains information about shard failures (if any), in case allow_partial_search_results=true
- ///
- ///
- [JsonInclude, JsonPropertyName("shard_failures")]
- public IReadOnlyCollection? ShardFailures { get; init; }
-
///
///
/// If true, the request timed out before completion.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs
index 5f88564f66a..d9b227b20ef 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs
@@ -76,10 +76,6 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r
///
[JsonIgnore]
public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); }
- [JsonInclude, JsonPropertyName("allow_partial_search_results")]
- public bool? AllowPartialSearchResults { get; set; }
- [JsonInclude, JsonPropertyName("allow_partial_sequence_results")]
- public bool? AllowPartialSequenceResults { get; set; }
[JsonInclude, JsonPropertyName("case_sensitive")]
public bool? CaseSensitive { get; set; }
@@ -121,16 +117,6 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r
[JsonInclude, JsonPropertyName("keep_on_completion")]
public bool? KeepOnCompletion { get; set; }
- ///
- ///
- /// By default, the response of a sample query contains up to 10 samples, with one sample per unique set of join keys. Use the size
- /// parameter to get a smaller or larger set of samples. To retrieve more than one sample per set of join keys, use the
- /// max_samples_per_key parameter. Pipes are not supported for sample queries.
- ///
- ///
- [JsonInclude, JsonPropertyName("max_samples_per_key")]
- public int? MaxSamplesPerKey { get; set; }
-
///
///
/// EQL query you wish to run.
@@ -207,8 +193,6 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsear
return Self;
}
- private bool? AllowPartialSearchResultsValue { get; set; }
- private bool? AllowPartialSequenceResultsValue { get; set; }
private bool? CaseSensitiveValue { get; set; }
private Elastic.Clients.Elasticsearch.Field? EventCategoryFieldValue { get; set; }
private int? FetchSizeValue { get; set; }
@@ -222,7 +206,6 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsear
private Action>[] FilterDescriptorActions { get; set; }
private Elastic.Clients.Elasticsearch.Duration? KeepAliveValue { get; set; }
private bool? KeepOnCompletionValue { get; set; }
- private int? MaxSamplesPerKeyValue { get; set; }
private string QueryValue { get; set; }
private Elastic.Clients.Elasticsearch.Eql.ResultPosition? ResultPositionValue { get; set; }
private IDictionary> RuntimeMappingsValue { get; set; }
@@ -231,18 +214,6 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsear
private Elastic.Clients.Elasticsearch.Field? TimestampFieldValue { get; set; }
private Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeoutValue { get; set; }
- public EqlSearchRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true)
- {
- AllowPartialSearchResultsValue = allowPartialSearchResults;
- return Self;
- }
-
- public EqlSearchRequestDescriptor AllowPartialSequenceResults(bool? allowPartialSequenceResults = true)
- {
- AllowPartialSequenceResultsValue = allowPartialSequenceResults;
- return Self;
- }
-
public EqlSearchRequestDescriptor CaseSensitive(bool? caseSensitive = true)
{
CaseSensitiveValue = caseSensitive;
@@ -387,19 +358,6 @@ public EqlSearchRequestDescriptor KeepOnCompletion(bool? keepOnComple
return Self;
}
- ///
- ///
- /// By default, the response of a sample query contains up to 10 samples, with one sample per unique set of join keys. Use the size
- /// parameter to get a smaller or larger set of samples. To retrieve more than one sample per set of join keys, use the
- /// max_samples_per_key parameter. Pipes are not supported for sample queries.
- ///
- ///
- public EqlSearchRequestDescriptor MaxSamplesPerKey(int? maxSamplesPerKey)
- {
- MaxSamplesPerKeyValue = maxSamplesPerKey;
- return Self;
- }
-
///
///
/// EQL query you wish to run.
@@ -509,18 +467,6 @@ public EqlSearchRequestDescriptor WaitForCompletionTimeout(Elastic.Cl
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
{
writer.WriteStartObject();
- if (AllowPartialSearchResultsValue.HasValue)
- {
- writer.WritePropertyName("allow_partial_search_results");
- writer.WriteBooleanValue(AllowPartialSearchResultsValue.Value);
- }
-
- if (AllowPartialSequenceResultsValue.HasValue)
- {
- writer.WritePropertyName("allow_partial_sequence_results");
- writer.WriteBooleanValue(AllowPartialSequenceResultsValue.Value);
- }
-
if (CaseSensitiveValue.HasValue)
{
writer.WritePropertyName("case_sensitive");
@@ -609,12 +555,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
writer.WriteBooleanValue(KeepOnCompletionValue.Value);
}
- if (MaxSamplesPerKeyValue.HasValue)
- {
- writer.WritePropertyName("max_samples_per_key");
- writer.WriteNumberValue(MaxSamplesPerKeyValue.Value);
- }
-
writer.WritePropertyName("query");
writer.WriteStringValue(QueryValue);
if (ResultPositionValue is not null)
@@ -690,8 +630,6 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices
return Self;
}
- private bool? AllowPartialSearchResultsValue { get; set; }
- private bool? AllowPartialSequenceResultsValue { get; set; }
private bool? CaseSensitiveValue { get; set; }
private Elastic.Clients.Elasticsearch.Field? EventCategoryFieldValue { get; set; }
private int? FetchSizeValue { get; set; }
@@ -705,7 +643,6 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices
private Action[] FilterDescriptorActions { get; set; }
private Elastic.Clients.Elasticsearch.Duration? KeepAliveValue { get; set; }
private bool? KeepOnCompletionValue { get; set; }
- private int? MaxSamplesPerKeyValue { get; set; }
private string QueryValue { get; set; }
private Elastic.Clients.Elasticsearch.Eql.ResultPosition? ResultPositionValue { get; set; }
private IDictionary RuntimeMappingsValue { get; set; }
@@ -714,18 +651,6 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices
private Elastic.Clients.Elasticsearch.Field? TimestampFieldValue { get; set; }
private Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeoutValue { get; set; }
- public EqlSearchRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true)
- {
- AllowPartialSearchResultsValue = allowPartialSearchResults;
- return Self;
- }
-
- public EqlSearchRequestDescriptor AllowPartialSequenceResults(bool? allowPartialSequenceResults = true)
- {
- AllowPartialSequenceResultsValue = allowPartialSequenceResults;
- return Self;
- }
-
public EqlSearchRequestDescriptor CaseSensitive(bool? caseSensitive = true)
{
CaseSensitiveValue = caseSensitive;
@@ -870,19 +795,6 @@ public EqlSearchRequestDescriptor KeepOnCompletion(bool? keepOnCompletion = true
return Self;
}
- ///
- ///
- /// By default, the response of a sample query contains up to 10 samples, with one sample per unique set of join keys. Use the size
- /// parameter to get a smaller or larger set of samples. To retrieve more than one sample per set of join keys, use the
- /// max_samples_per_key parameter. Pipes are not supported for sample queries.
- ///
- ///
- public EqlSearchRequestDescriptor MaxSamplesPerKey(int? maxSamplesPerKey)
- {
- MaxSamplesPerKeyValue = maxSamplesPerKey;
- return Self;
- }
-
///
///
/// EQL query you wish to run.
@@ -992,18 +904,6 @@ public EqlSearchRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elast
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
{
writer.WriteStartObject();
- if (AllowPartialSearchResultsValue.HasValue)
- {
- writer.WritePropertyName("allow_partial_search_results");
- writer.WriteBooleanValue(AllowPartialSearchResultsValue.Value);
- }
-
- if (AllowPartialSequenceResultsValue.HasValue)
- {
- writer.WritePropertyName("allow_partial_sequence_results");
- writer.WriteBooleanValue(AllowPartialSequenceResultsValue.Value);
- }
-
if (CaseSensitiveValue.HasValue)
{
writer.WritePropertyName("case_sensitive");
@@ -1092,12 +992,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
writer.WriteBooleanValue(KeepOnCompletionValue.Value);
}
- if (MaxSamplesPerKeyValue.HasValue)
- {
- writer.WritePropertyName("max_samples_per_key");
- writer.WriteNumberValue(MaxSamplesPerKeyValue.Value);
- }
-
writer.WritePropertyName("query");
writer.WriteStringValue(QueryValue);
if (ResultPositionValue is not null)
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchResponse.g.cs
index 720dbc35012..1f4602dc9b6 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchResponse.g.cs
@@ -60,14 +60,6 @@ public sealed partial class EqlSearchResponse : ElasticsearchResponse
[JsonInclude, JsonPropertyName("is_running")]
public bool? IsRunning { get; init; }
- ///
- ///
- /// Contains information about shard failures (if any), in case allow_partial_search_results=true
- ///
- ///
- [JsonInclude, JsonPropertyName("shard_failures")]
- public IReadOnlyCollection? ShardFailures { get; init; }
-
///
///
/// If true, the request timed out before completion.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryDeleteRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryDeleteRequest.g.cs
new file mode 100644
index 00000000000..5d663bd9589
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryDeleteRequest.g.cs
@@ -0,0 +1,170 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Requests;
+using Elastic.Clients.Elasticsearch.Serialization;
+using Elastic.Transport;
+using Elastic.Transport.Extensions;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Esql;
+
+public sealed partial class AsyncQueryDeleteRequestParameters : RequestParameters
+{
+}
+
+///
+///
+/// Delete an async ES|QL query.
+/// If the query is still running, it is cancelled.
+/// Otherwise, the stored results are deleted.
+///
+///
+/// If the Elasticsearch security features are enabled, only the following users can use this API to delete a query:
+///
+///
+/// -
+///
+/// The authenticated user that submitted the original query request
+///
+///
+/// -
+///
+/// Users with the cancel_task cluster privilege
+///
+///
+///
+///
+public sealed partial class AsyncQueryDeleteRequest : PlainRequest
+{
+ public AsyncQueryDeleteRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Required("id", id))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.EsqlAsyncQueryDelete;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "esql.async_query_delete";
+}
+
+///
+///
+/// Delete an async ES|QL query.
+/// If the query is still running, it is cancelled.
+/// Otherwise, the stored results are deleted.
+///
+///
+/// If the Elasticsearch security features are enabled, only the following users can use this API to delete a query:
+///
+///
+/// -
+///
+/// The authenticated user that submitted the original query request
+///
+///
+/// -
+///
+/// Users with the cancel_task cluster privilege
+///
+///
+///
+///
+public sealed partial class AsyncQueryDeleteRequestDescriptor : RequestDescriptor, AsyncQueryDeleteRequestParameters>
+{
+ internal AsyncQueryDeleteRequestDescriptor(Action> configure) => configure.Invoke(this);
+
+ public AsyncQueryDeleteRequestDescriptor(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Required("id", id))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.EsqlAsyncQueryDelete;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "esql.async_query_delete";
+
+ public AsyncQueryDeleteRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id)
+ {
+ RouteValues.Required("id", id);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
+
+///
+///
+/// Delete an async ES|QL query.
+/// If the query is still running, it is cancelled.
+/// Otherwise, the stored results are deleted.
+///
+///
+/// If the Elasticsearch security features are enabled, only the following users can use this API to delete a query:
+///
+///
+/// -
+///
+/// The authenticated user that submitted the original query request
+///
+///
+/// -
+///
+/// Users with the cancel_task cluster privilege
+///
+///
+///
+///
+public sealed partial class AsyncQueryDeleteRequestDescriptor : RequestDescriptor
+{
+ internal AsyncQueryDeleteRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public AsyncQueryDeleteRequestDescriptor(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Required("id", id))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.EsqlAsyncQueryDelete;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "esql.async_query_delete";
+
+ public AsyncQueryDeleteRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id)
+ {
+ RouteValues.Required("id", id);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryDeleteResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryDeleteResponse.g.cs
new file mode 100644
index 00000000000..4cc0e709c48
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryDeleteResponse.g.cs
@@ -0,0 +1,38 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Esql;
+
+public sealed partial class AsyncQueryDeleteResponse : ElasticsearchResponse
+{
+ ///
+ ///
+ /// For a successful response, this value is always true. On failure, an exception is returned instead.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("acknowledged")]
+ public bool Acknowledged { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryGetRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryGetRequest.g.cs
new file mode 100644
index 00000000000..0f8f1900b21
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryGetRequest.g.cs
@@ -0,0 +1,187 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Requests;
+using Elastic.Clients.Elasticsearch.Serialization;
+using Elastic.Transport;
+using Elastic.Transport.Extensions;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Esql;
+
+public sealed partial class AsyncQueryGetRequestParameters : RequestParameters
+{
+ ///
+ ///
+ /// Indicates whether columns that are entirely null will be removed from the columns and values portion of the results.
+ /// If true, the response will include an extra section under the name all_columns which has the name of all the columns.
+ ///
+ ///
+ public bool? DropNullColumns { get => Q("drop_null_columns"); set => Q("drop_null_columns", value); }
+
+ ///
+ ///
+ /// The period for which the query and its results are stored in the cluster.
+ /// When this period expires, the query and its results are deleted, even if the query is still ongoing.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); }
+
+ ///
+ ///
+ /// The period to wait for the request to finish.
+ /// By default, the request waits for complete query results.
+ /// If the request completes during the period specified in this parameter, complete query results are returned.
+ /// Otherwise, the response returns an is_running value of true and no results.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); }
+}
+
+///
+///
+/// Get async ES|QL query results.
+/// Get the current status and available results or stored results for an ES|QL asynchronous query.
+/// If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can retrieve the results using this API.
+///
+///
+public sealed partial class AsyncQueryGetRequest : PlainRequest
+{
+ public AsyncQueryGetRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Required("id", id))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.EsqlAsyncQueryGet;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "esql.async_query_get";
+
+ ///
+ ///
+ /// Indicates whether columns that are entirely null will be removed from the columns and values portion of the results.
+ /// If true, the response will include an extra section under the name all_columns which has the name of all the columns.
+ ///
+ ///
+ [JsonIgnore]
+ public bool? DropNullColumns { get => Q("drop_null_columns"); set => Q("drop_null_columns", value); }
+
+ ///
+ ///
+ /// The period for which the query and its results are stored in the cluster.
+ /// When this period expires, the query and its results are deleted, even if the query is still ongoing.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); }
+
+ ///
+ ///
+ /// The period to wait for the request to finish.
+ /// By default, the request waits for complete query results.
+ /// If the request completes during the period specified in this parameter, complete query results are returned.
+ /// Otherwise, the response returns an is_running value of true and no results.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); }
+}
+
+///
+///
+/// Get async ES|QL query results.
+/// Get the current status and available results or stored results for an ES|QL asynchronous query.
+/// If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can retrieve the results using this API.
+///
+///
+public sealed partial class AsyncQueryGetRequestDescriptor : RequestDescriptor, AsyncQueryGetRequestParameters>
+{
+ internal AsyncQueryGetRequestDescriptor(Action> configure) => configure.Invoke(this);
+
+ public AsyncQueryGetRequestDescriptor(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Required("id", id))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.EsqlAsyncQueryGet;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "esql.async_query_get";
+
+ public AsyncQueryGetRequestDescriptor DropNullColumns(bool? dropNullColumns = true) => Qs("drop_null_columns", dropNullColumns);
+ public AsyncQueryGetRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? keepAlive) => Qs("keep_alive", keepAlive);
+ public AsyncQueryGetRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Duration? waitForCompletionTimeout) => Qs("wait_for_completion_timeout", waitForCompletionTimeout);
+
+ public AsyncQueryGetRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id)
+ {
+ RouteValues.Required("id", id);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
+
+///
+///
+/// Get async ES|QL query results.
+/// Get the current status and available results or stored results for an ES|QL asynchronous query.
+/// If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can retrieve the results using this API.
+///
+///
+public sealed partial class AsyncQueryGetRequestDescriptor : RequestDescriptor
+{
+ internal AsyncQueryGetRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public AsyncQueryGetRequestDescriptor(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Required("id", id))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.EsqlAsyncQueryGet;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "esql.async_query_get";
+
+ public AsyncQueryGetRequestDescriptor DropNullColumns(bool? dropNullColumns = true) => Qs("drop_null_columns", dropNullColumns);
+ public AsyncQueryGetRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? keepAlive) => Qs("keep_alive", keepAlive);
+ public AsyncQueryGetRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Duration? waitForCompletionTimeout) => Qs("wait_for_completion_timeout", waitForCompletionTimeout);
+
+ public AsyncQueryGetRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id)
+ {
+ RouteValues.Required("id", id);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryGetResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryGetResponse.g.cs
new file mode 100644
index 00000000000..7e4c3c74151
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryGetResponse.g.cs
@@ -0,0 +1,31 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Esql;
+
+public sealed partial class AsyncQueryGetResponse : ElasticsearchResponse
+{
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.g.cs
new file mode 100644
index 00000000000..ee4cbf7d5be
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.g.cs
@@ -0,0 +1,601 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Requests;
+using Elastic.Clients.Elasticsearch.Serialization;
+using Elastic.Transport;
+using Elastic.Transport.Extensions;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Esql;
+
+public sealed partial class AsyncQueryRequestParameters : RequestParameters
+{
+ ///
+ ///
+ /// The character to use between values within a CSV row.
+ /// It is valid only for the CSV format.
+ ///
+ ///
+ public string? Delimiter { get => Q("delimiter"); set => Q("delimiter", value); }
+
+ ///
+ ///
+ /// Indicates whether columns that are entirely null will be removed from the columns and values portion of the results.
+ /// If true, the response will include an extra section under the name all_columns which has the name of all the columns.
+ ///
+ ///
+ public bool? DropNullColumns { get => Q("drop_null_columns"); set => Q("drop_null_columns", value); }
+
+ ///
+ ///
+ /// A short version of the Accept header, for example json or yaml.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Esql.EsqlFormat? Format { get => Q("format"); set => Q("format", value); }
+
+ ///
+ ///
+ /// The period for which the query and its results are stored in the cluster.
+ /// The default period is five days.
+ /// When this period expires, the query and its results are deleted, even if the query is still ongoing.
+ /// If the keep_on_completion parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the wait_for_completion_timeout parameter, regardless of this value.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); }
+
+ ///
+ ///
+ /// Indicates whether the query and its results are stored in the cluster.
+ /// If false, the query and its results are stored in the cluster only if the request does not complete during the period set by the wait_for_completion_timeout parameter.
+ ///
+ ///
+ public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); }
+
+ ///
+ ///
+ /// The period to wait for the request to finish.
+ /// By default, the request waits for 1 second for the query results.
+ /// If the query completes during this period, results are returned
+ /// Otherwise, a query ID is returned that can later be used to retrieve the results.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); }
+}
+
+///
+///
+/// Run an async ES|QL query.
+/// Asynchronously run an ES|QL (Elasticsearch query language) query, monitor its progress, and retrieve results when they become available.
+///
+///
+/// The API accepts the same parameters and request body as the synchronous query API, along with additional async related properties.
+///
+///
+public sealed partial class AsyncQueryRequest : PlainRequest
+{
+ internal override ApiUrls ApiUrls => ApiUrlLookup.EsqlAsyncQuery;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "esql.async_query";
+
+ ///
+ ///
+ /// The character to use between values within a CSV row.
+ /// It is valid only for the CSV format.
+ ///
+ ///
+ [JsonIgnore]
+ public string? Delimiter { get => Q("delimiter"); set => Q("delimiter", value); }
+
+ ///
+ ///
+ /// Indicates whether columns that are entirely null will be removed from the columns and values portion of the results.
+ /// If true, the response will include an extra section under the name all_columns which has the name of all the columns.
+ ///
+ ///
+ [JsonIgnore]
+ public bool? DropNullColumns { get => Q("drop_null_columns"); set => Q("drop_null_columns", value); }
+
+ ///
+ ///
+ /// A short version of the Accept header, for example json or yaml.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Esql.EsqlFormat? Format { get => Q("format"); set => Q("format", value); }
+
+ ///
+ ///
+ /// The period for which the query and its results are stored in the cluster.
+ /// The default period is five days.
+ /// When this period expires, the query and its results are deleted, even if the query is still ongoing.
+ /// If the keep_on_completion parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the wait_for_completion_timeout parameter, regardless of this value.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); }
+
+ ///
+ ///
+ /// Indicates whether the query and its results are stored in the cluster.
+ /// If false, the query and its results are stored in the cluster only if the request does not complete during the period set by the wait_for_completion_timeout parameter.
+ ///
+ ///
+ [JsonIgnore]
+ public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); }
+
+ ///
+ ///
+ /// The period to wait for the request to finish.
+ /// By default, the request waits for 1 second for the query results.
+ /// If the query completes during this period, results are returned
+ /// Otherwise, a query ID is returned that can later be used to retrieve the results.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); }
+
+ ///
+ ///
+ /// By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("columnar")]
+ public bool? Columnar { get; set; }
+
+ ///
+ ///
+ /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("filter")]
+ public Elastic.Clients.Elasticsearch.QueryDsl.Query? Filter { get; set; }
+
+ ///
+ ///
+ /// When set to true and performing a cross-cluster query, the response will include an extra _clusters
+ /// object with information about the clusters that participated in the search along with info such as shards
+ /// count.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("include_ccs_metadata")]
+ public bool? IncludeCcsMetadata { get; set; }
+ [JsonInclude, JsonPropertyName("locale")]
+ public string? Locale { get; set; }
+
+ ///
+ ///
+ /// To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("params")]
+ public ICollection? Params { get; set; }
+
+ ///
+ ///
+ /// If provided and true the response will include an extra profile object
+ /// with information on how the query was executed. This information is for human debugging
+ /// and its format can change at any time but it can give some insight into the performance
+ /// of each part of the query.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("profile")]
+ public bool? Profile { get; set; }
+
+ ///
+ ///
+ /// The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("query")]
+ public string Query { get; set; }
+}
+
+///
+///
+/// Run an async ES|QL query.
+/// Asynchronously run an ES|QL (Elasticsearch query language) query, monitor its progress, and retrieve results when they become available.
+///
+///
+/// The API accepts the same parameters and request body as the synchronous query API, along with additional async related properties.
+///
+///
+public sealed partial class AsyncQueryRequestDescriptor : RequestDescriptor, AsyncQueryRequestParameters>
+{
+ internal AsyncQueryRequestDescriptor(Action> configure) => configure.Invoke(this);
+
+ public AsyncQueryRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.EsqlAsyncQuery;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "esql.async_query";
+
+ public AsyncQueryRequestDescriptor Delimiter(string? delimiter) => Qs("delimiter", delimiter);
+ public AsyncQueryRequestDescriptor DropNullColumns(bool? dropNullColumns = true) => Qs("drop_null_columns", dropNullColumns);
+ public AsyncQueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Esql.EsqlFormat? format) => Qs("format", format);
+ public AsyncQueryRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? keepAlive) => Qs("keep_alive", keepAlive);
+ public AsyncQueryRequestDescriptor KeepOnCompletion(bool? keepOnCompletion = true) => Qs("keep_on_completion", keepOnCompletion);
+ public AsyncQueryRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Duration? waitForCompletionTimeout) => Qs("wait_for_completion_timeout", waitForCompletionTimeout);
+
+ private bool? ColumnarValue { get; set; }
+ private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; }
+ private Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor FilterDescriptor { get; set; }
+ private Action> FilterDescriptorAction { get; set; }
+ private bool? IncludeCcsMetadataValue { get; set; }
+ private string? LocaleValue { get; set; }
+ private ICollection? ParamsValue { get; set; }
+ private bool? ProfileValue { get; set; }
+ private string QueryValue { get; set; }
+
+ ///
+ ///
+ /// By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results.
+ ///
+ ///
+ public AsyncQueryRequestDescriptor Columnar(bool? columnar = true)
+ {
+ ColumnarValue = columnar;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on.
+ ///
+ ///
+ public AsyncQueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? filter)
+ {
+ FilterDescriptor = null;
+ FilterDescriptorAction = null;
+ FilterValue = filter;
+ return Self;
+ }
+
+ public AsyncQueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor descriptor)
+ {
+ FilterValue = null;
+ FilterDescriptorAction = null;
+ FilterDescriptor = descriptor;
+ return Self;
+ }
+
+ public AsyncQueryRequestDescriptor Filter(Action> configure)
+ {
+ FilterValue = null;
+ FilterDescriptor = null;
+ FilterDescriptorAction = configure;
+ return Self;
+ }
+
+ ///
+ ///
+ /// When set to true and performing a cross-cluster query, the response will include an extra _clusters
+ /// object with information about the clusters that participated in the search along with info such as shards
+ /// count.
+ ///
+ ///
+ public AsyncQueryRequestDescriptor IncludeCcsMetadata(bool? includeCcsMetadata = true)
+ {
+ IncludeCcsMetadataValue = includeCcsMetadata;
+ return Self;
+ }
+
+ public AsyncQueryRequestDescriptor Locale(string? locale)
+ {
+ LocaleValue = locale;
+ return Self;
+ }
+
+ ///
+ ///
+ /// To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters.
+ ///
+ ///
+ public AsyncQueryRequestDescriptor Params(ICollection? value)
+ {
+ ParamsValue = value;
+ return Self;
+ }
+
+ ///
+ ///
+ /// If provided and true the response will include an extra profile object
+ /// with information on how the query was executed. This information is for human debugging
+ /// and its format can change at any time but it can give some insight into the performance
+ /// of each part of the query.
+ ///
+ ///
+ public AsyncQueryRequestDescriptor Profile(bool? profile = true)
+ {
+ ProfileValue = profile;
+ return Self;
+ }
+
+ ///
+ ///
+ /// The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results.
+ ///
+ ///
+ public AsyncQueryRequestDescriptor Query(string query)
+ {
+ QueryValue = query;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ if (ColumnarValue.HasValue)
+ {
+ writer.WritePropertyName("columnar");
+ writer.WriteBooleanValue(ColumnarValue.Value);
+ }
+
+ if (FilterDescriptor is not null)
+ {
+ writer.WritePropertyName("filter");
+ JsonSerializer.Serialize(writer, FilterDescriptor, options);
+ }
+ else if (FilterDescriptorAction is not null)
+ {
+ writer.WritePropertyName("filter");
+ JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor(FilterDescriptorAction), options);
+ }
+ else if (FilterValue is not null)
+ {
+ writer.WritePropertyName("filter");
+ JsonSerializer.Serialize(writer, FilterValue, options);
+ }
+
+ if (IncludeCcsMetadataValue.HasValue)
+ {
+ writer.WritePropertyName("include_ccs_metadata");
+ writer.WriteBooleanValue(IncludeCcsMetadataValue.Value);
+ }
+
+ if (!string.IsNullOrEmpty(LocaleValue))
+ {
+ writer.WritePropertyName("locale");
+ writer.WriteStringValue(LocaleValue);
+ }
+
+ if (ParamsValue is not null)
+ {
+ writer.WritePropertyName("params");
+ JsonSerializer.Serialize(writer, ParamsValue, options);
+ }
+
+ if (ProfileValue.HasValue)
+ {
+ writer.WritePropertyName("profile");
+ writer.WriteBooleanValue(ProfileValue.Value);
+ }
+
+ writer.WritePropertyName("query");
+ writer.WriteStringValue(QueryValue);
+ writer.WriteEndObject();
+ }
+}
+
+///
+///
+/// Run an async ES|QL query.
+/// Asynchronously run an ES|QL (Elasticsearch query language) query, monitor its progress, and retrieve results when they become available.
+///
+///
+/// The API accepts the same parameters and request body as the synchronous query API, along with additional async related properties.
+///
+///
+public sealed partial class AsyncQueryRequestDescriptor : RequestDescriptor
+{
+ internal AsyncQueryRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public AsyncQueryRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.EsqlAsyncQuery;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "esql.async_query";
+
+ public AsyncQueryRequestDescriptor Delimiter(string? delimiter) => Qs("delimiter", delimiter);
+ public AsyncQueryRequestDescriptor DropNullColumns(bool? dropNullColumns = true) => Qs("drop_null_columns", dropNullColumns);
+ public AsyncQueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Esql.EsqlFormat? format) => Qs("format", format);
+ public AsyncQueryRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? keepAlive) => Qs("keep_alive", keepAlive);
+ public AsyncQueryRequestDescriptor KeepOnCompletion(bool? keepOnCompletion = true) => Qs("keep_on_completion", keepOnCompletion);
+ public AsyncQueryRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Duration? waitForCompletionTimeout) => Qs("wait_for_completion_timeout", waitForCompletionTimeout);
+
+ private bool? ColumnarValue { get; set; }
+ private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; }
+ private Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor FilterDescriptor { get; set; }
+ private Action FilterDescriptorAction { get; set; }
+ private bool? IncludeCcsMetadataValue { get; set; }
+ private string? LocaleValue { get; set; }
+ private ICollection? ParamsValue { get; set; }
+ private bool? ProfileValue { get; set; }
+ private string QueryValue { get; set; }
+
+ ///
+ ///
+ /// By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results.
+ ///
+ ///
+ public AsyncQueryRequestDescriptor Columnar(bool? columnar = true)
+ {
+ ColumnarValue = columnar;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on.
+ ///
+ ///
+ public AsyncQueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? filter)
+ {
+ FilterDescriptor = null;
+ FilterDescriptorAction = null;
+ FilterValue = filter;
+ return Self;
+ }
+
+ public AsyncQueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor descriptor)
+ {
+ FilterValue = null;
+ FilterDescriptorAction = null;
+ FilterDescriptor = descriptor;
+ return Self;
+ }
+
+ public AsyncQueryRequestDescriptor Filter(Action configure)
+ {
+ FilterValue = null;
+ FilterDescriptor = null;
+ FilterDescriptorAction = configure;
+ return Self;
+ }
+
+ ///
+ ///
+ /// When set to true and performing a cross-cluster query, the response will include an extra _clusters
+ /// object with information about the clusters that participated in the search along with info such as shards
+ /// count.
+ ///
+ ///
+ public AsyncQueryRequestDescriptor IncludeCcsMetadata(bool? includeCcsMetadata = true)
+ {
+ IncludeCcsMetadataValue = includeCcsMetadata;
+ return Self;
+ }
+
+ public AsyncQueryRequestDescriptor Locale(string? locale)
+ {
+ LocaleValue = locale;
+ return Self;
+ }
+
+ ///
+ ///
+ /// To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters.
+ ///
+ ///
+ public AsyncQueryRequestDescriptor Params(ICollection? value)
+ {
+ ParamsValue = value;
+ return Self;
+ }
+
+ ///
+ ///
+ /// If provided and true the response will include an extra profile object
+ /// with information on how the query was executed. This information is for human debugging
+ /// and its format can change at any time but it can give some insight into the performance
+ /// of each part of the query.
+ ///
+ ///
+ public AsyncQueryRequestDescriptor Profile(bool? profile = true)
+ {
+ ProfileValue = profile;
+ return Self;
+ }
+
+ ///
+ ///
+ /// The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results.
+ ///
+ ///
+ public AsyncQueryRequestDescriptor Query(string query)
+ {
+ QueryValue = query;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ if (ColumnarValue.HasValue)
+ {
+ writer.WritePropertyName("columnar");
+ writer.WriteBooleanValue(ColumnarValue.Value);
+ }
+
+ if (FilterDescriptor is not null)
+ {
+ writer.WritePropertyName("filter");
+ JsonSerializer.Serialize(writer, FilterDescriptor, options);
+ }
+ else if (FilterDescriptorAction is not null)
+ {
+ writer.WritePropertyName("filter");
+ JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor(FilterDescriptorAction), options);
+ }
+ else if (FilterValue is not null)
+ {
+ writer.WritePropertyName("filter");
+ JsonSerializer.Serialize(writer, FilterValue, options);
+ }
+
+ if (IncludeCcsMetadataValue.HasValue)
+ {
+ writer.WritePropertyName("include_ccs_metadata");
+ writer.WriteBooleanValue(IncludeCcsMetadataValue.Value);
+ }
+
+ if (!string.IsNullOrEmpty(LocaleValue))
+ {
+ writer.WritePropertyName("locale");
+ writer.WriteStringValue(LocaleValue);
+ }
+
+ if (ParamsValue is not null)
+ {
+ writer.WritePropertyName("params");
+ JsonSerializer.Serialize(writer, ParamsValue, options);
+ }
+
+ if (ProfileValue.HasValue)
+ {
+ writer.WritePropertyName("profile");
+ writer.WriteBooleanValue(ProfileValue.Value);
+ }
+
+ writer.WritePropertyName("query");
+ writer.WriteStringValue(QueryValue);
+ writer.WriteEndObject();
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryResponse.g.cs
new file mode 100644
index 00000000000..b1f6ebd37a4
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryResponse.g.cs
@@ -0,0 +1,31 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Esql;
+
+public sealed partial class AsyncQueryResponse : ElasticsearchResponse
+{
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs
index 1947cab2686..98f4d4fbde4 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs
@@ -111,6 +111,16 @@ public sealed partial class EsqlQueryRequest : PlainRequest
[JsonInclude, JsonPropertyName("filter")]
public Elastic.Clients.Elasticsearch.QueryDsl.Query? Filter { get; set; }
+
+ ///
+ ///
+ /// When set to true and performing a cross-cluster query, the response will include an extra _clusters
+ /// object with information about the clusters that participated in the search along with info such as shards
+ /// count.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("include_ccs_metadata")]
+ public bool? IncludeCcsMetadata { get; set; }
[JsonInclude, JsonPropertyName("locale")]
public string? Locale { get; set; }
@@ -172,6 +182,7 @@ public EsqlQueryRequestDescriptor()
private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; }
private Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor FilterDescriptor { get; set; }
private Action> FilterDescriptorAction { get; set; }
+ private bool? IncludeCcsMetadataValue { get; set; }
private string? LocaleValue { get; set; }
private ICollection? ParamsValue { get; set; }
private bool? ProfileValue { get; set; }
@@ -217,6 +228,19 @@ public EsqlQueryRequestDescriptor Filter(Action
+ ///
+ /// When set to true and performing a cross-cluster query, the response will include an extra _clusters
+ /// object with information about the clusters that participated in the search along with info such as shards
+ /// count.
+ ///
+ ///
+ public EsqlQueryRequestDescriptor IncludeCcsMetadata(bool? includeCcsMetadata = true)
+ {
+ IncludeCcsMetadataValue = includeCcsMetadata;
+ return Self;
+ }
+
public EsqlQueryRequestDescriptor Locale(string? locale)
{
LocaleValue = locale;
@@ -284,6 +308,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, FilterValue, options);
}
+ if (IncludeCcsMetadataValue.HasValue)
+ {
+ writer.WritePropertyName("include_ccs_metadata");
+ writer.WriteBooleanValue(IncludeCcsMetadataValue.Value);
+ }
+
if (!string.IsNullOrEmpty(LocaleValue))
{
writer.WritePropertyName("locale");
@@ -338,6 +368,7 @@ public EsqlQueryRequestDescriptor()
private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; }
private Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor FilterDescriptor { get; set; }
private Action FilterDescriptorAction { get; set; }
+ private bool? IncludeCcsMetadataValue { get; set; }
private string? LocaleValue { get; set; }
private ICollection? ParamsValue { get; set; }
private bool? ProfileValue { get; set; }
@@ -383,6 +414,19 @@ public EsqlQueryRequestDescriptor Filter(Action
+ ///
+ /// When set to true and performing a cross-cluster query, the response will include an extra _clusters
+ /// object with information about the clusters that participated in the search along with info such as shards
+ /// count.
+ ///
+ ///
+ public EsqlQueryRequestDescriptor IncludeCcsMetadata(bool? includeCcsMetadata = true)
+ {
+ IncludeCcsMetadataValue = includeCcsMetadata;
+ return Self;
+ }
+
public EsqlQueryRequestDescriptor Locale(string? locale)
{
LocaleValue = locale;
@@ -450,6 +494,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, FilterValue, options);
}
+ if (IncludeCcsMetadataValue.HasValue)
+ {
+ writer.WritePropertyName("include_ccs_metadata");
+ writer.WriteBooleanValue(IncludeCcsMetadataValue.Value);
+ }
+
if (!string.IsNullOrEmpty(LocaleValue))
{
writer.WritePropertyName("locale");
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs
index a69f181062f..332e8c2cc3e 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs
@@ -34,8 +34,14 @@ public sealed partial class ExistsRequestParameters : RequestParameters
{
///
///
- /// Specifies the node or shard the operation should be performed on.
- /// Random by default.
+ /// The node or shard the operation should be performed on.
+ /// By default, the operation is randomized between the shard replicas.
+ ///
+ ///
+ /// If it is set to _local, the operation will prefer to be run on a local allocated shard when possible.
+ /// If it is set to a custom value, the value is used to guarantee that the same shards will be used for the same custom value.
+ /// This can help with "jumping values" when hitting different shards in different refresh states.
+ /// A sample value can be something like the web session ID or the user name.
///
///
public string? Preference { get => Q("preference"); set => Q("preference", value); }
@@ -49,28 +55,31 @@ public sealed partial class ExistsRequestParameters : RequestParameters
///
///
- /// If true, Elasticsearch refreshes all shards involved in the delete by query after the request completes.
+ /// If true, the request refreshes the relevant shards before retrieving the document.
+ /// Setting it to true should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).
///
///
public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); }
///
///
- /// Target the specified primary shard.
+ /// A custom value used to route operations to a specific shard.
///
///
public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); }
///
///
- /// true or false to return the _source field or not, or a list of fields to return.
+ /// Indicates whether to return the _source field (true or false) or lists the fields to return.
///
///
public Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); }
///
///
- /// A comma-separated list of source fields to exclude in the response.
+ /// A comma-separated list of source fields to exclude from the response.
+ /// You can also use this parameter to exclude fields from the subset specified in _source_includes query parameter.
+ /// If the _source parameter is false, this parameter is ignored.
///
///
public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); }
@@ -78,15 +87,18 @@ public sealed partial class ExistsRequestParameters : RequestParameters
///
///
/// A comma-separated list of source fields to include in the response.
+ /// If this parameter is specified, only these source fields are returned.
+ /// You can exclude fields from this subset using the _source_excludes query parameter.
+ /// If the _source parameter is false, this parameter is ignored.
///
///
public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); }
///
///
- /// List of stored fields to return as part of a hit.
+ /// A comma-separated 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.
+ /// If this field is specified, the _source parameter defaults to false.
///
///
public Elastic.Clients.Elasticsearch.Fields? StoredFields { get => Q("stored_fields"); set => Q("stored_fields", value); }
@@ -101,7 +113,7 @@ public sealed partial class ExistsRequestParameters : RequestParameters
///
///
- /// Specific version type: external, external_gte.
+ /// The version type.
///
///
public Elastic.Clients.Elasticsearch.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); }
@@ -110,7 +122,28 @@ public sealed partial class ExistsRequestParameters : RequestParameters
///
///
/// Check a document.
-/// Checks if a specified document exists.
+///
+///
+/// Verify that a document exists.
+/// For example, check to see if a document with the _id 0 exists:
+///
+///
+/// HEAD my-index-000001/_doc/0
+///
+///
+/// If the document exists, the API returns a status code of 200 - OK.
+/// If the document doesn’t exist, the API returns 404 - Not Found.
+///
+///
+/// Versioning support
+///
+///
+/// You can use the version parameter to check the document only if its current version is equal to the specified one.
+///
+///
+/// Internally, Elasticsearch has marked the old document as deleted and added an entirely new document.
+/// The old version of the document doesn't disappear immediately, although you won't be able to access it.
+/// Elasticsearch cleans up deleted documents in the background as you continue to index more data.
///
///
public sealed partial class ExistsRequest : PlainRequest
@@ -129,8 +162,14 @@ public ExistsRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
- /// Specifies the node or shard the operation should be performed on.
- /// Random by default.
+ /// The node or shard the operation should be performed on.
+ /// By default, the operation is randomized between the shard replicas.
+ ///
+ ///
+ /// If it is set to _local, the operation will prefer to be run on a local allocated shard when possible.
+ /// If it is set to a custom value, the value is used to guarantee that the same shards will be used for the same custom value.
+ /// This can help with "jumping values" when hitting different shards in different refresh states.
+ /// A sample value can be something like the web session ID or the user name.
///
///
[JsonIgnore]
@@ -146,7 +185,8 @@ public ExistsRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
- /// If true, Elasticsearch refreshes all shards involved in the delete by query after the request completes.
+ /// If true, the request refreshes the relevant shards before retrieving the document.
+ /// Setting it to true should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).
///
///
[JsonIgnore]
@@ -154,7 +194,7 @@ public ExistsRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
- /// Target the specified primary shard.
+ /// A custom value used to route operations to a specific shard.
///
///
[JsonIgnore]
@@ -162,7 +202,7 @@ public ExistsRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
- /// true or false to return the _source field or not, or a list of fields to return.
+ /// Indicates whether to return the _source field (true or false) or lists the fields to return.
///
///
[JsonIgnore]
@@ -170,7 +210,9 @@ public ExistsRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
- /// A comma-separated list of source fields to exclude in the response.
+ /// A comma-separated list of source fields to exclude from the response.
+ /// You can also use this parameter to exclude fields from the subset specified in _source_includes query parameter.
+ /// If the _source parameter is false, this parameter is ignored.
///
///
[JsonIgnore]
@@ -179,6 +221,9 @@ public ExistsRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
/// A comma-separated list of source fields to include in the response.
+ /// If this parameter is specified, only these source fields are returned.
+ /// You can exclude fields from this subset using the _source_excludes query parameter.
+ /// If the _source parameter is false, this parameter is ignored.
///
///
[JsonIgnore]
@@ -186,9 +231,9 @@ public ExistsRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
- /// List of stored fields to return as part of a hit.
+ /// A comma-separated 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.
+ /// If this field is specified, the _source parameter defaults to false.
///
///
[JsonIgnore]
@@ -205,7 +250,7 @@ public ExistsRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
- /// Specific version type: external, external_gte.
+ /// The version type.
///
///
[JsonIgnore]
@@ -215,7 +260,28 @@ public ExistsRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie
///
///
/// Check a document.
-/// Checks if a specified document exists.
+///
+///
+/// Verify that a document exists.
+/// For example, check to see if a document with the _id 0 exists:
+///
+///
+/// HEAD my-index-000001/_doc/0
+///
+///
+/// If the document exists, the API returns a status code of 200 - OK.
+/// If the document doesn’t exist, the API returns 404 - Not Found.
+///
+///
+/// Versioning support
+///
+///
+/// You can use the version parameter to check the document only if its current version is equal to the specified one.
+///
+///
+/// Internally, Elasticsearch has marked the old document as deleted and added an entirely new document.
+/// The old version of the document doesn't disappear immediately, although you won't be able to access it.
+/// Elasticsearch cleans up deleted documents in the background as you continue to index more data.
///
///
public sealed partial class ExistsRequestDescriptor : RequestDescriptor, ExistsRequestParameters>
@@ -281,7 +347,28 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Check a document.
-/// Checks if a specified document exists.
+///
+///
+/// Verify that a document exists.
+/// For example, check to see if a document with the _id 0 exists:
+///
+///
+/// HEAD my-index-000001/_doc/0
+///
+///
+/// If the document exists, the API returns a status code of 200 - OK.
+/// If the document doesn’t exist, the API returns 404 - Not Found.
+///
+///
+/// Versioning support
+///
+///
+/// You can use the version parameter to check the document only if its current version is equal to the specified one.
+///
+///
+/// Internally, Elasticsearch has marked the old document as deleted and added an entirely new document.
+/// The old version of the document doesn't disappear immediately, although you won't be able to access it.
+/// Elasticsearch cleans up deleted documents in the background as you continue to index more data.
///
///
public sealed partial class ExistsRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs
index 92ee29cc3a7..dc07cb2c935 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs
@@ -34,36 +34,37 @@ public sealed partial class ExistsSourceRequestParameters : RequestParameters
{
///
///
- /// Specifies the node or shard the operation should be performed on.
- /// Random by default.
+ /// The node or shard the operation should be performed on.
+ /// By default, the operation is randomized between the shard replicas.
///
///
public string? Preference { get => Q("preference"); set => Q("preference", value); }
///
///
- /// If true, the request is real-time as opposed to near-real-time.
+ /// If true, the request is real-time as opposed to near-real-time.
///
///
public bool? Realtime { get => Q("realtime"); set => Q("realtime", value); }
///
///
- /// If true, Elasticsearch refreshes all shards involved in the delete by query after the request completes.
+ /// If true, the request refreshes the relevant shards before retrieving the document.
+ /// Setting it to true should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).
///
///
public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); }
///
///
- /// Target the specified primary shard.
+ /// A custom value used to route operations to a specific shard.
///
///
public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); }
///
///
- /// true or false to return the _source field or not, or a list of fields to return.
+ /// Indicates whether to return the _source field (true or false) or lists the fields to return.
///
///
public Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); }
@@ -84,15 +85,15 @@ public sealed partial class ExistsSourceRequestParameters : RequestParameters
///
///
- /// Explicit version number for concurrency control.
- /// The specified version must match the current version of the document for the request to succeed.
+ /// The version number for concurrency control.
+ /// It must match the current version of the document for the request to succeed.
///
///
public long? Version { get => Q("version"); set => Q("version", value); }
///
///
- /// Specific version type: external, external_gte.
+ /// The version type.
///
///
public Elastic.Clients.Elasticsearch.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); }
@@ -101,7 +102,16 @@ public sealed partial class ExistsSourceRequestParameters : RequestParameters
///
///
/// Check for a document source.
-/// Checks if a document's _source is stored.
+///
+///
+/// Check whether a document source exists in an index.
+/// For example:
+///
+///
+/// HEAD my-index-000001/_source/1
+///
+///
+/// A document's source is not available if it is disabled in the mapping.
///
///
public sealed partial class ExistsSourceRequest : PlainRequest
@@ -120,8 +130,8 @@ public ExistsSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elasti
///
///
- /// Specifies the node or shard the operation should be performed on.
- /// Random by default.
+ /// The node or shard the operation should be performed on.
+ /// By default, the operation is randomized between the shard replicas.
///
///
[JsonIgnore]
@@ -129,7 +139,7 @@ public ExistsSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elasti
///
///
- /// If true, the request is real-time as opposed to near-real-time.
+ /// If true, the request is real-time as opposed to near-real-time.
///
///
[JsonIgnore]
@@ -137,7 +147,8 @@ public ExistsSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elasti
///
///
- /// If true, Elasticsearch refreshes all shards involved in the delete by query after the request completes.
+ /// If true, the request refreshes the relevant shards before retrieving the document.
+ /// Setting it to true should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).
///
///
[JsonIgnore]
@@ -145,7 +156,7 @@ public ExistsSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elasti
///
///
- /// Target the specified primary shard.
+ /// A custom value used to route operations to a specific shard.
///
///
[JsonIgnore]
@@ -153,7 +164,7 @@ public ExistsSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elasti
///
///
- /// true or false to return the _source field or not, or a list of fields to return.
+ /// Indicates whether to return the _source field (true or false) or lists the fields to return.
///
///
[JsonIgnore]
@@ -177,8 +188,8 @@ public ExistsSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elasti
///
///
- /// Explicit version number for concurrency control.
- /// The specified version must match the current version of the document for the request to succeed.
+ /// The version number for concurrency control.
+ /// It must match the current version of the document for the request to succeed.
///
///
[JsonIgnore]
@@ -186,7 +197,7 @@ public ExistsSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elasti
///
///
- /// Specific version type: external, external_gte.
+ /// The version type.
///
///
[JsonIgnore]
@@ -196,7 +207,16 @@ public ExistsSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elasti
///
///
/// Check for a document source.
-/// Checks if a document's _source is stored.
+///
+///
+/// Check whether a document source exists in an index.
+/// For example:
+///
+///
+/// HEAD my-index-000001/_source/1
+///
+///
+/// A document's source is not available if it is disabled in the mapping.
///
///
public sealed partial class ExistsSourceRequestDescriptor : RequestDescriptor, ExistsSourceRequestParameters>
@@ -261,7 +281,16 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Check for a document source.
-/// Checks if a document's _source is stored.
+///
+///
+/// Check whether a document source exists in an index.
+/// For example:
+///
+///
+/// HEAD my-index-000001/_source/1
+///
+///
+/// A document's source is not available if it is disabled in the mapping.
///
///
public sealed partial class ExistsSourceRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs
index a747706a688..6d2e2946136 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs
@@ -34,8 +34,8 @@ public sealed partial class ExplainRequestParameters : RequestParameters
{
///
///
- /// Analyzer to use for the query string.
- /// This parameter can only be used when the q query string parameter is specified.
+ /// The analyzer to use for the query string.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
public string? Analyzer { get => Q("analyzer"); set => Q("analyzer", value); }
@@ -43,6 +43,7 @@ public sealed partial class ExplainRequestParameters : RequestParameters
///
///
/// If true, wildcard and prefix queries are analyzed.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
public bool? AnalyzeWildcard { get => Q("analyze_wildcard"); set => Q("analyze_wildcard", value); }
@@ -50,13 +51,15 @@ public sealed partial class ExplainRequestParameters : RequestParameters
///
///
/// The default operator for query string query: AND or OR.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
public Elastic.Clients.Elasticsearch.QueryDsl.Operator? DefaultOperator { get => Q("default_operator"); set => Q("default_operator", value); }
///
///
- /// Field to use as default where no field prefix is given in the query string.
+ /// The field to use as default where no field prefix is given in the query string.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
public string? Df { get => Q("df"); set => Q("df", value); }
@@ -64,35 +67,36 @@ public sealed partial class ExplainRequestParameters : RequestParameters
///
///
/// If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
public bool? Lenient { get => Q("lenient"); set => Q("lenient", value); }
///
///
- /// Specifies the node or shard the operation should be performed on.
- /// Random by default.
+ /// The node or shard the operation should be performed on.
+ /// It is random by default.
///
///
public string? Preference { get => Q("preference"); set => Q("preference", value); }
///
///
- /// Query in the Lucene query string syntax.
+ /// The 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.
+ /// A custom value used to route operations to a specific shard.
///
///
public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); }
///
///
- /// True or false to return the _source field or not, or a list of fields to return.
+ /// True or false to return the _source field or not or a list of fields to return.
///
///
public Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); }
@@ -100,6 +104,8 @@ public sealed partial class ExplainRequestParameters : RequestParameters
///
///
/// A comma-separated list of source fields to exclude from the response.
+ /// You can also use this parameter to exclude fields from the subset specified in _source_includes query parameter.
+ /// If the _source parameter is false, this parameter is ignored.
///
///
public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); }
@@ -107,6 +113,9 @@ public sealed partial class ExplainRequestParameters : RequestParameters
///
///
/// A comma-separated list of source fields to include in the response.
+ /// If this parameter is specified, only these source fields are returned.
+ /// You can exclude fields from this subset using the _source_excludes query parameter.
+ /// If the _source parameter is false, this parameter is ignored.
///
///
public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); }
@@ -122,7 +131,8 @@ public sealed partial class ExplainRequestParameters : RequestParameters
///
///
/// Explain a document match result.
-/// Returns information about why a specific document matches, or doesn’t match, a query.
+/// Get information about why a specific document matches, or doesn't match, a query.
+/// It computes a score explanation for a query and a specific document.
///
///
public sealed partial class ExplainRequest : PlainRequest
@@ -141,8 +151,8 @@ public ExplainRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Cli
///
///
- /// Analyzer to use for the query string.
- /// This parameter can only be used when the q query string parameter is specified.
+ /// The analyzer to use for the query string.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
[JsonIgnore]
@@ -151,6 +161,7 @@ public ExplainRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Cli
///
///
/// If true, wildcard and prefix queries are analyzed.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
[JsonIgnore]
@@ -159,6 +170,7 @@ public ExplainRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Cli
///
///
/// The default operator for query string query: AND or OR.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
[JsonIgnore]
@@ -166,7 +178,8 @@ public ExplainRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Cli
///
///
- /// Field to use as default where no field prefix is given in the query string.
+ /// The field to use as default where no field prefix is given in the query string.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
[JsonIgnore]
@@ -175,6 +188,7 @@ public ExplainRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Cli
///
///
/// If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
+ /// This parameter can be used only when the q query string parameter is specified.
///
///
[JsonIgnore]
@@ -182,8 +196,8 @@ public ExplainRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Cli
///
///
- /// Specifies the node or shard the operation should be performed on.
- /// Random by default.
+ /// The node or shard the operation should be performed on.
+ /// It is random by default.
///
///
[JsonIgnore]
@@ -191,7 +205,7 @@ public ExplainRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Cli
///
///
- /// Query in the Lucene query string syntax.
+ /// The query in the Lucene query string syntax.
///
///
[JsonIgnore]
@@ -199,7 +213,7 @@ public ExplainRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Cli
///
///
- /// Custom value used to route operations to a specific shard.
+ /// A custom value used to route operations to a specific shard.
///
///
[JsonIgnore]
@@ -207,7 +221,7 @@ public ExplainRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Cli
///
///
- /// True or false to return the _source field or not, or a list of fields to return.
+ /// True or false to return the _source field or not or a list of fields to return.
///
///
[JsonIgnore]
@@ -216,6 +230,8 @@ public ExplainRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Cli
///
///
/// A comma-separated list of source fields to exclude from the response.
+ /// You can also use this parameter to exclude fields from the subset specified in _source_includes query parameter.
+ /// If the _source parameter is false, this parameter is ignored.
///
///
[JsonIgnore]
@@ -224,6 +240,9 @@ public ExplainRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Cli
///
///
/// A comma-separated list of source fields to include in the response.
+ /// If this parameter is specified, only these source fields are returned.
+ /// You can exclude fields from this subset using the _source_excludes query parameter.
+ /// If the _source parameter is false, this parameter is ignored.
///
///
[JsonIgnore]
@@ -249,7 +268,8 @@ public ExplainRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Cli
///
///
/// Explain a document match result.
-/// Returns information about why a specific document matches, or doesn’t match, a query.
+/// Get information about why a specific document matches, or doesn't match, a query.
+/// It computes a score explanation for a query and a specific document.
///
///
public sealed partial class ExplainRequestDescriptor : RequestDescriptor, ExplainRequestParameters>
@@ -368,7 +388,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Explain a document match result.
-/// Returns information about why a specific document matches, or doesn’t match, a query.
+/// Get information about why a specific document matches, or doesn't match, a query.
+/// It computes a score explanation for a query and a specific document.
///
///
public sealed partial class ExplainRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs
index 40ca0aa9140..743ac9c88b5 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs
@@ -43,14 +43,14 @@ public sealed partial class FieldCapsRequestParameters : RequestParameters
///
///
- /// Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as open,hidden.
+ /// The type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as open,hidden.
///
///
public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); }
///
///
- /// An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent
+ /// A comma-separated list of filters to apply to the response.
///
///
public string? Filters { get => Q("filters"); set => Q("filters", value); }
@@ -78,7 +78,9 @@ public sealed partial class FieldCapsRequestParameters : RequestParameters
///
///
- /// Only return results for fields that have one of the types in the list
+ /// A comma-separated list of field types to include.
+ /// Any fields that do not match one of these types will be excluded from the results.
+ /// It defaults to empty, meaning that all field types are returned.
///
///
public ICollection? Types { get => Q?>("types"); set => Q("types", value); }
@@ -127,7 +129,7 @@ public FieldCapsRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r
///
///
- /// Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as open,hidden.
+ /// The type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as open,hidden.
///
///
[JsonIgnore]
@@ -135,7 +137,7 @@ public FieldCapsRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r
///
///
- /// An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent
+ /// A comma-separated list of filters to apply to the response.
///
///
[JsonIgnore]
@@ -167,7 +169,9 @@ public FieldCapsRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r
///
///
- /// Only return results for fields that have one of the types in the list
+ /// A comma-separated list of field types to include.
+ /// Any fields that do not match one of these types will be excluded from the results.
+ /// It defaults to empty, meaning that all field types are returned.
///
///
[JsonIgnore]
@@ -175,7 +179,7 @@ public FieldCapsRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r
///
///
- /// List of fields to retrieve capabilities for. Wildcard (*) expressions are supported.
+ /// A list of fields to retrieve capabilities for. Wildcard (*) expressions are supported.
///
///
[JsonInclude, JsonPropertyName("fields")]
@@ -184,7 +188,12 @@ public FieldCapsRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r
///
///
- /// Allows to filter indices if the provided query rewrites to match_none on every shard.
+ /// Filter indices if the provided query rewrites to match_none on every shard.
+ ///
+ ///
+ /// IMPORTANT: The filtering is done on a best-effort basis, it uses index statistics and mappings to rewrite queries to match_none instead of fully running the request.
+ /// For instance a range query over a date field can rewrite to match_none if all documents within a shard (including deleted documents) are outside of the provided range.
+ /// However, not all queries can rewrite to match_none so this API may return an index even if the provided filter matches no document.
///
///
[JsonInclude, JsonPropertyName("index_filter")]
@@ -192,7 +201,7 @@ public FieldCapsRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r
///
///
- /// Defines ad-hoc runtime fields in the request similar to the way it is done in search requests.
+ /// Define ad-hoc runtime fields in the request similar to the way it is done in search requests.
/// These fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings.
///
///
@@ -255,7 +264,7 @@ public FieldCapsRequestDescriptor Indices(Elastic.Clients.Elasticsear
///
///
- /// List of fields to retrieve capabilities for. Wildcard (*) expressions are supported.
+ /// A list of fields to retrieve capabilities for. Wildcard (*) expressions are supported.
///
///
public FieldCapsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields)
@@ -266,7 +275,12 @@ public FieldCapsRequestDescriptor Fields(Elastic.Clients.Elasticsearc
///
///
- /// Allows to filter indices if the provided query rewrites to match_none on every shard.
+ /// Filter indices if the provided query rewrites to match_none on every shard.
+ ///
+ ///
+ /// IMPORTANT: The filtering is done on a best-effort basis, it uses index statistics and mappings to rewrite queries to match_none instead of fully running the request.
+ /// For instance a range query over a date field can rewrite to match_none if all documents within a shard (including deleted documents) are outside of the provided range.
+ /// However, not all queries can rewrite to match_none so this API may return an index even if the provided filter matches no document.
///
///
public FieldCapsRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? indexFilter)
@@ -295,7 +309,7 @@ public FieldCapsRequestDescriptor IndexFilter(Action
///
- /// Defines ad-hoc runtime fields in the request similar to the way it is done in search requests.
+ /// Define ad-hoc runtime fields in the request similar to the way it is done in search requests.
/// These fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings.
///
///
@@ -395,7 +409,7 @@ public FieldCapsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices?
///
///
- /// List of fields to retrieve capabilities for. Wildcard (*) expressions are supported.
+ /// A list of fields to retrieve capabilities for. Wildcard (*) expressions are supported.
///
///
public FieldCapsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? fields)
@@ -406,7 +420,12 @@ public FieldCapsRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? f
///
///
- /// Allows to filter indices if the provided query rewrites to match_none on every shard.
+ /// Filter indices if the provided query rewrites to match_none on every shard.
+ ///
+ ///
+ /// IMPORTANT: The filtering is done on a best-effort basis, it uses index statistics and mappings to rewrite queries to match_none instead of fully running the request.
+ /// For instance a range query over a date field can rewrite to match_none if all documents within a shard (including deleted documents) are outside of the provided range.
+ /// However, not all queries can rewrite to match_none so this API may return an index even if the provided filter matches no document.
///
///
public FieldCapsRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? indexFilter)
@@ -435,7 +454,7 @@ public FieldCapsRequestDescriptor IndexFilter(Action
///
- /// Defines ad-hoc runtime fields in the request similar to the way it is done in search requests.
+ /// Define ad-hoc runtime fields in the request similar to the way it is done in search requests.
/// These fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings.
///
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsResponse.g.cs
index 1f2841fe397..efa756d8a3f 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsResponse.g.cs
@@ -31,6 +31,12 @@ public sealed partial class FieldCapsResponse : ElasticsearchResponse
[JsonInclude, JsonPropertyName("fields")]
[ReadOnlyFieldDictionaryConverter(typeof(IReadOnlyDictionary))]
public IReadOnlyDictionary> Fields { get; init; }
+
+ ///
+ ///
+ /// The list of indices where this field has the same type family, or null if all indices have the same type family for the field.
+ ///
+ ///
[JsonInclude, JsonPropertyName("indices")]
[SingleOrManyCollectionConverter(typeof(string))]
public IReadOnlyCollection Indices { get; init; }
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetRequest.g.cs
index e71f67d6fca..b5f6178c117 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetRequest.g.cs
@@ -34,16 +34,23 @@ public sealed partial class GetRequestParameters : RequestParameters
{
///
///
- /// Should this request force synthetic _source?
- /// Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.
- /// Fetches with this enabled will be slower the enabling synthetic source natively in the index.
+ /// Indicates whether the request forces synthetic _source.
+ /// Use this paramater to test if the mapping supports synthetic _source and to get a sense of the worst case performance.
+ /// Fetches with this parameter enabled will be slower than enabling synthetic source natively in the index.
///
///
public bool? ForceSyntheticSource { get => Q("force_synthetic_source"); set => Q("force_synthetic_source", value); }
///
///
- /// Specifies the node or shard the operation should be performed on. Random by default.
+ /// The node or shard the operation should be performed on.
+ /// By default, the operation is randomized between the shard replicas.
+ ///
+ ///
+ /// If it is set to _local, the operation will prefer to be run on a local allocated shard when possible.
+ /// If it is set to a custom value, the value is used to guarantee that the same shards will be used for the same custom value.
+ /// This can help with "jumping values" when hitting different shards in different refresh states.
+ /// A sample value can be something like the web session ID or the user name.
///
///
public string? Preference { get => Q("preference"); set => Q("preference", value); }
@@ -57,28 +64,31 @@ public sealed partial class GetRequestParameters : RequestParameters
///
///
- /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes.
+ /// If true, the request refreshes the relevant shards before retrieving the document.
+ /// Setting it to true should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).
///
///
public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); }
///
///
- /// Target the specified primary shard.
+ /// A custom value used to route operations to a specific shard.
///
///
public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); }
///
///
- /// True or false to return the _source field or not, or a list of fields to return.
+ /// Indicates whether to return the _source field (true or false) or lists the fields to return.
///
///
public Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); }
///
///
- /// A comma-separated list of source fields to exclude in the response.
+ /// A comma-separated list of source fields to exclude from the response.
+ /// You can also use this parameter to exclude fields from the subset specified in _source_includes query parameter.
+ /// If the _source parameter is false, this parameter is ignored.
///
///
public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); }
@@ -86,29 +96,35 @@ public sealed partial class GetRequestParameters : RequestParameters
///
///
/// A comma-separated list of source fields to include in the response.
+ /// If this parameter is specified, only these source fields are returned.
+ /// You can exclude fields from this subset using the _source_excludes query parameter.
+ /// If the _source parameter is false, this parameter is ignored.
///
///
public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); }
///
///
- /// List of stored fields to return as part of a hit.
+ /// A comma-separated 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.
+ /// If this field is specified, the _source parameter defaults to false.
+ /// Only leaf fields can be retrieved with the stored_field option.
+ /// Object fields can't be returned;if specified, the request fails.
///
///
public Elastic.Clients.Elasticsearch.Fields? StoredFields { get => Q("stored_fields"); set => Q("stored_fields", value); }
///
///
- /// Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
+ /// The version number for concurrency control.
+ /// It must match the current version of the document for the request to succeed.
///
///
public long? Version { get => Q("version"); set => Q("version", value); }
///
///
- /// Specific version type: internal, external, external_gte.
+ /// The version type.
///
///
public Elastic.Clients.Elasticsearch.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); }
@@ -117,7 +133,73 @@ public sealed partial class GetRequestParameters : RequestParameters
///
///
/// Get a document by its ID.
-/// Retrieves the document with the specified ID from an index.
+///
+///
+/// Get a document and its source or stored fields from an index.
+///
+///
+/// By default, this API is realtime and is not affected by the refresh rate of the index (when data will become visible for search).
+/// In the case where stored fields are requested with the stored_fields parameter and the document has been updated but is not yet refreshed, the API will have to parse and analyze the source to extract the stored fields.
+/// To turn off realtime behavior, set the realtime parameter to false.
+///
+///
+/// Source filtering
+///
+///
+/// By default, the API returns the contents of the _source field unless you have used the stored_fields parameter or the _source field is turned off.
+/// You can turn off _source retrieval by using the _source parameter:
+///
+///
+/// GET my-index-000001/_doc/0?_source=false
+///
+///
+/// If you only need one or two fields from the _source, use the _source_includes or _source_excludes parameters to include or filter out particular fields.
+/// This can be helpful with large documents where partial retrieval can save on network overhead
+/// Both parameters take a comma separated list of fields or wildcard expressions.
+/// For example:
+///
+///
+/// GET my-index-000001/_doc/0?_source_includes=*.id&_source_excludes=entities
+///
+///
+/// If you only want to specify includes, you can use a shorter notation:
+///
+///
+/// GET my-index-000001/_doc/0?_source=*.id
+///
+///
+/// Routing
+///
+///
+/// If routing is used during indexing, the routing value also needs to be specified to retrieve a document.
+/// For example:
+///
+///
+/// GET my-index-000001/_doc/2?routing=user1
+///
+///
+/// This request gets the document with ID 2, but it is routed based on the user.
+/// The document is not fetched if the correct routing is not specified.
+///
+///
+/// Distributed
+///
+///
+/// The GET operation is hashed into a specific shard ID.
+/// It is then redirected to one of the replicas within that shard ID and returns the result.
+/// The replicas are the primary shard and its replicas within that shard ID group.
+/// This means that the more replicas you have, the better your GET scaling will be.
+///
+///
+/// Versioning support
+///
+///
+/// You can use the version parameter to retrieve the document only if its current version is equal to the specified one.
+///
+///
+/// Internally, Elasticsearch has marked the old document as deleted and added an entirely new document.
+/// The old version of the document doesn't disappear immediately, although you won't be able to access it.
+/// Elasticsearch cleans up deleted documents in the background as you continue to index more data.
///
///
public sealed partial class GetRequest : PlainRequest
@@ -136,9 +218,9 @@ public GetRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients
///
///
- /// Should this request force synthetic _source?
- /// Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.
- /// Fetches with this enabled will be slower the enabling synthetic source natively in the index.
+ /// Indicates whether the request forces synthetic _source.
+ /// Use this paramater to test if the mapping supports synthetic _source and to get a sense of the worst case performance.
+ /// Fetches with this parameter enabled will be slower than enabling synthetic source natively in the index.
///
///
[JsonIgnore]
@@ -146,7 +228,14 @@ public GetRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients
///
///
- /// Specifies the node or shard the operation should be performed on. Random by default.
+ /// The node or shard the operation should be performed on.
+ /// By default, the operation is randomized between the shard replicas.
+ ///
+ ///
+ /// If it is set to _local, the operation will prefer to be run on a local allocated shard when possible.
+ /// If it is set to a custom value, the value is used to guarantee that the same shards will be used for the same custom value.
+ /// This can help with "jumping values" when hitting different shards in different refresh states.
+ /// A sample value can be something like the web session ID or the user name.
///
///
[JsonIgnore]
@@ -162,7 +251,8 @@ public GetRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients
///
///
- /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes.
+ /// If true, the request refreshes the relevant shards before retrieving the document.
+ /// Setting it to true should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).
///
///
[JsonIgnore]
@@ -170,7 +260,7 @@ public GetRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients
///
///
- /// Target the specified primary shard.
+ /// A custom value used to route operations to a specific shard.
///
///
[JsonIgnore]
@@ -178,7 +268,7 @@ public GetRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients
///
///
- /// True or false to return the _source field or not, or a list of fields to return.
+ /// Indicates whether to return the _source field (true or false) or lists the fields to return.
///
///
[JsonIgnore]
@@ -186,7 +276,9 @@ public GetRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients
///
///
- /// A comma-separated list of source fields to exclude in the response.
+ /// A comma-separated list of source fields to exclude from the response.
+ /// You can also use this parameter to exclude fields from the subset specified in _source_includes query parameter.
+ /// If the _source parameter is false, this parameter is ignored.
///
///
[JsonIgnore]
@@ -195,6 +287,9 @@ public GetRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients
///
///
/// A comma-separated list of source fields to include in the response.
+ /// If this parameter is specified, only these source fields are returned.
+ /// You can exclude fields from this subset using the _source_excludes query parameter.
+ /// If the _source parameter is false, this parameter is ignored.
///
///
[JsonIgnore]
@@ -202,9 +297,11 @@ public GetRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients
///
///
- /// List of stored fields to return as part of a hit.
+ /// A comma-separated 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.
+ /// If this field is specified, the _source parameter defaults to false.
+ /// Only leaf fields can be retrieved with the stored_field option.
+ /// Object fields can't be returned;if specified, the request fails.
///
///
[JsonIgnore]
@@ -212,7 +309,8 @@ public GetRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients
///
///
- /// Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
+ /// The version number for concurrency control.
+ /// It must match the current version of the document for the request to succeed.
///
///
[JsonIgnore]
@@ -220,7 +318,7 @@ public GetRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients
///
///
- /// Specific version type: internal, external, external_gte.
+ /// The version type.
///
///
[JsonIgnore]
@@ -230,7 +328,73 @@ public GetRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients
///
///
/// Get a document by its ID.
-/// Retrieves the document with the specified ID from an index.
+///
+///
+/// Get a document and its source or stored fields from an index.
+///
+///
+/// By default, this API is realtime and is not affected by the refresh rate of the index (when data will become visible for search).
+/// In the case where stored fields are requested with the stored_fields parameter and the document has been updated but is not yet refreshed, the API will have to parse and analyze the source to extract the stored fields.
+/// To turn off realtime behavior, set the realtime parameter to false.
+///
+///
+/// Source filtering
+///
+///
+/// By default, the API returns the contents of the _source field unless you have used the stored_fields parameter or the _source field is turned off.
+/// You can turn off _source retrieval by using the _source parameter:
+///
+///
+/// GET my-index-000001/_doc/0?_source=false
+///
+///
+/// If you only need one or two fields from the _source, use the _source_includes or _source_excludes parameters to include or filter out particular fields.
+/// This can be helpful with large documents where partial retrieval can save on network overhead
+/// Both parameters take a comma separated list of fields or wildcard expressions.
+/// For example:
+///
+///
+/// GET my-index-000001/_doc/0?_source_includes=*.id&_source_excludes=entities
+///
+///
+/// If you only want to specify includes, you can use a shorter notation:
+///
+///
+/// GET my-index-000001/_doc/0?_source=*.id
+///
+///
+/// Routing
+///
+///
+/// If routing is used during indexing, the routing value also needs to be specified to retrieve a document.
+/// For example:
+///
+///
+/// GET my-index-000001/_doc/2?routing=user1
+///
+///
+/// This request gets the document with ID 2, but it is routed based on the user.
+/// The document is not fetched if the correct routing is not specified.
+///
+///
+/// Distributed
+///
+///
+/// The GET operation is hashed into a specific shard ID.
+/// It is then redirected to one of the replicas within that shard ID and returns the result.
+/// The replicas are the primary shard and its replicas within that shard ID group.
+/// This means that the more replicas you have, the better your GET scaling will be.
+///
+///
+/// Versioning support
+///
+///
+/// You can use the version parameter to retrieve the document only if its current version is equal to the specified one.
+///
+///
+/// Internally, Elasticsearch has marked the old document as deleted and added an entirely new document.
+/// The old version of the document doesn't disappear immediately, although you won't be able to access it.
+/// Elasticsearch cleans up deleted documents in the background as you continue to index more data.
///
///
public sealed partial class GetRequestDescriptor : RequestDescriptor, GetRequestParameters>
@@ -297,7 +461,73 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Get a document by its ID.
-/// Retrieves the document with the specified ID from an index.
+///
+///
+/// Get a document and its source or stored fields from an index.
+///
+///
+/// By default, this API is realtime and is not affected by the refresh rate of the index (when data will become visible for search).
+/// In the case where stored fields are requested with the stored_fields parameter and the document has been updated but is not yet refreshed, the API will have to parse and analyze the source to extract the stored fields.
+/// To turn off realtime behavior, set the realtime parameter to false.
+///
+///
+/// Source filtering
+///
+///
+/// By default, the API returns the contents of the _source field unless you have used the stored_fields parameter or the _source field is turned off.
+/// You can turn off _source retrieval by using the _source parameter:
+///
+///
+/// GET my-index-000001/_doc/0?_source=false
+///
+///
+/// If you only need one or two fields from the _source, use the _source_includes or _source_excludes parameters to include or filter out particular fields.
+/// This can be helpful with large documents where partial retrieval can save on network overhead
+/// Both parameters take a comma separated list of fields or wildcard expressions.
+/// For example:
+///
+///
+/// GET my-index-000001/_doc/0?_source_includes=*.id&_source_excludes=entities
+///
+///
+/// If you only want to specify includes, you can use a shorter notation:
+///
+///
+/// GET my-index-000001/_doc/0?_source=*.id
+///
+///
+/// Routing
+///
+///
+/// If routing is used during indexing, the routing value also needs to be specified to retrieve a document.
+/// For example:
+///
+///
+/// GET my-index-000001/_doc/2?routing=user1
+///
+///
+/// This request gets the document with ID 2, but it is routed based on the user.
+/// The document is not fetched if the correct routing is not specified.
+///
+///
+/// Distributed
+///
+///
+/// The GET operation is hashed into a specific shard ID.
+/// It is then redirected to one of the replicas within that shard ID and returns the result.
+/// The replicas are the primary shard and its replicas within that shard ID group.
+/// This means that the more replicas you have, the better your GET scaling will be.
+///
+///
+/// Versioning support
+///
+///
+/// You can use the version parameter to retrieve the document only if its current version is equal to the specified one.
+///
+///
+/// Internally, Elasticsearch has marked the old document as deleted and added an entirely new document.
+/// The old version of the document doesn't disappear immediately, although you won't be able to access it.
+/// Elasticsearch cleans up deleted documents in the background as you continue to index more data.
///
///
public sealed partial class GetRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetResponse.g.cs
index 09773e266f6..f110c87f9ca 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetResponse.g.cs
@@ -28,25 +28,80 @@ namespace Elastic.Clients.Elasticsearch;
public sealed partial class GetResponse : ElasticsearchResponse
{
+ ///
+ ///
+ /// If the stored_fields parameter is set to true and found is true, it contains the document fields stored in the index.
+ ///
+ ///
[JsonInclude, JsonPropertyName("fields")]
public Elastic.Clients.Elasticsearch.FieldValues? Fields { get; init; }
+
+ ///
+ ///
+ /// Indicates whether the document exists.
+ ///
+ ///
[JsonInclude, JsonPropertyName("found")]
public bool Found { get; init; }
+
+ ///
+ ///
+ /// The unique identifier for the document.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_id")]
public string Id { get; init; }
[JsonInclude, JsonPropertyName("_ignored")]
public IReadOnlyCollection? Ignored { get; init; }
+
+ ///
+ ///
+ /// The name of the index the document belongs to.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_index")]
public string Index { get; init; }
+
+ ///
+ ///
+ /// The primary term assigned to the document for the indexing operation.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_primary_term")]
public long? PrimaryTerm { get; init; }
+
+ ///
+ ///
+ /// The explicit routing, if set.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_routing")]
public string? Routing { get; init; }
+
+ ///
+ ///
+ /// The sequence number assigned to the document for the indexing operation.
+ /// Sequence numbers are used to ensure an older version of a document doesn't overwrite a newer version.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_seq_no")]
public long? SeqNo { get; init; }
+
+ ///
+ ///
+ /// If found is true, it contains the document data formatted in JSON.
+ /// If the _source parameter is set to false or the stored_fields parameter is set to true, it is excluded.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_source")]
[SourceConverter]
public TDocument? Source { get; init; }
+
+ ///
+ ///
+ /// The document version, which is ncremented each time the document is updated.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_version")]
public long? Version { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetScriptRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetScriptRequest.g.cs
index 27db2736d08..34ef3573000 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetScriptRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetScriptRequest.g.cs
@@ -34,7 +34,9 @@ public sealed partial class GetScriptRequestParameters : RequestParameters
{
///
///
- /// Specify timeout for connection to master
+ /// The period to wait for the master node.
+ /// If the master node is not available before the timeout expires, the request fails and returns an error.
+ /// It can also be set to -1 to indicate that the request should never timeout.
///
///
public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); }
@@ -62,7 +64,9 @@ public GetScriptRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Requi
///
///
- /// Specify timeout for connection to master
+ /// The period to wait for the master node.
+ /// If the master node is not available before the timeout expires, the request fails and returns an error.
+ /// It can also be set to -1 to indicate that the request should never timeout.
///
///
[JsonIgnore]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceRequest.g.cs
index d44b4d6b1a2..0f3e7044d4e 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceRequest.g.cs
@@ -34,35 +34,37 @@ public sealed partial class GetSourceRequestParameters : RequestParameters
{
///
///
- /// Specifies the node or shard the operation should be performed on. Random by default.
+ /// The node or shard the operation should be performed on.
+ /// By default, the operation is randomized between the shard replicas.
///
///
public string? Preference { get => Q("preference"); set => Q("preference", value); }
///
///
- /// Boolean) If true, the request is real-time as opposed to near-real-time.
+ /// If true, the request is real-time as opposed to near-real-time.
///
///
public bool? Realtime { get => Q("realtime"); set => Q("realtime", value); }
///
///
- /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes.
+ /// If true, the request refreshes the relevant shards before retrieving the document.
+ /// Setting it to true should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).
///
///
public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); }
///
///
- /// Target the specified primary shard.
+ /// A custom value used to route operations to a specific shard.
///
///
public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); }
///
///
- /// True or false to return the _source field or not, or a list of fields to return.
+ /// Indicates whether to return the _source field (true or false) or lists the fields to return.
///
///
public Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); }
@@ -80,18 +82,25 @@ public sealed partial class GetSourceRequestParameters : RequestParameters
///
///
public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); }
+
+ ///
+ ///
+ /// A comma-separated list of stored fields to return as part of a hit.
+ ///
+ ///
public Elastic.Clients.Elasticsearch.Fields? StoredFields { get => Q("stored_fields"); set => Q("stored_fields", value); }
///
///
- /// Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
+ /// The version number for concurrency control.
+ /// It must match the current version of the document for the request to succeed.
///
///
public long? Version { get => Q("version"); set => Q("version", value); }
///
///
- /// Specific version type: internal, external, external_gte.
+ /// The version type.
///
///
public Elastic.Clients.Elasticsearch.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); }
@@ -100,8 +109,20 @@ public sealed partial class GetSourceRequestParameters : RequestParameters
///
///
/// Get a document's source.
-/// Returns the source of a document.
///
+///
+/// Get the source of a document.
+/// For example:
+///
+///
+/// GET my-index-000001/_source/1
+///
+///
+/// You can use the source filtering parameters to control which parts of the _source are returned:
+///
+///
+/// GET my-index-000001/_source/1/?_source_includes=*.id&_source_excludes=entities
+///
///
public sealed partial class GetSourceRequest : PlainRequest
{
@@ -119,7 +140,8 @@ public GetSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.C
///
///
- /// Specifies the node or shard the operation should be performed on. Random by default.
+ /// The node or shard the operation should be performed on.
+ /// By default, the operation is randomized between the shard replicas.
///
///
[JsonIgnore]
@@ -127,7 +149,7 @@ public GetSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.C
///
///
- /// Boolean) If true, the request is real-time as opposed to near-real-time.
+ /// If true, the request is real-time as opposed to near-real-time.
///
///
[JsonIgnore]
@@ -135,7 +157,8 @@ public GetSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.C
///
///
- /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes.
+ /// If true, the request refreshes the relevant shards before retrieving the document.
+ /// Setting it to true should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).
///
///
[JsonIgnore]
@@ -143,7 +166,7 @@ public GetSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.C
///
///
- /// Target the specified primary shard.
+ /// A custom value used to route operations to a specific shard.
///
///
[JsonIgnore]
@@ -151,7 +174,7 @@ public GetSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.C
///
///
- /// True or false to return the _source field or not, or a list of fields to return.
+ /// Indicates whether to return the _source field (true or false) or lists the fields to return.
///
///
[JsonIgnore]
@@ -172,12 +195,19 @@ public GetSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.C
///
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); }
+
+ ///
+ ///
+ /// A comma-separated list of stored fields to return as part of a hit.
+ ///
+ ///
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Fields? StoredFields { get => Q("stored_fields"); set => Q("stored_fields", value); }
///
///
- /// Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
+ /// The version number for concurrency control.
+ /// It must match the current version of the document for the request to succeed.
///
///
[JsonIgnore]
@@ -185,7 +215,7 @@ public GetSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.C
///
///
- /// Specific version type: internal, external, external_gte.
+ /// The version type.
///
///
[JsonIgnore]
@@ -195,8 +225,20 @@ public GetSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.C
///
///
/// Get a document's source.
-/// Returns the source of a document.
///
+///
+/// Get the source of a document.
+/// For example:
+///
+///
+/// GET my-index-000001/_source/1
+///
+///
+/// You can use the source filtering parameters to control which parts of the _source are returned:
+///
+///
+/// GET my-index-000001/_source/1/?_source_includes=*.id&_source_excludes=entities
+///
///
public sealed partial class GetSourceRequestDescriptor : RequestDescriptor, GetSourceRequestParameters>
{
@@ -261,8 +303,20 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Get a document's source.
-/// Returns the source of a document.
///
+///
+/// Get the source of a document.
+/// For example:
+///
+///
+/// GET my-index-000001/_source/1
+///
+///
+/// You can use the source filtering parameters to control which parts of the _source are returned:
+///
+///
+/// GET my-index-000001/_source/1/?_source_includes=*.id&_source_excludes=entities
+///
///
public sealed partial class GetSourceRequestDescriptor : RequestDescriptor
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/MigrateToDataTiersResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/MigrateToDataTiersResponse.g.cs
index d0d38a0096a..72723c175c6 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/MigrateToDataTiersResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/MigrateToDataTiersResponse.g.cs
@@ -30,17 +30,54 @@ public sealed partial class MigrateToDataTiersResponse : ElasticsearchResponse
{
[JsonInclude, JsonPropertyName("dry_run")]
public bool DryRun { get; init; }
+
+ ///
+ ///
+ /// The component templates that were updated to not contain custom routing settings for the provided data attribute.
+ ///
+ ///
[JsonInclude, JsonPropertyName("migrated_component_templates")]
public IReadOnlyCollection MigratedComponentTemplates { get; init; }
+
+ ///
+ ///
+ /// The composable index templates that were updated to not contain custom routing settings for the provided data attribute.
+ ///
+ ///
[JsonInclude, JsonPropertyName("migrated_composable_templates")]
public IReadOnlyCollection MigratedComposableTemplates { get; init; }
+
+ ///
+ ///
+ /// The ILM policies that were updated.
+ ///
+ ///
[JsonInclude, JsonPropertyName("migrated_ilm_policies")]
public IReadOnlyCollection MigratedIlmPolicies { get; init; }
+
+ ///
+ ///
+ /// The indices that were migrated to tier preference routing.
+ ///
+ ///
[JsonInclude, JsonPropertyName("migrated_indices")]
[SingleOrManyCollectionConverter(typeof(string))]
public IReadOnlyCollection MigratedIndices { get; init; }
+
+ ///
+ ///
+ /// The legacy index templates that were updated to not contain custom routing settings for the provided data attribute.
+ ///
+ ///
[JsonInclude, JsonPropertyName("migrated_legacy_templates")]
public IReadOnlyCollection MigratedLegacyTemplates { get; init; }
+
+ ///
+ ///
+ /// The name of the legacy index template that was deleted.
+ /// This information is missing if no legacy index templates were deleted.
+ ///
+ ///
[JsonInclude, JsonPropertyName("removed_legacy_template")]
public string RemovedLegacyTemplate { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/MoveToStepRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/MoveToStepRequest.g.cs
index e69e5d40c39..c45c2815647 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/MoveToStepRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/MoveToStepRequest.g.cs
@@ -69,8 +69,19 @@ public MoveToStepRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r
internal override string OperationName => "ilm.move_to_step";
+ ///
+ ///
+ /// The step that the index is expected to be in.
+ ///
+ ///
[JsonInclude, JsonPropertyName("current_step")]
public Elastic.Clients.Elasticsearch.IndexLifecycleManagement.StepKey CurrentStep { get; set; }
+
+ ///
+ ///
+ /// The step that you want to run.
+ ///
+ ///
[JsonInclude, JsonPropertyName("next_step")]
public Elastic.Clients.Elasticsearch.IndexLifecycleManagement.StepKey NextStep { get; set; }
}
@@ -129,6 +140,11 @@ public MoveToStepRequestDescriptor Index(Elastic.Clients.Elasticsearc
private Elastic.Clients.Elasticsearch.IndexLifecycleManagement.StepKeyDescriptor NextStepDescriptor { get; set; }
private Action NextStepDescriptorAction { get; set; }
+ ///
+ ///
+ /// The step that the index is expected to be in.
+ ///
+ ///
public MoveToStepRequestDescriptor CurrentStep(Elastic.Clients.Elasticsearch.IndexLifecycleManagement.StepKey currentStep)
{
CurrentStepDescriptor = null;
@@ -153,6 +169,11 @@ public MoveToStepRequestDescriptor CurrentStep(Action
+ ///
+ /// The step that you want to run.
+ ///
+ ///
public MoveToStepRequestDescriptor NextStep(Elastic.Clients.Elasticsearch.IndexLifecycleManagement.StepKey nextStep)
{
NextStepDescriptor = null;
@@ -266,6 +287,11 @@ public MoveToStepRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName
private Elastic.Clients.Elasticsearch.IndexLifecycleManagement.StepKeyDescriptor NextStepDescriptor { get; set; }
private Action NextStepDescriptorAction { get; set; }
+ ///
+ ///
+ /// The step that the index is expected to be in.
+ ///
+ ///
public MoveToStepRequestDescriptor CurrentStep(Elastic.Clients.Elasticsearch.IndexLifecycleManagement.StepKey currentStep)
{
CurrentStepDescriptor = null;
@@ -290,6 +316,11 @@ public MoveToStepRequestDescriptor CurrentStep(Action
+ ///
+ /// The step that you want to run.
+ ///
+ ///
public MoveToStepRequestDescriptor NextStep(Elastic.Clients.Elasticsearch.IndexLifecycleManagement.StepKey nextStep)
{
NextStepDescriptor = null;
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/StartIlmRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/StartIlmRequest.g.cs
index 9458140d79e..5849282dd88 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/StartIlmRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/StartIlmRequest.g.cs
@@ -32,7 +32,18 @@ namespace Elastic.Clients.Elasticsearch.IndexLifecycleManagement;
public sealed partial class StartIlmRequestParameters : RequestParameters
{
+ ///
+ ///
+ /// Explicit operation timeout for connection to master node
+ ///
+ ///
public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); }
+
+ ///
+ ///
+ /// Explicit operation timeout
+ ///
+ ///
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); }
}
@@ -54,8 +65,19 @@ public sealed partial class StartIlmRequest : PlainRequest "ilm.start";
+ ///
+ ///
+ /// Explicit operation timeout for connection to master node
+ ///
+ ///
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); }
+
+ ///
+ ///
+ /// Explicit operation timeout
+ ///
+ ///
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); }
}
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/StopIlmRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/StopIlmRequest.g.cs
index 900918996e5..3cd7e0ddf37 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/StopIlmRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/StopIlmRequest.g.cs
@@ -32,7 +32,18 @@ namespace Elastic.Clients.Elasticsearch.IndexLifecycleManagement;
public sealed partial class StopIlmRequestParameters : RequestParameters
{
+ ///
+ ///
+ /// Explicit operation timeout for connection to master node
+ ///
+ ///
public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); }
+
+ ///
+ ///
+ /// Explicit operation timeout
+ ///
+ ///
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); }
}
@@ -57,8 +68,19 @@ public sealed partial class StopIlmRequest : PlainRequest "ilm.stop";
+ ///
+ ///
+ /// Explicit operation timeout for connection to master node
+ ///
+ ///
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); }
+
+ ///
+ ///
+ /// Explicit operation timeout
+ ///
+ ///
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); }
}
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/AnalyzeIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/AnalyzeIndexRequest.g.cs
index 0a17e30d21c..a542c96bd8a 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/AnalyzeIndexRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/AnalyzeIndexRequest.g.cs
@@ -37,7 +37,13 @@ public sealed partial class AnalyzeIndexRequestParameters : RequestParameters
///
///
/// Get tokens from text analysis.
-/// The analyze API performs analysis on a text string and returns the resulting tokens.
+/// The analyze API performs analysis on a text string and returns the resulting tokens.
+///
+///
+/// Generating excessive amount of tokens may cause a node to run out of memory.
+/// The index.analyze.max_token_count setting enables you to limit the number of tokens that can be produced.
+/// If more than this limit of tokens gets generated, an error occurs.
+/// The _analyze endpoint without a specified index will always use 10000 as its limit.
///
///
public sealed partial class AnalyzeIndexRequest : PlainRequest
@@ -139,7 +145,13 @@ public AnalyzeIndexRequest(Elastic.Clients.Elasticsearch.IndexName? index) : bas
///
///
/// Get tokens from text analysis.
-/// The analyze API performs analysis on a text string and returns the resulting tokens.
+/// The analyze API performs analysis on a text string and returns the resulting tokens.
+///
+///
+/// Generating excessive amount of tokens may cause a node to run out of memory.
+/// The index.analyze.max_token_count setting enables you to limit the number of tokens that can be produced.
+/// If more than this limit of tokens gets generated, an error occurs.
+/// The _analyze endpoint without a specified index will always use 10000 as its limit.
///
///
public sealed partial class AnalyzeIndexRequestDescriptor : RequestDescriptor, AnalyzeIndexRequestParameters>
@@ -371,7 +383,13 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Get tokens from text analysis.
-/// The analyze API performs analysis on a text string and returns the resulting tokens.
+/// The analyze API performs analysis on a text string and returns the resulting tokens.
+///
+///
+/// Generating excessive amount of tokens may cause a node to run out of memory.
+/// The index.analyze.max_token_count setting enables you to limit the number of tokens that can be produced.
+/// If more than this limit of tokens gets generated, an error occurs.
+/// The _analyze endpoint without a specified index will always use 10000 as its limit.
///
///
public sealed partial class AnalyzeIndexRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ClearCacheRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ClearCacheRequest.g.cs
index 86ff0cc74bc..344bcff4e50 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ClearCacheRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ClearCacheRequest.g.cs
@@ -93,6 +93,11 @@ public sealed partial class ClearCacheRequestParameters : RequestParameters
/// Clear the cache of one or more indices.
/// For data streams, the API clears the caches of the stream's backing indices.
///
+///
+/// By default, the clear cache API clears all caches.
+/// To clear only specific caches, use the fielddata, query, or request parameters.
+/// To clear the cache only of specific fields, use the fields parameter.
+///
///
public sealed partial class ClearCacheRequest : PlainRequest
{
@@ -180,6 +185,11 @@ public ClearCacheRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(
/// Clear the cache of one or more indices.
/// For data streams, the API clears the caches of the stream's backing indices.
///
+///
+/// By default, the clear cache API clears all caches.
+/// To clear only specific caches, use the fielddata, query, or request parameters.
+/// To clear the cache only of specific fields, use the fields parameter.
+///
///
public sealed partial class ClearCacheRequestDescriptor : RequestDescriptor, ClearCacheRequestParameters>
{
@@ -226,6 +236,11 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
/// Clear the cache of one or more indices.
/// For data streams, the API clears the caches of the stream's backing indices.
///
+///
+/// By default, the clear cache API clears all caches.
+/// To clear only specific caches, use the fielddata, query, or request parameters.
+/// To clear the cache only of specific fields, use the fields parameter.
+///
///
public sealed partial class ClearCacheRequestDescriptor : RequestDescriptor
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloneIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloneIndexRequest.g.cs
index e6c9e2e8529..f5366157ae8 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloneIndexRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloneIndexRequest.g.cs
@@ -99,6 +99,11 @@ public sealed partial class CloneIndexRequestParameters : RequestParameters
///
/// -
///
+/// The index must be marked as read-only and have a cluster health status of green.
+///
+///
+/// -
+///
/// The target index must not exist.
///
///
@@ -113,6 +118,35 @@ public sealed partial class CloneIndexRequestParameters : RequestParameters
///
///
///
+///
+/// The current write index on a data stream cannot be cloned.
+/// In order to clone the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be cloned.
+///
+///
+/// NOTE: Mappings cannot be specified in the _clone request. The mappings of the source index will be used for the target index.
+///
+///
+/// Monitor the cloning process
+///
+///
+/// The cloning process can be monitored with the cat recovery API or the cluster health API can be used to wait until all primary shards have been allocated by setting the wait_for_status parameter to yellow.
+///
+///
+/// The _clone API returns as soon as the target index has been added to the cluster state, before any shards have been allocated.
+/// At this point, all shards are in the state unassigned.
+/// If, for any reason, the target index can't be allocated, its primary shard will remain unassigned until it can be allocated on that node.
+///
+///
+/// Once the primary shard is allocated, it moves to state initializing, and the clone process begins.
+/// When the clone operation completes, the shard will become active.
+/// At that point, Elasticsearch will try to allocate any replicas and may decide to relocate the primary shard to another node.
+///
+///
+/// Wait for active shards
+///
+///
+/// Because the clone operation creates a new index to clone the shards to, the wait for active shards setting on index creation applies to the clone index action as well.
+///
///
public sealed partial class CloneIndexRequest : PlainRequest
{
@@ -214,6 +248,11 @@ public CloneIndexRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.
///
/// -
///
+/// The index must be marked as read-only and have a cluster health status of green.
+///
+///
+/// -
+///
/// The target index must not exist.
///
///
@@ -228,6 +267,35 @@ public CloneIndexRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.
///
///
///
+///
+/// The current write index on a data stream cannot be cloned.
+/// In order to clone the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be cloned.
+///
+///
+/// NOTE: Mappings cannot be specified in the _clone request. The mappings of the source index will be used for the target index.
+///
+///
+/// Monitor the cloning process
+///
+///
+/// The cloning process can be monitored with the cat recovery API or the cluster health API can be used to wait until all primary shards have been allocated by setting the wait_for_status parameter to yellow.
+///
+///
+/// The _clone API returns as soon as the target index has been added to the cluster state, before any shards have been allocated.
+/// At this point, all shards are in the state unassigned.
+/// If, for any reason, the target index can't be allocated, its primary shard will remain unassigned until it can be allocated on that node.
+///
+///
+/// Once the primary shard is allocated, it moves to state initializing, and the clone process begins.
+/// When the clone operation completes, the shard will become active.
+/// At that point, Elasticsearch will try to allocate any replicas and may decide to relocate the primary shard to another node.
+///
+///
+/// Wait for active shards
+///
+///
+/// Because the clone operation creates a new index to clone the shards to, the wait for active shards setting on index creation applies to the clone index action as well.
+///
///
public sealed partial class CloneIndexRequestDescriptor : RequestDescriptor, CloneIndexRequestParameters>
{
@@ -351,6 +419,11 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
/// -
///
+/// The index must be marked as read-only and have a cluster health status of green.
+///
+///
+/// -
+///
/// The target index must not exist.
///
///
@@ -365,6 +438,35 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
///
+///
+/// The current write index on a data stream cannot be cloned.
+/// In order to clone the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be cloned.
+///
+///
+/// NOTE: Mappings cannot be specified in the _clone request. The mappings of the source index will be used for the target index.
+///
+///
+/// Monitor the cloning process
+///
+///
+/// The cloning process can be monitored with the cat recovery API or the cluster health API can be used to wait until all primary shards have been allocated by setting the wait_for_status parameter to yellow.
+///
+///
+/// The _clone API returns as soon as the target index has been added to the cluster state, before any shards have been allocated.
+/// At this point, all shards are in the state unassigned.
+/// If, for any reason, the target index can't be allocated, its primary shard will remain unassigned until it can be allocated on that node.
+///
+///
+/// Once the primary shard is allocated, it moves to state initializing, and the clone process begins.
+/// When the clone operation completes, the shard will become active.
+/// At that point, Elasticsearch will try to allocate any replicas and may decide to relocate the primary shard to another node.
+///
+///
+/// Wait for active shards
+///
+///
+/// Because the clone operation creates a new index to clone the shards to, the wait for active shards setting on index creation applies to the clone index action as well.
+///
///
public sealed partial class CloneIndexRequestDescriptor : RequestDescriptor
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs
index 1cab06ad5e6..fc291de27db 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs
@@ -60,7 +60,41 @@ public sealed partial class CreateIndexRequestParameters : RequestParameters
///
///
/// Create an index.
-/// Creates a new index.
+/// You can use the create index API to add a new index to an Elasticsearch cluster.
+/// When creating an index, you can specify the following:
+///
+///
+/// -
+///
+/// Settings for the index.
+///
+///
+/// -
+///
+/// Mappings for fields in the index.
+///
+///
+/// -
+///
+/// Index aliases
+///
+///
+///
+///
+/// Wait for active shards
+///
+///
+/// By default, index creation will only return a response to the client when the primary copies of each shard have been started, or the request times out.
+/// The index creation response will indicate what happened.
+/// For example, acknowledged indicates whether the index was successfully created in the cluster, while shards_acknowledged indicates whether the requisite number of shard copies were started for each shard in the index before timing out.
+/// Note that it is still possible for either acknowledged or shards_acknowledged to be false, but for the index creation to be successful.
+/// These values simply indicate whether the operation completed before the timeout.
+/// If acknowledged is false, the request timed out before the cluster state was updated with the newly created index, but it probably will be created sometime soon.
+/// If shards_acknowledged is false, then the request timed out before the requisite number of shards were started (by default just the primaries), even if the cluster state was successfully updated to reflect the newly created index (that is to say, acknowledged is true).
+///
+///
+/// You can change the default of only waiting for the primary shards to start through the index setting index.write.wait_for_active_shards.
+/// Note that changing this setting will also affect the wait_for_active_shards value on all subsequent write operations.
///
///
public sealed partial class CreateIndexRequest : PlainRequest
@@ -149,7 +183,41 @@ public CreateIndexRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(
///
///
/// Create an index.
-/// Creates a new index.
+/// You can use the create index API to add a new index to an Elasticsearch cluster.
+/// When creating an index, you can specify the following:
+///
+///
+/// -
+///
+/// Settings for the index.
+///
+///
+/// -
+///
+/// Mappings for fields in the index.
+///
+///
+/// -
+///
+/// Index aliases
+///
+///
+///
+///
+/// Wait for active shards
+///
+///
+/// By default, index creation will only return a response to the client when the primary copies of each shard have been started, or the request times out.
+/// The index creation response will indicate what happened.
+/// For example, acknowledged indicates whether the index was successfully created in the cluster, while shards_acknowledged indicates whether the requisite number of shard copies were started for each shard in the index before timing out.
+/// Note that it is still possible for either acknowledged or shards_acknowledged to be false, but for the index creation to be successful.
+/// These values simply indicate whether the operation completed before the timeout.
+/// If acknowledged is false, the request timed out before the cluster state was updated with the newly created index, but it probably will be created sometime soon.
+/// If shards_acknowledged is false, then the request timed out before the requisite number of shards were started (by default just the primaries), even if the cluster state was successfully updated to reflect the newly created index (that is to say, acknowledged is true).
+///
+///
+/// You can change the default of only waiting for the primary shards to start through the index setting index.write.wait_for_active_shards.
+/// Note that changing this setting will also affect the wait_for_active_shards value on all subsequent write operations.
///
///
public sealed partial class CreateIndexRequestDescriptor : RequestDescriptor, CreateIndexRequestParameters>
@@ -324,7 +392,41 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Create an index.
-/// Creates a new index.
+/// You can use the create index API to add a new index to an Elasticsearch cluster.
+/// When creating an index, you can specify the following:
+///
+///
+/// -
+///
+/// Settings for the index.
+///
+///
+/// -
+///
+/// Mappings for fields in the index.
+///
+///
+/// -
+///
+/// Index aliases
+///
+///
+///
+///
+/// Wait for active shards
+///
+///
+/// By default, index creation will only return a response to the client when the primary copies of each shard have been started, or the request times out.
+/// The index creation response will indicate what happened.
+/// For example, acknowledged indicates whether the index was successfully created in the cluster, while shards_acknowledged indicates whether the requisite number of shard copies were started for each shard in the index before timing out.
+/// Note that it is still possible for either acknowledged or shards_acknowledged to be false, but for the index creation to be successful.
+/// These values simply indicate whether the operation completed before the timeout.
+/// If acknowledged is false, the request timed out before the cluster state was updated with the newly created index, but it probably will be created sometime soon.
+/// If shards_acknowledged is false, then the request timed out before the requisite number of shards were started (by default just the primaries), even if the cluster state was successfully updated to reflect the newly created index (that is to say, acknowledged is true).
+///
+///
+/// You can change the default of only waiting for the primary shards to start through the index setting index.write.wait_for_active_shards.
+/// Note that changing this setting will also affect the wait_for_active_shards value on all subsequent write operations.
///
///
public sealed partial class CreateIndexRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteIndexRequest.g.cs
index f73c4862ff4..9e2fde6fe70 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteIndexRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteIndexRequest.g.cs
@@ -77,7 +77,13 @@ public sealed partial class DeleteIndexRequestParameters : RequestParameters
///
///
/// Delete indices.
-/// Deletes one or more indices.
+/// Deleting an index deletes its documents, shards, and metadata.
+/// It does not delete related Kibana components, such as data views, visualizations, or dashboards.
+///
+///
+/// You cannot delete the current write index of a data stream.
+/// To delete the index, you must roll over the data stream so a new write index is created.
+/// You can then use the delete index API to delete the previous write index.
///
///
public sealed partial class DeleteIndexRequest : PlainRequest
@@ -144,7 +150,13 @@ public DeleteIndexRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(
///
///
/// Delete indices.
-/// Deletes one or more indices.
+/// Deleting an index deletes its documents, shards, and metadata.
+/// It does not delete related Kibana components, such as data views, visualizations, or dashboards.
+///
+///
+/// You cannot delete the current write index of a data stream.
+/// To delete the index, you must roll over the data stream so a new write index is created.
+/// You can then use the delete index API to delete the previous write index.
///
///
public sealed partial class DeleteIndexRequestDescriptor : RequestDescriptor, DeleteIndexRequestParameters>
@@ -187,7 +199,13 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Delete indices.
-/// Deletes one or more indices.
+/// Deleting an index deletes its documents, shards, and metadata.
+/// It does not delete related Kibana components, such as data views, visualizations, or dashboards.
+///
+///
+/// You cannot delete the current write index of a data stream.
+/// To delete the index, you must roll over the data stream so a new write index is created.
+/// You can then use the delete index API to delete the previous write index.
///
///
public sealed partial class DeleteIndexRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteTemplateRequest.g.cs
index 22c27dca5fb..9636af46a91 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteTemplateRequest.g.cs
@@ -51,7 +51,7 @@ public sealed partial class DeleteTemplateRequestParameters : RequestParameters
///
///
-/// Deletes a legacy index template.
+/// Delete a legacy index template.
///
///
public sealed partial class DeleteTemplateRequest : PlainRequest
@@ -89,7 +89,7 @@ public DeleteTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : base(r =
///
///
-/// Deletes a legacy index template.
+/// Delete a legacy index template.
///
///
public sealed partial class DeleteTemplateRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DiskUsageRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DiskUsageRequest.g.cs
index f72d916026c..b8a1b0e113d 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DiskUsageRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DiskUsageRequest.g.cs
@@ -81,6 +81,11 @@ public sealed partial class DiskUsageRequestParameters : RequestParameters
/// This API might not support indices created in previous Elasticsearch versions.
/// The result of a small index can be inaccurate as some parts of an index might not be analyzed by the API.
///
+///
+/// NOTE: The total size of fields of the analyzed shards of the index in the response is usually smaller than the index store_size value because some small metadata files are ignored and some parts of data files might not be scanned by the API.
+/// Since stored fields are stored together in a compressed format, the sizes of stored fields are also estimates and can be inaccurate.
+/// The stored size of the _id field is likely underestimated while the _source field is overestimated.
+///
///
public sealed partial class DiskUsageRequest : PlainRequest
{
@@ -150,6 +155,11 @@ public DiskUsageRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r
/// This API might not support indices created in previous Elasticsearch versions.
/// The result of a small index can be inaccurate as some parts of an index might not be analyzed by the API.
///
+///
+/// NOTE: The total size of fields of the analyzed shards of the index in the response is usually smaller than the index store_size value because some small metadata files are ignored and some parts of data files might not be scanned by the API.
+/// Since stored fields are stored together in a compressed format, the sizes of stored fields are also estimates and can be inaccurate.
+/// The stored size of the _id field is likely underestimated while the _source field is overestimated.
+///
///
public sealed partial class DiskUsageRequestDescriptor : RequestDescriptor, DiskUsageRequestParameters>
{
@@ -195,6 +205,11 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
/// This API might not support indices created in previous Elasticsearch versions.
/// The result of a small index can be inaccurate as some parts of an index might not be analyzed by the API.
///
+///
+/// NOTE: The total size of fields of the analyzed shards of the index in the response is usually smaller than the index store_size value because some small metadata files are ignored and some parts of data files might not be scanned by the API.
+/// Since stored fields are stored together in a compressed format, the sizes of stored fields are also estimates and can be inaccurate.
+/// The stored size of the _id field is likely underestimated while the _source field is overestimated.
+///
///
public sealed partial class DiskUsageRequestDescriptor : RequestDescriptor
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsAliasRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsAliasRequest.g.cs
index ee84ea82590..497533fe195 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsAliasRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsAliasRequest.g.cs
@@ -56,14 +56,6 @@ public sealed partial class ExistsAliasRequestParameters : RequestParameters
///
///
public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); }
-
- ///
- ///
- /// Period to wait for a connection to the master node.
- /// If no response is received before the timeout expires, the request fails and returns an error.
- ///
- ///
- public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); }
}
///
@@ -117,15 +109,6 @@ public ExistsAliasRequest(Elastic.Clients.Elasticsearch.Indices? indices, Elasti
///
[JsonIgnore]
public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); }
-
- ///
- ///
- /// Period to wait for a connection to the master node.
- /// If no response is received before the timeout expires, the request fails and returns an error.
- ///
- ///
- [JsonIgnore]
- public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); }
}
///
@@ -157,7 +140,6 @@ public ExistsAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Names name) :
public ExistsAliasRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
public ExistsAliasRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards);
public ExistsAliasRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable);
- public ExistsAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout);
public ExistsAliasRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices)
{
@@ -205,7 +187,6 @@ public ExistsAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Names name) :
public ExistsAliasRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
public ExistsAliasRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards);
public ExistsAliasRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable);
- public ExistsAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout);
public ExistsAliasRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices)
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsRequest.g.cs
index efbc7dff46a..0d37ec92318 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsRequest.g.cs
@@ -82,7 +82,7 @@ public sealed partial class ExistsRequestParameters : RequestParameters
///
///
/// Check indices.
-/// Checks if one or more indices, index aliases, or data streams exist.
+/// Check if one or more indices, index aliases, or data streams exist.
///
///
public sealed partial class ExistsRequest : PlainRequest
@@ -155,7 +155,7 @@ public ExistsRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r =>
///
///
/// Check indices.
-/// Checks if one or more indices, index aliases, or data streams exist.
+/// Check if one or more indices, index aliases, or data streams exist.
///
///
public sealed partial class ExistsRequestDescriptor : RequestDescriptor, ExistsRequestParameters>
@@ -199,7 +199,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Check indices.
-/// Checks if one or more indices, index aliases, or data streams exist.
+/// Check if one or more indices, index aliases, or data streams exist.
///
///
public sealed partial class ExistsRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsTemplateRequest.g.cs
index 59042066550..de54274ac72 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsTemplateRequest.g.cs
@@ -34,21 +34,23 @@ public sealed partial class ExistsTemplateRequestParameters : RequestParameters
{
///
///
- /// Return settings in flat format (default: false)
+ /// Indicates whether to use a flat format for the response.
///
///
public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); }
///
///
- /// Return local information, do not retrieve the state from master node (default: false)
+ /// Indicates whether to get information from the local node only.
///
///
public bool? Local { get => Q("local"); set => Q("local", value); }
///
///
- /// Explicit operation timeout for connection to master node
+ /// The period to wait for the master node.
+ /// If the master node is not available before the timeout expires, the request fails and returns an error.
+ /// To indicate that the request should never timeout, set it to -1.
///
///
public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); }
@@ -57,7 +59,11 @@ public sealed partial class ExistsTemplateRequestParameters : RequestParameters
///
///
/// Check existence of index templates.
-/// Returns information about whether a particular index template exists.
+/// Get information about whether index templates exist.
+/// Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
+///
+///
+/// IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.
///
///
public sealed partial class ExistsTemplateRequest : PlainRequest
@@ -76,7 +82,7 @@ public ExistsTemplateRequest(Elastic.Clients.Elasticsearch.Names name) : base(r
///
///
- /// Return settings in flat format (default: false)
+ /// Indicates whether to use a flat format for the response.
///
///
[JsonIgnore]
@@ -84,7 +90,7 @@ public ExistsTemplateRequest(Elastic.Clients.Elasticsearch.Names name) : base(r
///
///
- /// Return local information, do not retrieve the state from master node (default: false)
+ /// Indicates whether to get information from the local node only.
///
///
[JsonIgnore]
@@ -92,7 +98,9 @@ public ExistsTemplateRequest(Elastic.Clients.Elasticsearch.Names name) : base(r
///
///
- /// Explicit operation timeout for connection to master node
+ /// The period to wait for the master node.
+ /// If the master node is not available before the timeout expires, the request fails and returns an error.
+ /// To indicate that the request should never timeout, set it to -1.
///
///
[JsonIgnore]
@@ -102,7 +110,11 @@ public ExistsTemplateRequest(Elastic.Clients.Elasticsearch.Names name) : base(r
///
///
/// Check existence of index templates.
-/// Returns information about whether a particular index template exists.
+/// Get information about whether index templates exist.
+/// Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
+///
+///
+/// IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.
///
///
public sealed partial class ExistsTemplateRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/FieldUsageStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/FieldUsageStatsRequest.g.cs
index 32d5670584b..3d7957b2e4d 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/FieldUsageStatsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/FieldUsageStatsRequest.g.cs
@@ -96,6 +96,10 @@ public sealed partial class FieldUsageStatsRequestParameters : RequestParameters
/// Field usage statistics are automatically captured when queries are running on a cluster.
/// A shard-level search request that accesses a given field, even if multiple times during that request, is counted as a single use.
///
+///
+/// The response body reports the per-shard usage count of the data structures that back the fields in the index.
+/// A given request will increment each count by a maximum value of 1, even if the request accesses the same field multiple times.
+///
///
public sealed partial class FieldUsageStatsRequest : PlainRequest
{
@@ -182,6 +186,10 @@ public FieldUsageStatsRequest(Elastic.Clients.Elasticsearch.Indices indices) : b
/// Field usage statistics are automatically captured when queries are running on a cluster.
/// A shard-level search request that accesses a given field, even if multiple times during that request, is counted as a single use.
///
+///
+/// The response body reports the per-shard usage count of the data structures that back the fields in the index.
+/// A given request will increment each count by a maximum value of 1, even if the request accesses the same field multiple times.
+///
///
public sealed partial class FieldUsageStatsRequestDescriptor : RequestDescriptor, FieldUsageStatsRequestParameters>
{
@@ -229,6 +237,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
/// Field usage statistics are automatically captured when queries are running on a cluster.
/// A shard-level search request that accesses a given field, even if multiple times during that request, is counted as a single use.
///
+///
+/// The response body reports the per-shard usage count of the data structures that back the fields in the index.
+/// A given request will increment each count by a maximum value of 1, even if the request accesses the same field multiple times.
+///
///
public sealed partial class FieldUsageStatsRequestDescriptor : RequestDescriptor
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ForcemergeRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ForcemergeRequest.g.cs
index 9059a333f91..d375c67ad88 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ForcemergeRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ForcemergeRequest.g.cs
@@ -100,6 +100,72 @@ public sealed partial class ForcemergeRequestParameters : RequestParameters
/// So the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance.
/// If you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally.
///
+///
+/// Blocks during a force merge
+///
+///
+/// Calls to this API block until the merge is complete (unless request contains wait_for_completion=false).
+/// If the client connection is lost before completion then the force merge process will continue in the background.
+/// Any new requests to force merge the same indices will also block until the ongoing force merge is complete.
+///
+///
+/// Running force merge asynchronously
+///
+///
+/// If the request contains wait_for_completion=false, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to get the status of the task.
+/// However, you can not cancel this task as the force merge task is not cancelable.
+/// Elasticsearch creates a record of this task as a document at _tasks/<task_id>.
+/// When you are done with a task, you should delete the task document so Elasticsearch can reclaim the space.
+///
+///
+/// Force merging multiple indices
+///
+///
+/// You can force merge multiple indices with a single request by targeting:
+///
+///
+/// -
+///
+/// One or more data streams that contain multiple backing indices
+///
+///
+/// -
+///
+/// Multiple indices
+///
+///
+/// -
+///
+/// One or more aliases
+///
+///
+/// -
+///
+/// All data streams and indices in a cluster
+///
+///
+///
+///
+/// Each targeted shard is force-merged separately using the force_merge threadpool.
+/// By default each node only has a single force_merge thread which means that the shards on that node are force-merged one at a time.
+/// If you expand the force_merge threadpool on a node then it will force merge its shards in parallel
+///
+///
+/// Force merge makes the storage for the shard being merged temporarily increase, as it may require free space up to triple its size in case max_num_segments parameter is set to 1, to rewrite all segments into a new one.
+///
+///
+/// Data streams and time-based indices
+///
+///
+/// Force-merging is useful for managing a data stream's older backing indices and other time-based indices, particularly after a rollover.
+/// In these cases, each index only receives indexing traffic for a certain period of time.
+/// Once an index receive no more writes, its shards can be force-merged to a single segment.
+/// This can be a good idea because single-segment shards can sometimes use simpler and more efficient data structures to perform searches.
+/// For example:
+///
+///
+/// POST /.ds-my-data-stream-2099.03.07-000001/_forcemerge?max_num_segments=1
+///
///
public sealed partial class ForcemergeRequest : PlainRequest
{
@@ -194,6 +260,72 @@ public ForcemergeRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(
/// So the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance.
/// If you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally.
///
+///
+/// Blocks during a force merge
+///
+///
+/// Calls to this API block until the merge is complete (unless request contains wait_for_completion=false).
+/// If the client connection is lost before completion then the force merge process will continue in the background.
+/// Any new requests to force merge the same indices will also block until the ongoing force merge is complete.
+///
+///
+/// Running force merge asynchronously
+///
+///
+/// If the request contains wait_for_completion=false, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to get the status of the task.
+/// However, you can not cancel this task as the force merge task is not cancelable.
+/// Elasticsearch creates a record of this task as a document at _tasks/<task_id>.
+/// When you are done with a task, you should delete the task document so Elasticsearch can reclaim the space.
+///
+///
+/// Force merging multiple indices
+///
+///
+/// You can force merge multiple indices with a single request by targeting:
+///
+///
+/// -
+///
+/// One or more data streams that contain multiple backing indices
+///
+///
+/// -
+///
+/// Multiple indices
+///
+///
+/// -
+///
+/// One or more aliases
+///
+///
+/// -
+///
+/// All data streams and indices in a cluster
+///
+///
+///
+///
+/// Each targeted shard is force-merged separately using the force_merge threadpool.
+/// By default each node only has a single force_merge thread which means that the shards on that node are force-merged one at a time.
+/// If you expand the force_merge threadpool on a node then it will force merge its shards in parallel
+///
+///
+/// Force merge makes the storage for the shard being merged temporarily increase, as it may require free space up to triple its size in case max_num_segments parameter is set to 1, to rewrite all segments into a new one.
+///
+///
+/// Data streams and time-based indices
+///
+///
+/// Force-merging is useful for managing a data stream's older backing indices and other time-based indices, particularly after a rollover.
+/// In these cases, each index only receives indexing traffic for a certain period of time.
+/// Once an index receive no more writes, its shards can be force-merged to a single segment.
+/// This can be a good idea because single-segment shards can sometimes use simpler and more efficient data structures to perform searches.
+/// For example:
+///
+///
+/// POST /.ds-my-data-stream-2099.03.07-000001/_forcemerge?max_num_segments=1
+///
///
public sealed partial class ForcemergeRequestDescriptor : RequestDescriptor, ForcemergeRequestParameters>
{
@@ -252,6 +384,72 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
/// So the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance.
/// If you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally.
///
+///
+/// Blocks during a force merge
+///
+///
+/// Calls to this API block until the merge is complete (unless request contains wait_for_completion=false).
+/// If the client connection is lost before completion then the force merge process will continue in the background.
+/// Any new requests to force merge the same indices will also block until the ongoing force merge is complete.
+///
+///
+/// Running force merge asynchronously
+///
+///
+/// If the request contains wait_for_completion=false, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to get the status of the task.
+/// However, you can not cancel this task as the force merge task is not cancelable.
+/// Elasticsearch creates a record of this task as a document at _tasks/<task_id>.
+/// When you are done with a task, you should delete the task document so Elasticsearch can reclaim the space.
+///
+///
+/// Force merging multiple indices
+///
+///
+/// You can force merge multiple indices with a single request by targeting:
+///
+///
+/// -
+///
+/// One or more data streams that contain multiple backing indices
+///
+///
+/// -
+///
+/// Multiple indices
+///
+///
+/// -
+///
+/// One or more aliases
+///
+///
+/// -
+///
+/// All data streams and indices in a cluster
+///
+///
+///
+///
+/// Each targeted shard is force-merged separately using the force_merge threadpool.
+/// By default each node only has a single force_merge thread which means that the shards on that node are force-merged one at a time.
+/// If you expand the force_merge threadpool on a node then it will force merge its shards in parallel
+///
+///
+/// Force merge makes the storage for the shard being merged temporarily increase, as it may require free space up to triple its size in case max_num_segments parameter is set to 1, to rewrite all segments into a new one.
+///
+///
+/// Data streams and time-based indices
+///
+///
+/// Force-merging is useful for managing a data stream's older backing indices and other time-based indices, particularly after a rollover.
+/// In these cases, each index only receives indexing traffic for a certain period of time.
+/// Once an index receive no more writes, its shards can be force-merged to a single segment.
+/// This can be a good idea because single-segment shards can sometimes use simpler and more efficient data structures to perform searches.
+/// For example:
+///
+///
+/// POST /.ds-my-data-stream-2099.03.07-000001/_forcemerge?max_num_segments=1
+///
///
public sealed partial class ForcemergeRequestDescriptor : RequestDescriptor
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetAliasRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetAliasRequest.g.cs
index 0b66e257a11..dde2e261da7 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetAliasRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetAliasRequest.g.cs
@@ -56,14 +56,6 @@ public sealed partial class GetAliasRequestParameters : RequestParameters
///
///
public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); }
-
- ///
- ///
- /// Period to wait for a connection to the master node.
- /// If no response is received before the timeout expires, the request fails and returns an error.
- ///
- ///
- public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); }
}
///
@@ -125,15 +117,6 @@ public GetAliasRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r
///
[JsonIgnore]
public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); }
-
- ///
- ///
- /// Period to wait for a connection to the master node.
- /// If no response is received before the timeout expires, the request fails and returns an error.
- ///
- ///
- [JsonIgnore]
- public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); }
}
///
@@ -165,7 +148,6 @@ public GetAliasRequestDescriptor()
public GetAliasRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
public GetAliasRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards);
public GetAliasRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable);
- public GetAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout);
public GetAliasRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices)
{
@@ -213,7 +195,6 @@ public GetAliasRequestDescriptor()
public GetAliasRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
public GetAliasRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards);
public GetAliasRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable);
- public GetAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout);
public GetAliasRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices)
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataLifecycleStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataLifecycleStatsRequest.g.cs
new file mode 100644
index 00000000000..edc0580d692
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataLifecycleStatsRequest.g.cs
@@ -0,0 +1,79 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Requests;
+using Elastic.Clients.Elasticsearch.Serialization;
+using Elastic.Transport;
+using Elastic.Transport.Extensions;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.IndexManagement;
+
+public sealed partial class GetDataLifecycleStatsRequestParameters : RequestParameters
+{
+}
+
+///
+///
+/// Get data stream lifecycle stats.
+/// Get statistics about the data streams that are managed by a data stream lifecycle.
+///
+///
+public sealed partial class GetDataLifecycleStatsRequest : PlainRequest
+{
+ internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGetDataLifecycleStats;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "indices.get_data_lifecycle_stats";
+}
+
+///
+///
+/// Get data stream lifecycle stats.
+/// Get statistics about the data streams that are managed by a data stream lifecycle.
+///
+///
+public sealed partial class GetDataLifecycleStatsRequestDescriptor : RequestDescriptor
+{
+ internal GetDataLifecycleStatsRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public GetDataLifecycleStatsRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementGetDataLifecycleStats;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "indices.get_data_lifecycle_stats";
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataLifecycleStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataLifecycleStatsResponse.g.cs
new file mode 100644
index 00000000000..53645820197
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataLifecycleStatsResponse.g.cs
@@ -0,0 +1,63 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.IndexManagement;
+
+public sealed partial class GetDataLifecycleStatsResponse : ElasticsearchResponse
+{
+ ///
+ ///
+ /// The count of data streams currently being managed by the data stream lifecycle.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("data_stream_count")]
+ public int DataStreamCount { get; init; }
+
+ ///
+ ///
+ /// Information about the data streams that are managed by the data stream lifecycle.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("data_streams")]
+ public IReadOnlyCollection DataStreams { get; init; }
+
+ ///
+ ///
+ /// The duration of the last data stream lifecycle execution.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("last_run_duration_in_millis")]
+ public long? LastRunDurationInMillis { get; init; }
+
+ ///
+ ///
+ /// The time that passed between the start of the last two data stream lifecycle executions.
+ /// This value should amount approximately to data_streams.lifecycle.poll_interval.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("time_between_starts_in_millis")]
+ public long? TimeBetweenStartsInMillis { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetFieldMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetFieldMappingRequest.g.cs
index 960c83e0bab..751c051c51c 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetFieldMappingRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetFieldMappingRequest.g.cs
@@ -78,6 +78,9 @@ public sealed partial class GetFieldMappingRequestParameters : RequestParameters
/// Retrieves mapping definitions for one or more fields.
/// For data streams, the API retrieves field mappings for the stream’s backing indices.
///
+///
+/// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields.
+///
///
public sealed partial class GetFieldMappingRequest : PlainRequest
{
@@ -148,6 +151,9 @@ public GetFieldMappingRequest(Elastic.Clients.Elasticsearch.Indices? indices, El
/// Retrieves mapping definitions for one or more fields.
/// For data streams, the API retrieves field mappings for the stream’s backing indices.
///
+///
+/// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields.
+///
///
public sealed partial class GetFieldMappingRequestDescriptor : RequestDescriptor, GetFieldMappingRequestParameters>
{
@@ -198,6 +204,9 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
/// Retrieves mapping definitions for one or more fields.
/// For data streams, the API retrieves field mappings for the stream’s backing indices.
///
+///
+/// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields.
+///
///
public sealed partial class GetFieldMappingRequestDescriptor : RequestDescriptor
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexRequest.g.cs
index 69965de963b..82a29f2bd97 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexRequest.g.cs
@@ -96,7 +96,7 @@ public sealed partial class GetIndexRequestParameters : RequestParameters
///
///
/// Get index information.
-/// Returns information about one or more indices. For data streams, the API returns information about the
+/// Get information about one or more indices. For data streams, the API returns information about the
/// stream’s backing indices.
///
///
@@ -186,7 +186,7 @@ public GetIndexRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r =
///
///
/// Get index information.
-/// Returns information about one or more indices. For data streams, the API returns information about the
+/// Get information about one or more indices. For data streams, the API returns information about the
/// stream’s backing indices.
///
///
@@ -233,7 +233,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Get index information.
-/// Returns information about one or more indices. For data streams, the API returns information about the
+/// Get information about one or more indices. For data streams, the API returns information about the
/// stream’s backing indices.
///
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs
index b4c809766b6..60ed8e8db98 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs
@@ -64,7 +64,7 @@ public sealed partial class GetIndexTemplateRequestParameters : RequestParameter
///
///
/// Get index templates.
-/// Returns information about one or more index templates.
+/// Get information about one or more index templates.
///
///
public sealed partial class GetIndexTemplateRequest : PlainRequest
@@ -121,7 +121,7 @@ public GetIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name? name) : base(
///
///
/// Get index templates.
-/// Returns information about one or more index templates.
+/// Get information about one or more index templates.
///
///
public sealed partial class GetIndexTemplateRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndicesSettingsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndicesSettingsRequest.g.cs
index 64fa5aa087b..9f336f6bebe 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndicesSettingsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndicesSettingsRequest.g.cs
@@ -94,8 +94,8 @@ public sealed partial class GetIndicesSettingsRequestParameters : RequestParamet
///
///
/// Get index settings.
-/// Returns setting information for one or more indices. For data streams,
-/// returns setting information for the stream’s backing indices.
+/// Get setting information for one or more indices.
+/// For data streams, it returns setting information for the stream's backing indices.
///
///
public sealed partial class GetIndicesSettingsRequest : PlainRequest
@@ -193,8 +193,8 @@ public GetIndicesSettingsRequest(Elastic.Clients.Elasticsearch.Names? name) : ba
///
///
/// Get index settings.
-/// Returns setting information for one or more indices. For data streams,
-/// returns setting information for the stream’s backing indices.
+/// Get setting information for one or more indices.
+/// For data streams, it returns setting information for the stream's backing indices.
///
///
public sealed partial class GetIndicesSettingsRequestDescriptor : RequestDescriptor, GetIndicesSettingsRequestParameters>
@@ -245,8 +245,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Get index settings.
-/// Returns setting information for one or more indices. For data streams,
-/// returns setting information for the stream’s backing indices.
+/// Get setting information for one or more indices.
+/// For data streams, it returns setting information for the stream's backing indices.
///
///
public sealed partial class GetIndicesSettingsRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetMappingRequest.g.cs
index ef614f8fa4e..9fe3b3aefb0 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetMappingRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetMappingRequest.g.cs
@@ -76,7 +76,6 @@ public sealed partial class GetMappingRequestParameters : RequestParameters
///
///
/// Get mapping definitions.
-/// Retrieves mapping definitions for one or more indices.
/// For data streams, the API retrieves mappings for the stream’s backing indices.
///
///
@@ -147,7 +146,6 @@ public GetMappingRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(
///
///
/// Get mapping definitions.
-/// Retrieves mapping definitions for one or more indices.
/// For data streams, the API retrieves mappings for the stream’s backing indices.
///
///
@@ -191,7 +189,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Get mapping definitions.
-/// Retrieves mapping definitions for one or more indices.
/// For data streams, the API retrieves mappings for the stream’s backing indices.
///
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetTemplateRequest.g.cs
index e65ca2399a7..fccb36b1bfe 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetTemplateRequest.g.cs
@@ -58,7 +58,10 @@ public sealed partial class GetTemplateRequestParameters : RequestParameters
///
///
/// Get index templates.
-/// Retrieves information about one or more index templates.
+/// Get information about one or more index templates.
+///
+///
+/// IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.
///
///
public sealed partial class GetTemplateRequest : PlainRequest
@@ -108,7 +111,10 @@ public GetTemplateRequest(Elastic.Clients.Elasticsearch.Names? name) : base(r =>
///
///
/// Get index templates.
-/// Retrieves information about one or more index templates.
+/// Get information about one or more index templates.
+///
+///
+/// IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.
///
///
public sealed partial class GetTemplateRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/OpenIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/OpenIndexRequest.g.cs
index b1a51e3447a..170dddb414d 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/OpenIndexRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/OpenIndexRequest.g.cs
@@ -84,9 +84,36 @@ public sealed partial class OpenIndexRequestParameters : RequestParameters
///
///
-/// Opens a closed index.
+/// Open a closed index.
/// For data streams, the API opens any closed backing indices.
///
+///
+/// A closed index is blocked for read/write operations and does not allow all operations that opened indices allow.
+/// It is not possible to index documents or to search for documents in a closed index.
+/// This allows closed indices to not have to maintain internal data structures for indexing or searching documents, resulting in a smaller overhead on the cluster.
+///
+///
+/// When opening or closing an index, the master is responsible for restarting the index shards to reflect the new state of the index.
+/// The shards will then go through the normal recovery process.
+/// The data of opened or closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times.
+///
+///
+/// You can open and close multiple indices.
+/// An error is thrown if the request explicitly refers to a missing index.
+/// This behavior can be turned off by using the ignore_unavailable=true parameter.
+///
+///
+/// By default, you must explicitly name the indices you are opening or closing.
+/// To open or close indices with _all, *, or other wildcard expressions, change the action.destructive_requires_name setting to false.
+/// This setting can also be changed with the cluster update settings API.
+///
+///
+/// Closed indices consume a significant amount of disk-space which can cause problems in managed environments.
+/// Closing indices can be turned off with the cluster settings API by setting cluster.indices.close.enable to false.
+///
+///
+/// Because opening or closing an index allocates its shards, the wait_for_active_shards setting on index creation applies to the _open and _close index actions as well.
+///
///
public sealed partial class OpenIndexRequest : PlainRequest
{
@@ -160,9 +187,36 @@ public OpenIndexRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r
///
///
-/// Opens a closed index.
+/// Open a closed index.
/// For data streams, the API opens any closed backing indices.
///
+///
+/// A closed index is blocked for read/write operations and does not allow all operations that opened indices allow.
+/// It is not possible to index documents or to search for documents in a closed index.
+/// This allows closed indices to not have to maintain internal data structures for indexing or searching documents, resulting in a smaller overhead on the cluster.
+///
+///
+/// When opening or closing an index, the master is responsible for restarting the index shards to reflect the new state of the index.
+/// The shards will then go through the normal recovery process.
+/// The data of opened or closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times.
+///
+///
+/// You can open and close multiple indices.
+/// An error is thrown if the request explicitly refers to a missing index.
+/// This behavior can be turned off by using the ignore_unavailable=true parameter.
+///
+///
+/// By default, you must explicitly name the indices you are opening or closing.
+/// To open or close indices with _all, *, or other wildcard expressions, change the action.destructive_requires_name setting to false.
+/// This setting can also be changed with the cluster update settings API.
+///
+///
+/// Closed indices consume a significant amount of disk-space which can cause problems in managed environments.
+/// Closing indices can be turned off with the cluster settings API by setting cluster.indices.close.enable to false.
+///
+///
+/// Because opening or closing an index allocates its shards, the wait_for_active_shards setting on index creation applies to the _open and _close index actions as well.
+///
///
public sealed partial class OpenIndexRequestDescriptor : RequestDescriptor, OpenIndexRequestParameters>
{
@@ -204,9 +258,36 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
-/// Opens a closed index.
+/// Open a closed index.
/// For data streams, the API opens any closed backing indices.
///
+///
+/// A closed index is blocked for read/write operations and does not allow all operations that opened indices allow.
+/// It is not possible to index documents or to search for documents in a closed index.
+/// This allows closed indices to not have to maintain internal data structures for indexing or searching documents, resulting in a smaller overhead on the cluster.
+///
+///
+/// When opening or closing an index, the master is responsible for restarting the index shards to reflect the new state of the index.
+/// The shards will then go through the normal recovery process.
+/// The data of opened or closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times.
+///
+///
+/// You can open and close multiple indices.
+/// An error is thrown if the request explicitly refers to a missing index.
+/// This behavior can be turned off by using the ignore_unavailable=true parameter.
+///
+///
+/// By default, you must explicitly name the indices you are opening or closing.
+/// To open or close indices with _all, *, or other wildcard expressions, change the action.destructive_requires_name setting to false.
+/// This setting can also be changed with the cluster update settings API.
+///
+///
+/// Closed indices consume a significant amount of disk-space which can cause problems in managed environments.
+/// Closing indices can be turned off with the cluster settings API by setting cluster.indices.close.enable to false.
+///
+///
+/// Because opening or closing an index allocates its shards, the wait_for_active_shards setting on index creation applies to the _open and _close index actions as well.
+///
///
public sealed partial class OpenIndexRequestDescriptor : RequestDescriptor
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs
index 85d023869c7..34af04025ab 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs
@@ -65,7 +65,7 @@ public sealed partial class PutDataLifecycleRequestParameters : RequestParameter
/// Update the data stream lifecycle of the specified data streams.
///
///
-public sealed partial class PutDataLifecycleRequest : PlainRequest, ISelfSerializable
+public sealed partial class PutDataLifecycleRequest : PlainRequest
{
public PutDataLifecycleRequest(Elastic.Clients.Elasticsearch.DataStreamNames name) : base(r => r.Required("name", name))
{
@@ -107,13 +107,25 @@ public PutDataLifecycleRequest(Elastic.Clients.Elasticsearch.DataStreamNames nam
///
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); }
- [JsonIgnore]
- public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle Lifecycle { get; set; }
- void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
- {
- JsonSerializer.Serialize(writer, Lifecycle, options);
- }
+ ///
+ ///
+ /// If defined, every document added to this data stream will be stored at least for this time frame.
+ /// Any time after this duration the document could be deleted.
+ /// When empty, every document in this data stream will be stored indefinitely.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("data_retention")]
+ public Elastic.Clients.Elasticsearch.Duration? DataRetention { get; set; }
+
+ ///
+ ///
+ /// If defined, every backing index will execute the configured downsampling configuration after the backing
+ /// index is not the data stream write index anymore.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("downsampling")]
+ public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsampling? Downsampling { get; set; }
}
///
@@ -125,7 +137,10 @@ void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions op
public sealed partial class PutDataLifecycleRequestDescriptor : RequestDescriptor
{
internal PutDataLifecycleRequestDescriptor(Action configure) => configure.Invoke(this);
- public PutDataLifecycleRequestDescriptor(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle lifecycle, Elastic.Clients.Elasticsearch.DataStreamNames name) : base(r => r.Required("name", name)) => LifecycleValue = lifecycle;
+
+ public PutDataLifecycleRequestDescriptor(Elastic.Clients.Elasticsearch.DataStreamNames name) : base(r => r.Required("name", name))
+ {
+ }
internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementPutDataLifecycle;
@@ -145,36 +160,79 @@ public PutDataLifecycleRequestDescriptor Name(Elastic.Clients.Elasticsearch.Data
return Self;
}
- private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle LifecycleValue { get; set; }
- private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDescriptor LifecycleDescriptor { get; set; }
- private Action LifecycleDescriptorAction { get; set; }
+ private Elastic.Clients.Elasticsearch.Duration? DataRetentionValue { get; set; }
+ private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsampling? DownsamplingValue { get; set; }
+ private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsamplingDescriptor DownsamplingDescriptor { get; set; }
+ private Action DownsamplingDescriptorAction { get; set; }
- public PutDataLifecycleRequestDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle lifecycle)
+ ///
+ ///
+ /// If defined, every document added to this data stream will be stored at least for this time frame.
+ /// Any time after this duration the document could be deleted.
+ /// When empty, every document in this data stream will be stored indefinitely.
+ ///
+ ///
+ public PutDataLifecycleRequestDescriptor DataRetention(Elastic.Clients.Elasticsearch.Duration? dataRetention)
+ {
+ DataRetentionValue = dataRetention;
+ return Self;
+ }
+
+ ///
+ ///
+ /// If defined, every backing index will execute the configured downsampling configuration after the backing
+ /// index is not the data stream write index anymore.
+ ///
+ ///
+ public PutDataLifecycleRequestDescriptor Downsampling(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsampling? downsampling)
{
- LifecycleDescriptor = null;
- LifecycleDescriptorAction = null;
- LifecycleValue = lifecycle;
+ DownsamplingDescriptor = null;
+ DownsamplingDescriptorAction = null;
+ DownsamplingValue = downsampling;
return Self;
}
- public PutDataLifecycleRequestDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDescriptor descriptor)
+ public PutDataLifecycleRequestDescriptor Downsampling(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsamplingDescriptor descriptor)
{
- LifecycleValue = null;
- LifecycleDescriptorAction = null;
- LifecycleDescriptor = descriptor;
+ DownsamplingValue = null;
+ DownsamplingDescriptorAction = null;
+ DownsamplingDescriptor = descriptor;
return Self;
}
- public PutDataLifecycleRequestDescriptor Lifecycle(Action configure)
+ public PutDataLifecycleRequestDescriptor Downsampling(Action configure)
{
- LifecycleValue = null;
- LifecycleDescriptor = null;
- LifecycleDescriptorAction = configure;
+ DownsamplingValue = null;
+ DownsamplingDescriptor = null;
+ DownsamplingDescriptorAction = configure;
return Self;
}
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
{
- JsonSerializer.Serialize(writer, LifecycleValue, options);
+ writer.WriteStartObject();
+ if (DataRetentionValue is not null)
+ {
+ writer.WritePropertyName("data_retention");
+ JsonSerializer.Serialize(writer, DataRetentionValue, options);
+ }
+
+ if (DownsamplingDescriptor is not null)
+ {
+ writer.WritePropertyName("downsampling");
+ JsonSerializer.Serialize(writer, DownsamplingDescriptor, options);
+ }
+ else if (DownsamplingDescriptorAction is not null)
+ {
+ writer.WritePropertyName("downsampling");
+ JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsamplingDescriptor(DownsamplingDescriptorAction), options);
+ }
+ else if (DownsamplingValue is not null)
+ {
+ writer.WritePropertyName("downsampling");
+ JsonSerializer.Serialize(writer, DownsamplingValue, options);
+ }
+
+ writer.WriteEndObject();
}
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs
index 614820e2fd8..32f549bebd0 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs
@@ -60,6 +60,39 @@ public sealed partial class PutIndexTemplateRequestParameters : RequestParameter
/// Create or update an index template.
/// Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
///
+///
+/// Elasticsearch applies templates to new indices based on an wildcard pattern that matches the index name.
+/// Index templates are applied during data stream or index creation.
+/// For data streams, these settings and mappings are applied when the stream's backing indices are created.
+/// Settings and mappings specified in a create index API request override any settings or mappings specified in an index template.
+/// Changes to index templates do not affect existing indices, including the existing backing indices of a data stream.
+///
+///
+/// You can use C-style /* *\/ block comments in index templates.
+/// You can include comments anywhere in the request body, except before the opening curly bracket.
+///
+///
+/// Multiple matching templates
+///
+///
+/// If multiple index templates match the name of a new index or data stream, the template with the highest priority is used.
+///
+///
+/// Multiple templates with overlapping index patterns at the same priority are not allowed and an error will be thrown when attempting to create a template matching an existing index template at identical priorities.
+///
+///
+/// Composing aliases, mappings, and settings
+///
+///
+/// When multiple component templates are specified in the composed_of field for an index template, they are merged in the order specified, meaning that later component templates override earlier component templates.
+/// Any mappings, settings, or aliases from the parent index template are merged in next.
+/// Finally, any configuration on the index request itself is merged.
+/// Mapping definitions are merged recursively, which means that later mapping components can introduce new field mappings and update the mapping configuration.
+/// If a field mapping is already contained in an earlier component, its definition will be completely overwritten by the later one.
+/// This recursive merging strategy applies not only to field mappings, but also root options like dynamic_templates and meta.
+/// If an earlier component contains a dynamic_templates block, then by default new dynamic_templates entries are appended onto the end.
+/// If an entry already exists with the same key, then it is overwritten by the new definition.
+///
///
public sealed partial class PutIndexTemplateRequest : PlainRequest
{
@@ -158,8 +191,10 @@ public PutIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : base(r
///
///
/// Optional user metadata about the index template.
- /// May have any contents.
- /// This map is not automatically generated by Elasticsearch.
+ /// It may have any contents.
+ /// It is not automatically generated or used by Elasticsearch.
+ /// This user-defined object is stored in the cluster state, so keeping it short is preferable
+ /// To unset the metadata, replace the template without specifying it.
///
///
[JsonInclude, JsonPropertyName("_meta")]
@@ -189,6 +224,8 @@ public PutIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : base(r
///
/// Version number used to manage index templates externally.
/// This number is not automatically generated by Elasticsearch.
+ /// External systems can use these version numbers to simplify template management.
+ /// To unset a version, replace the template without specifying one.
///
///
[JsonInclude, JsonPropertyName("version")]
@@ -200,6 +237,39 @@ public PutIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : base(r
/// Create or update an index template.
/// Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
///
+///
+/// Elasticsearch applies templates to new indices based on an wildcard pattern that matches the index name.
+/// Index templates are applied during data stream or index creation.
+/// For data streams, these settings and mappings are applied when the stream's backing indices are created.
+/// Settings and mappings specified in a create index API request override any settings or mappings specified in an index template.
+/// Changes to index templates do not affect existing indices, including the existing backing indices of a data stream.
+///
+///
+/// You can use C-style /* *\/ block comments in index templates.
+/// You can include comments anywhere in the request body, except before the opening curly bracket.
+///
+///
+/// Multiple matching templates
+///
+///
+/// If multiple index templates match the name of a new index or data stream, the template with the highest priority is used.
+///
+///
+/// Multiple templates with overlapping index patterns at the same priority are not allowed and an error will be thrown when attempting to create a template matching an existing index template at identical priorities.
+///
+///
+/// Composing aliases, mappings, and settings
+///
+///
+/// When multiple component templates are specified in the composed_of field for an index template, they are merged in the order specified, meaning that later component templates override earlier component templates.
+/// Any mappings, settings, or aliases from the parent index template are merged in next.
+/// Finally, any configuration on the index request itself is merged.
+/// Mapping definitions are merged recursively, which means that later mapping components can introduce new field mappings and update the mapping configuration.
+/// If a field mapping is already contained in an earlier component, its definition will be completely overwritten by the later one.
+/// This recursive merging strategy applies not only to field mappings, but also root options like dynamic_templates and meta.
+/// If an earlier component contains a dynamic_templates block, then by default new dynamic_templates entries are appended onto the end.
+/// If an entry already exists with the same key, then it is overwritten by the new definition.
+///
///
public sealed partial class PutIndexTemplateRequestDescriptor : RequestDescriptor, PutIndexTemplateRequestParameters>
{
@@ -336,8 +406,10 @@ public PutIndexTemplateRequestDescriptor IndexPatterns(Elastic.Client
///
///
/// Optional user metadata about the index template.
- /// May have any contents.
- /// This map is not automatically generated by Elasticsearch.
+ /// It may have any contents.
+ /// It is not automatically generated or used by Elasticsearch.
+ /// This user-defined object is stored in the cluster state, so keeping it short is preferable
+ /// To unset the metadata, replace the template without specifying it.
///
///
public PutIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector)
@@ -394,6 +466,8 @@ public PutIndexTemplateRequestDescriptor Template(Action
/// Version number used to manage index templates externally.
/// This number is not automatically generated by Elasticsearch.
+ /// External systems can use these version numbers to simplify template management.
+ /// To unset a version, replace the template without specifying one.
///
///
public PutIndexTemplateRequestDescriptor Version(long? version)
@@ -494,6 +568,39 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
/// Create or update an index template.
/// Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
///
+///
+/// Elasticsearch applies templates to new indices based on an wildcard pattern that matches the index name.
+/// Index templates are applied during data stream or index creation.
+/// For data streams, these settings and mappings are applied when the stream's backing indices are created.
+/// Settings and mappings specified in a create index API request override any settings or mappings specified in an index template.
+/// Changes to index templates do not affect existing indices, including the existing backing indices of a data stream.
+///
+///
+/// You can use C-style /* *\/ block comments in index templates.
+/// You can include comments anywhere in the request body, except before the opening curly bracket.
+///
+///
+/// Multiple matching templates
+///
+///
+/// If multiple index templates match the name of a new index or data stream, the template with the highest priority is used.
+///
+///
+/// Multiple templates with overlapping index patterns at the same priority are not allowed and an error will be thrown when attempting to create a template matching an existing index template at identical priorities.
+///
+///
+/// Composing aliases, mappings, and settings
+///
+///
+/// When multiple component templates are specified in the composed_of field for an index template, they are merged in the order specified, meaning that later component templates override earlier component templates.
+/// Any mappings, settings, or aliases from the parent index template are merged in next.
+/// Finally, any configuration on the index request itself is merged.
+/// Mapping definitions are merged recursively, which means that later mapping components can introduce new field mappings and update the mapping configuration.
+/// If a field mapping is already contained in an earlier component, its definition will be completely overwritten by the later one.
+/// This recursive merging strategy applies not only to field mappings, but also root options like dynamic_templates and meta.
+/// If an earlier component contains a dynamic_templates block, then by default new dynamic_templates entries are appended onto the end.
+/// If an entry already exists with the same key, then it is overwritten by the new definition.
+///
///
public sealed partial class PutIndexTemplateRequestDescriptor : RequestDescriptor
{
@@ -630,8 +737,10 @@ public PutIndexTemplateRequestDescriptor IndexPatterns(Elastic.Clients.Elasticse
///
///
/// Optional user metadata about the index template.
- /// May have any contents.
- /// This map is not automatically generated by Elasticsearch.
+ /// It may have any contents.
+ /// It is not automatically generated or used by Elasticsearch.
+ /// This user-defined object is stored in the cluster state, so keeping it short is preferable
+ /// To unset the metadata, replace the template without specifying it.
///
///
public PutIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector)
@@ -688,6 +797,8 @@ public PutIndexTemplateRequestDescriptor Template(Action
/// Version number used to manage index templates externally.
/// This number is not automatically generated by Elasticsearch.
+ /// External systems can use these version numbers to simplify template management.
+ /// To unset a version, replace the template without specifying one.
///
///
public PutIndexTemplateRequestDescriptor Version(long? version)
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndicesSettingsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndicesSettingsRequest.g.cs
index 9eb516eb4e1..8bb53488e96 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndicesSettingsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndicesSettingsRequest.g.cs
@@ -95,8 +95,23 @@ public sealed partial class PutIndicesSettingsRequestParameters : RequestParamet
///
///
/// Update index settings.
-/// Changes dynamic index settings in real time. For data streams, index setting
-/// changes are applied to all backing indices by default.
+/// Changes dynamic index settings in real time.
+/// For data streams, index setting changes are applied to all backing indices by default.
+///
+///
+/// To revert a setting to the default value, use a null value.
+/// The list of per-index settings that can be updated dynamically on live indices can be found in index module documentation.
+/// To preserve existing settings from being updated, set the preserve_existing parameter to true.
+///
+///
+/// NOTE: You can only define new analyzers on closed indices.
+/// To add an analyzer, you must close the index, define the analyzer, and reopen the index.
+/// You cannot close the write index of a data stream.
+/// To update the analyzer for a data stream's write index and future backing indices, update the analyzer in the index template used by the stream.
+/// Then roll over the data stream to apply the new analyzer to the stream's write index and future backing indices.
+/// This affects searches and any new data added to the stream after the rollover.
+/// However, it does not affect the data stream's backing indices or their existing data.
+/// To change the analyzer for existing backing indices, you must create a new data stream and reindex your data into it.
///
///
public sealed partial class PutIndicesSettingsRequest : PlainRequest, ISelfSerializable
@@ -194,8 +209,23 @@ void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions op
///
///
/// Update index settings.
-/// Changes dynamic index settings in real time. For data streams, index setting
-/// changes are applied to all backing indices by default.
+/// Changes dynamic index settings in real time.
+/// For data streams, index setting changes are applied to all backing indices by default.
+///
+///
+/// To revert a setting to the default value, use a null value.
+/// The list of per-index settings that can be updated dynamically on live indices can be found in index module documentation.
+/// To preserve existing settings from being updated, set the preserve_existing parameter to true.
+///
+///
+/// NOTE: You can only define new analyzers on closed indices.
+/// To add an analyzer, you must close the index, define the analyzer, and reopen the index.
+/// You cannot close the write index of a data stream.
+/// To update the analyzer for a data stream's write index and future backing indices, update the analyzer in the index template used by the stream.
+/// Then roll over the data stream to apply the new analyzer to the stream's write index and future backing indices.
+/// This affects searches and any new data added to the stream after the rollover.
+/// However, it does not affect the data stream's backing indices or their existing data.
+/// To change the analyzer for existing backing indices, you must create a new data stream and reindex your data into it.
///
///
public sealed partial class PutIndicesSettingsRequestDescriptor : RequestDescriptor, PutIndicesSettingsRequestParameters>
@@ -263,8 +293,23 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Update index settings.
-/// Changes dynamic index settings in real time. For data streams, index setting
-/// changes are applied to all backing indices by default.
+/// Changes dynamic index settings in real time.
+/// For data streams, index setting changes are applied to all backing indices by default.
+///
+///
+/// To revert a setting to the default value, use a null value.
+/// The list of per-index settings that can be updated dynamically on live indices can be found in index module documentation.
+/// To preserve existing settings from being updated, set the preserve_existing parameter to true.
+///
+///
+/// NOTE: You can only define new analyzers on closed indices.
+/// To add an analyzer, you must close the index, define the analyzer, and reopen the index.
+/// You cannot close the write index of a data stream.
+/// To update the analyzer for a data stream's write index and future backing indices, update the analyzer in the index template used by the stream.
+/// Then roll over the data stream to apply the new analyzer to the stream's write index and future backing indices.
+/// This affects searches and any new data added to the stream after the rollover.
+/// However, it does not affect the data stream's backing indices or their existing data.
+/// To change the analyzer for existing backing indices, you must create a new data stream and reindex your data into it.
///
///
public sealed partial class PutIndicesSettingsRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs
index 708c10deaef..d4375cf1a3d 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs
@@ -84,10 +84,44 @@ public sealed partial class PutMappingRequestParameters : RequestParameters
///
///
/// Update field mappings.
-/// Adds new fields to an existing data stream or index.
-/// You can also use this API to change the search settings of existing fields.
+/// Add new fields to an existing data stream or index.
+/// You can also use this API to change the search settings of existing fields and add new properties to existing object fields.
/// For data streams, these changes are applied to all backing indices by default.
///
+///
+/// Add multi-fields to an existing field
+///
+///
+/// Multi-fields let you index the same field in different ways.
+/// You can use this API to update the fields mapping parameter and enable multi-fields for an existing field.
+/// WARNING: If an index (or data stream) contains documents when you add a multi-field, those documents will not have values for the new multi-field.
+/// You can populate the new multi-field with the update by query API.
+///
+///
+/// Change supported mapping parameters for an existing field
+///
+///
+/// The documentation for each mapping parameter indicates whether you can update it for an existing field using this API.
+/// For example, you can use the update mapping API to update the ignore_above parameter.
+///
+///
+/// Change the mapping of an existing field
+///
+///
+/// Except for supported mapping parameters, you can't change the mapping or field type of an existing field.
+/// Changing an existing field could invalidate data that's already indexed.
+///
+///
+/// If you need to change the mapping of a field in a data stream's backing indices, refer to documentation about modifying data streams.
+/// If you need to change the mapping of a field in other indices, create a new index with the correct mapping and reindex your data into that index.
+///
+///
+/// Rename a field
+///
+///
+/// Renaming a field would invalidate data already indexed under the old field name.
+/// Instead, add an alias field to create an alternate field name.
+///
///
public sealed partial class PutMappingRequest : PlainRequest
{
@@ -189,7 +223,6 @@ public PutMappingRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r
///
///
[JsonInclude, JsonPropertyName("dynamic_templates")]
- [SingleOrManyCollectionConverter(typeof(IReadOnlyDictionary))]
public ICollection>? DynamicTemplates { get; set; }
///
@@ -271,10 +304,44 @@ public PutMappingRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r
///
///
/// Update field mappings.
-/// Adds new fields to an existing data stream or index.
-/// You can also use this API to change the search settings of existing fields.
+/// Add new fields to an existing data stream or index.
+/// You can also use this API to change the search settings of existing fields and add new properties to existing object fields.
/// For data streams, these changes are applied to all backing indices by default.
///
+///
+/// Add multi-fields to an existing field
+///
+///
+/// Multi-fields let you index the same field in different ways.
+/// You can use this API to update the fields mapping parameter and enable multi-fields for an existing field.
+/// WARNING: If an index (or data stream) contains documents when you add a multi-field, those documents will not have values for the new multi-field.
+/// You can populate the new multi-field with the update by query API.
+///
+///
+/// Change supported mapping parameters for an existing field
+///
+///
+/// The documentation for each mapping parameter indicates whether you can update it for an existing field using this API.
+/// For example, you can use the update mapping API to update the ignore_above parameter.
+///
+///
+/// Change the mapping of an existing field
+///
+///
+/// Except for supported mapping parameters, you can't change the mapping or field type of an existing field.
+/// Changing an existing field could invalidate data that's already indexed.
+///
+///
+/// If you need to change the mapping of a field in a data stream's backing indices, refer to documentation about modifying data streams.
+/// If you need to change the mapping of a field in other indices, create a new index with the correct mapping and reindex your data into that index.
+///
+///
+/// Rename a field
+///
+///
+/// Renaming a field would invalidate data already indexed under the old field name.
+/// Instead, add an alias field to create an alternate field name.
+///
///
public sealed partial class PutMappingRequestDescriptor : RequestDescriptor, PutMappingRequestParameters>
{
@@ -561,7 +628,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
if (DynamicTemplatesValue is not null)
{
writer.WritePropertyName("dynamic_templates");
- SingleOrManySerializationHelper.Serialize>(DynamicTemplatesValue, writer, options);
+ JsonSerializer.Serialize(writer, DynamicTemplatesValue, options);
}
if (FieldNamesDescriptor is not null)
@@ -643,10 +710,44 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Update field mappings.
-/// Adds new fields to an existing data stream or index.
-/// You can also use this API to change the search settings of existing fields.
+/// Add new fields to an existing data stream or index.
+/// You can also use this API to change the search settings of existing fields and add new properties to existing object fields.
/// For data streams, these changes are applied to all backing indices by default.
///
+///
+/// Add multi-fields to an existing field
+///
+///
+/// Multi-fields let you index the same field in different ways.
+/// You can use this API to update the fields mapping parameter and enable multi-fields for an existing field.
+/// WARNING: If an index (or data stream) contains documents when you add a multi-field, those documents will not have values for the new multi-field.
+/// You can populate the new multi-field with the update by query API.
+///
+///
+/// Change supported mapping parameters for an existing field
+///
+///
+/// The documentation for each mapping parameter indicates whether you can update it for an existing field using this API.
+/// For example, you can use the update mapping API to update the ignore_above parameter.
+///
+///
+/// Change the mapping of an existing field
+///
+///
+/// Except for supported mapping parameters, you can't change the mapping or field type of an existing field.
+/// Changing an existing field could invalidate data that's already indexed.
+///
+///
+/// If you need to change the mapping of a field in a data stream's backing indices, refer to documentation about modifying data streams.
+/// If you need to change the mapping of a field in other indices, create a new index with the correct mapping and reindex your data into that index.
+///
+///
+/// Rename a field
+///
+///
+/// Renaming a field would invalidate data already indexed under the old field name.
+/// Instead, add an alias field to create an alternate field name.
+///
///
public sealed partial class PutMappingRequestDescriptor : RequestDescriptor
{
@@ -929,7 +1030,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
if (DynamicTemplatesValue is not null)
{
writer.WritePropertyName("dynamic_templates");
- SingleOrManySerializationHelper.Serialize>(DynamicTemplatesValue, writer, options);
+ JsonSerializer.Serialize(writer, DynamicTemplatesValue, options);
}
if (FieldNamesDescriptor is not null)
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs
index 6c14ce93433..3c6067ef0eb 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs
@@ -68,6 +68,18 @@ public sealed partial class PutTemplateRequestParameters : RequestParameters
/// Changes to index templates do not affect existing indices.
/// Settings and mappings specified in create index API requests override any settings or mappings specified in an index template.
///
+///
+/// You can use C-style /* *\/ block comments in index templates.
+/// You can include comments anywhere in the request body, except before the opening curly bracket.
+///
+///
+/// Indices matching multiple templates
+///
+///
+/// Multiple index templates can potentially match an index, in this case, both the settings and mappings are merged into the final configuration of the index.
+/// The order of the merging can be controlled using the order parameter, with lower order being applied first, and higher orders overriding them.
+/// NOTE: Multiple matching templates with the same order value will result in a non-deterministic merging order.
+///
///
public sealed partial class PutTemplateRequest : PlainRequest
{
@@ -154,6 +166,7 @@ public PutTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r
///
/// Version number used to manage index templates externally. This number
/// is not automatically generated by Elasticsearch.
+ /// To unset a version, replace the template without specifying one.
///
///
[JsonInclude, JsonPropertyName("version")]
@@ -178,6 +191,18 @@ public PutTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r
/// Changes to index templates do not affect existing indices.
/// Settings and mappings specified in create index API requests override any settings or mappings specified in an index template.
///
+///
+/// You can use C-style /* *\/ block comments in index templates.
+/// You can include comments anywhere in the request body, except before the opening curly bracket.
+///
+///
+/// Indices matching multiple templates
+///
+///
+/// Multiple index templates can potentially match an index, in this case, both the settings and mappings are merged into the final configuration of the index.
+/// The order of the merging can be controlled using the order parameter, with lower order being applied first, and higher orders overriding them.
+/// NOTE: Multiple matching templates with the same order value will result in a non-deterministic merging order.
+///
///
public sealed partial class PutTemplateRequestDescriptor : RequestDescriptor, PutTemplateRequestParameters>
{
@@ -317,6 +342,7 @@ public PutTemplateRequestDescriptor Settings(Action
/// Version number used to manage index templates externally. This number
/// is not automatically generated by Elasticsearch.
+ /// To unset a version, replace the template without specifying one.
///
///
public PutTemplateRequestDescriptor Version(long? version)
@@ -406,6 +432,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
/// Changes to index templates do not affect existing indices.
/// Settings and mappings specified in create index API requests override any settings or mappings specified in an index template.
///
+///
+/// You can use C-style /* *\/ block comments in index templates.
+/// You can include comments anywhere in the request body, except before the opening curly bracket.
+///
+///
+/// Indices matching multiple templates
+///
+///
+/// Multiple index templates can potentially match an index, in this case, both the settings and mappings are merged into the final configuration of the index.
+/// The order of the merging can be controlled using the order parameter, with lower order being applied first, and higher orders overriding them.
+/// NOTE: Multiple matching templates with the same order value will result in a non-deterministic merging order.
+///
///
public sealed partial class PutTemplateRequestDescriptor : RequestDescriptor
{
@@ -545,6 +583,7 @@ public PutTemplateRequestDescriptor Settings(Action
/// Version number used to manage index templates externally. This number
/// is not automatically generated by Elasticsearch.
+ /// To unset a version, replace the template without specifying one.
///
///
public PutTemplateRequestDescriptor Version(long? version)
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RecoveryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RecoveryRequest.g.cs
index fa16870effe..2b970903d67 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RecoveryRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RecoveryRequest.g.cs
@@ -54,6 +54,9 @@ public sealed partial class RecoveryRequestParameters : RequestParameters
/// For data streams, the API returns information for the stream's backing indices.
///
///
+/// All recoveries, whether ongoing or complete, are kept in the cluster state and may be reported on at any time.
+///
+///
/// Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard.
/// When a shard recovery completes, the recovered shard is available for search and indexing.
///
@@ -143,6 +146,9 @@ public RecoveryRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r
/// For data streams, the API returns information for the stream's backing indices.
///
///
+/// All recoveries, whether ongoing or complete, are kept in the cluster state and may be reported on at any time.
+///
+///
/// Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard.
/// When a shard recovery completes, the recovered shard is available for search and indexing.
///
@@ -231,6 +237,9 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
/// For data streams, the API returns information for the stream's backing indices.
///
///
+/// All recoveries, whether ongoing or complete, are kept in the cluster state and may be reported on at any time.
+///
+///
/// Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard.
/// When a shard recovery completes, the recovered shard is available for search and indexing.
///
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RefreshRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RefreshRequest.g.cs
index 7b6446a62d7..abecc21a22e 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RefreshRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RefreshRequest.g.cs
@@ -64,6 +64,21 @@ public sealed partial class RefreshRequestParameters : RequestParameters
/// A refresh makes recent operations performed on one or more indices available for search.
/// For data streams, the API runs the refresh operation on the stream’s backing indices.
///
+///
+/// By default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds.
+/// You can change this default interval with the index.refresh_interval setting.
+///
+///
+/// Refresh requests are synchronous and do not return a response until the refresh operation completes.
+///
+///
+/// Refreshes are resource-intensive.
+/// To ensure good cluster performance, it's recommended to wait for Elasticsearch's periodic refresh rather than performing an explicit refresh when possible.
+///
+///
+/// If your application workflow indexes documents and then runs a search to retrieve the indexed document, it's recommended to use the index API's refresh=wait_for query parameter option.
+/// This option ensures the indexing operation waits for a periodic refresh before running the search.
+///
///
public sealed partial class RefreshRequest : PlainRequest
{
@@ -118,6 +133,21 @@ public RefreshRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r =
/// A refresh makes recent operations performed on one or more indices available for search.
/// For data streams, the API runs the refresh operation on the stream’s backing indices.
///
+///
+/// By default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds.
+/// You can change this default interval with the index.refresh_interval setting.
+///
+///
+/// Refresh requests are synchronous and do not return a response until the refresh operation completes.
+///
+///
+/// Refreshes are resource-intensive.
+/// To ensure good cluster performance, it's recommended to wait for Elasticsearch's periodic refresh rather than performing an explicit refresh when possible.
+///
+///
+/// If your application workflow indexes documents and then runs a search to retrieve the indexed document, it's recommended to use the index API's refresh=wait_for query parameter option.
+/// This option ensures the indexing operation waits for a periodic refresh before running the search.
+///
///
public sealed partial class RefreshRequestDescriptor : RequestDescriptor, RefreshRequestParameters>
{
@@ -160,6 +190,21 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
/// A refresh makes recent operations performed on one or more indices available for search.
/// For data streams, the API runs the refresh operation on the stream’s backing indices.
///
+///
+/// By default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds.
+/// You can change this default interval with the index.refresh_interval setting.
+///
+///
+/// Refresh requests are synchronous and do not return a response until the refresh operation completes.
+///
+///
+/// Refreshes are resource-intensive.
+/// To ensure good cluster performance, it's recommended to wait for Elasticsearch's periodic refresh rather than performing an explicit refresh when possible.
+///
+///
+/// If your application workflow indexes documents and then runs a search to retrieve the indexed document, it's recommended to use the index API's refresh=wait_for query parameter option.
+/// This option ensures the indexing operation waits for a periodic refresh before running the search.
+///
///
public sealed partial class RefreshRequestDescriptor : RequestDescriptor
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ResolveClusterRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ResolveClusterRequest.g.cs
index 3081c88ff9d..daee9636fb7 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ResolveClusterRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ResolveClusterRequest.g.cs
@@ -109,6 +109,38 @@ public sealed partial class ResolveClusterRequestParameters : RequestParameters
///
///
///
+///
+/// For example, GET /_resolve/cluster/my-index-*,cluster*:my-index-* returns information about the local cluster and all remotely configured clusters that start with the alias cluster*.
+/// Each cluster returns information about whether it has any indices, aliases or data streams that match my-index-*.
+///
+///
+/// Advantages of using this endpoint before a cross-cluster search
+///
+///
+/// You may want to exclude a cluster or index from a search when:
+///
+///
+/// -
+///
+/// A remote cluster is not currently connected and is configured with skip_unavailable=false. Running a cross-cluster search under those conditions will cause the entire search to fail.
+///
+///
+/// -
+///
+/// A cluster has no matching indices, aliases or data streams for the index expression (or your user does not have permissions to search them). For example, suppose your index expression is logs*,remote1:logs* and the remote1 cluster has no indices, aliases or data streams that match logs*. In that case, that cluster will return no results from that cluster if you include it in a cross-cluster search.
+///
+///
+/// -
+///
+/// The index expression (combined with any query parameters you specify) will likely cause an exception to be thrown when you do the search. In these cases, the "error" field in the _resolve/cluster response will be present. (This is also where security/permission errors will be shown.)
+///
+///
+/// -
+///
+/// A remote cluster is an older version that does not support the feature you want to use in your search.
+///
+///
+///
///
public sealed partial class ResolveClusterRequest : PlainRequest
{
@@ -205,6 +237,38 @@ public ResolveClusterRequest(Elastic.Clients.Elasticsearch.Names name) : base(r
///
///
///
+///
+/// For example, GET /_resolve/cluster/my-index-*,cluster*:my-index-* returns information about the local cluster and all remotely configured clusters that start with the alias cluster*.
+/// Each cluster returns information about whether it has any indices, aliases or data streams that match my-index-*.
+///
+///
+/// Advantages of using this endpoint before a cross-cluster search
+///
+///
+/// You may want to exclude a cluster or index from a search when:
+///
+///
+/// -
+///
+/// A remote cluster is not currently connected and is configured with skip_unavailable=false. Running a cross-cluster search under those conditions will cause the entire search to fail.
+///
+///
+/// -
+///
+/// A cluster has no matching indices, aliases or data streams for the index expression (or your user does not have permissions to search them). For example, suppose your index expression is logs*,remote1:logs* and the remote1 cluster has no indices, aliases or data streams that match logs*. In that case, that cluster will return no results from that cluster if you include it in a cross-cluster search.
+///
+///
+/// -
+///
+/// The index expression (combined with any query parameters you specify) will likely cause an exception to be thrown when you do the search. In these cases, the "error" field in the _resolve/cluster response will be present. (This is also where security/permission errors will be shown.)
+///
+///
+/// -
+///
+/// A remote cluster is an older version that does not support the feature you want to use in your search.
+///
+///
+///
///
public sealed partial class ResolveClusterRequestDescriptor : RequestDescriptor
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RolloverRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RolloverRequest.g.cs
index 4d0efc47482..331aa7bfe7b 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RolloverRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RolloverRequest.g.cs
@@ -67,7 +67,55 @@ public sealed partial class RolloverRequestParameters : RequestParameters
///
///
/// Roll over to a new index.
-/// Creates a new index for a data stream or index alias.
+/// TIP: It is recommended to use the index lifecycle rollover action to automate rollovers.
+///
+///
+/// The rollover API creates a new index for a data stream or index alias.
+/// The API behavior depends on the rollover target.
+///
+///
+/// Roll over a data stream
+///
+///
+/// If you roll over a data stream, the API creates a new write index for the stream.
+/// The stream's previous write index becomes a regular backing index.
+/// A rollover also increments the data stream's generation.
+///
+///
+/// Roll over an index alias with a write index
+///
+///
+/// TIP: Prior to Elasticsearch 7.9, you'd typically use an index alias with a write index to manage time series data.
+/// Data streams replace this functionality, require less maintenance, and automatically integrate with data tiers.
+///
+///
+/// If an index alias points to multiple indices, one of the indices must be a write index.
+/// The rollover API creates a new write index for the alias with is_write_index set to true.
+/// The API also sets is_write_index to false for the previous write index.
+///
+///
+/// Roll over an index alias with one index
+///
+///
+/// If you roll over an index alias that points to only one index, the API creates a new index for the alias and removes the original index from the alias.
+///
+///
+/// NOTE: A rollover creates a new index and is subject to the wait_for_active_shards setting.
+///
+///
+/// Increment index names for an alias
+///
+///
+/// When you roll over an index alias, you can specify a name for the new index.
+/// If you don't specify a name and the current index ends with - and a number, such as my-index-000001 or my-index-3, the new index name increments that number.
+/// For example, if you roll over an alias with a current index of my-index-000001, the rollover creates a new index named my-index-000002.
+/// This number is always six characters and zero-padded, regardless of the previous index's name.
+///
+///
+/// If you use an index alias for time series data, you can use date math in the index name to track the rollover date.
+/// For example, you can create an alias that points to an index named <my-index-{now/d}-000001>.
+/// If you create the index on May 6, 2099, the index's name is my-index-2099.05.06-000001.
+/// If you roll over the alias on May 7, 2099, the new index's name is my-index-2099.05.07-000002.
///
///
public sealed partial class RolloverRequest : PlainRequest
@@ -166,7 +214,55 @@ public RolloverRequest(Elastic.Clients.Elasticsearch.IndexAlias alias, Elastic.C
///
///
/// Roll over to a new index.
-/// Creates a new index for a data stream or index alias.
+/// TIP: It is recommended to use the index lifecycle rollover action to automate rollovers.
+///
+///
+/// The rollover API creates a new index for a data stream or index alias.
+/// The API behavior depends on the rollover target.
+///
+///
+/// Roll over a data stream
+///
+///
+/// If you roll over a data stream, the API creates a new write index for the stream.
+/// The stream's previous write index becomes a regular backing index.
+/// A rollover also increments the data stream's generation.
+///
+///
+/// Roll over an index alias with a write index
+///
+///
+/// TIP: Prior to Elasticsearch 7.9, you'd typically use an index alias with a write index to manage time series data.
+/// Data streams replace this functionality, require less maintenance, and automatically integrate with data tiers.
+///
+///
+/// If an index alias points to multiple indices, one of the indices must be a write index.
+/// The rollover API creates a new write index for the alias with is_write_index set to true.
+/// The API also sets is_write_index to false for the previous write index.
+///
+///
+/// Roll over an index alias with one index
+///
+///
+/// If you roll over an index alias that points to only one index, the API creates a new index for the alias and removes the original index from the alias.
+///
+///
+/// NOTE: A rollover creates a new index and is subject to the wait_for_active_shards setting.
+///
+///
+/// Increment index names for an alias
+///
+///
+/// When you roll over an index alias, you can specify a name for the new index.
+/// If you don't specify a name and the current index ends with - and a number, such as my-index-000001 or my-index-3, the new index name increments that number.
+/// For example, if you roll over an alias with a current index of my-index-000001, the rollover creates a new index named my-index-000002.
+/// This number is always six characters and zero-padded, regardless of the previous index's name.
+///
+///
+/// If you use an index alias for time series data, you can use date math in the index name to track the rollover date.
+/// For example, you can create an alias that points to an index named <my-index-{now/d}-000001>.
+/// If you create the index on May 6, 2099, the index's name is my-index-2099.05.06-000001.
+/// If you roll over the alias on May 7, 2099, the new index's name is my-index-2099.05.07-000002.
///
///
public sealed partial class RolloverRequestDescriptor : RequestDescriptor, RolloverRequestParameters>
@@ -356,7 +452,55 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Roll over to a new index.
-/// Creates a new index for a data stream or index alias.
+/// TIP: It is recommended to use the index lifecycle rollover action to automate rollovers.
+///
+///
+/// The rollover API creates a new index for a data stream or index alias.
+/// The API behavior depends on the rollover target.
+///
+///
+/// Roll over a data stream
+///
+///
+/// If you roll over a data stream, the API creates a new write index for the stream.
+/// The stream's previous write index becomes a regular backing index.
+/// A rollover also increments the data stream's generation.
+///
+///
+/// Roll over an index alias with a write index
+///
+///
+/// TIP: Prior to Elasticsearch 7.9, you'd typically use an index alias with a write index to manage time series data.
+/// Data streams replace this functionality, require less maintenance, and automatically integrate with data tiers.
+///
+///
+/// If an index alias points to multiple indices, one of the indices must be a write index.
+/// The rollover API creates a new write index for the alias with is_write_index set to true.
+/// The API also sets is_write_index to false for the previous write index.
+///
+///
+/// Roll over an index alias with one index
+///
+///
+/// If you roll over an index alias that points to only one index, the API creates a new index for the alias and removes the original index from the alias.
+///
+///
+/// NOTE: A rollover creates a new index and is subject to the wait_for_active_shards setting.
+///
+///
+/// Increment index names for an alias
+///
+///
+/// When you roll over an index alias, you can specify a name for the new index.
+/// If you don't specify a name and the current index ends with - and a number, such as my-index-000001 or my-index-3, the new index name increments that number.
+/// For example, if you roll over an alias with a current index of my-index-000001, the rollover creates a new index named my-index-000002.
+/// This number is always six characters and zero-padded, regardless of the previous index's name.
+///
+///
+/// If you use an index alias for time series data, you can use date math in the index name to track the rollover date.
+/// For example, you can create an alias that points to an index named <my-index-{now/d}-000001>.
+/// If you create the index on May 6, 2099, the index's name is my-index-2099.05.06-000001.
+/// If you roll over the alias on May 7, 2099, the new index's name is my-index-2099.05.07-000002.
///
///
public sealed partial class RolloverRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SegmentsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SegmentsRequest.g.cs
index 935d749c917..4bd6a06cc35 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SegmentsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SegmentsRequest.g.cs
@@ -56,6 +56,13 @@ public sealed partial class SegmentsRequestParameters : RequestParameters
///
///
public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); }
+
+ ///
+ ///
+ /// If true, the request returns a verbose response.
+ ///
+ ///
+ public bool? Verbose { get => Q("verbose"); set => Q("verbose", value); }
}
///
@@ -110,6 +117,14 @@ public SegmentsRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r
///
[JsonIgnore]
public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); }
+
+ ///
+ ///
+ /// If true, the request returns a verbose response.
+ ///
+ ///
+ [JsonIgnore]
+ public bool? Verbose { get => Q("verbose"); set => Q("verbose", value); }
}
///
@@ -142,6 +157,7 @@ public SegmentsRequestDescriptor()
public SegmentsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
public SegmentsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards);
public SegmentsRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable);
+ public SegmentsRequestDescriptor Verbose(bool? verbose = true) => Qs("verbose", verbose);
public SegmentsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices)
{
@@ -184,6 +200,7 @@ public SegmentsRequestDescriptor()
public SegmentsRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
public SegmentsRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards);
public SegmentsRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable);
+ public SegmentsRequestDescriptor Verbose(bool? verbose = true) => Qs("verbose", verbose);
public SegmentsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices)
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs
index 94431e9a878..11c724fe951 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs
@@ -50,7 +50,7 @@ public sealed partial class SimulateIndexTemplateRequestParameters : RequestPara
///
///
/// Simulate an index.
-/// Returns the index configuration that would be applied to the specified index from an existing index template.
+/// Get the index configuration that would be applied to the specified index from an existing index template.
///
///
public sealed partial class SimulateIndexTemplateRequest : PlainRequest
@@ -87,7 +87,7 @@ public SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : b
///
///
/// Simulate an index.
-/// Returns the index configuration that would be applied to the specified index from an existing index template.
+/// Get the index configuration that would be applied to the specified index from an existing index template.
///
///
public sealed partial class SimulateIndexTemplateRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs
index 51e33f2427e..2e522a02799 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs
@@ -57,7 +57,7 @@ public sealed partial class SimulateTemplateRequestParameters : RequestParameter
///
///
/// Simulate an index template.
-/// Returns the index configuration that would be applied by a particular index template.
+/// Get the index configuration that would be applied by a particular index template.
///
///
public sealed partial class SimulateTemplateRequest : PlainRequest
@@ -200,7 +200,7 @@ public SimulateTemplateRequest(Elastic.Clients.Elasticsearch.Name? name) : base(
///
///
/// Simulate an index template.
-/// Returns the index configuration that would be applied by a particular index template.
+/// Get the index configuration that would be applied by a particular index template.
///
///
public sealed partial class SimulateTemplateRequestDescriptor : RequestDescriptor, SimulateTemplateRequestParameters>
@@ -498,7 +498,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Simulate an index template.
-/// Returns the index configuration that would be applied by a particular index template.
+/// Get the index configuration that would be applied by a particular index template.
///
///
public sealed partial class SimulateTemplateRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SplitIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SplitIndexRequest.g.cs
index de7ea89236b..132249bcd26 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SplitIndexRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SplitIndexRequest.g.cs
@@ -80,6 +80,16 @@ public sealed partial class SplitIndexRequestParameters : RequestParameters
///
///
///
+/// You can do make an index read-only with the following request using the add index block API:
+///
+///
+/// PUT /my_source_index/_block/write
+///
+///
+/// The current write index on a data stream cannot be split.
+/// In order to split the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be split.
+///
+///
/// The number of times the index can be split (and the number of shards that each original shard can be split into) is determined by the index.number_of_routing_shards setting.
/// The number of routing shards specifies the hashing space that is used internally to distribute documents across shards with consistent hashing.
/// For instance, a 5 shard index with number_of_routing_shards set to 30 (5 x 2 x 3) could be split by a factor of 2 or 3.
@@ -216,6 +226,16 @@ public SplitIndexRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.
///
///
///
+/// You can do make an index read-only with the following request using the add index block API:
+///
+///
+/// PUT /my_source_index/_block/write
+///
+///
+/// The current write index on a data stream cannot be split.
+/// In order to split the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be split.
+///
+///
/// The number of times the index can be split (and the number of shards that each original shard can be split into) is determined by the index.number_of_routing_shards setting.
/// The number of routing shards specifies the hashing space that is used internally to distribute documents across shards with consistent hashing.
/// For instance, a 5 shard index with number_of_routing_shards set to 30 (5 x 2 x 3) could be split by a factor of 2 or 3.
@@ -370,6 +390,16 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
///
+/// You can do make an index read-only with the following request using the add index block API:
+///
+///
+/// PUT /my_source_index/_block/write
+///
+///
+/// The current write index on a data stream cannot be split.
+/// In order to split the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be split.
+///
+///
/// The number of times the index can be split (and the number of shards that each original shard can be split into) is determined by the index.number_of_routing_shards setting.
/// The number of routing shards specifies the hashing space that is used internally to distribute documents across shards with consistent hashing.
/// For instance, a 5 shard index with number_of_routing_shards set to 30 (5 x 2 x 3) could be split by a factor of 2 or 3.
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexRequest.g.cs
index 2722f0c9b24..044af3b8442 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexRequest.g.cs
@@ -48,19 +48,19 @@ public sealed partial class IndexRequestParameters : RequestParameters
///
///
- /// Set to create to only index the document if it does not already exist (put if absent).
+ /// Set to create to only index the document if it does not already exist (put if absent).
/// If a document with the specified _id already exists, the indexing operation will fail.
- /// Same as using the <index>/_create endpoint.
- /// Valid values: index, create.
- /// If document id is specified, it defaults to index.
+ /// The behavior is the same as using the <index>/_create endpoint.
+ /// If a document ID is specified, this paramater defaults to index.
/// Otherwise, it defaults to create.
+ /// If the request targets a data stream, an op_type of create is required.
///
///
public Elastic.Clients.Elasticsearch.OpType? OpType { get => Q("op_type"); set => Q("op_type", value); }
///
///
- /// ID of the pipeline to use to preprocess incoming documents.
+ /// The ID of the pipeline to use to preprocess incoming documents.
/// If the index has a default ingest pipeline specified, then setting the value to _none disables the default ingest pipeline for this request.
/// If a final pipeline is configured it will always run, regardless of the value of this parameter.
///
@@ -69,8 +69,9 @@ public sealed partial class IndexRequestParameters : RequestParameters
///
///
- /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false do nothing with refreshes.
- /// Valid values: true, false, wait_for.
+ /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search.
+ /// If wait_for, it waits for a refresh to make this operation visible to search.
+ /// If false, it does nothing with refreshes.
///
///
public Elastic.Clients.Elasticsearch.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
@@ -84,29 +85,35 @@ public sealed partial class IndexRequestParameters : RequestParameters
///
///
- /// Custom value used to route operations to a specific shard.
+ /// A custom value that is used to route operations to a specific shard.
///
///
public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); }
///
///
- /// Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
+ /// The period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
+ ///
+ ///
+ /// This parameter is useful for situations where the primary shard assigned to perform the operation might not be available when the operation runs.
+ /// Some reasons for this might be that the primary shard is currently recovering from a gateway or undergoing relocation.
+ /// By default, the operation will wait on the primary shard to become available for at least 1 minute before failing and responding with an error.
+ /// The actual wait time could be longer, particularly when multiple waits occur.
///
///
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); }
///
///
- /// Explicit version number for concurrency control.
- /// The specified version must match the current version of the document for the request to succeed.
+ /// An explicit version number for concurrency control.
+ /// It must be a non-negative long number.
///
///
public long? Version { get => Q("version"); set => Q("version", value); }
///
///
- /// Specific version type: external, external_gte.
+ /// The version type.
///
///
public Elastic.Clients.Elasticsearch.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); }
@@ -114,7 +121,8 @@ public sealed partial class IndexRequestParameters : 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).
+ /// You can set it to all or any positive integer up to the total number of shards in the index (number_of_replicas+1).
+ /// The default value of 1 means it waits for each primary shard to be active.
///
///
public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); }
@@ -122,10 +130,175 @@ public sealed partial class IndexRequestParameters : RequestParameters
///
///
-/// Index a document.
-/// Adds a JSON document to the specified data stream or index and makes it searchable.
+/// Create or update a document in an index.
+///
+///
+/// Add a JSON document to the specified data stream or index and make it searchable.
/// If the target is an index and the document already exists, the request updates the document and increments its version.
///
+///
+/// NOTE: You cannot use this API to send update requests for existing documents in a data stream.
+///
+///
+/// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:
+///
+///
+/// -
+///
+/// To add or overwrite a document using the PUT /<target>/_doc/<_id> request format, you must have the create, index, or write index privilege.
+///
+///
+/// -
+///
+/// To add a document using the POST /<target>/_doc/ request format, you must have the create_doc, create, index, or write index privilege.
+///
+///
+/// -
+///
+/// To automatically create a data stream or index with this API request, you must have the auto_configure, create_index, or manage index privilege.
+///
+///
+///
+///
+/// Automatic data stream creation requires a matching index template with data stream enabled.
+///
+///
+/// NOTE: Replica shards might not all be started when an indexing operation returns successfully.
+/// By default, only the primary is required. Set wait_for_active_shards to change this default behavior.
+///
+///
+/// Automatically create data streams and indices
+///
+///
+/// If the request's target doesn't exist and matches an index template with a data_stream definition, the index operation automatically creates the data stream.
+///
+///
+/// If the target doesn't exist and doesn't match a data stream template, the operation automatically creates the index and applies any matching index templates.
+///
+///
+/// NOTE: Elasticsearch includes several built-in index templates. To avoid naming collisions with these templates, refer to index pattern documentation.
+///
+///
+/// If no mapping exists, the index operation creates a dynamic mapping.
+/// By default, new fields and objects are automatically added to the mapping if needed.
+///
+///
+/// Automatic index creation is controlled by the action.auto_create_index setting.
+/// If it is true, any index can be created automatically.
+/// You can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns or set it to false to turn off automatic index creation entirely.
+/// Specify a comma-separated list of patterns you want to allow or prefix each pattern with + or - to indicate whether it should be allowed or blocked.
+/// When a list is specified, the default behaviour is to disallow.
+///
+///
+/// NOTE: The action.auto_create_index setting affects the automatic creation of indices only.
+/// It does not affect the creation of data streams.
+///
+///
+/// Optimistic concurrency control
+///
+///
+/// Index operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the if_seq_no and if_primary_term parameters.
+/// If a mismatch is detected, the operation will result in a VersionConflictException and a status code of 409.
+///
+///
+/// Routing
+///
+///
+/// By default, shard placement — or routing — is controlled by using a hash of the document's ID value.
+/// For more explicit control, the value fed into the hash function used by the router can be directly specified on a per-operation basis using the routing parameter.
+///
+///
+/// When setting up explicit mapping, you can also use the _routing field to direct the index operation to extract the routing value from the document itself.
+/// This does come at the (very minimal) cost of an additional document parsing pass.
+/// If the _routing mapping is defined and set to be required, the index operation will fail if no routing value is provided or extracted.
+///
+///
+/// NOTE: Data streams do not support custom routing unless they were created with the allow_custom_routing setting enabled in the template.
+///
+///
+/// -
+///
+/// ** Distributed**
+///
+///
+///
+///
+/// The index operation is directed to the primary shard based on its route and performed on the actual node containing this shard.
+/// After the primary shard completes the operation, if needed, the update is distributed to applicable replicas.
+///
+///
+/// Active shards
+///
+///
+/// To improve the resiliency of writes to the system, indexing operations can be configured to wait for a certain number of active shard copies before proceeding with the operation.
+/// If the requisite number of active shard copies are not available, then the write operation must wait and retry, until either the requisite shard copies have started or a timeout occurs.
+/// By default, write operations only wait for the primary shards to be active before proceeding (that is to say wait_for_active_shards is 1).
+/// This default can be overridden in the index settings dynamically by setting index.write.wait_for_active_shards.
+/// To alter this behavior per operation, use the wait_for_active_shards request parameter.
+///
+///
+/// Valid values are all or any positive integer up to the total number of configured copies per shard in the index (which is number_of_replicas+1).
+/// Specifying a negative value or a number greater than the number of shard copies will throw an error.
+///
+///
+/// For example, suppose you have a cluster of three nodes, A, B, and C and you create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes).
+/// If you attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding.
+/// This means that even if B and C went down and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data.
+/// If wait_for_active_shards is set on the request to 3 (and all three nodes are up), the indexing operation will require 3 active shard copies before proceeding.
+/// This requirement should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard.
+/// However, if you set wait_for_active_shards to all (or to 4, which is the same in this situation), the indexing operation will not proceed as you do not have all 4 copies of each shard active in the index.
+/// The operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard.
+///
+///
+/// It is important to note that this setting greatly reduces the chances of the write operation not writing to the requisite number of shard copies, but it does not completely eliminate the possibility, because this check occurs before the write operation starts.
+/// After the write operation is underway, it is still possible for replication to fail on any number of shard copies but still succeed on the primary.
+/// The _shards section of the API response reveals the number of shard copies on which replication succeeded and failed.
+///
+///
+/// No operation (noop) updates
+///
+///
+/// When updating a document by using this API, a new version of the document is always created even if the document hasn't changed.
+/// If this isn't acceptable use the _update API with detect_noop set to true.
+/// The detect_noop option isn't available on this API because it doesn’t fetch the old source and isn't able to compare it against the new source.
+///
+///
+/// There isn't a definitive rule for when noop updates aren't acceptable.
+/// It's a combination of lots of factors like how frequently your data source sends updates that are actually noops and how many queries per second Elasticsearch runs on the shard receiving the updates.
+///
+///
+/// Versioning
+///
+///
+/// Each indexed document is given a version number.
+/// By default, internal versioning is used that starts at 1 and increments with each update, deletes included.
+/// Optionally, the version number can be set to an external value (for example, if maintained in a database).
+/// To enable this functionality, version_type should be set to external.
+/// The value provided must be a numeric, long value greater than or equal to 0, and less than around 9.2e+18.
+///
+///
+/// NOTE: Versioning is completely real time, and is not affected by the near real time aspects of search operations.
+/// If no version is provided, the operation runs without any version checks.
+///
+///
+/// When using the external version type, the system checks to see if the version number passed to the index request is greater than the version of the currently stored document.
+/// If true, the document will be indexed and the new version number used.
+/// If the value provided is less than or equal to the stored document's version number, a version conflict will occur and the index operation will fail. For example:
+///
+///
+/// PUT my-index-000001/_doc/1?version=2&version_type=external
+/// {
+/// "user": {
+/// "id": "elkbee"
+/// }
+/// }
+///
+/// In this example, the operation will succeed since the supplied version of 2 is higher than the current document version of 1.
+/// If the document was already updated and its version was set to 2 or higher, the indexing command will fail and result in a conflict (409 HTTP status code).
+///
+/// A nice side effect is that there is no need to maintain strict ordering of async indexing operations run as a result of changes to a source database, as long as version numbers from the source database are used.
+/// Even the simple case of updating the Elasticsearch index using data from a database is simplified if external versioning is used, as only the latest version will be used if the index operations arrive out of order.
+///
///
public sealed partial class IndexRequest : PlainRequest, ISelfSerializable
{
@@ -163,12 +336,12 @@ public IndexRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r => r
///
///
- /// Set to create to only index the document if it does not already exist (put if absent).
+ /// Set to create to only index the document if it does not already exist (put if absent).
/// If a document with the specified _id already exists, the indexing operation will fail.
- /// Same as using the <index>/_create endpoint.
- /// Valid values: index, create.
- /// If document id is specified, it defaults to index.
+ /// The behavior is the same as using the <index>/_create endpoint.
+ /// If a document ID is specified, this paramater defaults to index.
/// Otherwise, it defaults to create.
+ /// If the request targets a data stream, an op_type of create is required.
///
///
[JsonIgnore]
@@ -176,7 +349,7 @@ public IndexRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r => r
///
///
- /// ID of the pipeline to use to preprocess incoming documents.
+ /// The ID of the pipeline to use to preprocess incoming documents.
/// If the index has a default ingest pipeline specified, then setting the value to _none disables the default ingest pipeline for this request.
/// If a final pipeline is configured it will always run, regardless of the value of this parameter.
///
@@ -186,8 +359,9 @@ public IndexRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r => r
///
///
- /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false do nothing with refreshes.
- /// Valid values: true, false, wait_for.
+ /// If true, Elasticsearch refreshes the affected shards to make this operation visible to search.
+ /// If wait_for, it waits for a refresh to make this operation visible to search.
+ /// If false, it does nothing with refreshes.
///
///
[JsonIgnore]
@@ -203,7 +377,7 @@ public IndexRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r => r
///
///
- /// Custom value used to route operations to a specific shard.
+ /// A custom value that is used to route operations to a specific shard.
///
///
[JsonIgnore]
@@ -211,7 +385,13 @@ public IndexRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r => r
///
///
- /// Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
+ /// The period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
+ ///
+ ///
+ /// This parameter is useful for situations where the primary shard assigned to perform the operation might not be available when the operation runs.
+ /// Some reasons for this might be that the primary shard is currently recovering from a gateway or undergoing relocation.
+ /// By default, the operation will wait on the primary shard to become available for at least 1 minute before failing and responding with an error.
+ /// The actual wait time could be longer, particularly when multiple waits occur.
///
///
[JsonIgnore]
@@ -219,8 +399,8 @@ public IndexRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r => r
///
///
- /// Explicit version number for concurrency control.
- /// The specified version must match the current version of the document for the request to succeed.
+ /// An explicit version number for concurrency control.
+ /// It must be a non-negative long number.
///
///
[JsonIgnore]
@@ -228,7 +408,7 @@ public IndexRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r => r
///
///
- /// Specific version type: external, external_gte.
+ /// The version type.
///
///
[JsonIgnore]
@@ -237,7 +417,8 @@ public IndexRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r => r
///
///
/// 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).
+ /// You can set it to all or any positive integer up to the total number of shards in the index (number_of_replicas+1).
+ /// The default value of 1 means it waits for each primary shard to be active.
///
///
[JsonIgnore]
@@ -253,10 +434,175 @@ void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions op
///
///
-/// Index a document.
-/// Adds a JSON document to the specified data stream or index and makes it searchable.
+/// Create or update a document in an index.
+///
+///
+/// Add a JSON document to the specified data stream or index and make it searchable.
/// If the target is an index and the document already exists, the request updates the document and increments its version.
///
+///
+/// NOTE: You cannot use this API to send update requests for existing documents in a data stream.
+///
+///
+/// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:
+///
+///
+/// -
+///
+/// To add or overwrite a document using the PUT /<target>/_doc/<_id> request format, you must have the create, index, or write index privilege.
+///
+///
+/// -
+///
+/// To add a document using the POST /<target>/_doc/ request format, you must have the create_doc, create, index, or write index privilege.
+///
+///
+/// -
+///
+/// To automatically create a data stream or index with this API request, you must have the auto_configure, create_index, or manage index privilege.
+///
+///
+///
+///
+/// Automatic data stream creation requires a matching index template with data stream enabled.
+///
+///
+/// NOTE: Replica shards might not all be started when an indexing operation returns successfully.
+/// By default, only the primary is required. Set wait_for_active_shards to change this default behavior.
+///
+///
+/// Automatically create data streams and indices
+///
+///
+/// If the request's target doesn't exist and matches an index template with a data_stream definition, the index operation automatically creates the data stream.
+///
+///
+/// If the target doesn't exist and doesn't match a data stream template, the operation automatically creates the index and applies any matching index templates.
+///
+///
+/// NOTE: Elasticsearch includes several built-in index templates. To avoid naming collisions with these templates, refer to index pattern documentation.
+///
+///
+/// If no mapping exists, the index operation creates a dynamic mapping.
+/// By default, new fields and objects are automatically added to the mapping if needed.
+///
+///
+/// Automatic index creation is controlled by the action.auto_create_index setting.
+/// If it is true, any index can be created automatically.
+/// You can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns or set it to false to turn off automatic index creation entirely.
+/// Specify a comma-separated list of patterns you want to allow or prefix each pattern with + or - to indicate whether it should be allowed or blocked.
+/// When a list is specified, the default behaviour is to disallow.
+///
+///
+/// NOTE: The action.auto_create_index setting affects the automatic creation of indices only.
+/// It does not affect the creation of data streams.
+///
+///
+/// Optimistic concurrency control
+///
+///
+/// Index operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the if_seq_no and if_primary_term parameters.
+/// If a mismatch is detected, the operation will result in a VersionConflictException and a status code of 409.
+///
+///
+/// Routing
+///
+///
+/// By default, shard placement — or routing — is controlled by using a hash of the document's ID value.
+/// For more explicit control, the value fed into the hash function used by the router can be directly specified on a per-operation basis using the routing parameter.
+///
+///
+/// When setting up explicit mapping, you can also use the _routing field to direct the index operation to extract the routing value from the document itself.
+/// This does come at the (very minimal) cost of an additional document parsing pass.
+/// If the _routing mapping is defined and set to be required, the index operation will fail if no routing value is provided or extracted.
+///
+///
+/// NOTE: Data streams do not support custom routing unless they were created with the allow_custom_routing setting enabled in the template.
+///
+///
+/// -
+///
+/// ** Distributed**
+///
+///
+///
+///
+/// The index operation is directed to the primary shard based on its route and performed on the actual node containing this shard.
+/// After the primary shard completes the operation, if needed, the update is distributed to applicable replicas.
+///
+///
+/// Active shards
+///
+///
+/// To improve the resiliency of writes to the system, indexing operations can be configured to wait for a certain number of active shard copies before proceeding with the operation.
+/// If the requisite number of active shard copies are not available, then the write operation must wait and retry, until either the requisite shard copies have started or a timeout occurs.
+/// By default, write operations only wait for the primary shards to be active before proceeding (that is to say wait_for_active_shards is 1).
+/// This default can be overridden in the index settings dynamically by setting index.write.wait_for_active_shards.
+/// To alter this behavior per operation, use the wait_for_active_shards request parameter.
+///
+///
+/// Valid values are all or any positive integer up to the total number of configured copies per shard in the index (which is number_of_replicas+1).
+/// Specifying a negative value or a number greater than the number of shard copies will throw an error.
+///
+///
+/// For example, suppose you have a cluster of three nodes, A, B, and C and you create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes).
+/// If you attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding.
+/// This means that even if B and C went down and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data.
+/// If wait_for_active_shards is set on the request to 3 (and all three nodes are up), the indexing operation will require 3 active shard copies before proceeding.
+/// This requirement should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard.
+/// However, if you set wait_for_active_shards to all (or to 4, which is the same in this situation), the indexing operation will not proceed as you do not have all 4 copies of each shard active in the index.
+/// The operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard.
+///
+///
+/// It is important to note that this setting greatly reduces the chances of the write operation not writing to the requisite number of shard copies, but it does not completely eliminate the possibility, because this check occurs before the write operation starts.
+/// After the write operation is underway, it is still possible for replication to fail on any number of shard copies but still succeed on the primary.
+/// The _shards section of the API response reveals the number of shard copies on which replication succeeded and failed.
+///
+///
+/// No operation (noop) updates
+///
+///
+/// When updating a document by using this API, a new version of the document is always created even if the document hasn't changed.
+/// If this isn't acceptable use the _update API with detect_noop set to true.
+/// The detect_noop option isn't available on this API because it doesn’t fetch the old source and isn't able to compare it against the new source.
+///
+///
+/// There isn't a definitive rule for when noop updates aren't acceptable.
+/// It's a combination of lots of factors like how frequently your data source sends updates that are actually noops and how many queries per second Elasticsearch runs on the shard receiving the updates.
+///
+///
+/// Versioning
+///
+///
+/// Each indexed document is given a version number.
+/// By default, internal versioning is used that starts at 1 and increments with each update, deletes included.
+/// Optionally, the version number can be set to an external value (for example, if maintained in a database).
+/// To enable this functionality, version_type should be set to external.
+/// The value provided must be a numeric, long value greater than or equal to 0, and less than around 9.2e+18.
+///
+///
+/// NOTE: Versioning is completely real time, and is not affected by the near real time aspects of search operations.
+/// If no version is provided, the operation runs without any version checks.
+///
+///
+/// When using the external version type, the system checks to see if the version number passed to the index request is greater than the version of the currently stored document.
+/// If true, the document will be indexed and the new version number used.
+/// If the value provided is less than or equal to the stored document's version number, a version conflict will occur and the index operation will fail. For example:
+///
+///
+/// PUT my-index-000001/_doc/1?version=2&version_type=external
+/// {
+/// "user": {
+/// "id": "elkbee"
+/// }
+/// }
+///
+/// In this example, the operation will succeed since the supplied version of 2 is higher than the current document version of 1.
+/// If the document was already updated and its version was set to 2 or higher, the indexing command will fail and result in a conflict (409 HTTP status code).
+///
+/// A nice side effect is that there is no need to maintain strict ordering of async indexing operations run as a result of changes to a source database, as long as version numbers from the source database are used.
+/// Even the simple case of updating the Elasticsearch index using data from a database is simplified if external versioning is used, as only the latest version will be used if the index operations arrive out of order.
+///
///
public sealed partial class IndexRequestDescriptor : RequestDescriptor, IndexRequestParameters>
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexResponse.g.cs
index 289d66cf21d..f6d0222b690 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexResponse.g.cs
@@ -30,18 +30,61 @@ public sealed partial class IndexResponse : ElasticsearchResponse
{
[JsonInclude, JsonPropertyName("forced_refresh")]
public bool? ForcedRefresh { get; init; }
+
+ ///
+ ///
+ /// The unique identifier for the added document.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_id")]
public string Id { get; init; }
+
+ ///
+ ///
+ /// The name of the index the document was added to.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_index")]
public string Index { get; init; }
+
+ ///
+ ///
+ /// The primary term assigned to the document for the indexing operation.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_primary_term")]
public long? PrimaryTerm { get; init; }
+
+ ///
+ ///
+ /// The result of the indexing operation: created or updated.
+ ///
+ ///
[JsonInclude, JsonPropertyName("result")]
public Elastic.Clients.Elasticsearch.Result Result { get; init; }
+
+ ///
+ ///
+ /// The sequence number assigned to the document for the indexing operation.
+ /// Sequence numbers are used to ensure an older version of a document doesn't overwrite a newer version.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_seq_no")]
public long? SeqNo { get; init; }
+
+ ///
+ ///
+ /// Information about the replication process of the operation.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_shards")]
public Elastic.Clients.Elasticsearch.ShardStatistics Shards { get; init; }
+
+ ///
+ ///
+ /// The document version, which is incremented each time the document is updated.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_version")]
public long Version { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutInferenceResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutInferenceResponse.g.cs
index dca82330fc2..a4efc6e47fa 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutInferenceResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutInferenceResponse.g.cs
@@ -28,6 +28,14 @@ namespace Elastic.Clients.Elasticsearch.Inference;
public sealed partial class PutInferenceResponse : ElasticsearchResponse
{
+ ///
+ ///
+ /// Chunking configuration object
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("chunking_settings")]
+ public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; init; }
+
///
///
/// The inference Id
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/StreamInferenceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/StreamInferenceRequest.g.cs
new file mode 100644
index 00000000000..13e9654e82f
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/StreamInferenceRequest.g.cs
@@ -0,0 +1,151 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Requests;
+using Elastic.Clients.Elasticsearch.Serialization;
+using Elastic.Transport;
+using Elastic.Transport.Extensions;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Inference;
+
+public sealed partial class StreamInferenceRequestParameters : RequestParameters
+{
+}
+
+///
+///
+/// Perform streaming inference.
+/// Get real-time responses for completion tasks by delivering answers incrementally, reducing response times during computation.
+/// This API works only with the completion task type.
+///
+///
+/// IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.
+///
+///
+/// This API requires the monitor_inference cluster privilege (the built-in inference_admin and inference_user roles grant this privilege). You must use a client that supports streaming.
+///
+///
+public sealed partial class StreamInferenceRequest : PlainRequest
+{
+ public StreamInferenceRequest(Elastic.Clients.Elasticsearch.Id inferenceId) : base(r => r.Required("inference_id", inferenceId))
+ {
+ }
+
+ public StreamInferenceRequest(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Id inferenceId) : base(r => r.Optional("task_type", taskType).Required("inference_id", inferenceId))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.InferenceStreamInference;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "inference.stream_inference";
+
+ ///
+ ///
+ /// The text on which you want to perform the inference task.
+ /// It can be a single string or an array.
+ ///
+ ///
+ /// NOTE: Inference endpoints for the completion task type currently only support a single string as input.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("input")]
+ [SingleOrManyCollectionConverter(typeof(string))]
+ public ICollection Input { get; set; }
+}
+
+///
+///
+/// Perform streaming inference.
+/// Get real-time responses for completion tasks by delivering answers incrementally, reducing response times during computation.
+/// This API works only with the completion task type.
+///
+///
+/// IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.
+///
+///
+/// This API requires the monitor_inference cluster privilege (the built-in inference_admin and inference_user roles grant this privilege). You must use a client that supports streaming.
+///
+///
+public sealed partial class StreamInferenceRequestDescriptor : RequestDescriptor
+{
+ internal StreamInferenceRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public StreamInferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Id inferenceId) : base(r => r.Optional("task_type", taskType).Required("inference_id", inferenceId))
+ {
+ }
+
+ public StreamInferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Id inferenceId) : base(r => r.Required("inference_id", inferenceId))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.InferenceStreamInference;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "inference.stream_inference";
+
+ public StreamInferenceRequestDescriptor InferenceId(Elastic.Clients.Elasticsearch.Id inferenceId)
+ {
+ RouteValues.Required("inference_id", inferenceId);
+ return Self;
+ }
+
+ public StreamInferenceRequestDescriptor TaskType(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType)
+ {
+ RouteValues.Optional("task_type", taskType);
+ return Self;
+ }
+
+ private ICollection InputValue { get; set; }
+
+ ///
+ ///
+ /// The text on which you want to perform the inference task.
+ /// It can be a single string or an array.
+ ///
+ ///
+ /// NOTE: Inference endpoints for the completion task type currently only support a single string as input.
+ ///
+ ///
+ public StreamInferenceRequestDescriptor Input(ICollection input)
+ {
+ InputValue = input;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("input");
+ SingleOrManySerializationHelper.Serialize(InputValue, writer, options);
+ writer.WriteEndObject();
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/StreamInferenceResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/StreamInferenceResponse.g.cs
new file mode 100644
index 00000000000..6b31527b8b9
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/StreamInferenceResponse.g.cs
@@ -0,0 +1,31 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Inference;
+
+public sealed partial class StreamInferenceResponse : ElasticsearchResponse
+{
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/UpdateInferenceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/UpdateInferenceRequest.g.cs
new file mode 100644
index 00000000000..b3b1146f41e
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/UpdateInferenceRequest.g.cs
@@ -0,0 +1,148 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Requests;
+using Elastic.Clients.Elasticsearch.Serialization;
+using Elastic.Transport;
+using Elastic.Transport.Extensions;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Inference;
+
+public sealed partial class UpdateInferenceRequestParameters : RequestParameters
+{
+}
+
+///
+///
+/// Update an inference endpoint.
+///
+///
+/// Modify task_settings, secrets (within service_settings), or num_allocations for an inference endpoint, depending on the specific endpoint service and task_type.
+///
+///
+/// IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.
+/// For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.
+/// However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.
+///
+///
+public sealed partial class UpdateInferenceRequest : PlainRequest, ISelfSerializable
+{
+ public UpdateInferenceRequest(Elastic.Clients.Elasticsearch.Id inferenceId) : base(r => r.Required("inference_id", inferenceId))
+ {
+ }
+
+ public UpdateInferenceRequest(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Id inferenceId) : base(r => r.Optional("task_type", taskType).Required("inference_id", inferenceId))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.InferenceUpdate;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "inference.update";
+
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Inference.InferenceEndpoint InferenceConfig { get; set; }
+
+ void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ JsonSerializer.Serialize(writer, InferenceConfig, options);
+ }
+}
+
+///
+///
+/// Update an inference endpoint.
+///
+///
+/// Modify task_settings, secrets (within service_settings), or num_allocations for an inference endpoint, depending on the specific endpoint service and task_type.
+///
+///
+/// IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.
+/// For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.
+/// However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.
+///
+///
+public sealed partial class UpdateInferenceRequestDescriptor : RequestDescriptor
+{
+ internal UpdateInferenceRequestDescriptor(Action configure) => configure.Invoke(this);
+ public UpdateInferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Id inferenceId) : base(r => r.Optional("task_type", taskType).Required("inference_id", inferenceId)) => InferenceConfigValue = inferenceConfig;
+ public UpdateInferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Id inferenceId) : base(r => r.Required("inference_id", inferenceId)) => InferenceConfigValue = inferenceConfig;
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.InferenceUpdate;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "inference.update";
+
+ public UpdateInferenceRequestDescriptor InferenceId(Elastic.Clients.Elasticsearch.Id inferenceId)
+ {
+ RouteValues.Required("inference_id", inferenceId);
+ return Self;
+ }
+
+ public UpdateInferenceRequestDescriptor TaskType(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType)
+ {
+ RouteValues.Optional("task_type", taskType);
+ return Self;
+ }
+
+ private Elastic.Clients.Elasticsearch.Inference.InferenceEndpoint InferenceConfigValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Inference.InferenceEndpointDescriptor InferenceConfigDescriptor { get; set; }
+ private Action InferenceConfigDescriptorAction { get; set; }
+
+ public UpdateInferenceRequestDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Inference.InferenceEndpoint inferenceConfig)
+ {
+ InferenceConfigDescriptor = null;
+ InferenceConfigDescriptorAction = null;
+ InferenceConfigValue = inferenceConfig;
+ return Self;
+ }
+
+ public UpdateInferenceRequestDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Inference.InferenceEndpointDescriptor descriptor)
+ {
+ InferenceConfigValue = null;
+ InferenceConfigDescriptorAction = null;
+ InferenceConfigDescriptor = descriptor;
+ return Self;
+ }
+
+ public UpdateInferenceRequestDescriptor InferenceConfig(Action configure)
+ {
+ InferenceConfigValue = null;
+ InferenceConfigDescriptor = null;
+ InferenceConfigDescriptorAction = configure;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ JsonSerializer.Serialize(writer, InferenceConfigValue, options);
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/UpdateInferenceResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/UpdateInferenceResponse.g.cs
new file mode 100644
index 00000000000..219b81f402e
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/UpdateInferenceResponse.g.cs
@@ -0,0 +1,78 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Inference;
+
+public sealed partial class UpdateInferenceResponse : ElasticsearchResponse
+{
+ ///
+ ///
+ /// Chunking configuration object
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("chunking_settings")]
+ public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; init; }
+
+ ///
+ ///
+ /// The inference Id
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("inference_id")]
+ public string InferenceId { get; init; }
+
+ ///
+ ///
+ /// The service type
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("service")]
+ public string Service { get; init; }
+
+ ///
+ ///
+ /// Settings specific to the service
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("service_settings")]
+ public object ServiceSettings { get; init; }
+
+ ///
+ ///
+ /// Task settings specific to the service and task type
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("task_settings")]
+ public object? TaskSettings { get; init; }
+
+ ///
+ ///
+ /// The task type
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("task_type")]
+ public Elastic.Clients.Elasticsearch.Inference.TaskType TaskType { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoRequest.g.cs
index 9d5e5290857..792542afd63 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoRequest.g.cs
@@ -37,7 +37,7 @@ public sealed partial class InfoRequestParameters : RequestParameters
///
///
/// Get cluster info.
-/// Returns basic information about the cluster.
+/// Get basic build, version, and cluster information.
///
///
public sealed partial class InfoRequest : PlainRequest
@@ -54,7 +54,7 @@ public sealed partial class InfoRequest : PlainRequest
///
///
/// Get cluster info.
-/// Returns basic information about the cluster.
+/// Get basic build, version, and cluster information.
///
///
public sealed partial class InfoRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoResponse.g.cs
index 0558e1d8735..48d217b3951 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/InfoResponse.g.cs
@@ -28,14 +28,31 @@ namespace Elastic.Clients.Elasticsearch;
public sealed partial class InfoResponse : ElasticsearchResponse
{
+ ///
+ ///
+ /// The responding cluster's name.
+ ///
+ ///
[JsonInclude, JsonPropertyName("cluster_name")]
public string ClusterName { get; init; }
[JsonInclude, JsonPropertyName("cluster_uuid")]
public string ClusterUuid { get; init; }
+
+ ///
+ ///
+ /// The responding node's name.
+ ///
+ ///
[JsonInclude, JsonPropertyName("name")]
public string Name { get; init; }
[JsonInclude, JsonPropertyName("tagline")]
public string Tagline { get; init; }
+
+ ///
+ ///
+ /// The running version of Elasticsearch.
+ ///
+ ///
[JsonInclude, JsonPropertyName("version")]
public Elastic.Clients.Elasticsearch.ElasticsearchVersionInfo Version { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/EvaluateDataFrameResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/EvaluateDataFrameResponse.g.cs
index 8cad649908a..239a4585c7c 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/EvaluateDataFrameResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/EvaluateDataFrameResponse.g.cs
@@ -28,10 +28,29 @@ namespace Elastic.Clients.Elasticsearch.MachineLearning;
public sealed partial class EvaluateDataFrameResponse : ElasticsearchResponse
{
+ ///
+ ///
+ /// Evaluation results for a classification analysis.
+ /// It outputs a prediction that identifies to which of the classes each document belongs.
+ ///
+ ///
[JsonInclude, JsonPropertyName("classification")]
public Elastic.Clients.Elasticsearch.MachineLearning.DataframeClassificationSummary? Classification { get; init; }
+
+ ///
+ ///
+ /// Evaluation results for an outlier detection analysis.
+ /// It outputs the probability that each document is an outlier.
+ ///
+ ///
[JsonInclude, JsonPropertyName("outlier_detection")]
public Elastic.Clients.Elasticsearch.MachineLearning.DataframeOutlierDetectionSummary? OutlierDetection { get; init; }
+
+ ///
+ ///
+ /// Evaluation results for a regression analysis which outputs a prediction of values.
+ ///
+ ///
[JsonInclude, JsonPropertyName("regression")]
public Elastic.Clients.Elasticsearch.MachineLearning.DataframeRegressionSummary? Regression { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDataFrameAnalyticsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDataFrameAnalyticsRequest.g.cs
index f62f35e8c15..e135e76d45e 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDataFrameAnalyticsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDataFrameAnalyticsRequest.g.cs
@@ -39,6 +39,13 @@ public sealed partial class PutDataFrameAnalyticsRequestParameters : RequestPara
/// Create a data frame analytics job.
/// This API creates a data frame analytics job that performs an analysis on the
/// source indices and stores the outcome in a destination index.
+/// By default, the query used in the source configuration is {"match_all": {}}.
+///
+///
+/// If the destination index does not exist, it is created automatically when you start the job.
+///
+///
+/// If you supply only a subset of the regression or classification parameters, hyperparameter optimization occurs. It determines a value for each of the undefined parameters.
///
///
public sealed partial class PutDataFrameAnalyticsRequest : PlainRequest
@@ -174,6 +181,13 @@ public PutDataFrameAnalyticsRequest(Elastic.Clients.Elasticsearch.Id id) : base(
/// Create a data frame analytics job.
/// This API creates a data frame analytics job that performs an analysis on the
/// source indices and stores the outcome in a destination index.
+/// By default, the query used in the source configuration is {"match_all": {}}.
+///
+///
+/// If the destination index does not exist, it is created automatically when you start the job.
+///
+///
+/// If you supply only a subset of the regression or classification parameters, hyperparameter optimization occurs. It determines a value for each of the undefined parameters.
///
///
public sealed partial class PutDataFrameAnalyticsRequestDescriptor : RequestDescriptor, PutDataFrameAnalyticsRequestParameters>
@@ -557,6 +571,13 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
/// Create a data frame analytics job.
/// This API creates a data frame analytics job that performs an analysis on the
/// source indices and stores the outcome in a destination index.
+/// By default, the query used in the source configuration is {"match_all": {}}.
+///
+///
+/// If the destination index does not exist, it is created automatically when you start the job.
+///
+///
+/// If you supply only a subset of the regression or classification parameters, hyperparameter optimization occurs. It determines a value for each of the undefined parameters.
///
///
public sealed partial class PutDataFrameAnalyticsRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDatafeedRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDatafeedRequest.g.cs
index f73cd9f69fd..b6c1bf9569d 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDatafeedRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDatafeedRequest.g.cs
@@ -254,7 +254,9 @@ public override void Write(Utf8JsonWriter writer, PutDatafeedRequest value, Json
/// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.
/// You can associate only one datafeed with each anomaly detection job.
/// The datafeed contains a query that runs at a defined interval (frequency).
-/// If you are concerned about delayed data, you can add a delay (query_delay) at each interval.
+/// If you are concerned about delayed data, you can add a delay (query_delay') at each interval. By default, the datafeed uses the following query: {"match_all": {"boost": 1}}`.
+///
+///
/// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had
/// at the time of creation and runs the query using those same roles. If you provide secondary authorization headers,
/// those credentials are used instead.
@@ -355,8 +357,8 @@ public PutDatafeedRequest()
///
///
- /// An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the machine
- /// learning nodes must have the remote_cluster_client role.
+ /// An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the master
+ /// nodes and the machine learning nodes must have the remote_cluster_client role.
///
///
[JsonInclude, JsonPropertyName("indices")]
@@ -443,7 +445,9 @@ public PutDatafeedRequest()
/// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.
/// You can associate only one datafeed with each anomaly detection job.
/// The datafeed contains a query that runs at a defined interval (frequency).
-/// If you are concerned about delayed data, you can add a delay (query_delay) at each interval.
+/// If you are concerned about delayed data, you can add a delay (query_delay') at each interval. By default, the datafeed uses the following query: {"match_all": {"boost": 1}}`.
+///
+///
/// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had
/// at the time of creation and runs the query using those same roles. If you provide secondary authorization headers,
/// those credentials are used instead.
@@ -600,8 +604,8 @@ public PutDatafeedRequestDescriptor Headers(Func
///
- /// An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the machine
- /// learning nodes must have the remote_cluster_client role.
+ /// An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the master
+ /// nodes and the machine learning nodes must have the remote_cluster_client role.
///
///
public PutDatafeedRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices)
@@ -881,7 +885,9 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
/// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.
/// You can associate only one datafeed with each anomaly detection job.
/// The datafeed contains a query that runs at a defined interval (frequency).
-/// If you are concerned about delayed data, you can add a delay (query_delay) at each interval.
+/// If you are concerned about delayed data, you can add a delay (query_delay') at each interval. By default, the datafeed uses the following query: {"match_all": {"boost": 1}}`.
+///
+///
/// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had
/// at the time of creation and runs the query using those same roles. If you provide secondary authorization headers,
/// those credentials are used instead.
@@ -1038,8 +1044,8 @@ public PutDatafeedRequestDescriptor Headers(Func
///
- /// An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the machine
- /// learning nodes must have the remote_cluster_client role.
+ /// An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the master
+ /// nodes and the machine learning nodes must have the remote_cluster_client role.
///
///
public PutDatafeedRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices)
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobRequest.g.cs
index 7810b59710c..6b657b25509 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobRequest.g.cs
@@ -87,6 +87,7 @@ public sealed partial class PutJobRequestParameters : RequestParameters
///
/// Create an anomaly detection job.
/// If you include a datafeed_config, you must have read index privileges on the source index.
+/// If you include a datafeed_config but do not provide a query, the datafeed uses {"match_all": {"boost": 1}}.
///
///
public sealed partial class PutJobRequest : PlainRequest
@@ -289,6 +290,7 @@ public PutJobRequest(Elastic.Clients.Elasticsearch.Id jobId) : base(r => r.Requi
///
/// Create an anomaly detection job.
/// If you include a datafeed_config, you must have read index privileges on the source index.
+/// If you include a datafeed_config but do not provide a query, the datafeed uses {"match_all": {"boost": 1}}.
///
///
public sealed partial class PutJobRequestDescriptor : RequestDescriptor, PutJobRequestParameters>
@@ -757,6 +759,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
/// Create an anomaly detection job.
/// If you include a datafeed_config, you must have read index privileges on the source index.
+/// If you include a datafeed_config but do not provide a query, the datafeed uses {"match_all": {"boost": 1}}.
///
///
public sealed partial class PutJobRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ValidateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ValidateRequest.g.cs
index 2f532c21c40..9b5d2f7b8ec 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ValidateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ValidateRequest.g.cs
@@ -36,7 +36,7 @@ public sealed partial class ValidateRequestParameters : RequestParameters
///
///
-/// Validates an anomaly detection job.
+/// Validate an anomaly detection job.
///
///
public sealed partial class ValidateRequest : PlainRequest
@@ -71,7 +71,7 @@ public sealed partial class ValidateRequest : PlainRequest
///
-/// Validates an anomaly detection job.
+/// Validate an anomaly detection job.
///
///
public sealed partial class ValidateRequestDescriptor : RequestDescriptor, ValidateRequestParameters>
@@ -337,7 +337,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
-/// Validates an anomaly detection job.
+/// Validate an anomaly detection job.
///
///
public sealed partial class ValidateRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetRequest.g.cs
index 192b345d954..11041d3ecde 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetRequest.g.cs
@@ -110,6 +110,22 @@ public sealed partial class MultiGetRequestParameters : RequestParameters
/// If you specify an index in the request URI, you only need to specify the document IDs in the request body.
/// To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.
///
+///
+/// Filter source fields
+///
+///
+/// By default, the _source field is returned for every document (if stored).
+/// Use the _source and _source_include or source_exclude attributes to filter what fields are returned for a particular document.
+/// You can include the _source, _source_includes, and _source_excludes query parameters in the request URI to specify the defaults to use when there are no per-document instructions.
+///
+///
+/// Get stored fields
+///
+///
+/// Use the stored_fields attribute to specify the set of stored fields you want to retrieve.
+/// Any requested fields that are not stored are ignored.
+/// You can include the stored_fields query parameter in the request URI to specify the defaults to use when there are no per-document instructions.
+///
///
public sealed partial class MultiGetRequest : PlainRequest
{
@@ -232,6 +248,22 @@ public MultiGetRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r
/// If you specify an index in the request URI, you only need to specify the document IDs in the request body.
/// To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.
///
+///
+/// Filter source fields
+///
+///
+/// By default, the _source field is returned for every document (if stored).
+/// Use the _source and _source_include or source_exclude attributes to filter what fields are returned for a particular document.
+/// You can include the _source, _source_includes, and _source_excludes query parameters in the request URI to specify the defaults to use when there are no per-document instructions.
+///
+///
+/// Get stored fields
+///
+///
+/// Use the stored_fields attribute to specify the set of stored fields you want to retrieve.
+/// Any requested fields that are not stored are ignored.
+/// You can include the stored_fields query parameter in the request URI to specify the defaults to use when there are no per-document instructions.
+///
///
public sealed partial class MultiGetRequestDescriptor : RequestDescriptor, MultiGetRequestParameters>
{
@@ -380,6 +412,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
/// If you specify an index in the request URI, you only need to specify the document IDs in the request body.
/// To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.
///
+///
+/// Filter source fields
+///
+///
+/// By default, the _source field is returned for every document (if stored).
+/// Use the _source and _source_include or source_exclude attributes to filter what fields are returned for a particular document.
+/// You can include the _source, _source_includes, and _source_excludes query parameters in the request URI to specify the defaults to use when there are no per-document instructions.
+///
+///
+/// Get stored fields
+///
+///
+/// Use the stored_fields attribute to specify the set of stored fields you want to retrieve.
+/// Any requested fields that are not stored are ignored.
+/// You can include the stored_fields query parameter in the request URI to specify the defaults to use when there are no per-document instructions.
+///
///
public sealed partial class MultiGetRequestDescriptor : RequestDescriptor
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetResponse.g.cs
index 13199e2f0a7..1831e3c54b1 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetResponse.g.cs
@@ -28,6 +28,13 @@ namespace Elastic.Clients.Elasticsearch;
public sealed partial class MultiGetResponse : ElasticsearchResponse
{
+ ///
+ ///
+ /// The response includes a docs array that contains the documents in the order specified in the request.
+ /// The structure of the returned documents is similar to that returned by the get API.
+ /// If there is a failure getting a particular document, the error is included in place of the document.
+ ///
+ ///
[JsonInclude, JsonPropertyName("docs")]
public IReadOnlyCollection> Docs { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchTemplateRequest.g.cs
index 2c558db006d..db526110c63 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchTemplateRequest.g.cs
@@ -43,7 +43,7 @@ public sealed partial class MultiSearchTemplateRequestParameters : RequestParame
///
///
- /// Maximum number of concurrent searches the API can run.
+ /// The maximum number of concurrent searches the API can run.
///
///
public long? MaxConcurrentSearches { get => Q("max_concurrent_searches"); set => Q("max_concurrent_searches", value); }
@@ -59,7 +59,6 @@ public sealed partial class MultiSearchTemplateRequestParameters : RequestParame
///
///
/// The type of the search operation.
- /// Available options: query_then_fetch, dfs_query_then_fetch.
///
///
public Elastic.Clients.Elasticsearch.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); }
@@ -76,6 +75,20 @@ public sealed partial class MultiSearchTemplateRequestParameters : RequestParame
///
/// Run multiple templated searches.
///
+///
+/// Run multiple templated searches with a single request.
+/// If you are providing a text file or text input to curl, use the --data-binary flag instead of -d to preserve newlines.
+/// For example:
+///
+///
+/// $ cat requests
+/// { "index": "my-index" }
+/// { "id": "my-search-template", "params": { "query_string": "hello world", "from": 0, "size": 10 }}
+/// { "index": "my-other-index" }
+/// { "id": "my-other-search-template", "params": { "query_type": "match_all" }}
+///
+/// $ curl -H "Content-Type: application/x-ndjson" -XGET localhost:9200/_msearch/template --data-binary "@requests"; echo
+///
///
public sealed partial class MultiSearchTemplateRequest : PlainRequest, IStreamSerializable
{
@@ -105,7 +118,7 @@ public MultiSearchTemplateRequest(Elastic.Clients.Elasticsearch.Indices? indices
///
///
- /// Maximum number of concurrent searches the API can run.
+ /// The maximum number of concurrent searches the API can run.
///
///
[JsonIgnore]
@@ -123,7 +136,6 @@ public MultiSearchTemplateRequest(Elastic.Clients.Elasticsearch.Indices? indices
///
///
/// The type of the search operation.
- /// Available options: query_then_fetch, dfs_query_then_fetch.
///
///
[JsonIgnore]
@@ -165,6 +177,20 @@ async Task IStreamSerializable.SerializeAsync(Stream stream, IElasticsearchClien
///
/// Run multiple templated searches.
///
+///
+/// Run multiple templated searches with a single request.
+/// If you are providing a text file or text input to curl, use the --data-binary flag instead of -d to preserve newlines.
+/// For example:
+///
+///
+/// $ cat requests
+/// { "index": "my-index" }
+/// { "id": "my-search-template", "params": { "query_string": "hello world", "from": 0, "size": 10 }}
+/// { "index": "my-other-index" }
+/// { "id": "my-other-search-template", "params": { "query_type": "match_all" }}
+///
+/// $ curl -H "Content-Type: application/x-ndjson" -XGET localhost:9200/_msearch/template --data-binary "@requests"; echo
+///
///
public sealed partial class MultiSearchTemplateRequestDescriptor : RequestDescriptor, MultiSearchTemplateRequestParameters>, IStreamSerializable
{
@@ -237,6 +263,20 @@ public MultiSearchTemplateRequestDescriptor AddSearchTemplates(Elasti
///
/// Run multiple templated searches.
///
+///
+/// Run multiple templated searches with a single request.
+/// If you are providing a text file or text input to curl, use the --data-binary flag instead of -d to preserve newlines.
+/// For example:
+///
+///
+/// $ cat requests
+/// { "index": "my-index" }
+/// { "id": "my-search-template", "params": { "query_string": "hello world", "from": 0, "size": 10 }}
+/// { "index": "my-other-index" }
+/// { "id": "my-other-search-template", "params": { "query_type": "match_all" }}
+///
+/// $ curl -H "Content-Type: application/x-ndjson" -XGET localhost:9200/_msearch/template --data-binary "@requests"; echo
+///
///
public sealed partial class MultiSearchTemplateRequestDescriptor : RequestDescriptor, IStreamSerializable
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiTermVectorsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiTermVectorsRequest.g.cs
index 9a6c3ba7206..9005e71cdea 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiTermVectorsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiTermVectorsRequest.g.cs
@@ -34,8 +34,8 @@ public sealed partial class MultiTermVectorsRequestParameters : RequestParameter
{
///
///
- /// Comma-separated list or wildcard expressions of fields to include in the statistics.
- /// Used as the default list unless a specific field list is provided in the completion_fields or fielddata_fields parameters.
+ /// A comma-separated list or wildcard expressions of fields to include in the statistics.
+ /// It is used as the default list unless a specific field list is provided in the completion_fields or fielddata_fields parameters.
///
///
public Elastic.Clients.Elasticsearch.Fields? Fields { get => Q("fields"); set => Q("fields", value); }
@@ -70,8 +70,8 @@ public sealed partial class MultiTermVectorsRequestParameters : RequestParameter
///
///
- /// Specifies the node or shard the operation should be performed on.
- /// Random by default.
+ /// The node or shard the operation should be performed on.
+ /// It is random by default.
///
///
public string? Preference { get => Q("preference"); set => Q("preference", value); }
@@ -85,7 +85,7 @@ public sealed partial class MultiTermVectorsRequestParameters : RequestParameter
///
///
- /// Custom value used to route operations to a specific shard.
+ /// A custom value used to route operations to a specific shard.
///
///
public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); }
@@ -106,7 +106,7 @@ public sealed partial class MultiTermVectorsRequestParameters : RequestParameter
///
///
- /// Specific version type.
+ /// The version type.
///
///
public Elastic.Clients.Elasticsearch.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); }
@@ -117,11 +117,19 @@ public sealed partial class MultiTermVectorsRequestParameters : RequestParameter
/// Get multiple term vectors.
///
///
+/// Get multiple term vectors with a single request.
/// You can specify existing documents by index and ID or provide artificial documents in the body of the request.
/// You can specify the index in the request body or request URI.
/// The response contains a docs array with all the fetched termvectors.
/// Each element has the structure provided by the termvectors API.
///
+///
+/// Artificial documents
+///
+///
+/// You can also use mtermvectors to generate term vectors for artificial documents provided in the body of the request.
+/// The mapping used is determined by the specified _index.
+///
///
public sealed partial class MultiTermVectorsRequest : PlainRequest
{
@@ -143,8 +151,8 @@ public MultiTermVectorsRequest(Elastic.Clients.Elasticsearch.IndexName? index) :
///
///
- /// Comma-separated list or wildcard expressions of fields to include in the statistics.
- /// Used as the default list unless a specific field list is provided in the completion_fields or fielddata_fields parameters.
+ /// A comma-separated list or wildcard expressions of fields to include in the statistics.
+ /// It is used as the default list unless a specific field list is provided in the completion_fields or fielddata_fields parameters.
///
///
[JsonIgnore]
@@ -184,8 +192,8 @@ public MultiTermVectorsRequest(Elastic.Clients.Elasticsearch.IndexName? index) :
///
///
- /// Specifies the node or shard the operation should be performed on.
- /// Random by default.
+ /// The node or shard the operation should be performed on.
+ /// It is random by default.
///
///
[JsonIgnore]
@@ -201,7 +209,7 @@ public MultiTermVectorsRequest(Elastic.Clients.Elasticsearch.IndexName? index) :
///
///
- /// Custom value used to route operations to a specific shard.
+ /// A custom value used to route operations to a specific shard.
///
///
[JsonIgnore]
@@ -225,7 +233,7 @@ public MultiTermVectorsRequest(Elastic.Clients.Elasticsearch.IndexName? index) :
///
///
- /// Specific version type.
+ /// The version type.
///
///
[JsonIgnore]
@@ -233,7 +241,7 @@ public MultiTermVectorsRequest(Elastic.Clients.Elasticsearch.IndexName? index) :
///
///
- /// Array of existing or artificial documents.
+ /// An array of existing or artificial documents.
///
///
[JsonInclude, JsonPropertyName("docs")]
@@ -241,7 +249,7 @@ public MultiTermVectorsRequest(Elastic.Clients.Elasticsearch.IndexName? index) :
///
///
- /// Simplified syntax to specify documents by their ID if they're in the same index.
+ /// A simplified syntax to specify documents by their ID if they're in the same index.
///
///
[JsonInclude, JsonPropertyName("ids")]
@@ -253,11 +261,19 @@ public MultiTermVectorsRequest(Elastic.Clients.Elasticsearch.IndexName? index) :
/// Get multiple term vectors.
///
///
+/// Get multiple term vectors with a single request.
/// You can specify existing documents by index and ID or provide artificial documents in the body of the request.
/// You can specify the index in the request body or request URI.
/// The response contains a docs array with all the fetched termvectors.
/// Each element has the structure provided by the termvectors API.
///
+///
+/// Artificial documents
+///
+///
+/// You can also use mtermvectors to generate term vectors for artificial documents provided in the body of the request.
+/// The mapping used is determined by the specified _index.
+///
///
public sealed partial class MultiTermVectorsRequestDescriptor : RequestDescriptor, MultiTermVectorsRequestParameters>
{
@@ -305,7 +321,7 @@ public MultiTermVectorsRequestDescriptor Index(Elastic.Clients.Elasti
///
///
- /// Array of existing or artificial documents.
+ /// An array of existing or artificial documents.
///
///
public MultiTermVectorsRequestDescriptor Docs(ICollection? docs)
@@ -346,7 +362,7 @@ public MultiTermVectorsRequestDescriptor Docs(params Action
///
- /// Simplified syntax to specify documents by their ID if they're in the same index.
+ /// A simplified syntax to specify documents by their ID if they're in the same index.
///
///
public MultiTermVectorsRequestDescriptor Ids(ICollection? ids)
@@ -404,11 +420,19 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
/// Get multiple term vectors.
///
///
+/// Get multiple term vectors with a single request.
/// You can specify existing documents by index and ID or provide artificial documents in the body of the request.
/// You can specify the index in the request body or request URI.
/// The response contains a docs array with all the fetched termvectors.
/// Each element has the structure provided by the termvectors API.
///
+///
+/// Artificial documents
+///
+///
+/// You can also use mtermvectors to generate term vectors for artificial documents provided in the body of the request.
+/// The mapping used is determined by the specified _index.
+///
///
public sealed partial class MultiTermVectorsRequestDescriptor : RequestDescriptor
{
@@ -456,7 +480,7 @@ public MultiTermVectorsRequestDescriptor Index(Elastic.Clients.Elasticsearch.Ind
///
///
- /// Array of existing or artificial documents.
+ /// An array of existing or artificial documents.
///
///
public MultiTermVectorsRequestDescriptor Docs(ICollection? docs)
@@ -497,7 +521,7 @@ public MultiTermVectorsRequestDescriptor Docs(params Action
///
- /// Simplified syntax to specify documents by their ID if they're in the same index.
+ /// A simplified syntax to specify documents by their ID if they're in the same index.
///
///
public MultiTermVectorsRequestDescriptor Ids(ICollection? ids)
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Nodes/ClearRepositoriesMeteringArchiveResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Nodes/ClearRepositoriesMeteringArchiveResponse.g.cs
index 5b20e33dca1..7e786c95929 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Nodes/ClearRepositoriesMeteringArchiveResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Nodes/ClearRepositoriesMeteringArchiveResponse.g.cs
@@ -30,7 +30,7 @@ public sealed partial class ClearRepositoriesMeteringArchiveResponse : Elasticse
{
///
///
- /// Name of the cluster. Based on the Cluster name setting.
+ /// Name of the cluster. Based on the cluster.name setting.
///
///
[JsonInclude, JsonPropertyName("cluster_name")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Nodes/GetRepositoriesMeteringInfoResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Nodes/GetRepositoriesMeteringInfoResponse.g.cs
index 5699dc4d2fb..cc5ce41da4b 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Nodes/GetRepositoriesMeteringInfoResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Nodes/GetRepositoriesMeteringInfoResponse.g.cs
@@ -30,7 +30,7 @@ public sealed partial class GetRepositoriesMeteringInfoResponse : ElasticsearchR
{
///
///
- /// Name of the cluster. Based on the Cluster name setting.
+ /// Name of the cluster. Based on the cluster.name setting.
///
///
[JsonInclude, JsonPropertyName("cluster_name")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeRequest.g.cs
index 4741472e4d9..8a6b6acbb11 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeRequest.g.cs
@@ -34,6 +34,7 @@ public sealed partial class OpenPointInTimeRequestParameters : RequestParameters
{
///
///
+ /// Indicates whether the point in time tolerates unavailable shards or shard failures when initially creating the PIT.
/// If false, creating a point in time request when a shard is missing or unavailable will throw an exception.
/// If true, the point in time will contain all the shards that are available at the time of the request.
///
@@ -42,9 +43,9 @@ public sealed partial class OpenPointInTimeRequestParameters : RequestParameters
///
///
- /// Type of index that wildcard patterns can match.
+ /// The type of index that wildcard patterns can match.
/// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
- /// Supports comma-separated values, such as open,hidden. Valid values are: all, open, closed, hidden, none.
+ /// It supports comma-separated values, such as open,hidden. Valid values are: all, open, closed, hidden, none.
///
///
public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); }
@@ -58,22 +59,22 @@ public sealed partial class OpenPointInTimeRequestParameters : RequestParameters
///
///
- /// Extends the time to live of the corresponding point in time.
+ /// Extend the length of time that the point in time persists.
///
///
public Elastic.Clients.Elasticsearch.Duration KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); }
///
///
- /// Specifies the node or shard the operation should be performed on.
- /// Random by default.
+ /// The node or shard the operation should be performed on.
+ /// By default, it is random.
///
///
public string? Preference { get => Q("preference"); set => Q("preference", value); }
///
///
- /// Custom value used to route operations to a specific shard.
+ /// A custom value that is used to route operations to a specific shard.
///
///
public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); }
@@ -93,7 +94,42 @@ public sealed partial class OpenPointInTimeRequestParameters : RequestParameters
///
///
/// A point in time must be opened explicitly before being used in search requests.
-/// The keep_alive parameter tells Elasticsearch how long it should persist.
+///
+///
+/// A subsequent search request with the pit parameter must not specify index, routing, or preference values as these parameters are copied from the point in time.
+///
+///
+/// Just like regular searches, you can use from and size to page through point in time search results, up to the first 10,000 hits.
+/// If you want to retrieve more hits, use PIT with search_after.
+///
+///
+/// IMPORTANT: The open point in time request and each subsequent search request can return different identifiers; always use the most recently received ID for the next search request.
+///
+///
+/// When a PIT that contains shard failures is used in a search request, the missing are always reported in the search response as a NoShardAvailableActionException exception.
+/// To get rid of these exceptions, a new PIT needs to be created so that shards missing from the previous PIT can be handled, assuming they become available in the meantime.
+///
+///
+/// Keeping point in time alive
+///
+///
+/// The keep_alive parameter, which is passed to a open point in time request and search request, extends the time to live of the corresponding point in time.
+/// The value does not need to be long enough to process all data — it just needs to be long enough for the next request.
+///
+///
+/// Normally, the background merge process optimizes the index by merging together smaller segments to create new, bigger segments.
+/// Once the smaller segments are no longer needed they are deleted.
+/// However, open point-in-times prevent the old segments from being deleted since they are still in use.
+///
+///
+/// TIP: Keeping older segments alive means that more disk space and file handles are needed.
+/// Ensure that you have configured your nodes to have ample free file handles.
+///
+///
+/// Additionally, if a segment contains deleted or updated documents then the point in time must keep track of whether each document in the segment was live at the time of the initial search request.
+/// Ensure that your nodes have sufficient heap space if you have many open point-in-times on an index that is subject to ongoing deletes or updates.
+/// Note that a point-in-time doesn't prevent its associated indices from being deleted.
+/// You can check how many point-in-times (that is, search contexts) are open with the nodes stats API.
///
///
public sealed partial class OpenPointInTimeRequest : PlainRequest
@@ -112,6 +148,7 @@ public OpenPointInTimeRequest(Elastic.Clients.Elasticsearch.Indices indices) : b
///
///
+ /// Indicates whether the point in time tolerates unavailable shards or shard failures when initially creating the PIT.
/// If false, creating a point in time request when a shard is missing or unavailable will throw an exception.
/// If true, the point in time will contain all the shards that are available at the time of the request.
///
@@ -121,9 +158,9 @@ public OpenPointInTimeRequest(Elastic.Clients.Elasticsearch.Indices indices) : b
///
///
- /// Type of index that wildcard patterns can match.
+ /// The type of index that wildcard patterns can match.
/// If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
- /// Supports comma-separated values, such as open,hidden. Valid values are: all, open, closed, hidden, none.
+ /// It supports comma-separated values, such as open,hidden. Valid values are: all, open, closed, hidden, none.
///
///
[JsonIgnore]
@@ -139,7 +176,7 @@ public OpenPointInTimeRequest(Elastic.Clients.Elasticsearch.Indices indices) : b
///
///
- /// Extends the time to live of the corresponding point in time.
+ /// Extend the length of time that the point in time persists.
///
///
[JsonIgnore]
@@ -147,8 +184,8 @@ public OpenPointInTimeRequest(Elastic.Clients.Elasticsearch.Indices indices) : b
///
///
- /// Specifies the node or shard the operation should be performed on.
- /// Random by default.
+ /// The node or shard the operation should be performed on.
+ /// By default, it is random.
///
///
[JsonIgnore]
@@ -156,7 +193,7 @@ public OpenPointInTimeRequest(Elastic.Clients.Elasticsearch.Indices indices) : b
///
///
- /// Custom value used to route operations to a specific shard.
+ /// A custom value that is used to route operations to a specific shard.
///
///
[JsonIgnore]
@@ -164,7 +201,7 @@ public OpenPointInTimeRequest(Elastic.Clients.Elasticsearch.Indices indices) : b
///
///
- /// Allows to filter indices if the provided query rewrites to match_none on every shard.
+ /// Filter indices if the provided query rewrites to match_none on every shard.
///
///
[JsonInclude, JsonPropertyName("index_filter")]
@@ -185,7 +222,42 @@ public OpenPointInTimeRequest(Elastic.Clients.Elasticsearch.Indices indices) : b
///
///
/// A point in time must be opened explicitly before being used in search requests.
-/// The keep_alive parameter tells Elasticsearch how long it should persist.
+///
+///
+/// A subsequent search request with the pit parameter must not specify index, routing, or preference values as these parameters are copied from the point in time.
+///
+///
+/// Just like regular searches, you can use from and size to page through point in time search results, up to the first 10,000 hits.
+/// If you want to retrieve more hits, use PIT with search_after.
+///
+///
+/// IMPORTANT: The open point in time request and each subsequent search request can return different identifiers; always use the most recently received ID for the next search request.
+///
+///
+/// When a PIT that contains shard failures is used in a search request, the missing are always reported in the search response as a NoShardAvailableActionException exception.
+/// To get rid of these exceptions, a new PIT needs to be created so that shards missing from the previous PIT can be handled, assuming they become available in the meantime.
+///
+///
+/// Keeping point in time alive
+///
+///
+/// The keep_alive parameter, which is passed to a open point in time request and search request, extends the time to live of the corresponding point in time.
+/// The value does not need to be long enough to process all data — it just needs to be long enough for the next request.
+///
+///
+/// Normally, the background merge process optimizes the index by merging together smaller segments to create new, bigger segments.
+/// Once the smaller segments are no longer needed they are deleted.
+/// However, open point-in-times prevent the old segments from being deleted since they are still in use.
+///
+///
+/// TIP: Keeping older segments alive means that more disk space and file handles are needed.
+/// Ensure that you have configured your nodes to have ample free file handles.
+///
+///
+/// Additionally, if a segment contains deleted or updated documents then the point in time must keep track of whether each document in the segment was live at the time of the initial search request.
+/// Ensure that your nodes have sufficient heap space if you have many open point-in-times on an index that is subject to ongoing deletes or updates.
+/// Note that a point-in-time doesn't prevent its associated indices from being deleted.
+/// You can check how many point-in-times (that is, search contexts) are open with the nodes stats API.
///
///
public sealed partial class OpenPointInTimeRequestDescriptor : RequestDescriptor, OpenPointInTimeRequestParameters>
@@ -227,7 +299,7 @@ public OpenPointInTimeRequestDescriptor Indices(Elastic.Clients.Elast
///
///
- /// Allows to filter indices if the provided query rewrites to match_none on every shard.
+ /// Filter indices if the provided query rewrites to match_none on every shard.
///
///
public OpenPointInTimeRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? indexFilter)
@@ -291,7 +363,42 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// A point in time must be opened explicitly before being used in search requests.
-/// The keep_alive parameter tells Elasticsearch how long it should persist.
+///
+///
+/// A subsequent search request with the pit parameter must not specify index, routing, or preference values as these parameters are copied from the point in time.
+///
+///
+/// Just like regular searches, you can use from and size to page through point in time search results, up to the first 10,000 hits.
+/// If you want to retrieve more hits, use PIT with search_after.
+///
+///
+/// IMPORTANT: The open point in time request and each subsequent search request can return different identifiers; always use the most recently received ID for the next search request.
+///
+///
+/// When a PIT that contains shard failures is used in a search request, the missing are always reported in the search response as a NoShardAvailableActionException exception.
+/// To get rid of these exceptions, a new PIT needs to be created so that shards missing from the previous PIT can be handled, assuming they become available in the meantime.
+///
+///
+/// Keeping point in time alive
+///
+///
+/// The keep_alive parameter, which is passed to a open point in time request and search request, extends the time to live of the corresponding point in time.
+/// The value does not need to be long enough to process all data — it just needs to be long enough for the next request.
+///
+///
+/// Normally, the background merge process optimizes the index by merging together smaller segments to create new, bigger segments.
+/// Once the smaller segments are no longer needed they are deleted.
+/// However, open point-in-times prevent the old segments from being deleted since they are still in use.
+///
+///
+/// TIP: Keeping older segments alive means that more disk space and file handles are needed.
+/// Ensure that you have configured your nodes to have ample free file handles.
+///
+///
+/// Additionally, if a segment contains deleted or updated documents then the point in time must keep track of whether each document in the segment was live at the time of the initial search request.
+/// Ensure that your nodes have sufficient heap space if you have many open point-in-times on an index that is subject to ongoing deletes or updates.
+/// Note that a point-in-time doesn't prevent its associated indices from being deleted.
+/// You can check how many point-in-times (that is, search contexts) are open with the nodes stats API.
///
///
public sealed partial class OpenPointInTimeRequestDescriptor : RequestDescriptor
@@ -329,7 +436,7 @@ public OpenPointInTimeRequestDescriptor Indices(Elastic.Clients.Elasticsearch.In
///
///
- /// Allows to filter indices if the provided query rewrites to match_none on every shard.
+ /// Filter indices if the provided query rewrites to match_none on every shard.
///
///
public OpenPointInTimeRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? indexFilter)
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/PutScriptRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/PutScriptRequest.g.cs
index 91d6b99e3cf..30a9ae556c2 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/PutScriptRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/PutScriptRequest.g.cs
@@ -34,16 +34,18 @@ public sealed partial class PutScriptRequestParameters : RequestParameters
{
///
///
- /// Period to wait for a connection to the master node.
+ /// The period to wait for a connection to the master node.
/// If no response is received before the timeout expires, the request fails and returns an error.
+ /// It can also be set to -1 to indicate that the request should never timeout.
///
///
public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); }
///
///
- /// Period to wait for a response.
+ /// The period to wait for a response.
/// If no response is received before the timeout expires, the request fails and returns an error.
+ /// It can also be set to -1 to indicate that the request should never timeout.
///
///
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); }
@@ -75,8 +77,9 @@ public PutScriptRequest(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Ela
///
///
- /// Period to wait for a connection to the master node.
+ /// The period to wait for a connection to the master node.
/// If no response is received before the timeout expires, the request fails and returns an error.
+ /// It can also be set to -1 to indicate that the request should never timeout.
///
///
[JsonIgnore]
@@ -84,8 +87,9 @@ public PutScriptRequest(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Ela
///
///
- /// Period to wait for a response.
+ /// The period to wait for a response.
/// If no response is received before the timeout expires, the request fails and returns an error.
+ /// It can also be set to -1 to indicate that the request should never timeout.
///
///
[JsonIgnore]
@@ -93,7 +97,7 @@ public PutScriptRequest(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Ela
///
///
- /// Contains the script or search template, its parameters, and its language.
+ /// The script or search template, its parameters, and its language.
///
///
[JsonInclude, JsonPropertyName("script")]
@@ -147,7 +151,7 @@ public PutScriptRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id
///
///
- /// Contains the script or search template, its parameters, and its language.
+ /// The script or search template, its parameters, and its language.
///
///
public PutScriptRequestDescriptor Script(Elastic.Clients.Elasticsearch.StoredScript script)
@@ -244,7 +248,7 @@ public PutScriptRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id)
///
///
- /// Contains the script or search template, its parameters, and its language.
+ /// The script or search template, its parameters, and its language.
///
///
public PutScriptRequestDescriptor Script(Elastic.Clients.Elasticsearch.StoredScript script)
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/DeleteRuleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/DeleteRuleRequest.g.cs
index 5db5e648058..4ee5638c217 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/DeleteRuleRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/DeleteRuleRequest.g.cs
@@ -38,6 +38,7 @@ public sealed partial class DeleteRuleRequestParameters : RequestParameters
///
/// Delete a query rule.
/// Delete a query rule within a query ruleset.
+/// This is a destructive action that is only recoverable by re-adding the same rule with the create or update query rule API.
///
///
public sealed partial class DeleteRuleRequest : PlainRequest
@@ -59,6 +60,7 @@ public DeleteRuleRequest(Elastic.Clients.Elasticsearch.Id rulesetId, Elastic.Cli
///
/// Delete a query rule.
/// Delete a query rule within a query ruleset.
+/// This is a destructive action that is only recoverable by re-adding the same rule with the create or update query rule API.
///
///
public sealed partial class DeleteRuleRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/DeleteRulesetRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/DeleteRulesetRequest.g.cs
index c9ff402c290..138ef634f74 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/DeleteRulesetRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/DeleteRulesetRequest.g.cs
@@ -37,6 +37,8 @@ public sealed partial class DeleteRulesetRequestParameters : RequestParameters
///
///
/// Delete a query ruleset.
+/// Remove a query ruleset and its associated data.
+/// This is a destructive action that is not recoverable.
///
///
public sealed partial class DeleteRulesetRequest : PlainRequest
@@ -57,6 +59,8 @@ public DeleteRulesetRequest(Elastic.Clients.Elasticsearch.Id rulesetId) : base(r
///
///
/// Delete a query ruleset.
+/// Remove a query ruleset and its associated data.
+/// This is a destructive action that is not recoverable.
///
///
public sealed partial class DeleteRulesetRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/GetRuleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/GetRuleResponse.g.cs
index 014f75a2f0f..b66e024dbbf 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/GetRuleResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/GetRuleResponse.g.cs
@@ -28,15 +28,42 @@ namespace Elastic.Clients.Elasticsearch.QueryRules;
public sealed partial class GetRuleResponse : ElasticsearchResponse
{
+ ///
+ ///
+ /// The actions to take when the rule is matched.
+ /// The format of this action depends on the rule type.
+ ///
+ ///
[JsonInclude, JsonPropertyName("actions")]
public Elastic.Clients.Elasticsearch.QueryRules.QueryRuleActions Actions { get; init; }
+
+ ///
+ ///
+ /// The criteria that must be met for the rule to be applied.
+ /// If multiple criteria are specified for a rule, all criteria must be met for the rule to be applied.
+ ///
+ ///
[JsonInclude, JsonPropertyName("criteria")]
[SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryRules.QueryRuleCriteria))]
public IReadOnlyCollection Criteria { get; init; }
[JsonInclude, JsonPropertyName("priority")]
public int? Priority { get; init; }
+
+ ///
+ ///
+ /// A unique identifier for the rule.
+ ///
+ ///
[JsonInclude, JsonPropertyName("rule_id")]
public string RuleId { get; init; }
+
+ ///
+ ///
+ /// The type of rule.
+ /// pinned will identify and pin specific documents to the top of search results.
+ /// exclude will exclude specific documents from search results.
+ ///
+ ///
[JsonInclude, JsonPropertyName("type")]
public Elastic.Clients.Elasticsearch.QueryRules.QueryRuleType Type { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/GetRulesetResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/GetRulesetResponse.g.cs
index c0fef19badb..d4cef289e17 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/GetRulesetResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/GetRulesetResponse.g.cs
@@ -30,7 +30,7 @@ public sealed partial class GetRulesetResponse : ElasticsearchResponse
{
///
///
- /// Rules associated with the query ruleset
+ /// Rules associated with the query ruleset.
///
///
[JsonInclude, JsonPropertyName("rules")]
@@ -38,7 +38,7 @@ public sealed partial class GetRulesetResponse : ElasticsearchResponse
///
///
- /// Query Ruleset unique identifier
+ /// A unique identifier for the ruleset.
///
///
[JsonInclude, JsonPropertyName("ruleset_id")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/ListRulesetsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/ListRulesetsRequest.g.cs
index 1c0b5e1be87..3073fd3f1fa 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/ListRulesetsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/ListRulesetsRequest.g.cs
@@ -34,14 +34,14 @@ public sealed partial class ListRulesetsRequestParameters : RequestParameters
{
///
///
- /// Starting offset (default: 0)
+ /// The offset from the first result to fetch.
///
///
public int? From { get => Q("from"); set => Q("from", value); }
///
///
- /// specifies a max number of results to get
+ /// The maximum number of results to retrieve.
///
///
public int? Size { get => Q("size"); set => Q("size", value); }
@@ -65,7 +65,7 @@ public sealed partial class ListRulesetsRequest : PlainRequest
///
- /// Starting offset (default: 0)
+ /// The offset from the first result to fetch.
///
///
[JsonIgnore]
@@ -73,7 +73,7 @@ public sealed partial class ListRulesetsRequest : PlainRequest
///
- /// specifies a max number of results to get
+ /// The maximum number of results to retrieve.
///
///
[JsonIgnore]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/PutRuleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/PutRuleRequest.g.cs
index b9287c5cda7..0fd2174e097 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/PutRuleRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/PutRuleRequest.g.cs
@@ -39,6 +39,12 @@ public sealed partial class PutRuleRequestParameters : RequestParameters
/// Create or update a query rule.
/// Create or update a query rule within a query ruleset.
///
+///
+/// IMPORTANT: Due to limitations within pinned queries, you can only pin documents using ids or docs, but cannot use both in single rule.
+/// It is advised to use one or the other in query rulesets, to avoid errors.
+/// Additionally, pinned queries have a maximum limit of 100 pinned hits.
+/// If multiple matching rules pin more than 100 documents, only the first 100 documents are pinned in the order they are specified in the ruleset.
+///
///
public sealed partial class PutRuleRequest : PlainRequest
{
@@ -54,13 +60,32 @@ public PutRuleRequest(Elastic.Clients.Elasticsearch.Id rulesetId, Elastic.Client
internal override string OperationName => "query_rules.put_rule";
+ ///
+ ///
+ /// The actions to take when the rule is matched.
+ /// The format of this action depends on the rule type.
+ ///
+ ///
[JsonInclude, JsonPropertyName("actions")]
public Elastic.Clients.Elasticsearch.QueryRules.QueryRuleActions Actions { get; set; }
+
+ ///
+ ///
+ /// The criteria that must be met for the rule to be applied.
+ /// If multiple criteria are specified for a rule, all criteria must be met for the rule to be applied.
+ ///
+ ///
[JsonInclude, JsonPropertyName("criteria")]
[SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryRules.QueryRuleCriteria))]
public ICollection Criteria { get; set; }
[JsonInclude, JsonPropertyName("priority")]
public int? Priority { get; set; }
+
+ ///
+ ///
+ /// The type of rule.
+ ///
+ ///
[JsonInclude, JsonPropertyName("type")]
public Elastic.Clients.Elasticsearch.QueryRules.QueryRuleType Type { get; set; }
}
@@ -70,6 +95,12 @@ public PutRuleRequest(Elastic.Clients.Elasticsearch.Id rulesetId, Elastic.Client
/// Create or update a query rule.
/// Create or update a query rule within a query ruleset.
///
+///
+/// IMPORTANT: Due to limitations within pinned queries, you can only pin documents using ids or docs, but cannot use both in single rule.
+/// It is advised to use one or the other in query rulesets, to avoid errors.
+/// Additionally, pinned queries have a maximum limit of 100 pinned hits.
+/// If multiple matching rules pin more than 100 documents, only the first 100 documents are pinned in the order they are specified in the ruleset.
+///
///
public sealed partial class PutRuleRequestDescriptor : RequestDescriptor
{
@@ -109,6 +140,12 @@ public PutRuleRequestDescriptor RulesetId(Elastic.Clients.Elasticsearch.Id rules
private int? PriorityValue { get; set; }
private Elastic.Clients.Elasticsearch.QueryRules.QueryRuleType TypeValue { get; set; }
+ ///
+ ///
+ /// The actions to take when the rule is matched.
+ /// The format of this action depends on the rule type.
+ ///
+ ///
public PutRuleRequestDescriptor Actions(Elastic.Clients.Elasticsearch.QueryRules.QueryRuleActions actions)
{
ActionsDescriptor = null;
@@ -133,6 +170,12 @@ public PutRuleRequestDescriptor Actions(Action
+ ///
+ /// The criteria that must be met for the rule to be applied.
+ /// If multiple criteria are specified for a rule, all criteria must be met for the rule to be applied.
+ ///
+ ///
public PutRuleRequestDescriptor Criteria(ICollection criteria)
{
CriteriaDescriptor = null;
@@ -175,6 +218,11 @@ public PutRuleRequestDescriptor Priority(int? priority)
return Self;
}
+ ///
+ ///
+ /// The type of rule.
+ ///
+ ///
public PutRuleRequestDescriptor Type(Elastic.Clients.Elasticsearch.QueryRules.QueryRuleType type)
{
TypeValue = type;
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/PutRulesetRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/PutRulesetRequest.g.cs
index 3d91b4e2890..86ddbaede4e 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/PutRulesetRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/PutRulesetRequest.g.cs
@@ -37,6 +37,14 @@ public sealed partial class PutRulesetRequestParameters : RequestParameters
///
///
/// Create or update a query ruleset.
+/// There is a limit of 100 rules per ruleset.
+/// This limit can be increased by using the xpack.applications.rules.max_rules_per_ruleset cluster setting.
+///
+///
+/// IMPORTANT: Due to limitations within pinned queries, you can only select documents using ids or docs, but cannot use both in single rule.
+/// It is advised to use one or the other in query rulesets, to avoid errors.
+/// Additionally, pinned queries have a maximum limit of 100 pinned hits.
+/// If multiple matching rules pin more than 100 documents, only the first 100 documents are pinned in the order they are specified in the ruleset.
///
///
public sealed partial class PutRulesetRequest : PlainRequest
@@ -61,6 +69,14 @@ public PutRulesetRequest(Elastic.Clients.Elasticsearch.Id rulesetId) : base(r =>
///
///
/// Create or update a query ruleset.
+/// There is a limit of 100 rules per ruleset.
+/// This limit can be increased by using the xpack.applications.rules.max_rules_per_ruleset cluster setting.
+///
+///
+/// IMPORTANT: Due to limitations within pinned queries, you can only select documents using ids or docs, but cannot use both in single rule.
+/// It is advised to use one or the other in query rulesets, to avoid errors.
+/// Additionally, pinned queries have a maximum limit of 100 pinned hits.
+/// If multiple matching rules pin more than 100 documents, only the first 100 documents are pinned in the order they are specified in the ruleset.
///
///
public sealed partial class PutRulesetRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/TestRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/TestRequest.g.cs
index 973d126cfdb..04d3da58199 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/TestRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/TestRequest.g.cs
@@ -54,6 +54,12 @@ public TestRequest(Elastic.Clients.Elasticsearch.Id rulesetId) : base(r => r.Req
internal override string OperationName => "query_rules.test";
+ ///
+ ///
+ /// The match criteria to apply to rules in the given query ruleset.
+ /// Match criteria should match the keys defined in the criteria.metadata field of the rule.
+ ///
+ ///
[JsonInclude, JsonPropertyName("match_criteria")]
public IDictionary MatchCriteria { get; set; }
}
@@ -88,6 +94,12 @@ public TestRequestDescriptor RulesetId(Elastic.Clients.Elasticsearch.Id rulesetI
private IDictionary MatchCriteriaValue { get; set; }
+ ///
+ ///
+ /// The match criteria to apply to rules in the given query ruleset.
+ /// Match criteria should match the keys defined in the criteria.metadata field of the rule.
+ ///
+ ///
public TestRequestDescriptor MatchCriteria(Func, FluentDictionary> selector)
{
MatchCriteriaValue = selector?.Invoke(new FluentDictionary());
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs
index fa7c00a14bd..428503821c2 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs
@@ -42,7 +42,7 @@ public sealed partial class ReindexRequestParameters : RequestParameters
///
///
/// The throttle for this request in sub-requests per second.
- /// Defaults to no throttle.
+ /// By default, there is no throttle.
///
///
public float? RequestsPerSecond { get => Q("requests_per_second"); set => Q("requests_per_second", value); }
@@ -56,7 +56,7 @@ public sealed partial class ReindexRequestParameters : RequestParameters
///
///
- /// Specifies how long a consistent view of the index should be maintained for scrolled search.
+ /// The period of time that a consistent view of the index should be maintained for scrolled search.
///
///
public Elastic.Clients.Elasticsearch.Duration? Scroll { get => Q("scroll"); set => Q("scroll", value); }
@@ -64,14 +64,28 @@ public sealed partial class ReindexRequestParameters : RequestParameters
///
///
/// The number of slices this task should be divided into.
- /// Defaults to 1 slice, meaning the task isn’t sliced into subtasks.
+ /// It defaults to one slice, which means the task isn't sliced into subtasks.
+ ///
+ ///
+ /// Reindex supports sliced scroll to parallelize the reindexing process.
+ /// This parallelization can improve efficiency and provide a convenient way to break the request down into smaller parts.
+ ///
+ ///
+ /// NOTE: Reindexing from remote clusters does not support manual or automatic slicing.
+ ///
+ ///
+ /// If set to auto, Elasticsearch chooses the number of slices to use.
+ /// This setting will use one slice per shard, up to a certain limit.
+ /// If there are multiple sources, it will choose the number of slices based on the index or backing index with the smallest number of shards.
///
///
public Elastic.Clients.Elasticsearch.Slices? Slices { get => Q("slices"); set => Q("slices", value); }
///
///
- /// Period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards.
+ /// The period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards.
+ /// By default, Elasticsearch waits for at least one minute before failing.
+ /// The actual wait time could be longer, particularly when multiple waits occur.
///
///
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); }
@@ -79,7 +93,8 @@ public sealed partial class ReindexRequestParameters : 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).
+ /// Set it to all or any positive integer up to the total number of shards in the index (number_of_replicas+1).
+ /// The default value is one, which means it waits for each primary shard to be active.
///
///
public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); }
@@ -95,7 +110,294 @@ public sealed partial class ReindexRequestParameters : RequestParameters
///
///
/// Reindex documents.
-/// Copies documents from a source to a destination. The source can be any existing index, alias, or data stream. The destination must differ from the source. For example, you cannot reindex a data stream into itself.
+///
+///
+/// Copy documents from a source to a destination.
+/// You can copy all documents to the destination index or reindex a subset of the documents.
+/// The source can be any existing index, alias, or data stream.
+/// The destination must differ from the source.
+/// For example, you cannot reindex a data stream into itself.
+///
+///
+/// IMPORTANT: Reindex requires _source to be enabled for all documents in the source.
+/// The destination should be configured as wanted before calling the reindex API.
+/// Reindex does not copy the settings from the source or its associated template.
+/// Mappings, shard counts, and replicas, for example, must be configured ahead of time.
+///
+///
+/// If the Elasticsearch security features are enabled, you must have the following security privileges:
+///
+///
+/// -
+///
+/// The read index privilege for the source data stream, index, or alias.
+///
+///
+/// -
+///
+/// The write index privilege for the destination data stream, index, or index alias.
+///
+///
+/// -
+///
+/// To automatically create a data stream or index with a reindex API request, you must have the auto_configure, create_index, or manage index privilege for the destination data stream, index, or alias.
+///
+///
+/// -
+///
+/// If reindexing from a remote cluster, the source.remote.user must have the monitor cluster privilege and the read index privilege for the source data stream, index, or alias.
+///
+///
+///
+///
+/// If reindexing from a remote cluster, you must explicitly allow the remote host in the reindex.remote.whitelist setting.
+/// Automatic data stream creation requires a matching index template with data stream enabled.
+///
+///
+/// The dest element can be configured like the index API to control optimistic concurrency control.
+/// Omitting version_type or setting it to internal causes Elasticsearch to blindly dump documents into the destination, overwriting any that happen to have the same ID.
+///
+///
+/// Setting version_type to external causes Elasticsearch to preserve the version from the source, create any documents that are missing, and update any documents that have an older version in the destination than they do in the source.
+///
+///
+/// Setting op_type to create causes the reindex API to create only missing documents in the destination.
+/// All existing documents will cause a version conflict.
+///
+///
+/// IMPORTANT: Because data streams are append-only, any reindex request to a destination data stream must have an op_type of create.
+/// A reindex can only add new documents to a destination data stream.
+/// It cannot update existing documents in a destination data stream.
+///
+///
+/// By default, version conflicts abort the reindex process.
+/// To continue reindexing if there are conflicts, set the conflicts request body property to proceed.
+/// In this case, the response includes a count of the version conflicts that were encountered.
+/// Note that the handling of other error types is unaffected by the conflicts property.
+/// Additionally, if you opt to count version conflicts, the operation could attempt to reindex more documents from the source than max_docs until it has successfully indexed max_docs documents into the target or it has gone through every document in the source query.
+///
+///
+/// NOTE: The reindex API makes no effort to handle ID collisions.
+/// The last document written will "win" but the order isn't usually predictable so it is not a good idea to rely on this behavior.
+/// Instead, make sure that IDs are unique by using a script.
+///
+///
+/// Running reindex asynchronously
+///
+///
+/// If the request contains wait_for_completion=false, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to cancel or get the status of the task.
+/// Elasticsearch creates a record of this task as a document at _tasks/<task_id>.
+///
+///
+/// Reindex from multiple sources
+///
+///
+/// If you have many sources to reindex it is generally better to reindex them one at a time rather than using a glob pattern to pick up multiple sources.
+/// That way you can resume the process if there are any errors by removing the partially completed source and starting over.
+/// It also makes parallelizing the process fairly simple: split the list of sources to reindex and run each list in parallel.
+///
+///
+/// For example, you can use a bash script like this:
+///
+///
+/// for index in i1 i2 i3 i4 i5; do
+/// curl -HContent-Type:application/json -XPOST localhost:9200/_reindex?pretty -d'{
+/// "source": {
+/// "index": "'$index'"
+/// },
+/// "dest": {
+/// "index": "'$index'-reindexed"
+/// }
+/// }'
+/// done
+///
+///
+/// ** Throttling**
+///
+///
+/// Set requests_per_second to any positive decimal number (1.4, 6, 1000, for example) to throttle the rate at which reindex issues batches of index operations.
+/// Requests are throttled by padding each batch with a wait time.
+/// To turn off throttling, set requests_per_second to -1.
+///
+///
+/// The throttling is done by waiting between batches so that the scroll that reindex uses internally can be given a timeout that takes into account the padding.
+/// The padding time is the difference between the batch size divided by the requests_per_second and the time spent writing.
+/// By default the batch size is 1000, so if requests_per_second is set to 500:
+///
+///
+/// target_time = 1000 / 500 per second = 2 seconds
+/// wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds
+///
+///
+/// Since the batch is issued as a single bulk request, large batch sizes cause Elasticsearch to create many requests and then wait for a while before starting the next set.
+/// This is "bursty" instead of "smooth".
+///
+///
+/// Slicing
+///
+///
+/// Reindex supports sliced scroll to parallelize the reindexing process.
+/// This parallelization can improve efficiency and provide a convenient way to break the request down into smaller parts.
+///
+///
+/// NOTE: Reindexing from remote clusters does not support manual or automatic slicing.
+///
+///
+/// You can slice a reindex request manually by providing a slice ID and total number of slices to each request.
+/// You can also let reindex automatically parallelize by using sliced scroll to slice on _id.
+/// The slices parameter specifies the number of slices to use.
+///
+///
+/// Adding slices to the reindex request just automates the manual process, creating sub-requests which means it has some quirks:
+///
+///
+/// -
+///
+/// You can see these requests in the tasks API. These sub-requests are "child" tasks of the task for the request with slices.
+///
+///
+/// -
+///
+/// Fetching the status of the task for the request with slices only contains the status of completed slices.
+///
+///
+/// -
+///
+/// These sub-requests are individually addressable for things like cancellation and rethrottling.
+///
+///
+/// -
+///
+/// Rethrottling the request with slices will rethrottle the unfinished sub-request proportionally.
+///
+///
+/// -
+///
+/// Canceling the request with slices will cancel each sub-request.
+///
+///
+/// -
+///
+/// Due to the nature of slices, each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.
+///
+///
+/// -
+///
+/// Parameters like requests_per_second and max_docs on a request with slices are distributed proportionally to each sub-request. Combine that with the previous point about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being reindexed.
+///
+///
+/// -
+///
+/// Each sub-request gets a slightly different snapshot of the source, though these are all taken at approximately the same time.
+///
+///
+///
+///
+/// If slicing automatically, setting slices to auto will choose a reasonable number for most indices.
+/// If slicing manually or otherwise tuning automatic slicing, use the following guidelines.
+///
+///
+/// Query performance is most efficient when the number of slices is equal to the number of shards in the index.
+/// If that number is large (for example, 500), choose a lower number as too many slices will hurt performance.
+/// Setting slices higher than the number of shards generally does not improve efficiency and adds overhead.
+///
+///
+/// Indexing performance scales linearly across available resources with the number of slices.
+///
+///
+/// Whether query or indexing performance dominates the runtime depends on the documents being reindexed and cluster resources.
+///
+///
+/// Modify documents during reindexing
+///
+///
+/// Like _update_by_query, reindex operations support a script that modifies the document.
+/// Unlike _update_by_query, the script is allowed to modify the document's metadata.
+///
+///
+/// Just as in _update_by_query, you can set ctx.op to change the operation that is run on the destination.
+/// For example, set ctx.op to noop if your script decides that the document doesn’t have to be indexed in the destination. This "no operation" will be reported in the noop counter in the response body.
+/// Set ctx.op to delete if your script decides that the document must be deleted from the destination.
+/// The deletion will be reported in the deleted counter in the response body.
+/// Setting ctx.op to anything else will return an error, as will setting any other field in ctx.
+///
+///
+/// Think of the possibilities! Just be careful; you are able to change:
+///
+///
+/// -
+///
+/// _id
+///
+///
+/// -
+///
+/// _index
+///
+///
+/// -
+///
+/// _version
+///
+///
+/// -
+///
+/// _routing
+///
+///
+///
+///
+/// Setting _version to null or clearing it from the ctx map is just like not sending the version in an indexing request.
+/// It will cause the document to be overwritten in the destination regardless of the version on the target or the version type you use in the reindex API.
+///
+///
+/// Reindex from remote
+///
+///
+/// Reindex supports reindexing from a remote Elasticsearch cluster.
+/// The host parameter must contain a scheme, host, port, and optional path.
+/// The username and password parameters are optional and when they are present the reindex operation will connect to the remote Elasticsearch node using basic authentication.
+/// Be sure to use HTTPS when using basic authentication or the password will be sent in plain text.
+/// There are a range of settings available to configure the behavior of the HTTPS connection.
+///
+///
+/// When using Elastic Cloud, it is also possible to authenticate against the remote cluster through the use of a valid API key.
+/// Remote hosts must be explicitly allowed with the reindex.remote.whitelist setting.
+/// It can be set to a comma delimited list of allowed remote host and port combinations.
+/// Scheme is ignored; only the host and port are used.
+/// For example:
+///
+///
+/// reindex.remote.whitelist: [otherhost:9200, another:9200, 127.0.10.*:9200, localhost:*"]
+///
+///
+/// The list of allowed hosts must be configured on any nodes that will coordinate the reindex.
+/// This feature should work with remote clusters of any version of Elasticsearch.
+/// This should enable you to upgrade from any version of Elasticsearch to the current version by reindexing from a cluster of the old version.
+///
+///
+/// WARNING: Elasticsearch does not support forward compatibility across major versions.
+/// For example, you cannot reindex from a 7.x cluster into a 6.x cluster.
+///
+///
+/// To enable queries sent to older versions of Elasticsearch, the query parameter is sent directly to the remote host without validation or modification.
+///
+///
+/// NOTE: Reindexing from remote clusters does not support manual or automatic slicing.
+///
+///
+/// Reindexing from a remote server uses an on-heap buffer that defaults to a maximum size of 100mb.
+/// If the remote index includes very large documents you'll need to use a smaller batch size.
+/// It is also possible to set the socket read timeout on the remote connection with the socket_timeout field and the connection timeout with the connect_timeout field.
+/// Both default to 30 seconds.
+///
+///
+/// Configuring SSL parameters
+///
+///
+/// Reindex from remote supports configurable SSL settings.
+/// These must be specified in the elasticsearch.yml file, with the exception of the secure settings, which you add in the Elasticsearch keystore.
+/// It is not possible to configure SSL in the body of the reindex request.
///
///
public sealed partial class ReindexRequest : PlainRequest
@@ -119,7 +421,7 @@ public sealed partial class ReindexRequest : PlainRequest
///
/// The throttle for this request in sub-requests per second.
- /// Defaults to no throttle.
+ /// By default, there is no throttle.
///
///
[JsonIgnore]
@@ -135,7 +437,7 @@ public sealed partial class ReindexRequest : PlainRequest
///
- /// Specifies how long a consistent view of the index should be maintained for scrolled search.
+ /// The period of time that a consistent view of the index should be maintained for scrolled search.
///
///
[JsonIgnore]
@@ -144,7 +446,19 @@ public sealed partial class ReindexRequest : PlainRequest
///
/// The number of slices this task should be divided into.
- /// Defaults to 1 slice, meaning the task isn’t sliced into subtasks.
+ /// It defaults to one slice, which means the task isn't sliced into subtasks.
+ ///
+ ///
+ /// Reindex supports sliced scroll to parallelize the reindexing process.
+ /// This parallelization can improve efficiency and provide a convenient way to break the request down into smaller parts.
+ ///
+ ///
+ /// NOTE: Reindexing from remote clusters does not support manual or automatic slicing.
+ ///
+ ///
+ /// If set to auto, Elasticsearch chooses the number of slices to use.
+ /// This setting will use one slice per shard, up to a certain limit.
+ /// If there are multiple sources, it will choose the number of slices based on the index or backing index with the smallest number of shards.
///
///
[JsonIgnore]
@@ -152,7 +466,9 @@ public sealed partial class ReindexRequest : PlainRequest
///
- /// Period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards.
+ /// The period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards.
+ /// By default, Elasticsearch waits for at least one minute before failing.
+ /// The actual wait time could be longer, particularly when multiple waits occur.
///
///
[JsonIgnore]
@@ -161,7 +477,8 @@ public sealed partial class ReindexRequest : PlainRequest
///
/// 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).
+ /// Set it to all or any positive integer up to the total number of shards in the index (number_of_replicas+1).
+ /// The default value is one, which means it waits for each primary shard to be active.
///
///
[JsonIgnore]
@@ -177,7 +494,7 @@ public sealed partial class ReindexRequest : PlainRequest
///
- /// Set to proceed to continue reindexing even if there are conflicts.
+ /// Indicates whether to continue reindexing even when there are conflicts.
///
///
[JsonInclude, JsonPropertyName("conflicts")]
@@ -194,6 +511,11 @@ public sealed partial class ReindexRequest : PlainRequest
///
/// The maximum number of documents to reindex.
+ /// By default, all documents are reindexed.
+ /// If it is a value less then or equal to scroll_size, a scroll will not be used to retrieve the results for the operation.
+ ///
+ ///
+ /// If conflicts is set to proceed, the reindex operation could attempt to reindex more documents from the source than max_docs until it has successfully indexed max_docs documents into the target or it has gone through every document in the source query.
///
///
[JsonInclude, JsonPropertyName("max_docs")]
@@ -221,7 +543,294 @@ public sealed partial class ReindexRequest : PlainRequest
///
/// Reindex documents.
-/// Copies documents from a source to a destination. The source can be any existing index, alias, or data stream. The destination must differ from the source. For example, you cannot reindex a data stream into itself.
+///
+///
+/// Copy documents from a source to a destination.
+/// You can copy all documents to the destination index or reindex a subset of the documents.
+/// The source can be any existing index, alias, or data stream.
+/// The destination must differ from the source.
+/// For example, you cannot reindex a data stream into itself.
+///
+///
+/// IMPORTANT: Reindex requires _source to be enabled for all documents in the source.
+/// The destination should be configured as wanted before calling the reindex API.
+/// Reindex does not copy the settings from the source or its associated template.
+/// Mappings, shard counts, and replicas, for example, must be configured ahead of time.
+///
+///
+/// If the Elasticsearch security features are enabled, you must have the following security privileges:
+///
+///
+/// -
+///
+/// The read index privilege for the source data stream, index, or alias.
+///
+///
+/// -
+///
+/// The write index privilege for the destination data stream, index, or index alias.
+///
+///
+/// -
+///
+/// To automatically create a data stream or index with a reindex API request, you must have the auto_configure, create_index, or manage index privilege for the destination data stream, index, or alias.
+///
+///
+/// -
+///
+/// If reindexing from a remote cluster, the source.remote.user must have the monitor cluster privilege and the read index privilege for the source data stream, index, or alias.
+///
+///
+///
+///
+/// If reindexing from a remote cluster, you must explicitly allow the remote host in the reindex.remote.whitelist setting.
+/// Automatic data stream creation requires a matching index template with data stream enabled.
+///
+///
+/// The dest element can be configured like the index API to control optimistic concurrency control.
+/// Omitting version_type or setting it to internal causes Elasticsearch to blindly dump documents into the destination, overwriting any that happen to have the same ID.
+///
+///
+/// Setting version_type to external causes Elasticsearch to preserve the version from the source, create any documents that are missing, and update any documents that have an older version in the destination than they do in the source.
+///
+///
+/// Setting op_type to create causes the reindex API to create only missing documents in the destination.
+/// All existing documents will cause a version conflict.
+///
+///
+/// IMPORTANT: Because data streams are append-only, any reindex request to a destination data stream must have an op_type of create.
+/// A reindex can only add new documents to a destination data stream.
+/// It cannot update existing documents in a destination data stream.
+///
+///
+/// By default, version conflicts abort the reindex process.
+/// To continue reindexing if there are conflicts, set the conflicts request body property to proceed.
+/// In this case, the response includes a count of the version conflicts that were encountered.
+/// Note that the handling of other error types is unaffected by the conflicts property.
+/// Additionally, if you opt to count version conflicts, the operation could attempt to reindex more documents from the source than max_docs until it has successfully indexed max_docs documents into the target or it has gone through every document in the source query.
+///
+///
+/// NOTE: The reindex API makes no effort to handle ID collisions.
+/// The last document written will "win" but the order isn't usually predictable so it is not a good idea to rely on this behavior.
+/// Instead, make sure that IDs are unique by using a script.
+///
+///
+/// Running reindex asynchronously
+///
+///
+/// If the request contains wait_for_completion=false, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to cancel or get the status of the task.
+/// Elasticsearch creates a record of this task as a document at _tasks/<task_id>.
+///
+///
+/// Reindex from multiple sources
+///
+///
+/// If you have many sources to reindex it is generally better to reindex them one at a time rather than using a glob pattern to pick up multiple sources.
+/// That way you can resume the process if there are any errors by removing the partially completed source and starting over.
+/// It also makes parallelizing the process fairly simple: split the list of sources to reindex and run each list in parallel.
+///
+///
+/// For example, you can use a bash script like this:
+///
+///
+/// for index in i1 i2 i3 i4 i5; do
+/// curl -HContent-Type:application/json -XPOST localhost:9200/_reindex?pretty -d'{
+/// "source": {
+/// "index": "'$index'"
+/// },
+/// "dest": {
+/// "index": "'$index'-reindexed"
+/// }
+/// }'
+/// done
+///
+///
+/// ** Throttling**
+///
+///
+/// Set requests_per_second to any positive decimal number (1.4, 6, 1000, for example) to throttle the rate at which reindex issues batches of index operations.
+/// Requests are throttled by padding each batch with a wait time.
+/// To turn off throttling, set requests_per_second to -1.
+///
+///
+/// The throttling is done by waiting between batches so that the scroll that reindex uses internally can be given a timeout that takes into account the padding.
+/// The padding time is the difference between the batch size divided by the requests_per_second and the time spent writing.
+/// By default the batch size is 1000, so if requests_per_second is set to 500:
+///
+///
+/// target_time = 1000 / 500 per second = 2 seconds
+/// wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds
+///
+///
+/// Since the batch is issued as a single bulk request, large batch sizes cause Elasticsearch to create many requests and then wait for a while before starting the next set.
+/// This is "bursty" instead of "smooth".
+///
+///
+/// Slicing
+///
+///
+/// Reindex supports sliced scroll to parallelize the reindexing process.
+/// This parallelization can improve efficiency and provide a convenient way to break the request down into smaller parts.
+///
+///
+/// NOTE: Reindexing from remote clusters does not support manual or automatic slicing.
+///
+///
+/// You can slice a reindex request manually by providing a slice ID and total number of slices to each request.
+/// You can also let reindex automatically parallelize by using sliced scroll to slice on _id.
+/// The slices parameter specifies the number of slices to use.
+///
+///
+/// Adding slices to the reindex request just automates the manual process, creating sub-requests which means it has some quirks:
+///
+///
+/// -
+///
+/// You can see these requests in the tasks API. These sub-requests are "child" tasks of the task for the request with slices.
+///
+///
+/// -
+///
+/// Fetching the status of the task for the request with slices only contains the status of completed slices.
+///
+///
+/// -
+///
+/// These sub-requests are individually addressable for things like cancellation and rethrottling.
+///
+///
+/// -
+///
+/// Rethrottling the request with slices will rethrottle the unfinished sub-request proportionally.
+///
+///
+/// -
+///
+/// Canceling the request with slices will cancel each sub-request.
+///
+///
+/// -
+///
+/// Due to the nature of slices, each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.
+///
+///
+/// -
+///
+/// Parameters like requests_per_second and max_docs on a request with slices are distributed proportionally to each sub-request. Combine that with the previous point about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being reindexed.
+///
+///
+/// -
+///
+/// Each sub-request gets a slightly different snapshot of the source, though these are all taken at approximately the same time.
+///
+///
+///
+///
+/// If slicing automatically, setting slices to auto will choose a reasonable number for most indices.
+/// If slicing manually or otherwise tuning automatic slicing, use the following guidelines.
+///
+///
+/// Query performance is most efficient when the number of slices is equal to the number of shards in the index.
+/// If that number is large (for example, 500), choose a lower number as too many slices will hurt performance.
+/// Setting slices higher than the number of shards generally does not improve efficiency and adds overhead.
+///
+///
+/// Indexing performance scales linearly across available resources with the number of slices.
+///
+///
+/// Whether query or indexing performance dominates the runtime depends on the documents being reindexed and cluster resources.
+///
+///
+/// Modify documents during reindexing
+///
+///
+/// Like _update_by_query, reindex operations support a script that modifies the document.
+/// Unlike _update_by_query, the script is allowed to modify the document's metadata.
+///
+///
+/// Just as in _update_by_query, you can set ctx.op to change the operation that is run on the destination.
+/// For example, set ctx.op to noop if your script decides that the document doesn’t have to be indexed in the destination. This "no operation" will be reported in the noop counter in the response body.
+/// Set ctx.op to delete if your script decides that the document must be deleted from the destination.
+/// The deletion will be reported in the deleted counter in the response body.
+/// Setting ctx.op to anything else will return an error, as will setting any other field in ctx.
+///
+///
+/// Think of the possibilities! Just be careful; you are able to change:
+///
+///
+/// -
+///
+/// _id
+///
+///
+/// -
+///
+/// _index
+///
+///
+/// -
+///
+/// _version
+///
+///
+/// -
+///
+/// _routing
+///
+///
+///
+///
+/// Setting _version to null or clearing it from the ctx map is just like not sending the version in an indexing request.
+/// It will cause the document to be overwritten in the destination regardless of the version on the target or the version type you use in the reindex API.
+///
+///
+/// Reindex from remote
+///
+///
+/// Reindex supports reindexing from a remote Elasticsearch cluster.
+/// The host parameter must contain a scheme, host, port, and optional path.
+/// The username and password parameters are optional and when they are present the reindex operation will connect to the remote Elasticsearch node using basic authentication.
+/// Be sure to use HTTPS when using basic authentication or the password will be sent in plain text.
+/// There are a range of settings available to configure the behavior of the HTTPS connection.
+///
+///
+/// When using Elastic Cloud, it is also possible to authenticate against the remote cluster through the use of a valid API key.
+/// Remote hosts must be explicitly allowed with the reindex.remote.whitelist setting.
+/// It can be set to a comma delimited list of allowed remote host and port combinations.
+/// Scheme is ignored; only the host and port are used.
+/// For example:
+///
+///
+/// reindex.remote.whitelist: [otherhost:9200, another:9200, 127.0.10.*:9200, localhost:*"]
+///
+///
+/// The list of allowed hosts must be configured on any nodes that will coordinate the reindex.
+/// This feature should work with remote clusters of any version of Elasticsearch.
+/// This should enable you to upgrade from any version of Elasticsearch to the current version by reindexing from a cluster of the old version.
+///
+///
+/// WARNING: Elasticsearch does not support forward compatibility across major versions.
+/// For example, you cannot reindex from a 7.x cluster into a 6.x cluster.
+///
+///
+/// To enable queries sent to older versions of Elasticsearch, the query parameter is sent directly to the remote host without validation or modification.
+///
+///
+/// NOTE: Reindexing from remote clusters does not support manual or automatic slicing.
+///
+///
+/// Reindexing from a remote server uses an on-heap buffer that defaults to a maximum size of 100mb.
+/// If the remote index includes very large documents you'll need to use a smaller batch size.
+/// It is also possible to set the socket read timeout on the remote connection with the socket_timeout field and the connection timeout with the connect_timeout field.
+/// Both default to 30 seconds.
+///
+///
+/// Configuring SSL parameters
+///
+///
+/// Reindex from remote supports configurable SSL settings.
+/// These must be specified in the elasticsearch.yml file, with the exception of the secure settings, which you add in the Elasticsearch keystore.
+/// It is not possible to configure SSL in the body of the reindex request.
///
///
public sealed partial class ReindexRequestDescriptor : RequestDescriptor, ReindexRequestParameters>
@@ -264,7 +873,7 @@ public ReindexRequestDescriptor()
///
///
- /// Set to proceed to continue reindexing even if there are conflicts.
+ /// Indicates whether to continue reindexing even when there are conflicts.
///
///
public ReindexRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Conflicts? conflicts)
@@ -305,6 +914,11 @@ public ReindexRequestDescriptor Dest(Action
///
/// The maximum number of documents to reindex.
+ /// By default, all documents are reindexed.
+ /// If it is a value less then or equal to scroll_size, a scroll will not be used to retrieve the results for the operation.
+ ///
+ ///
+ /// If conflicts is set to proceed, the reindex operation could attempt to reindex more documents from the source than max_docs until it has successfully indexed max_docs documents into the target or it has gone through every document in the source query.
///
///
public ReindexRequestDescriptor MaxDocs(long? maxDocs)
@@ -453,7 +1067,294 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
///
///
/// Reindex documents.
-/// Copies documents from a source to a destination. The source can be any existing index, alias, or data stream. The destination must differ from the source. For example, you cannot reindex a data stream into itself.
+///
+///
+/// Copy documents from a source to a destination.
+/// You can copy all documents to the destination index or reindex a subset of the documents.
+/// The source can be any existing index, alias, or data stream.
+/// The destination must differ from the source.
+/// For example, you cannot reindex a data stream into itself.
+///
+///
+/// IMPORTANT: Reindex requires _source to be enabled for all documents in the source.
+/// The destination should be configured as wanted before calling the reindex API.
+/// Reindex does not copy the settings from the source or its associated template.
+/// Mappings, shard counts, and replicas, for example, must be configured ahead of time.
+///
+///
+/// If the Elasticsearch security features are enabled, you must have the following security privileges:
+///
+///
+/// -
+///
+/// The read index privilege for the source data stream, index, or alias.
+///
+///
+/// -
+///
+/// The write index privilege for the destination data stream, index, or index alias.
+///
+///
+/// -
+///
+/// To automatically create a data stream or index with a reindex API request, you must have the auto_configure, create_index, or manage index privilege for the destination data stream, index, or alias.
+///
+///
+/// -
+///
+/// If reindexing from a remote cluster, the source.remote.user must have the monitor cluster privilege and the read index privilege for the source data stream, index, or alias.
+///
+///
+///
+///
+/// If reindexing from a remote cluster, you must explicitly allow the remote host in the reindex.remote.whitelist setting.
+/// Automatic data stream creation requires a matching index template with data stream enabled.
+///
+///
+/// The dest element can be configured like the index API to control optimistic concurrency control.
+/// Omitting version_type or setting it to internal causes Elasticsearch to blindly dump documents into the destination, overwriting any that happen to have the same ID.
+///
+///
+/// Setting version_type to external causes Elasticsearch to preserve the version from the source, create any documents that are missing, and update any documents that have an older version in the destination than they do in the source.
+///
+///
+/// Setting op_type to create causes the reindex API to create only missing documents in the destination.
+/// All existing documents will cause a version conflict.
+///
+///
+/// IMPORTANT: Because data streams are append-only, any reindex request to a destination data stream must have an op_type of create.
+/// A reindex can only add new documents to a destination data stream.
+/// It cannot update existing documents in a destination data stream.
+///
+///
+/// By default, version conflicts abort the reindex process.
+/// To continue reindexing if there are conflicts, set the conflicts request body property to proceed.
+/// In this case, the response includes a count of the version conflicts that were encountered.
+/// Note that the handling of other error types is unaffected by the conflicts property.
+/// Additionally, if you opt to count version conflicts, the operation could attempt to reindex more documents from the source than max_docs until it has successfully indexed max_docs documents into the target or it has gone through every document in the source query.
+///
+///
+/// NOTE: The reindex API makes no effort to handle ID collisions.
+/// The last document written will "win" but the order isn't usually predictable so it is not a good idea to rely on this behavior.
+/// Instead, make sure that IDs are unique by using a script.
+///
+///
+/// Running reindex asynchronously
+///
+///
+/// If the request contains wait_for_completion=false, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to cancel or get the status of the task.
+/// Elasticsearch creates a record of this task as a document at _tasks/<task_id>.
+///
+///
+/// Reindex from multiple sources
+///
+///
+/// If you have many sources to reindex it is generally better to reindex them one at a time rather than using a glob pattern to pick up multiple sources.
+/// That way you can resume the process if there are any errors by removing the partially completed source and starting over.
+/// It also makes parallelizing the process fairly simple: split the list of sources to reindex and run each list in parallel.
+///
+///
+/// For example, you can use a bash script like this:
+///
+///
+/// for index in i1 i2 i3 i4 i5; do
+/// curl -HContent-Type:application/json -XPOST localhost:9200/_reindex?pretty -d'{
+/// "source": {
+/// "index": "'$index'"
+/// },
+/// "dest": {
+/// "index": "'$index'-reindexed"
+/// }
+/// }'
+/// done
+///
+///
+/// ** Throttling**
+///
+///
+/// Set requests_per_second to any positive decimal number (1.4, 6, 1000, for example) to throttle the rate at which reindex issues batches of index operations.
+/// Requests are throttled by padding each batch with a wait time.
+/// To turn off throttling, set requests_per_second to -1.
+///
+///
+/// The throttling is done by waiting between batches so that the scroll that reindex uses internally can be given a timeout that takes into account the padding.
+/// The padding time is the difference between the batch size divided by the requests_per_second and the time spent writing.
+/// By default the batch size is 1000, so if requests_per_second is set to 500:
+///
+///
+/// target_time = 1000 / 500 per second = 2 seconds
+/// wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds
+///
+///
+/// Since the batch is issued as a single bulk request, large batch sizes cause Elasticsearch to create many requests and then wait for a while before starting the next set.
+/// This is "bursty" instead of "smooth".
+///
+///
+/// Slicing
+///
+///
+/// Reindex supports sliced scroll to parallelize the reindexing process.
+/// This parallelization can improve efficiency and provide a convenient way to break the request down into smaller parts.
+///
+///
+/// NOTE: Reindexing from remote clusters does not support manual or automatic slicing.
+///
+///
+/// You can slice a reindex request manually by providing a slice ID and total number of slices to each request.
+/// You can also let reindex automatically parallelize by using sliced scroll to slice on _id.
+/// The slices parameter specifies the number of slices to use.
+///
+///
+/// Adding slices to the reindex request just automates the manual process, creating sub-requests which means it has some quirks:
+///
+///
+/// -
+///
+/// You can see these requests in the tasks API. These sub-requests are "child" tasks of the task for the request with slices.
+///
+///
+/// -
+///
+/// Fetching the status of the task for the request with slices only contains the status of completed slices.
+///
+///
+/// -
+///
+/// These sub-requests are individually addressable for things like cancellation and rethrottling.
+///
+///
+/// -
+///
+/// Rethrottling the request with slices will rethrottle the unfinished sub-request proportionally.
+///
+///
+/// -
+///
+/// Canceling the request with slices will cancel each sub-request.
+///
+///
+/// -
+///
+/// Due to the nature of slices, each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.
+///
+///
+/// -
+///
+/// Parameters like requests_per_second and max_docs on a request with slices are distributed proportionally to each sub-request. Combine that with the previous point about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being reindexed.
+///
+///
+/// -
+///
+/// Each sub-request gets a slightly different snapshot of the source, though these are all taken at approximately the same time.
+///
+///
+///
+///
+/// If slicing automatically, setting slices to auto will choose a reasonable number for most indices.
+/// If slicing manually or otherwise tuning automatic slicing, use the following guidelines.
+///
+///
+/// Query performance is most efficient when the number of slices is equal to the number of shards in the index.
+/// If that number is large (for example, 500), choose a lower number as too many slices will hurt performance.
+/// Setting slices higher than the number of shards generally does not improve efficiency and adds overhead.
+///
+///
+/// Indexing performance scales linearly across available resources with the number of slices.
+///
+///
+/// Whether query or indexing performance dominates the runtime depends on the documents being reindexed and cluster resources.
+///
+///
+/// Modify documents during reindexing
+///
+///
+/// Like _update_by_query, reindex operations support a script that modifies the document.
+/// Unlike _update_by_query, the script is allowed to modify the document's metadata.
+///
+///
+/// Just as in _update_by_query, you can set ctx.op to change the operation that is run on the destination.
+/// For example, set ctx.op to noop if your script decides that the document doesn’t have to be indexed in the destination. This "no operation" will be reported in the noop counter in the response body.
+/// Set ctx.op to delete if your script decides that the document must be deleted from the destination.
+/// The deletion will be reported in the deleted counter in the response body.
+/// Setting ctx.op to anything else will return an error, as will setting any other field in ctx.
+///
+///
+/// Think of the possibilities! Just be careful; you are able to change:
+///
+///
+/// -
+///
+/// _id
+///
+///
+/// -
+///
+/// _index
+///
+///
+/// -
+///
+/// _version
+///
+///
+/// -
+///
+/// _routing
+///
+///
+///
+///
+/// Setting _version to null or clearing it from the ctx map is just like not sending the version in an indexing request.
+/// It will cause the document to be overwritten in the destination regardless of the version on the target or the version type you use in the reindex API.
+///
+///
+/// Reindex from remote
+///
+///
+/// Reindex supports reindexing from a remote Elasticsearch cluster.
+/// The host parameter must contain a scheme, host, port, and optional path.
+/// The username and password parameters are optional and when they are present the reindex operation will connect to the remote Elasticsearch node using basic authentication.
+/// Be sure to use HTTPS when using basic authentication or the password will be sent in plain text.
+/// There are a range of settings available to configure the behavior of the HTTPS connection.
+///
+///
+/// When using Elastic Cloud, it is also possible to authenticate against the remote cluster through the use of a valid API key.
+/// Remote hosts must be explicitly allowed with the reindex.remote.whitelist setting.
+/// It can be set to a comma delimited list of allowed remote host and port combinations.
+/// Scheme is ignored; only the host and port are used.
+/// For example:
+///
+///
+/// reindex.remote.whitelist: [otherhost:9200, another:9200, 127.0.10.*:9200, localhost:*"]
+///
+///
+/// The list of allowed hosts must be configured on any nodes that will coordinate the reindex.
+/// This feature should work with remote clusters of any version of Elasticsearch.
+/// This should enable you to upgrade from any version of Elasticsearch to the current version by reindexing from a cluster of the old version.
+///
+///
+/// WARNING: Elasticsearch does not support forward compatibility across major versions.
+/// For example, you cannot reindex from a 7.x cluster into a 6.x cluster.
+///
+///
+/// To enable queries sent to older versions of Elasticsearch, the query parameter is sent directly to the remote host without validation or modification.
+///
+///
+/// NOTE: Reindexing from remote clusters does not support manual or automatic slicing.
+///
+///
+/// Reindexing from a remote server uses an on-heap buffer that defaults to a maximum size of 100mb.
+/// If the remote index includes very large documents you'll need to use a smaller batch size.
+/// It is also possible to set the socket read timeout on the remote connection with the socket_timeout field and the connection timeout with the connect_timeout field.
+/// Both default to 30 seconds.
+///
+///
+/// Configuring SSL parameters
+///
+///
+/// Reindex from remote supports configurable SSL settings.
+/// These must be specified in the elasticsearch.yml file, with the exception of the secure settings, which you add in the Elasticsearch keystore.
+/// It is not possible to configure SSL in the body of the reindex request.
///
///
public sealed partial class ReindexRequestDescriptor : RequestDescriptor
@@ -496,7 +1397,7 @@ public ReindexRequestDescriptor()
///
///
- /// Set to proceed to continue reindexing even if there are conflicts.
+ /// Indicates whether to continue reindexing even when there are conflicts.
///
///
public ReindexRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Conflicts? conflicts)
@@ -537,6 +1438,11 @@ public ReindexRequestDescriptor Dest(Action
///
/// The maximum number of documents to reindex.
+ /// By default, all documents are reindexed.
+ /// If it is a value less then or equal to scroll_size, a scroll will not be used to retrieve the results for the operation.
+ ///
+ ///
+ /// If conflicts is set to proceed, the reindex operation could attempt to reindex more documents from the source than max_docs until it has successfully indexed max_docs documents into the target or it has gone through every document in the source query.
///
///
public ReindexRequestDescriptor MaxDocs(long? maxDocs)
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexResponse.g.cs
index 615f5821c06..57fafdd818b 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexResponse.g.cs
@@ -28,36 +28,124 @@ namespace Elastic.Clients.Elasticsearch;
public sealed partial class ReindexResponse : ElasticsearchResponse
{
+ ///
+ ///
+ /// The number of scroll responses that were pulled back by the reindex.
+ ///
+ ///
[JsonInclude, JsonPropertyName("batches")]
public long? Batches { get; init; }
+
+ ///
+ ///
+ /// The number of documents that were successfully created.
+ ///
+ ///
[JsonInclude, JsonPropertyName("created")]
public long? Created { get; init; }
+
+ ///
+ ///
+ /// The number of documents that were successfully deleted.
+ ///
+ ///
[JsonInclude, JsonPropertyName("deleted")]
public long? Deleted { get; init; }
+
+ ///
+ ///
+ /// If there were any unrecoverable errors during the process, it is an array of those failures.
+ /// If this array is not empty, the request ended because of those failures.
+ /// Reindex is implemented using batches and any failure causes the entire process to end but all failures in the current batch are collected into the array.
+ /// You can use the conflicts option to prevent the reindex from ending on version conflicts.
+ ///
+ ///
[JsonInclude, JsonPropertyName("failures")]
public IReadOnlyCollection? Failures { get; init; }
+
+ ///
+ ///
+ /// The number of documents that were ignored because the script used for the reindex returned a noop value for ctx.op.
+ ///
+ ///
[JsonInclude, JsonPropertyName("noops")]
public long? Noops { get; init; }
+
+ ///
+ ///
+ /// The number of requests per second effectively run during the reindex.
+ ///
+ ///
[JsonInclude, JsonPropertyName("requests_per_second")]
public float? RequestsPerSecond { get; init; }
+
+ ///
+ ///
+ /// The number of retries attempted by reindex.
+ ///
+ ///
[JsonInclude, JsonPropertyName("retries")]
public Elastic.Clients.Elasticsearch.Retries? Retries { get; init; }
[JsonInclude, JsonPropertyName("slice_id")]
public int? SliceId { get; init; }
[JsonInclude, JsonPropertyName("task")]
public Elastic.Clients.Elasticsearch.TaskId? Task { get; init; }
+
+ ///
+ ///
+ /// The number of milliseconds the request slept to conform to requests_per_second.
+ ///
+ ///
[JsonInclude, JsonPropertyName("throttled_millis")]
public long? ThrottledMillis { get; init; }
+
+ ///
+ ///
+ /// This field should always be equal to zero in a reindex response.
+ /// It has meaning only when using the task API, where it indicates the next time (in milliseconds since epoch) that a throttled request will be run again in order to conform to requests_per_second.
+ ///
+ ///
[JsonInclude, JsonPropertyName("throttled_until_millis")]
public long? ThrottledUntilMillis { get; init; }
+
+ ///
+ ///
+ /// If any of the requests that ran during the reindex timed out, it is true.
+ ///
+ ///
[JsonInclude, JsonPropertyName("timed_out")]
public bool? TimedOut { get; init; }
+
+ ///
+ ///
+ /// The total milliseconds the entire operation took.
+ ///
+ ///
[JsonInclude, JsonPropertyName("took")]
public long? Took { get; init; }
+
+ ///
+ ///
+ /// The number of documents that were successfully processed.
+ ///
+ ///
[JsonInclude, JsonPropertyName("total")]
public long? Total { get; init; }
+
+ ///
+ ///
+ /// The number of documents that were successfully updated.
+ /// That is to say, a document with the same ID already existed before the reindex updated it.
+ ///
+ ///
[JsonInclude, JsonPropertyName("updated")]
public long? Updated { get; init; }
+
+ ///
+ ///
+ /// The number of version conflicts that occurred.
+ ///
+ ///
[JsonInclude, JsonPropertyName("version_conflicts")]
public long? VersionConflicts { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRethrottleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRethrottleRequest.g.cs
index 88bf92f8d80..bc01acf7030 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRethrottleRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRethrottleRequest.g.cs
@@ -35,6 +35,7 @@ public sealed partial class ReindexRethrottleRequestParameters : RequestParamete
///
///
/// The throttle for this request in sub-requests per second.
+ /// It can be either -1 to turn off throttling or any decimal number like 1.7 or 12 to throttle to that level.
///
///
public float? RequestsPerSecond { get => Q("requests_per_second"); set => Q("requests_per_second", value); }
@@ -46,6 +47,15 @@ public sealed partial class ReindexRethrottleRequestParameters : RequestParamete
///
///
/// Change the number of requests per second for a particular reindex operation.
+/// For example:
+///
+///
+/// POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1
+///
+///
+/// Rethrottling that speeds up the query takes effect immediately.
+/// Rethrottling that slows down the query will take effect after completing the current batch.
+/// This behavior prevents scroll timeouts.
///
///
public sealed partial class ReindexRethrottleRequest : PlainRequest
@@ -65,6 +75,7 @@ public ReindexRethrottleRequest(Elastic.Clients.Elasticsearch.Id taskId) : base(
///
///
/// The throttle for this request in sub-requests per second.
+ /// It can be either -1 to turn off throttling or any decimal number like 1.7 or 12 to throttle to that level.
///
///
[JsonIgnore]
@@ -77,6 +88,15 @@ public ReindexRethrottleRequest(Elastic.Clients.Elasticsearch.Id taskId) : base(
///
///
/// Change the number of requests per second for a particular reindex operation.
+/// For example:
+///
+///
+/// POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1
+///
+///
+/// Rethrottling that speeds up the query takes effect immediately.
+/// Rethrottling that slows down the query will take effect after completing the current batch.
+/// This behavior prevents scroll timeouts.
///
///
public sealed partial class ReindexRethrottleRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/RenderSearchTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/RenderSearchTemplateRequest.g.cs
index 26361bc0ec5..7e7a6a4d21b 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/RenderSearchTemplateRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/RenderSearchTemplateRequest.g.cs
@@ -63,6 +63,16 @@ public RenderSearchTemplateRequest(Elastic.Clients.Elasticsearch.Id? id) : base(
[JsonInclude, JsonPropertyName("file")]
public string? File { get; set; }
+ ///
+ ///
+ /// The ID of the search template to render.
+ /// If no source is specified, this or the <template-id> request path parameter is required.
+ /// If you specify both this parameter and the <template-id> parameter, the API uses only <template-id>.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("id")]
+ public Elastic.Clients.Elasticsearch.Id? Id { get; set; }
+
///
///
/// Key-value pairs used to replace Mustache variables in the template.
@@ -76,7 +86,7 @@ public RenderSearchTemplateRequest(Elastic.Clients.Elasticsearch.Id? id) : base(
///
///
/// An inline search template.
- /// Supports the same parameters as the search API's request body.
+ /// It supports the same parameters as the search API's request body.
/// These parameters also support Mustache variables.
/// If no id or <templated-id> is specified, this parameter is required.
///
@@ -97,10 +107,6 @@ public sealed partial class RenderSearchTemplateRequestDescriptor : R
{
internal RenderSearchTemplateRequestDescriptor(Action> configure) => configure.Invoke(this);
- public RenderSearchTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Id? id) : base(r => r.Optional("id", id))
- {
- }
-
public RenderSearchTemplateRequestDescriptor()
{
}
@@ -113,13 +119,8 @@ public RenderSearchTemplateRequestDescriptor()
internal override string OperationName => "render_search_template";
- public RenderSearchTemplateRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id? id)
- {
- RouteValues.Optional("id", id);
- return Self;
- }
-
private string? FileValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Id? IdValue { get; set; }
private IDictionary? ParamsValue { get; set; }
private string? SourceValue { get; set; }
@@ -129,6 +130,19 @@ public RenderSearchTemplateRequestDescriptor File(string? file)
return Self;
}
+ ///
+ ///
+ /// The ID of the search template to render.
+ /// If no source is specified, this or the <template-id> request path parameter is required.
+ /// If you specify both this parameter and the <template-id> parameter, the API uses only <template-id>.
+ ///
+ ///
+ public RenderSearchTemplateRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id? id)
+ {
+ IdValue = id;
+ return Self;
+ }
+
///
///
/// Key-value pairs used to replace Mustache variables in the template.
@@ -145,7 +159,7 @@ public RenderSearchTemplateRequestDescriptor Params(Func
///
/// An inline search template.
- /// Supports the same parameters as the search API's request body.
+ /// It supports the same parameters as the search API's request body.
/// These parameters also support Mustache variables.
/// If no id or <templated-id> is specified, this parameter is required.
///
@@ -165,6 +179,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
writer.WriteStringValue(FileValue);
}
+ if (IdValue is not null)
+ {
+ writer.WritePropertyName("id");
+ JsonSerializer.Serialize(writer, IdValue, options);
+ }
+
if (ParamsValue is not null)
{
writer.WritePropertyName("params");
@@ -193,10 +213,6 @@ public sealed partial class RenderSearchTemplateRequestDescriptor : RequestDescr
{
internal RenderSearchTemplateRequestDescriptor(Action configure) => configure.Invoke(this);
- public RenderSearchTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Id? id) : base(r => r.Optional("id", id))
- {
- }
-
public RenderSearchTemplateRequestDescriptor()
{
}
@@ -209,13 +225,8 @@ public RenderSearchTemplateRequestDescriptor()
internal override string OperationName => "render_search_template";
- public RenderSearchTemplateRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id? id)
- {
- RouteValues.Optional("id", id);
- return Self;
- }
-
private string? FileValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Id? IdValue { get; set; }
private IDictionary? ParamsValue { get; set; }
private string? SourceValue { get; set; }
@@ -225,6 +236,19 @@ public RenderSearchTemplateRequestDescriptor File(string? file)
return Self;
}
+ ///
+ ///
+ /// The ID of the search template to render.
+ /// If no source is specified, this or the <template-id> request path parameter is required.
+ /// If you specify both this parameter and the <template-id> parameter, the API uses only <template-id>.
+ ///
+ ///
+ public RenderSearchTemplateRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id? id)
+ {
+ IdValue = id;
+ return Self;
+ }
+
///
///
/// Key-value pairs used to replace Mustache variables in the template.
@@ -241,7 +265,7 @@ public RenderSearchTemplateRequestDescriptor Params(Func
///
/// An inline search template.
- /// Supports the same parameters as the search API's request body.
+ /// It supports the same parameters as the search API's request body.
/// These parameters also support Mustache variables.
/// If no id or <templated-id> is specified, this parameter is required.
///
@@ -261,6 +285,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
writer.WriteStringValue(FileValue);
}
+ if (IdValue is not null)
+ {
+ writer.WritePropertyName("id");
+ JsonSerializer.Serialize(writer, IdValue, options);
+ }
+
if (ParamsValue is not null)
{
writer.WritePropertyName("params");
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchRequest.g.cs
index 983b3bbff95..e81b3267e9e 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchRequest.g.cs
@@ -113,6 +113,53 @@ public override void Write(Utf8JsonWriter writer, RollupSearchRequest value, Jso
/// The rollup search endpoint is needed because, internally, rolled-up documents utilize a different document structure than the original data.
/// It rewrites standard Query DSL into a format that matches the rollup documents then takes the response and rewrites it back to what a client would expect given the original query.
///
+///
+/// The request body supports a subset of features from the regular search API.
+/// The following functionality is not available:
+///
+///
+/// size: Because rollups work on pre-aggregated data, no search hits can be returned and so size must be set to zero or omitted entirely.
+/// highlighter, suggestors, post_filter, profile, explain: These are similarly disallowed.
+///
+///
+/// Searching both historical rollup and non-rollup data
+///
+///
+/// The rollup search API has the capability to search across both "live" non-rollup data and the aggregated rollup data.
+/// This is done by simply adding the live indices to the URI. For example:
+///
+///
+/// GET sensor-1,sensor_rollup/_rollup_search
+/// {
+/// "size": 0,
+/// "aggregations": {
+/// "max_temperature": {
+/// "max": {
+/// "field": "temperature"
+/// }
+/// }
+/// }
+/// }
+///
+///
+/// The rollup search endpoint does two things when the search runs:
+///
+///
+/// -
+///
+/// The original request is sent to the non-rollup index unaltered.
+///
+///
+/// -
+///
+/// A rewritten version of the original request is sent to the rollup index.
+///
+///
+///
+///
+/// When the two responses are received, the endpoint rewrites the rollup response and merges the two together.
+/// During the merging process, if there is any overlap in buckets between the two responses, the buckets from the non-rollup index are used.
+///
///
[JsonConverter(typeof(RollupSearchRequestConverter))]
public sealed partial class RollupSearchRequest : PlainRequest
@@ -159,7 +206,7 @@ public RollupSearchRequest()
///
///
- /// Specifies a DSL query.
+ /// Specifies a DSL query that is subject to some limitations.
///
///
[JsonInclude, JsonPropertyName("query")]
@@ -180,6 +227,53 @@ public RollupSearchRequest()
/// The rollup search endpoint is needed because, internally, rolled-up documents utilize a different document structure than the original data.
/// It rewrites standard Query DSL into a format that matches the rollup documents then takes the response and rewrites it back to what a client would expect given the original query.
///
+///
+/// The request body supports a subset of features from the regular search API.
+/// The following functionality is not available:
+///
+///
+/// size: Because rollups work on pre-aggregated data, no search hits can be returned and so size must be set to zero or omitted entirely.
+/// highlighter, suggestors, post_filter, profile, explain: These are similarly disallowed.
+///
+///
+/// Searching both historical rollup and non-rollup data
+///
+///
+/// The rollup search API has the capability to search across both "live" non-rollup data and the aggregated rollup data.
+/// This is done by simply adding the live indices to the URI. For example:
+///
+///
+/// GET sensor-1,sensor_rollup/_rollup_search
+/// {
+/// "size": 0,
+/// "aggregations": {
+/// "max_temperature": {
+/// "max": {
+/// "field": "temperature"
+/// }
+/// }
+/// }
+/// }
+///
+///
+/// The rollup search endpoint does two things when the search runs:
+///
+///
+/// -
+///
+/// The original request is sent to the non-rollup index unaltered.
+///
+///
+/// -
+///
+/// A rewritten version of the original request is sent to the rollup index.
+///
+///
+///
+///
+/// When the two responses are received, the endpoint rewrites the rollup response and merges the two together.
+/// During the merging process, if there is any overlap in buckets between the two responses, the buckets from the non-rollup index are used.
+///
///
public sealed partial class RollupSearchRequestDescriptor : RequestDescriptor, RollupSearchRequestParameters>
{
@@ -229,7 +323,7 @@ public RollupSearchRequestDescriptor Aggregations(Func
///
- /// Specifies a DSL query.
+ /// Specifies a DSL query that is subject to some limitations.
///
///
public RollupSearchRequestDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? query)
@@ -308,6 +402,53 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
/// The rollup search endpoint is needed because, internally, rolled-up documents utilize a different document structure than the original data.
/// It rewrites standard Query DSL into a format that matches the rollup documents then takes the response and rewrites it back to what a client would expect given the original query.
///
+///
+/// The request body supports a subset of features from the regular search API.
+/// The following functionality is not available:
+///
+///
+/// size: Because rollups work on pre-aggregated data, no search hits can be returned and so size must be set to zero or omitted entirely.
+/// highlighter, suggestors, post_filter, profile, explain: These are similarly disallowed.
+///
+///
+/// Searching both historical rollup and non-rollup data
+///
+///
+/// The rollup search API has the capability to search across both "live" non-rollup data and the aggregated rollup data.
+/// This is done by simply adding the live indices to the URI. For example:
+///
+///
+/// GET sensor-1,sensor_rollup/_rollup_search
+/// {
+/// "size": 0,
+/// "aggregations": {
+/// "max_temperature": {
+/// "max": {
+/// "field": "temperature"
+/// }
+/// }
+/// }
+/// }
+///
+///
+/// The rollup search endpoint does two things when the search runs:
+///
+///
+/// -
+///
+/// The original request is sent to the non-rollup index unaltered.
+///
+///
+/// -
+///
+/// A rewritten version of the original request is sent to the rollup index.
+///
+///
+///
+///
+/// When the two responses are received, the endpoint rewrites the rollup response and merges the two together.
+/// During the merging process, if there is any overlap in buckets between the two responses, the buckets from the non-rollup index are used.
+///
///
public sealed partial class RollupSearchRequestDescriptor : RequestDescriptor
{
@@ -353,7 +494,7 @@ public RollupSearchRequestDescriptor Aggregations(Func
///
- /// Specifies a DSL query.
+ /// Specifies a DSL query that is subject to some limitations.
///
///
public RollupSearchRequestDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? query)
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/StopJobRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/StopJobRequest.g.cs
index f4129512b7e..ae55889760a 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/StopJobRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/StopJobRequest.g.cs
@@ -36,6 +36,8 @@ public sealed partial class StopJobRequestParameters : RequestParameters
///
/// If wait_for_completion is true, the API blocks for (at maximum) the specified duration while waiting for the job to stop.
/// If more than timeout time has passed, the API throws a timeout exception.
+ /// NOTE: Even if a timeout occurs, the stop request is still processing and eventually moves the job to STOPPED.
+ /// The timeout simply means the API call itself timed out while waiting for the status change.
///
///
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); }
@@ -55,6 +57,17 @@ public sealed partial class StopJobRequestParameters : RequestParameters
/// If you try to stop a job that does not exist, an exception occurs.
/// If you try to stop a job that is already stopped, nothing happens.
///
+///
+/// Since only a stopped job can be deleted, it can be useful to block the API until the indexer has fully stopped.
+/// This is accomplished with the wait_for_completion query parameter, and optionally a timeout. For example:
+///
+///
+/// POST _rollup/job/sensor/_stop?wait_for_completion=true&timeout=10s
+///
+///
+/// The parameter blocks the API call from returning until either the job has moved to STOPPED or the specified time has elapsed.
+/// If the specified time elapses without the job moving to STOPPED, a timeout exception occurs.
+///
///
public sealed partial class StopJobRequest : PlainRequest
{
@@ -74,6 +87,8 @@ public StopJobRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Require
///
/// If wait_for_completion is true, the API blocks for (at maximum) the specified duration while waiting for the job to stop.
/// If more than timeout time has passed, the API throws a timeout exception.
+ /// NOTE: Even if a timeout occurs, the stop request is still processing and eventually moves the job to STOPPED.
+ /// The timeout simply means the API call itself timed out while waiting for the status change.
///
///
[JsonIgnore]
@@ -95,6 +110,17 @@ public StopJobRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Require
/// If you try to stop a job that does not exist, an exception occurs.
/// If you try to stop a job that is already stopped, nothing happens.
///
+///
+/// Since only a stopped job can be deleted, it can be useful to block the API until the indexer has fully stopped.
+/// This is accomplished with the wait_for_completion query parameter, and optionally a timeout. For example:
+///
+///
+/// POST _rollup/job/sensor/_stop?wait_for_completion=true&timeout=10s
+///
+///
+/// The parameter blocks the API call from returning until either the job has moved to STOPPED or the specified time has elapsed.
+/// If the specified time elapses without the job moving to STOPPED, a timeout exception occurs.
+///
///
public sealed partial class StopJobRequestDescriptor : RequestDescriptor, StopJobRequestParameters>
{
@@ -132,6 +158,17 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
/// If you try to stop a job that does not exist, an exception occurs.
/// If you try to stop a job that is already stopped, nothing happens.
///
+///
+/// Since only a stopped job can be deleted, it can be useful to block the API until the indexer has fully stopped.
+/// This is accomplished with the wait_for_completion query parameter, and optionally a timeout. For example:
+///
+///
+/// POST _rollup/job/sensor/_stop?wait_for_completion=true&timeout=10s
+///
+///
+/// The parameter blocks the API call from returning until either the job has moved to STOPPED or the specified time has elapsed.
+/// If the specified time elapses without the job moving to STOPPED, a timeout exception occurs.
+///
///
public sealed partial class StopJobRequestDescriptor : RequestDescriptor
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollRequest.g.cs
index 71eeba5ada6..a2a70d0c5cd 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollRequest.g.cs
@@ -82,7 +82,7 @@ public sealed partial class ScrollRequest : PlainRequest
///
- /// Period to retain the search context for scrolling.
+ /// The period to retain the search context for scrolling.
///
///
[JsonInclude, JsonPropertyName("scroll")]
@@ -90,7 +90,7 @@ public sealed partial class ScrollRequest : PlainRequest
///
- /// Scroll ID of the search.
+ /// The scroll ID of the search.
///
///
[JsonInclude, JsonPropertyName("scroll_id")]
@@ -142,7 +142,7 @@ public ScrollRequestDescriptor()
///
///
- /// Period to retain the search context for scrolling.
+ /// The period to retain the search context for scrolling.
///
///
public ScrollRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Duration? scroll)
@@ -153,7 +153,7 @@ public ScrollRequestDescriptor Scroll(Elastic.Clients.Elasticsearch.Duration? sc
///
///
- /// Scroll ID of the search.
+ /// The scroll ID of the search.
///
///
public ScrollRequestDescriptor ScrollId(Elastic.Clients.Elasticsearch.ScrollId scrollId)
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollResponse.g.cs
index 056d1985d46..9c67203c91f 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollResponse.g.cs
@@ -34,6 +34,12 @@ public sealed partial class ScrollResponse : ElasticsearchResponse
public Elastic.Clients.Elasticsearch.ClusterStatistics? Clusters { get; init; }
[JsonInclude, JsonPropertyName("fields")]
public IReadOnlyDictionary? Fields { get; init; }
+
+ ///
+ ///
+ /// The returned documents and metadata.
+ ///
+ ///
[JsonInclude, JsonPropertyName("hits")]
public Elastic.Clients.Elasticsearch.Core.Search.HitsMetadata HitsMetadata { get; init; }
[JsonInclude, JsonPropertyName("max_score")]
@@ -44,16 +50,81 @@ public sealed partial class ScrollResponse : ElasticsearchResponse
public string? PitId { get; init; }
[JsonInclude, JsonPropertyName("profile")]
public Elastic.Clients.Elasticsearch.Core.Search.Profile? Profile { get; init; }
+
+ ///
+ ///
+ /// The identifier for the search and its search context.
+ /// You can use this scroll ID with the scroll API to retrieve the next batch of search results for the request.
+ /// This property is returned only if the scroll query parameter is specified in the request.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_scroll_id")]
public Elastic.Clients.Elasticsearch.ScrollId? ScrollId { get; init; }
+
+ ///
+ ///
+ /// A count of shards used for the request.
+ ///
+ ///
[JsonInclude, JsonPropertyName("_shards")]
public Elastic.Clients.Elasticsearch.ShardStatistics Shards { get; init; }
[JsonInclude, JsonPropertyName("suggest")]
public Elastic.Clients.Elasticsearch.Core.Search.SuggestDictionary? Suggest { get; init; }
[JsonInclude, JsonPropertyName("terminated_early")]
public bool? TerminatedEarly { get; init; }
+
+ ///
+ ///
+ /// If true, the request timed out before completion; returned results may be partial or empty.
+ ///
+ ///
[JsonInclude, JsonPropertyName("timed_out")]
public bool TimedOut { get; init; }
+
+ ///
+ ///
+ /// The number of milliseconds it took Elasticsearch to run the request.
+ /// This value is calculated by measuring the time elapsed between receipt of a request on the coordinating node and the time at which the coordinating node is ready to send the response.
+ /// It includes:
+ ///
+ ///
+ /// -
+ ///
+ /// Communication time between the coordinating node and data nodes
+ ///
+ ///
+ /// -
+ ///
+ /// Time the request spends in the search thread pool, queued for execution
+ ///
+ ///
+ /// -
+ ///
+ /// Actual run time
+ ///
+ ///
+ ///
+ ///
+ /// It does not include:
+ ///
+ ///
+ /// -
+ ///
+ /// Time needed to send the request to Elasticsearch
+ ///
+ ///
+ /// -
+ ///
+ /// Time needed to serialize the JSON response
+ ///
+ ///
+ /// -
+ ///
+ /// Time needed to send the response to a client
+ ///
+ ///
+ ///
+ ///
[JsonInclude, JsonPropertyName("took")]
public long Took { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/GetSearchApplicationResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/GetSearchApplicationResponse.g.cs
index e8dfe37f8c5..13bcb8d5841 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/GetSearchApplicationResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/GetSearchApplicationResponse.g.cs
@@ -46,7 +46,7 @@ public sealed partial class GetSearchApplicationResponse : ElasticsearchResponse
///
///
- /// Search Application name
+ /// Search Application name.
///
///
[JsonInclude, JsonPropertyName("name")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/ListRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/ListRequest.g.cs
index 4a1abd18f85..b34b4602f13 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/ListRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/ListRequest.g.cs
@@ -56,7 +56,8 @@ public sealed partial class ListRequestParameters : RequestParameters
///
///
-/// Returns the existing search applications.
+/// Get search applications.
+/// Get information about search applications.
///
///
public sealed partial class ListRequest : PlainRequest
@@ -96,7 +97,8 @@ public sealed partial class ListRequest : PlainRequest
///
///
-/// Returns the existing search applications.
+/// Get search applications.
+/// Get information about search applications.
///
///
public sealed partial class ListRequestDescriptor : RequestDescriptor
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/ListResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/ListResponse.g.cs
index c1945b4a695..634f03fc463 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/ListResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/ListResponse.g.cs
@@ -31,5 +31,5 @@ public sealed partial class ListResponse : ElasticsearchResponse
[JsonInclude, JsonPropertyName("count")]
public long Count { get; init; }
[JsonInclude, JsonPropertyName("results")]
- public IReadOnlyCollection Results { get; init; }
+ public IReadOnlyCollection Results { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/PostBehavioralAnalyticsEventRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/PostBehavioralAnalyticsEventRequest.g.cs
new file mode 100644
index 00000000000..7dc60d7ed16
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/PostBehavioralAnalyticsEventRequest.g.cs
@@ -0,0 +1,125 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Requests;
+using Elastic.Clients.Elasticsearch.Serialization;
+using Elastic.Transport;
+using Elastic.Transport.Extensions;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.SearchApplication;
+
+public sealed partial class PostBehavioralAnalyticsEventRequestParameters : RequestParameters
+{
+ ///
+ ///
+ /// Whether the response type has to include more details
+ ///
+ ///
+ public bool? Debug { get => Q("debug"); set => Q("debug", value); }
+}
+
+///
+///
+/// Create a behavioral analytics collection event.
+///
+///
+public sealed partial class PostBehavioralAnalyticsEventRequest : PlainRequest, ISelfSerializable
+{
+ public PostBehavioralAnalyticsEventRequest(Elastic.Clients.Elasticsearch.Name collectionName, Elastic.Clients.Elasticsearch.SearchApplication.EventType eventType) : base(r => r.Required("collection_name", collectionName).Required("event_type", eventType))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SearchApplicationPostBehavioralAnalyticsEvent;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "search_application.post_behavioral_analytics_event";
+
+ ///
+ ///
+ /// Whether the response type has to include more details
+ ///
+ ///
+ [JsonIgnore]
+ public bool? Debug { get => Q("debug"); set => Q("debug", value); }
+ [JsonIgnore]
+ public object Payload { get; set; }
+
+ void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ JsonSerializer.Serialize(writer, Payload, options);
+ }
+}
+
+///
+///
+/// Create a behavioral analytics collection event.
+///
+///
+public sealed partial class PostBehavioralAnalyticsEventRequestDescriptor : RequestDescriptor
+{
+ internal PostBehavioralAnalyticsEventRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public PostBehavioralAnalyticsEventRequestDescriptor(Elastic.Clients.Elasticsearch.Name collectionName, Elastic.Clients.Elasticsearch.SearchApplication.EventType eventType) : base(r => r.Required("collection_name", collectionName).Required("event_type", eventType))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SearchApplicationPostBehavioralAnalyticsEvent;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "search_application.post_behavioral_analytics_event";
+
+ public PostBehavioralAnalyticsEventRequestDescriptor Debug(bool? debug = true) => Qs("debug", debug);
+
+ public PostBehavioralAnalyticsEventRequestDescriptor CollectionName(Elastic.Clients.Elasticsearch.Name collectionName)
+ {
+ RouteValues.Required("collection_name", collectionName);
+ return Self;
+ }
+
+ public PostBehavioralAnalyticsEventRequestDescriptor EventType(Elastic.Clients.Elasticsearch.SearchApplication.EventType eventType)
+ {
+ RouteValues.Required("event_type", eventType);
+ return Self;
+ }
+
+ private object PayloadValue { get; set; }
+
+ public PostBehavioralAnalyticsEventRequestDescriptor Payload(object payload)
+ {
+ PayloadValue = payload;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ JsonSerializer.Serialize(writer, PayloadValue, options);
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/PostBehavioralAnalyticsEventResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/PostBehavioralAnalyticsEventResponse.g.cs
new file mode 100644
index 00000000000..c9fbc6dc44e
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/PostBehavioralAnalyticsEventResponse.g.cs
@@ -0,0 +1,35 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.SearchApplication;
+
+public sealed partial class PostBehavioralAnalyticsEventResponse : ElasticsearchResponse
+{
+ [JsonInclude, JsonPropertyName("accepted")]
+ public bool Accepted { get; init; }
+ [JsonInclude, JsonPropertyName("event")]
+ public object? Event { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/PutSearchApplicationRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/PutSearchApplicationRequest.g.cs
index 09736ffa1d9..30d3c434500 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/PutSearchApplicationRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/PutSearchApplicationRequest.g.cs
@@ -67,7 +67,7 @@ public PutSearchApplicationRequest(Elastic.Clients.Elasticsearch.Name name) : ba
[JsonIgnore]
public bool? Create { get => Q("create"); set => Q("create", value); }
[JsonIgnore]
- public Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationParameters SearchApplication { get; set; }
+ public Elastic.Clients.Elasticsearch.SearchApplication.SearchApplication SearchApplication { get; set; }
void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
{
@@ -83,7 +83,7 @@ void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions op
public sealed partial class PutSearchApplicationRequestDescriptor : RequestDescriptor
{
internal PutSearchApplicationRequestDescriptor(Action