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 configure) => configure.Invoke(this); - public PutSearchApplicationRequestDescriptor(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationParameters searchApplication, Elastic.Clients.Elasticsearch.Name name) : base(r => r.Required("name", name)) => SearchApplicationValue = searchApplication; + public PutSearchApplicationRequestDescriptor(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplication searchApplication, Elastic.Clients.Elasticsearch.Name name) : base(r => r.Required("name", name)) => SearchApplicationValue = searchApplication; internal override ApiUrls ApiUrls => ApiUrlLookup.SearchApplicationPut; @@ -101,11 +101,11 @@ public PutSearchApplicationRequestDescriptor Name(Elastic.Clients.Elasticsearch. return Self; } - private Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationParameters SearchApplicationValue { get; set; } - private Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationParametersDescriptor SearchApplicationDescriptor { get; set; } - private Action SearchApplicationDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.SearchApplication.SearchApplication SearchApplicationValue { get; set; } + private Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationDescriptor SearchApplicationDescriptor { get; set; } + private Action SearchApplicationDescriptorAction { get; set; } - public PutSearchApplicationRequestDescriptor SearchApplication(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationParameters searchApplication) + public PutSearchApplicationRequestDescriptor SearchApplication(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplication searchApplication) { SearchApplicationDescriptor = null; SearchApplicationDescriptorAction = null; @@ -113,7 +113,7 @@ public PutSearchApplicationRequestDescriptor SearchApplication(Elastic.Clients.E return Self; } - public PutSearchApplicationRequestDescriptor SearchApplication(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationParametersDescriptor descriptor) + public PutSearchApplicationRequestDescriptor SearchApplication(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationDescriptor descriptor) { SearchApplicationValue = null; SearchApplicationDescriptorAction = null; @@ -121,7 +121,7 @@ public PutSearchApplicationRequestDescriptor SearchApplication(Elastic.Clients.E return Self; } - public PutSearchApplicationRequestDescriptor SearchApplication(Action configure) + public PutSearchApplicationRequestDescriptor SearchApplication(Action configure) { SearchApplicationValue = null; SearchApplicationDescriptor = null; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/RenderQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/RenderQueryRequest.g.cs new file mode 100644 index 00000000000..da8e0779a89 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/RenderQueryRequest.g.cs @@ -0,0 +1,118 @@ +// 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 RenderQueryRequestParameters : RequestParameters +{ +} + +/// +/// +/// Render a search application query. +/// Generate an Elasticsearch query using the specified query parameters and the search template associated with the search application or a default template if none is specified. +/// If a parameter used in the search template is not specified in params, the parameter's default value will be used. +/// The API returns the specific Elasticsearch query that would be generated and run by calling the search application search API. +/// +/// +/// You must have read privileges on the backing alias of the search application. +/// +/// +public sealed partial class RenderQueryRequest : PlainRequest +{ + public RenderQueryRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r.Required("name", name)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.SearchApplicationRenderQuery; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "search_application.render_query"; + + [JsonInclude, JsonPropertyName("params")] + public IDictionary? Params { get; set; } +} + +/// +/// +/// Render a search application query. +/// Generate an Elasticsearch query using the specified query parameters and the search template associated with the search application or a default template if none is specified. +/// If a parameter used in the search template is not specified in params, the parameter's default value will be used. +/// The API returns the specific Elasticsearch query that would be generated and run by calling the search application search API. +/// +/// +/// You must have read privileges on the backing alias of the search application. +/// +/// +public sealed partial class RenderQueryRequestDescriptor : RequestDescriptor +{ + internal RenderQueryRequestDescriptor(Action configure) => configure.Invoke(this); + + public RenderQueryRequestDescriptor(Elastic.Clients.Elasticsearch.Name name) : base(r => r.Required("name", name)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.SearchApplicationRenderQuery; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "search_application.render_query"; + + public RenderQueryRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name) + { + RouteValues.Required("name", name); + return Self; + } + + private IDictionary? ParamsValue { get; set; } + + public RenderQueryRequestDescriptor Params(Func, FluentDictionary> selector) + { + ParamsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (ParamsValue is not null) + { + writer.WritePropertyName("params"); + JsonSerializer.Serialize(writer, ParamsValue, options); + } + + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/RenderQueryResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/RenderQueryResponse.g.cs new file mode 100644 index 00000000000..1e3ecd37ae6 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/RenderQueryResponse.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.SearchApplication; + +public sealed partial class RenderQueryResponse : ElasticsearchResponse +{ +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/SearchApplicationSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/SearchApplicationSearchResponse.g.cs index 65205873d88..3a656edaf6f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/SearchApplicationSearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/SearchApplicationSearchResponse.g.cs @@ -34,6 +34,12 @@ public sealed partial class SearchApplicationSearchResponse : Elastic 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 SearchApplicationSearchResponse : Elastic 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/SearchMvtRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchMvtRequest.g.cs index 2863e257262..b42cdd1bb4b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchMvtRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchMvtRequest.g.cs @@ -40,6 +40,193 @@ public sealed partial class SearchMvtRequestParameters : RequestParameters /// /// /// Search a vector tile for geospatial values. +/// Before using this API, you should be familiar with the Mapbox vector tile specification. +/// The API returns results as a binary mapbox vector tile. +/// +/// +/// Internally, Elasticsearch translates a vector tile search API request into a search containing: +/// +/// +/// +/// +/// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. +/// +/// +/// +/// +/// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. +/// +/// +/// +/// +/// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. +/// +/// +/// +/// +/// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. +/// +/// +/// +/// +/// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search +/// +/// +/// GET my-index/_search +/// { +/// "size": 10000, +/// "query": { +/// "geo_bounding_box": { +/// "my-geo-field": { +/// "top_left": { +/// "lat": -40.979898069620134, +/// "lon": -45 +/// }, +/// "bottom_right": { +/// "lat": -66.51326044311186, +/// "lon": 0 +/// } +/// } +/// } +/// }, +/// "aggregations": { +/// "grid": { +/// "geotile_grid": { +/// "field": "my-geo-field", +/// "precision": 11, +/// "size": 65536, +/// "bounds": { +/// "top_left": { +/// "lat": -40.979898069620134, +/// "lon": -45 +/// }, +/// "bottom_right": { +/// "lat": -66.51326044311186, +/// "lon": 0 +/// } +/// } +/// } +/// }, +/// "bounds": { +/// "geo_bounds": { +/// "field": "my-geo-field", +/// "wrap_longitude": false +/// } +/// } +/// } +/// } +/// +/// +/// The API returns results as a binary Mapbox vector tile. +/// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: +/// +/// +/// +/// +/// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. +/// +/// +/// +/// +/// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. +/// +/// +/// +/// +/// A meta layer containing: +/// +/// +/// +/// +/// A feature containing a bounding box. By default, this is the bounding box of the tile. +/// +/// +/// +/// +/// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. +/// +/// +/// +/// +/// Metadata for the search. +/// +/// +/// +/// +/// +/// +/// The API only returns features that can display at its zoom level. +/// For example, if a polygon feature has no area at its zoom level, the API omits it. +/// The API returns errors as UTF-8 encoded JSON. +/// +/// +/// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. +/// If you specify both parameters, the query parameter takes precedence. +/// +/// +/// Grid precision for geotile +/// +/// +/// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. +/// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. +/// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. +/// The maximum final precision is 29. +/// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). +/// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. +/// The aggs layer only contains features for cells with matching data. +/// +/// +/// Grid precision for geohex +/// +/// +/// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. +/// +/// +/// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. +/// The following table maps the H3 resolution for each precision. +/// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. +/// At a precision of 6, hexagonal cells have an H3 resolution of 2. +/// If <zoom> is 3 and grid_precision is 4, the precision is 7. +/// At a precision of 7, hexagonal cells have an H3 resolution of 3. +/// +/// +/// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | +/// | --------- | ---------------- | ------------- | ----------------| ----- | +/// | 1 | 4 | 0 | 122 | 30.5 | +/// | 2 | 16 | 0 | 122 | 7.625 | +/// | 3 | 64 | 1 | 842 | 13.15625 | +/// | 4 | 256 | 1 | 842 | 3.2890625 | +/// | 5 | 1024 | 2 | 5882 | 5.744140625 | +/// | 6 | 4096 | 2 | 5882 | 1.436035156 | +/// | 7 | 16384 | 3 | 41162 | 2.512329102 | +/// | 8 | 65536 | 3 | 41162 | 0.6280822754 | +/// | 9 | 262144 | 4 | 288122 | 1.099098206 | +/// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | +/// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | +/// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | +/// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | +/// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | +/// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | +/// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | +/// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | +/// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | +/// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | +/// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | +/// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | +/// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | +/// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | +/// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | +/// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | +/// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | +/// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | +/// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | +/// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | +/// +/// +/// Hexagonal cells don't align perfectly on a vector tile. +/// Some cells may intersect more than one vector tile. +/// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. +/// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. /// /// public sealed partial class SearchMvtRequest : PlainRequest @@ -61,42 +248,80 @@ public SearchMvtRequest(Elastic.Clients.Elasticsearch.Indices indices, Elastic.C /// Sub-aggregations for the geotile_grid. /// /// - /// Supports the following aggregation types: + /// It supports the following aggregation types: /// /// /// /// - /// avg + /// avg + /// + /// + /// + /// + /// boxplot /// /// /// /// - /// cardinality + /// cardinality /// /// /// /// - /// max + /// extended stats /// /// /// /// - /// min + /// max /// /// /// /// - /// sum + /// median absolute deviation + /// + /// + /// + /// + /// min + /// + /// + /// + /// + /// percentile + /// + /// + /// + /// + /// percentile-rank + /// + /// + /// + /// + /// stats + /// + /// + /// + /// + /// sum + /// + /// + /// + /// + /// value count /// /// /// + /// + /// The aggregation names can't start with _mvt_. The _mvt_ prefix is reserved for internal aggregations. + /// /// [JsonInclude, JsonPropertyName("aggs")] public IDictionary? Aggs { get; set; } /// /// - /// Size, in pixels, of a clipping buffer outside the tile. This allows renderers + /// The size, in pixels, of a clipping buffer outside the tile. This allows renderers /// to avoid outline artifacts from geometries that extend past the extent of the tile. /// /// @@ -105,10 +330,10 @@ public SearchMvtRequest(Elastic.Clients.Elasticsearch.Indices indices, Elastic.C /// /// - /// If false, the meta layer’s feature is the bounding box of the tile. - /// If true, the meta layer’s feature is a bounding box resulting from a - /// geo_bounds aggregation. The aggregation runs on <field> values that intersect - /// the <zoom>/<x>/<y> tile with wrap_longitude set to false. The resulting + /// If false, the meta layer's feature is the bounding box of the tile. + /// If true, the meta layer's feature is a bounding box resulting from a + /// geo_bounds aggregation. The aggregation runs on <field> values that intersect + /// the <zoom>/<x>/<y> tile with wrap_longitude set to false. The resulting /// bounding box may be larger than the vector tile. /// /// @@ -117,7 +342,7 @@ public SearchMvtRequest(Elastic.Clients.Elasticsearch.Indices indices, Elastic.C /// /// - /// Size, in pixels, of a side of the tile. Vector tiles are square with equal sides. + /// The size, in pixels, of a side of the tile. Vector tiles are square with equal sides. /// /// [JsonInclude, JsonPropertyName("extent")] @@ -125,7 +350,8 @@ public SearchMvtRequest(Elastic.Clients.Elasticsearch.Indices indices, Elastic.C /// /// - /// Fields to return in the hits layer. Supports wildcards (*). + /// The fields to return in the hits layer. + /// It supports wildcards (*). /// This parameter does not support fields with array values. Fields with array /// values may return inconsistent results. /// @@ -136,7 +362,7 @@ public SearchMvtRequest(Elastic.Clients.Elasticsearch.Indices indices, Elastic.C /// /// - /// Aggregation used to create a grid for the field. + /// The aggregation used to create a grid for the field. /// /// [JsonInclude, JsonPropertyName("grid_agg")] @@ -144,9 +370,9 @@ public SearchMvtRequest(Elastic.Clients.Elasticsearch.Indices indices, Elastic.C /// /// - /// Additional zoom levels available through the aggs layer. For example, if <zoom> is 7 - /// and grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results - /// don’t include the aggs layer. + /// Additional zoom levels available through the aggs layer. For example, if <zoom> is 7 + /// and grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results + /// don't include the aggs layer. /// /// [JsonInclude, JsonPropertyName("grid_precision")] @@ -155,8 +381,7 @@ public SearchMvtRequest(Elastic.Clients.Elasticsearch.Indices indices, Elastic.C /// /// /// Determines the geometry type for features in the aggs layer. In the aggs layer, - /// each feature represents a geotile_grid cell. If 'grid' each feature is a Polygon - /// of the cells bounding box. If 'point' each feature is a Point that is the centroid + /// each feature represents a geotile_grid cell. If grid, each feature is a polygon of the cells bounding box. If point`, each feature is a Point that is the centroid /// of the cell. /// /// @@ -165,7 +390,7 @@ public SearchMvtRequest(Elastic.Clients.Elasticsearch.Indices indices, Elastic.C /// /// - /// Query DSL used to filter documents for the search. + /// The query DSL used to filter documents for the search. /// /// [JsonInclude, JsonPropertyName("query")] @@ -182,8 +407,8 @@ public SearchMvtRequest(Elastic.Clients.Elasticsearch.Indices indices, Elastic.C /// /// - /// Maximum number of features to return in the hits layer. Accepts 0-10000. - /// If 0, results don’t include the hits layer. + /// The maximum number of features to return in the hits layer. Accepts 0-10000. + /// If 0, results don't include the hits layer. /// /// [JsonInclude, JsonPropertyName("size")] @@ -191,8 +416,8 @@ public SearchMvtRequest(Elastic.Clients.Elasticsearch.Indices indices, Elastic.C /// /// - /// Sorts features in the hits layer. By default, the API calculates a bounding - /// box for each feature. It sorts features based on this box’s diagonal length, + /// Sort the features in the hits layer. By default, the API calculates a bounding + /// box for each feature. It sorts features based on this box's diagonal length, /// from longest to shortest. /// /// @@ -202,7 +427,7 @@ public SearchMvtRequest(Elastic.Clients.Elasticsearch.Indices indices, Elastic.C /// /// - /// Number of hits matching the query to count accurately. If true, the exact number + /// The number of hits matching the query to count accurately. If true, the exact number /// of hits is returned at the cost of some performance. If false, the response does /// not include the total number of hits matching the query. /// @@ -215,6 +440,32 @@ public SearchMvtRequest(Elastic.Clients.Elasticsearch.Indices indices, Elastic.C /// If true, the hits and aggs layers will contain additional point features representing /// suggested label positions for the original features. /// + /// + /// + /// + /// Point and MultiPoint features will have one of the points selected. + /// + /// + /// + /// + /// Polygon and MultiPolygon features will have a single point generated, either the centroid, if it is within the polygon, or another point within the polygon selected from the sorted triangle-tree. + /// + /// + /// + /// + /// LineString features will likewise provide a roughly central point selected from the triangle-tree. + /// + /// + /// + /// + /// The aggregation results will provide one central point for each aggregation bucket. + /// + /// + /// + /// + /// All attributes from the original features will also be copied to the new label features. + /// In addition, the new features will be distinguishable using the tag _mvt_label_position. + /// /// [JsonInclude, JsonPropertyName("with_labels")] public bool? WithLabels { get; set; } @@ -226,6 +477,193 @@ public SearchMvtRequest(Elastic.Clients.Elasticsearch.Indices indices, Elastic.C /// /// /// Search a vector tile for geospatial values. +/// Before using this API, you should be familiar with the Mapbox vector tile specification. +/// The API returns results as a binary mapbox vector tile. +/// +/// +/// Internally, Elasticsearch translates a vector tile search API request into a search containing: +/// +/// +/// +/// +/// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. +/// +/// +/// +/// +/// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. +/// +/// +/// +/// +/// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. +/// +/// +/// +/// +/// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. +/// +/// +/// +/// +/// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search +/// +/// +/// GET my-index/_search +/// { +/// "size": 10000, +/// "query": { +/// "geo_bounding_box": { +/// "my-geo-field": { +/// "top_left": { +/// "lat": -40.979898069620134, +/// "lon": -45 +/// }, +/// "bottom_right": { +/// "lat": -66.51326044311186, +/// "lon": 0 +/// } +/// } +/// } +/// }, +/// "aggregations": { +/// "grid": { +/// "geotile_grid": { +/// "field": "my-geo-field", +/// "precision": 11, +/// "size": 65536, +/// "bounds": { +/// "top_left": { +/// "lat": -40.979898069620134, +/// "lon": -45 +/// }, +/// "bottom_right": { +/// "lat": -66.51326044311186, +/// "lon": 0 +/// } +/// } +/// } +/// }, +/// "bounds": { +/// "geo_bounds": { +/// "field": "my-geo-field", +/// "wrap_longitude": false +/// } +/// } +/// } +/// } +/// +/// +/// The API returns results as a binary Mapbox vector tile. +/// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: +/// +/// +/// +/// +/// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. +/// +/// +/// +/// +/// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. +/// +/// +/// +/// +/// A meta layer containing: +/// +/// +/// +/// +/// A feature containing a bounding box. By default, this is the bounding box of the tile. +/// +/// +/// +/// +/// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. +/// +/// +/// +/// +/// Metadata for the search. +/// +/// +/// +/// +/// +/// +/// The API only returns features that can display at its zoom level. +/// For example, if a polygon feature has no area at its zoom level, the API omits it. +/// The API returns errors as UTF-8 encoded JSON. +/// +/// +/// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. +/// If you specify both parameters, the query parameter takes precedence. +/// +/// +/// Grid precision for geotile +/// +/// +/// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. +/// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. +/// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. +/// The maximum final precision is 29. +/// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). +/// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. +/// The aggs layer only contains features for cells with matching data. +/// +/// +/// Grid precision for geohex +/// +/// +/// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. +/// +/// +/// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. +/// The following table maps the H3 resolution for each precision. +/// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. +/// At a precision of 6, hexagonal cells have an H3 resolution of 2. +/// If <zoom> is 3 and grid_precision is 4, the precision is 7. +/// At a precision of 7, hexagonal cells have an H3 resolution of 3. +/// +/// +/// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | +/// | --------- | ---------------- | ------------- | ----------------| ----- | +/// | 1 | 4 | 0 | 122 | 30.5 | +/// | 2 | 16 | 0 | 122 | 7.625 | +/// | 3 | 64 | 1 | 842 | 13.15625 | +/// | 4 | 256 | 1 | 842 | 3.2890625 | +/// | 5 | 1024 | 2 | 5882 | 5.744140625 | +/// | 6 | 4096 | 2 | 5882 | 1.436035156 | +/// | 7 | 16384 | 3 | 41162 | 2.512329102 | +/// | 8 | 65536 | 3 | 41162 | 0.6280822754 | +/// | 9 | 262144 | 4 | 288122 | 1.099098206 | +/// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | +/// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | +/// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | +/// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | +/// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | +/// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | +/// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | +/// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | +/// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | +/// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | +/// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | +/// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | +/// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | +/// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | +/// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | +/// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | +/// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | +/// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | +/// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | +/// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | +/// +/// +/// Hexagonal cells don't align perfectly on a vector tile. +/// Some cells may intersect more than one vector tile. +/// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. +/// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. /// /// public sealed partial class SearchMvtRequestDescriptor : RequestDescriptor, SearchMvtRequestParameters> @@ -303,35 +741,73 @@ public SearchMvtRequestDescriptor Zoom(int zoom) /// Sub-aggregations for the geotile_grid. /// /// - /// Supports the following aggregation types: + /// It supports the following aggregation types: /// /// /// /// - /// avg + /// avg + /// + /// + /// + /// + /// boxplot + /// + /// + /// + /// + /// cardinality + /// + /// + /// + /// + /// extended stats + /// + /// + /// + /// + /// max + /// + /// + /// + /// + /// median absolute deviation + /// + /// + /// + /// + /// min /// /// /// /// - /// cardinality + /// percentile /// /// /// /// - /// max + /// percentile-rank /// /// /// /// - /// min + /// stats /// /// /// /// - /// sum + /// sum + /// + /// + /// + /// + /// value count /// /// /// + /// + /// The aggregation names can't start with _mvt_. The _mvt_ prefix is reserved for internal aggregations. + /// /// public SearchMvtRequestDescriptor Aggs(Func>, FluentDescriptorDictionary>> selector) { @@ -341,7 +817,7 @@ public SearchMvtRequestDescriptor Aggs(Func /// - /// Size, in pixels, of a clipping buffer outside the tile. This allows renderers + /// The size, in pixels, of a clipping buffer outside the tile. This allows renderers /// to avoid outline artifacts from geometries that extend past the extent of the tile. /// /// @@ -353,10 +829,10 @@ public SearchMvtRequestDescriptor Buffer(int? buffer) /// /// - /// If false, the meta layer’s feature is the bounding box of the tile. - /// If true, the meta layer’s feature is a bounding box resulting from a - /// geo_bounds aggregation. The aggregation runs on <field> values that intersect - /// the <zoom>/<x>/<y> tile with wrap_longitude set to false. The resulting + /// If false, the meta layer's feature is the bounding box of the tile. + /// If true, the meta layer's feature is a bounding box resulting from a + /// geo_bounds aggregation. The aggregation runs on <field> values that intersect + /// the <zoom>/<x>/<y> tile with wrap_longitude set to false. The resulting /// bounding box may be larger than the vector tile. /// /// @@ -368,7 +844,7 @@ public SearchMvtRequestDescriptor ExactBounds(bool? exactBounds = tru /// /// - /// Size, in pixels, of a side of the tile. Vector tiles are square with equal sides. + /// The size, in pixels, of a side of the tile. Vector tiles are square with equal sides. /// /// public SearchMvtRequestDescriptor Extent(int? extent) @@ -379,7 +855,8 @@ public SearchMvtRequestDescriptor Extent(int? extent) /// /// - /// Fields to return in the hits layer. Supports wildcards (*). + /// The fields to return in the hits layer. + /// It supports wildcards (*). /// This parameter does not support fields with array values. Fields with array /// values may return inconsistent results. /// @@ -392,7 +869,7 @@ public SearchMvtRequestDescriptor Fields(Elastic.Clients.Elasticsearc /// /// - /// Aggregation used to create a grid for the field. + /// The aggregation used to create a grid for the field. /// /// public SearchMvtRequestDescriptor GridAgg(Elastic.Clients.Elasticsearch.Core.SearchMvt.GridAggregationType? gridAgg) @@ -403,9 +880,9 @@ public SearchMvtRequestDescriptor GridAgg(Elastic.Clients.Elasticsear /// /// - /// Additional zoom levels available through the aggs layer. For example, if <zoom> is 7 - /// and grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results - /// don’t include the aggs layer. + /// Additional zoom levels available through the aggs layer. For example, if <zoom> is 7 + /// and grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results + /// don't include the aggs layer. /// /// public SearchMvtRequestDescriptor GridPrecision(int? gridPrecision) @@ -417,8 +894,7 @@ public SearchMvtRequestDescriptor GridPrecision(int? gridPrecision) /// /// /// Determines the geometry type for features in the aggs layer. In the aggs layer, - /// each feature represents a geotile_grid cell. If 'grid' each feature is a Polygon - /// of the cells bounding box. If 'point' each feature is a Point that is the centroid + /// each feature represents a geotile_grid cell. If grid, each feature is a polygon of the cells bounding box. If point`, each feature is a Point that is the centroid /// of the cell. /// /// @@ -430,7 +906,7 @@ public SearchMvtRequestDescriptor GridType(Elastic.Clients.Elasticsea /// /// - /// Query DSL used to filter documents for the search. + /// The query DSL used to filter documents for the search. /// /// public SearchMvtRequestDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? query) @@ -471,8 +947,8 @@ public SearchMvtRequestDescriptor RuntimeMappings(Func /// - /// Maximum number of features to return in the hits layer. Accepts 0-10000. - /// If 0, results don’t include the hits layer. + /// The maximum number of features to return in the hits layer. Accepts 0-10000. + /// If 0, results don't include the hits layer. /// /// public SearchMvtRequestDescriptor Size(int? size) @@ -483,8 +959,8 @@ public SearchMvtRequestDescriptor Size(int? size) /// /// - /// Sorts features in the hits layer. By default, the API calculates a bounding - /// box for each feature. It sorts features based on this box’s diagonal length, + /// Sort the features in the hits layer. By default, the API calculates a bounding + /// box for each feature. It sorts features based on this box's diagonal length, /// from longest to shortest. /// /// @@ -526,7 +1002,7 @@ public SearchMvtRequestDescriptor Sort(params Action /// - /// Number of hits matching the query to count accurately. If true, the exact number + /// The number of hits matching the query to count accurately. If true, the exact number /// of hits is returned at the cost of some performance. If false, the response does /// not include the total number of hits matching the query. /// @@ -542,6 +1018,32 @@ public SearchMvtRequestDescriptor TrackTotalHits(Elastic.Clients.Elas /// If true, the hits and aggs layers will contain additional point features representing /// suggested label positions for the original features. /// + /// + /// + /// + /// Point and MultiPoint features will have one of the points selected. + /// + /// + /// + /// + /// Polygon and MultiPolygon features will have a single point generated, either the centroid, if it is within the polygon, or another point within the polygon selected from the sorted triangle-tree. + /// + /// + /// + /// + /// LineString features will likewise provide a roughly central point selected from the triangle-tree. + /// + /// + /// + /// + /// The aggregation results will provide one central point for each aggregation bucket. + /// + /// + /// + /// + /// All attributes from the original features will also be copied to the new label features. + /// In addition, the new features will be distinguishable using the tag _mvt_label_position. + /// /// public SearchMvtRequestDescriptor WithLabels(bool? withLabels = true) { @@ -679,6 +1181,193 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o /// /// /// Search a vector tile for geospatial values. +/// Before using this API, you should be familiar with the Mapbox vector tile specification. +/// The API returns results as a binary mapbox vector tile. +/// +/// +/// Internally, Elasticsearch translates a vector tile search API request into a search containing: +/// +/// +/// +/// +/// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. +/// +/// +/// +/// +/// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. +/// +/// +/// +/// +/// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. +/// +/// +/// +/// +/// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. +/// +/// +/// +/// +/// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search +/// +/// +/// GET my-index/_search +/// { +/// "size": 10000, +/// "query": { +/// "geo_bounding_box": { +/// "my-geo-field": { +/// "top_left": { +/// "lat": -40.979898069620134, +/// "lon": -45 +/// }, +/// "bottom_right": { +/// "lat": -66.51326044311186, +/// "lon": 0 +/// } +/// } +/// } +/// }, +/// "aggregations": { +/// "grid": { +/// "geotile_grid": { +/// "field": "my-geo-field", +/// "precision": 11, +/// "size": 65536, +/// "bounds": { +/// "top_left": { +/// "lat": -40.979898069620134, +/// "lon": -45 +/// }, +/// "bottom_right": { +/// "lat": -66.51326044311186, +/// "lon": 0 +/// } +/// } +/// } +/// }, +/// "bounds": { +/// "geo_bounds": { +/// "field": "my-geo-field", +/// "wrap_longitude": false +/// } +/// } +/// } +/// } +/// +/// +/// The API returns results as a binary Mapbox vector tile. +/// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: +/// +/// +/// +/// +/// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. +/// +/// +/// +/// +/// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. +/// +/// +/// +/// +/// A meta layer containing: +/// +/// +/// +/// +/// A feature containing a bounding box. By default, this is the bounding box of the tile. +/// +/// +/// +/// +/// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. +/// +/// +/// +/// +/// Metadata for the search. +/// +/// +/// +/// +/// +/// +/// The API only returns features that can display at its zoom level. +/// For example, if a polygon feature has no area at its zoom level, the API omits it. +/// The API returns errors as UTF-8 encoded JSON. +/// +/// +/// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. +/// If you specify both parameters, the query parameter takes precedence. +/// +/// +/// Grid precision for geotile +/// +/// +/// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. +/// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. +/// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. +/// The maximum final precision is 29. +/// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). +/// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. +/// The aggs layer only contains features for cells with matching data. +/// +/// +/// Grid precision for geohex +/// +/// +/// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. +/// +/// +/// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. +/// The following table maps the H3 resolution for each precision. +/// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. +/// At a precision of 6, hexagonal cells have an H3 resolution of 2. +/// If <zoom> is 3 and grid_precision is 4, the precision is 7. +/// At a precision of 7, hexagonal cells have an H3 resolution of 3. +/// +/// +/// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | +/// | --------- | ---------------- | ------------- | ----------------| ----- | +/// | 1 | 4 | 0 | 122 | 30.5 | +/// | 2 | 16 | 0 | 122 | 7.625 | +/// | 3 | 64 | 1 | 842 | 13.15625 | +/// | 4 | 256 | 1 | 842 | 3.2890625 | +/// | 5 | 1024 | 2 | 5882 | 5.744140625 | +/// | 6 | 4096 | 2 | 5882 | 1.436035156 | +/// | 7 | 16384 | 3 | 41162 | 2.512329102 | +/// | 8 | 65536 | 3 | 41162 | 0.6280822754 | +/// | 9 | 262144 | 4 | 288122 | 1.099098206 | +/// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | +/// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | +/// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | +/// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | +/// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | +/// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | +/// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | +/// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | +/// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | +/// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | +/// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | +/// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | +/// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | +/// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | +/// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | +/// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | +/// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | +/// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | +/// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | +/// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | +/// +/// +/// Hexagonal cells don't align perfectly on a vector tile. +/// Some cells may intersect more than one vector tile. +/// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. +/// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. /// /// public sealed partial class SearchMvtRequestDescriptor : RequestDescriptor @@ -752,35 +1441,73 @@ public SearchMvtRequestDescriptor Zoom(int zoom) /// Sub-aggregations for the geotile_grid. /// /// - /// Supports the following aggregation types: + /// It supports the following aggregation types: /// /// /// /// - /// avg + /// avg + /// + /// + /// + /// + /// boxplot + /// + /// + /// + /// + /// cardinality + /// + /// + /// + /// + /// extended stats + /// + /// + /// + /// + /// max + /// + /// + /// + /// + /// median absolute deviation + /// + /// + /// + /// + /// min /// /// /// /// - /// cardinality + /// percentile /// /// /// /// - /// max + /// percentile-rank /// /// /// /// - /// min + /// stats /// /// /// /// - /// sum + /// sum + /// + /// + /// + /// + /// value count /// /// /// + /// + /// The aggregation names can't start with _mvt_. The _mvt_ prefix is reserved for internal aggregations. + /// /// public SearchMvtRequestDescriptor Aggs(Func, FluentDescriptorDictionary> selector) { @@ -790,7 +1517,7 @@ public SearchMvtRequestDescriptor Aggs(Func /// - /// Size, in pixels, of a clipping buffer outside the tile. This allows renderers + /// The size, in pixels, of a clipping buffer outside the tile. This allows renderers /// to avoid outline artifacts from geometries that extend past the extent of the tile. /// /// @@ -802,10 +1529,10 @@ public SearchMvtRequestDescriptor Buffer(int? buffer) /// /// - /// If false, the meta layer’s feature is the bounding box of the tile. - /// If true, the meta layer’s feature is a bounding box resulting from a - /// geo_bounds aggregation. The aggregation runs on <field> values that intersect - /// the <zoom>/<x>/<y> tile with wrap_longitude set to false. The resulting + /// If false, the meta layer's feature is the bounding box of the tile. + /// If true, the meta layer's feature is a bounding box resulting from a + /// geo_bounds aggregation. The aggregation runs on <field> values that intersect + /// the <zoom>/<x>/<y> tile with wrap_longitude set to false. The resulting /// bounding box may be larger than the vector tile. /// /// @@ -817,7 +1544,7 @@ public SearchMvtRequestDescriptor ExactBounds(bool? exactBounds = true) /// /// - /// Size, in pixels, of a side of the tile. Vector tiles are square with equal sides. + /// The size, in pixels, of a side of the tile. Vector tiles are square with equal sides. /// /// public SearchMvtRequestDescriptor Extent(int? extent) @@ -828,7 +1555,8 @@ public SearchMvtRequestDescriptor Extent(int? extent) /// /// - /// Fields to return in the hits layer. Supports wildcards (*). + /// The fields to return in the hits layer. + /// It supports wildcards (*). /// This parameter does not support fields with array values. Fields with array /// values may return inconsistent results. /// @@ -841,7 +1569,7 @@ public SearchMvtRequestDescriptor Fields(Elastic.Clients.Elasticsearch.Fields? f /// /// - /// Aggregation used to create a grid for the field. + /// The aggregation used to create a grid for the field. /// /// public SearchMvtRequestDescriptor GridAgg(Elastic.Clients.Elasticsearch.Core.SearchMvt.GridAggregationType? gridAgg) @@ -852,9 +1580,9 @@ public SearchMvtRequestDescriptor GridAgg(Elastic.Clients.Elasticsearch.Core.Sea /// /// - /// Additional zoom levels available through the aggs layer. For example, if <zoom> is 7 - /// and grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results - /// don’t include the aggs layer. + /// Additional zoom levels available through the aggs layer. For example, if <zoom> is 7 + /// and grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results + /// don't include the aggs layer. /// /// public SearchMvtRequestDescriptor GridPrecision(int? gridPrecision) @@ -866,8 +1594,7 @@ public SearchMvtRequestDescriptor GridPrecision(int? gridPrecision) /// /// /// Determines the geometry type for features in the aggs layer. In the aggs layer, - /// each feature represents a geotile_grid cell. If 'grid' each feature is a Polygon - /// of the cells bounding box. If 'point' each feature is a Point that is the centroid + /// each feature represents a geotile_grid cell. If grid, each feature is a polygon of the cells bounding box. If point`, each feature is a Point that is the centroid /// of the cell. /// /// @@ -879,7 +1606,7 @@ public SearchMvtRequestDescriptor GridType(Elastic.Clients.Elasticsearch.Core.Se /// /// - /// Query DSL used to filter documents for the search. + /// The query DSL used to filter documents for the search. /// /// public SearchMvtRequestDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? query) @@ -920,8 +1647,8 @@ public SearchMvtRequestDescriptor RuntimeMappings(Func /// - /// Maximum number of features to return in the hits layer. Accepts 0-10000. - /// If 0, results don’t include the hits layer. + /// The maximum number of features to return in the hits layer. Accepts 0-10000. + /// If 0, results don't include the hits layer. /// /// public SearchMvtRequestDescriptor Size(int? size) @@ -932,8 +1659,8 @@ public SearchMvtRequestDescriptor Size(int? size) /// /// - /// Sorts features in the hits layer. By default, the API calculates a bounding - /// box for each feature. It sorts features based on this box’s diagonal length, + /// Sort the features in the hits layer. By default, the API calculates a bounding + /// box for each feature. It sorts features based on this box's diagonal length, /// from longest to shortest. /// /// @@ -975,7 +1702,7 @@ public SearchMvtRequestDescriptor Sort(params Action /// - /// Number of hits matching the query to count accurately. If true, the exact number + /// The number of hits matching the query to count accurately. If true, the exact number /// of hits is returned at the cost of some performance. If false, the response does /// not include the total number of hits matching the query. /// @@ -991,6 +1718,32 @@ public SearchMvtRequestDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.C /// If true, the hits and aggs layers will contain additional point features representing /// suggested label positions for the original features. /// + /// + /// + /// + /// Point and MultiPoint features will have one of the points selected. + /// + /// + /// + /// + /// Polygon and MultiPolygon features will have a single point generated, either the centroid, if it is within the polygon, or another point within the polygon selected from the sorted triangle-tree. + /// + /// + /// + /// + /// LineString features will likewise provide a roughly central point selected from the triangle-tree. + /// + /// + /// + /// + /// The aggregation results will provide one central point for each aggregation bucket. + /// + /// + /// + /// + /// All attributes from the original features will also be copied to the new label features. + /// In addition, the new features will be distinguishable using the tag _mvt_label_position. + /// /// public SearchMvtRequestDescriptor WithLabels(bool? withLabels = true) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs index 7c11901438f..1ce4a5ef0d8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs @@ -43,23 +43,27 @@ public sealed partial class SearchRequestParameters : RequestParameters /// /// - /// If true, returns partial results if there are shard request timeouts or shard failures. If false, returns an error with no partial results. + /// If true and there are shard request timeouts or shard failures, the request returns partial results. + /// If false, it returns an error with no partial results. + /// + /// + /// To override the default behavior, you can set the search.default_allow_partial_results cluster setting to false. /// /// public bool? AllowPartialSearchResults { get => Q("allow_partial_search_results"); set => Q("allow_partial_search_results", 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); } /// /// - /// If true, wildcard and prefix queries are analyzed. - /// This parameter can only be used when the q query string parameter is specified. + /// 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); } @@ -67,39 +71,39 @@ public sealed partial class SearchRequestParameters : RequestParameters /// /// /// The number of shard results that should be reduced at once on the coordinating node. - /// This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. + /// If the potential number of shards in the request can be large, this value should be used as a protection mechanism to reduce the memory overhead per search request. /// /// public long? BatchedReduceSize { get => Q("batched_reduce_size"); set => Q("batched_reduce_size", value); } /// /// - /// If true, network round-trips between the coordinating node and the remote clusters are minimized when executing cross-cluster search (CCS) requests. + /// If true, network round-trips between the coordinating node and the remote clusters are minimized when running cross-cluster search (CCS) requests. /// /// public bool? CcsMinimizeRoundtrips { get => Q("ccs_minimize_roundtrips"); set => Q("ccs_minimize_roundtrips", value); } /// /// - /// The default operator for query string query: AND or OR. - /// This parameter can only be used when the q query string parameter is specified. + /// The default operator for the 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. - /// 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); } @@ -113,13 +117,6 @@ public sealed partial class SearchRequestParameters : RequestParameters /// public bool? ForceSyntheticSource { get => Q("force_synthetic_source"); set => Q("force_synthetic_source", value); } - /// - /// - /// If true, concrete, expanded or aliased indices will be 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. @@ -130,14 +127,14 @@ public sealed partial class SearchRequestParameters : 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 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? Lenient { get => Q("lenient"); set => Q("lenient", value); } /// /// - /// Defines the number of concurrent shard requests per node this search executes concurrently. + /// The number of concurrent shard requests per node that the search runs concurrently. /// This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests. /// /// @@ -145,42 +142,94 @@ public sealed partial class SearchRequestParameters : RequestParameters /// /// - /// Nodes and shards used for the search. + /// The minimum version of the node that can handle the request. + /// Any handling node with a lower version will fail the request. + /// + /// + public string? MinCompatibleShardNode { get => Q("min_compatible_shard_node"); set => Q("min_compatible_shard_node", value); } + + /// + /// + /// The nodes and shards used for the search. /// By default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness. Valid values are: + /// + /// + /// + /// /// _only_local to run the search only on shards on the local node; + /// + /// + /// + /// /// _local to, if possible, run the search on shards on the local node, or if not, select shards using the default method; + /// + /// + /// + /// /// _only_nodes:<node-id>,<node-id> to run the search on only the specified nodes IDs, where, if suitable shards exist on more than one selected node, use shards on those nodes using the default method, or if none of the specified nodes are available, select shards from any available node using the default method; + /// + /// + /// + /// /// _prefer_nodes:<node-id>,<node-id> to if possible, run the search on the specified nodes IDs, or if not, select shards using the default method; + /// + /// + /// + /// /// _shards:<shard>,<shard> to run the search only on the specified shards; + /// + /// + /// + /// /// <custom-string> (any string that does not start with _) to route searches with the same <custom-string> to the same shards in the same order. /// + /// + /// /// public string? Preference { get => Q("preference"); set => Q("preference", value); } /// /// - /// Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. + /// A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. /// This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method (if date filters are mandatory to match but the shard bounds and the query are disjoint). /// When unspecified, the pre-filter phase is executed if any of these conditions is met: - /// the request targets more than 128 shards; - /// the request targets one or more read-only index; - /// the primary sort of the query targets an indexed field. /// + /// + /// + /// + /// The request targets more than 128 shards. + /// + /// + /// + /// + /// The request targets one or more read-only index. + /// + /// + /// + /// + /// The primary sort of the query targets an indexed field. + /// + /// + /// /// public long? PreFilterShardSize { get => Q("pre_filter_shard_size"); set => Q("pre_filter_shard_size", value); } /// /// - /// Query in the Lucene query string syntax using query parameter search. + /// A query in the Lucene query string syntax. /// Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing. /// + /// + /// IMPORTANT: This parameter overrides the query parameter in the request body. + /// If both parameters are specified, documents matching the query request body parameter are not returned. + /// /// public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } /// /// /// If true, the caching of search results is enabled for requests where size is 0. - /// Defaults to index level settings. + /// It defaults to index level settings. /// /// public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); } @@ -194,23 +243,23 @@ public sealed partial class SearchRequestParameters : 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 to retain the search context for scrolling. See Scroll search results. + /// The period to retain the search context for scrolling. /// By default, this value cannot exceed 1d (24 hours). - /// You can change this limit using the search.max_keep_alive cluster-level setting. + /// You can change this limit by using the search.max_keep_alive cluster-level setting. /// /// public Elastic.Clients.Elasticsearch.Duration? Scroll { get => Q("scroll"); set => Q("scroll", value); } /// /// - /// How distributed term frequencies are calculated for relevance scoring. + /// Indicates how distributed term frequencies are calculated for relevance scoring. /// /// public Elastic.Clients.Elasticsearch.SearchType? SearchType { get => Q("search_type"); set => Q("search_type", value); } @@ -236,23 +285,23 @@ public sealed partial class SearchRequestParameters : RequestParameters /// /// - /// Specifies which field to use for suggestions. + /// The field to use for suggestions. /// /// public Elastic.Clients.Elasticsearch.Field? SuggestField { get => Q("suggest_field"); set => Q("suggest_field", value); } /// /// - /// Specifies the suggest mode. - /// This parameter can only be used when the suggest_field and suggest_text query string parameters are specified. + /// The suggest mode. + /// This parameter can be used only when the suggest_field and suggest_text query string parameters are specified. /// /// public Elastic.Clients.Elasticsearch.SuggestMode? SuggestMode { get => Q("suggest_mode"); set => Q("suggest_mode", value); } /// /// - /// Number of suggestions to return. - /// This parameter can only be used when the suggest_field and suggest_text query string parameters are specified. + /// The number of suggestions to return. + /// This parameter can be used only when the suggest_field and suggest_text query string parameters are specified. /// /// public long? SuggestSize { get => Q("suggest_size"); set => Q("suggest_size", value); } @@ -260,7 +309,7 @@ public sealed partial class SearchRequestParameters : RequestParameters /// /// /// The source text for which the suggestions should be returned. - /// This parameter can only be used when the suggest_field and suggest_text query string parameters are specified. + /// This parameter can be used only when the suggest_field and suggest_text query string parameters are specified. /// /// public string? SuggestText { get => Q("suggest_text"); set => Q("suggest_text", value); } @@ -714,6 +763,26 @@ public override void Write(Utf8JsonWriter writer, SearchRequest value, JsonSeria /// You can provide search queries using the q query string parameter or the request body. /// If both are specified, only the query parameter is used. /// +/// +/// If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges. +/// To search a point in time (PIT) for an alias, you must have the read index privilege for the alias's data streams or indices. +/// +/// +/// Search slicing +/// +/// +/// When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the slice and pit properties. +/// By default the splitting is done first on the shards, then locally on each shard. +/// The local splitting partitions the shard into contiguous ranges based on Lucene document IDs. +/// +/// +/// For instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard. +/// +/// +/// IMPORTANT: The same point-in-time ID should be used for all slices. +/// If different PIT IDs are used, slices can overlap and miss documents. +/// This situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index. +/// /// [JsonConverter(typeof(SearchRequestConverter))] public partial class SearchRequest : PlainRequest @@ -746,7 +815,11 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// If true, returns partial results if there are shard request timeouts or shard failures. If false, returns an error with no partial results. + /// If true and there are shard request timeouts or shard failures, the request returns partial results. + /// If false, it returns an error with no partial results. + /// + /// + /// To override the default behavior, you can set the search.default_allow_partial_results cluster setting to false. /// /// [JsonIgnore] @@ -754,8 +827,8 @@ public SearchRequest(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] @@ -763,8 +836,8 @@ public SearchRequest(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. + /// If true, wildcard and prefix queries are analyzed. + /// This parameter can be used only when the q query string parameter is specified. /// /// [JsonIgnore] @@ -773,7 +846,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// /// The number of shard results that should be reduced at once on the coordinating node. - /// This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. + /// If the potential number of shards in the request can be large, this value should be used as a protection mechanism to reduce the memory overhead per search request. /// /// [JsonIgnore] @@ -781,7 +854,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// If true, network round-trips between the coordinating node and the remote clusters are minimized when executing cross-cluster search (CCS) requests. + /// If true, network round-trips between the coordinating node and the remote clusters are minimized when running cross-cluster search (CCS) requests. /// /// [JsonIgnore] @@ -789,8 +862,8 @@ public SearchRequest(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. + /// The default operator for the query string query: AND or OR. + /// This parameter can be used only when the q query string parameter is specified. /// /// [JsonIgnore] @@ -798,8 +871,8 @@ public SearchRequest(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] @@ -807,9 +880,9 @@ public SearchRequest(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] @@ -825,14 +898,6 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => [JsonIgnore] public bool? ForceSyntheticSource { get => Q("force_synthetic_source"); set => Q("force_synthetic_source", value); } - /// - /// - /// If true, concrete, expanded or aliased indices will be 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. @@ -844,7 +909,7 @@ public SearchRequest(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 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] @@ -852,7 +917,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// Defines the number of concurrent shard requests per node this search executes concurrently. + /// The number of concurrent shard requests per node that the search runs concurrently. /// This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests. /// /// @@ -861,37 +926,90 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// Nodes and shards used for the search. + /// The minimum version of the node that can handle the request. + /// Any handling node with a lower version will fail the request. + /// + /// + [JsonIgnore] + public string? MinCompatibleShardNode { get => Q("min_compatible_shard_node"); set => Q("min_compatible_shard_node", value); } + + /// + /// + /// The nodes and shards used for the search. /// By default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness. Valid values are: + /// + /// + /// + /// /// _only_local to run the search only on shards on the local node; + /// + /// + /// + /// /// _local to, if possible, run the search on shards on the local node, or if not, select shards using the default method; + /// + /// + /// + /// /// _only_nodes:<node-id>,<node-id> to run the search on only the specified nodes IDs, where, if suitable shards exist on more than one selected node, use shards on those nodes using the default method, or if none of the specified nodes are available, select shards from any available node using the default method; + /// + /// + /// + /// /// _prefer_nodes:<node-id>,<node-id> to if possible, run the search on the specified nodes IDs, or if not, select shards using the default method; + /// + /// + /// + /// /// _shards:<shard>,<shard> to run the search only on the specified shards; + /// + /// + /// + /// /// <custom-string> (any string that does not start with _) to route searches with the same <custom-string> to the same shards in the same order. /// + /// + /// /// [JsonIgnore] public string? Preference { get => Q("preference"); set => Q("preference", value); } /// /// - /// Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. + /// A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. /// This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method (if date filters are mandatory to match but the shard bounds and the query are disjoint). /// When unspecified, the pre-filter phase is executed if any of these conditions is met: - /// the request targets more than 128 shards; - /// the request targets one or more read-only index; - /// the primary sort of the query targets an indexed field. /// + /// + /// + /// + /// The request targets more than 128 shards. + /// + /// + /// + /// + /// The request targets one or more read-only index. + /// + /// + /// + /// + /// The primary sort of the query targets an indexed field. + /// + /// + /// /// [JsonIgnore] public long? PreFilterShardSize { get => Q("pre_filter_shard_size"); set => Q("pre_filter_shard_size", value); } /// /// - /// Query in the Lucene query string syntax using query parameter search. + /// A query in the Lucene query string syntax. /// Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing. /// + /// + /// IMPORTANT: This parameter overrides the query parameter in the request body. + /// If both parameters are specified, documents matching the query request body parameter are not returned. + /// /// [JsonIgnore] public string? QueryLuceneSyntax { get => Q("q"); set => Q("q", value); } @@ -899,7 +1017,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// /// If true, the caching of search results is enabled for requests where size is 0. - /// Defaults to index level settings. + /// It defaults to index level settings. /// /// [JsonIgnore] @@ -915,7 +1033,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(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] @@ -923,9 +1041,9 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// Period to retain the search context for scrolling. See Scroll search results. + /// The period to retain the search context for scrolling. /// By default, this value cannot exceed 1d (24 hours). - /// You can change this limit using the search.max_keep_alive cluster-level setting. + /// You can change this limit by using the search.max_keep_alive cluster-level setting. /// /// [JsonIgnore] @@ -933,7 +1051,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// How distributed term frequencies are calculated for relevance scoring. + /// Indicates how distributed term frequencies are calculated for relevance scoring. /// /// [JsonIgnore] @@ -962,7 +1080,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// Specifies which field to use for suggestions. + /// The field to use for suggestions. /// /// [JsonIgnore] @@ -970,8 +1088,8 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// Specifies the suggest mode. - /// This parameter can only be used when the suggest_field and suggest_text query string parameters are specified. + /// The suggest mode. + /// This parameter can be used only when the suggest_field and suggest_text query string parameters are specified. /// /// [JsonIgnore] @@ -979,8 +1097,8 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// Number of suggestions to return. - /// This parameter can only be used when the suggest_field and suggest_text query string parameters are specified. + /// The number of suggestions to return. + /// This parameter can be used only when the suggest_field and suggest_text query string parameters are specified. /// /// [JsonIgnore] @@ -989,7 +1107,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// /// The source text for which the suggestions should be returned. - /// This parameter can only be used when the suggest_field and suggest_text query string parameters are specified. + /// This parameter can be used only when the suggest_field and suggest_text query string parameters are specified. /// /// [JsonIgnore] @@ -1021,7 +1139,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// Array of wildcard (*) patterns. + /// An array of wildcard (*) field patterns. /// The request returns doc values for field names matching these patterns in the hits.fields property of the response. /// /// @@ -1030,7 +1148,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// If true, returns detailed information about score computation as part of a hit. + /// If true, the request returns detailed information about score computation as part of a hit. /// /// [JsonInclude, JsonPropertyName("explain")] @@ -1046,7 +1164,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// Array of wildcard (*) patterns. + /// An array of wildcard (*) field patterns. /// The request returns values for field names matching these patterns in the hits.fields property of the response. /// /// @@ -1055,8 +1173,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// Starting document offset. - /// Needs to be non-negative. + /// The starting document offset, which must be non-negative. /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// @@ -1074,7 +1191,10 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// Boosts the _score of documents from specified indices. + /// Boost the _score of documents from specified indices. + /// The boost value is the factor by which scores are multiplied. + /// A boost value greater than 1.0 increases the score. + /// A boost value between 0 and 1.0 decreases the score. /// /// [JsonInclude, JsonPropertyName("indices_boost")] @@ -1082,7 +1202,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// Defines the approximate kNN search to run. + /// The approximate kNN search to run. /// /// [JsonInclude, JsonPropertyName("knn")] @@ -1091,7 +1211,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// Minimum _score for matching documents. + /// The minimum _score for matching documents. /// Documents with a lower _score are not included in the search results. /// /// @@ -1100,7 +1220,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// Limits the search to a point in time (PIT). + /// Limit the search to a point in time (PIT). /// If you provide a PIT, you cannot specify an <index> in the request path. /// /// @@ -1128,7 +1248,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// Defines the search definition using the Query DSL. + /// The search definition using the Query DSL. /// /// [JsonInclude, JsonPropertyName("query")] @@ -1136,7 +1256,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// Defines the Reciprocal Rank Fusion (RRF) to use. + /// The Reciprocal Rank Fusion (RRF) to use. /// /// [JsonInclude, JsonPropertyName("rank")] @@ -1153,7 +1273,8 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// A retriever is a specification to describe top documents returned from a search. A retriever replaces other elements of the search API that also return top documents such as query and knn. + /// A retriever is a specification to describe top documents returned from a search. + /// A retriever replaces other elements of the search API that also return top documents such as query and knn. /// /// [JsonInclude, JsonPropertyName("retriever")] @@ -1161,7 +1282,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// Defines one or more runtime fields in the search request. + /// One or more runtime fields in the search request. /// These fields take precedence over mapped fields with the same name. /// /// @@ -1186,7 +1307,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// If true, returns sequence number and primary term of the last modification of each hit. + /// If true, the request returns sequence number and primary term of the last modification of each hit. /// /// [JsonInclude, JsonPropertyName("seq_no_primary_term")] @@ -1194,9 +1315,9 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// The number of hits to return. + /// The number of hits to return, which must not be negative. /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. + /// To page through more hits, use the search_after property. /// /// [JsonInclude, JsonPropertyName("size")] @@ -1204,7 +1325,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// Can be used to split a scrolled search into multiple slices that can be consumed independently. + /// Split a scrolled search into multiple slices that can be consumed independently. /// /// [JsonInclude, JsonPropertyName("slice")] @@ -1221,8 +1342,10 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// Indicates which source fields are returned for matching documents. - /// These fields are returned in the hits._source property of the search response. + /// The source fields that are returned for matching documents. + /// These fields are returned in the hits._source property of the search response. + /// If the stored_fields property is specified, the _source property defaults to false. + /// Otherwise, it defaults to true. /// /// [JsonInclude, JsonPropertyName("_source")] @@ -1230,7 +1353,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// Stats groups to associate with the search. + /// The stats groups to associate with the search. /// Each group maintains a statistics aggregation for its associated searches. /// You can retrieve these stats using the indices stats API. /// @@ -1240,9 +1363,9 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// 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 property defaults to false. /// You can pass _source: true to return both source fields and stored fields in the search response. /// /// @@ -1260,13 +1383,17 @@ public SearchRequest(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. - /// Use with caution. - /// Elasticsearch applies this parameter to each shard handling the request. + /// + /// + /// IMPORTANT: Use with caution. + /// Elasticsearch applies this property 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. + /// Avoid specifying this property for requests that target data streams with backing indices across multiple data tiers. + /// + /// /// If set to 0 (default), the query does not terminate early. /// /// @@ -1275,7 +1402,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// Specifies the period of time to wait for a response from each shard. + /// The period of time to wait for a response from each shard. /// If no response is received before the timeout expires, the request fails and returns an error. /// Defaults to no timeout. /// @@ -1285,7 +1412,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// If true, calculate and return document scores, even if the scores are not used for sorting. + /// If true, calculate and return document scores, even if the scores are not used for sorting. /// /// [JsonInclude, JsonPropertyName("track_scores")] @@ -1303,7 +1430,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// /// - /// If true, returns document version as part of a hit. + /// If true, the request returns the document version as part of a hit. /// /// [JsonInclude, JsonPropertyName("version")] @@ -1319,6 +1446,26 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// You can provide search queries using the q query string parameter or the request body. /// If both are specified, only the query parameter is used. /// +/// +/// If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges. +/// To search a point in time (PIT) for an alias, you must have the read index privilege for the alias's data streams or indices. +/// +/// +/// Search slicing +/// +/// +/// When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the slice and pit properties. +/// By default the splitting is done first on the shards, then locally on each shard. +/// The local splitting partitions the shard into contiguous ranges based on Lucene document IDs. +/// +/// +/// For instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard. +/// +/// +/// IMPORTANT: The same point-in-time ID should be used for all slices. +/// If different PIT IDs are used, slices can overlap and miss documents. +/// This situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index. +/// /// public sealed partial class SearchRequestDescriptor : RequestDescriptor, SearchRequestParameters> { @@ -1350,10 +1497,10 @@ public SearchRequestDescriptor() public SearchRequestDescriptor Df(string? df) => Qs("df", df); public SearchRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public SearchRequestDescriptor ForceSyntheticSource(bool? forceSyntheticSource = true) => Qs("force_synthetic_source", forceSyntheticSource); - public SearchRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled); public SearchRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); public SearchRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public SearchRequestDescriptor MaxConcurrentShardRequests(long? maxConcurrentShardRequests) => Qs("max_concurrent_shard_requests", maxConcurrentShardRequests); + public SearchRequestDescriptor MinCompatibleShardNode(string? minCompatibleShardNode) => Qs("min_compatible_shard_node", minCompatibleShardNode); public SearchRequestDescriptor Preference(string? preference) => Qs("preference", preference); public SearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); public SearchRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); @@ -1486,7 +1633,7 @@ public SearchRequestDescriptor Collapse(Action /// - /// Array of wildcard (*) patterns. + /// An array of wildcard (*) field patterns. /// The request returns doc values for field names matching these patterns in the hits.fields property of the response. /// /// @@ -1528,7 +1675,7 @@ public SearchRequestDescriptor DocvalueFields(params Action /// - /// If true, returns detailed information about score computation as part of a hit. + /// If true, the request returns detailed information about score computation as part of a hit. /// /// public SearchRequestDescriptor Explain(bool? explain = true) @@ -1550,7 +1697,7 @@ public SearchRequestDescriptor Ext(Func /// - /// Array of wildcard (*) patterns. + /// An array of wildcard (*) field patterns. /// The request returns values for field names matching these patterns in the hits.fields property of the response. /// /// @@ -1592,8 +1739,7 @@ public SearchRequestDescriptor Fields(params Action /// - /// Starting document offset. - /// Needs to be non-negative. + /// The starting document offset, which must be non-negative. /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// @@ -1635,7 +1781,10 @@ public SearchRequestDescriptor Highlight(Action /// - /// Boosts the _score of documents from specified indices. + /// Boost the _score of documents from specified indices. + /// The boost value is the factor by which scores are multiplied. + /// A boost value greater than 1.0 increases the score. + /// A boost value between 0 and 1.0 decreases the score. /// /// public SearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) @@ -1646,7 +1795,7 @@ public SearchRequestDescriptor IndicesBoost(ICollection /// - /// Defines the approximate kNN search to run. + /// The approximate kNN search to run. /// /// public SearchRequestDescriptor Knn(ICollection? knn) @@ -1687,7 +1836,7 @@ public SearchRequestDescriptor Knn(params Action /// - /// Minimum _score for matching documents. + /// The minimum _score for matching documents. /// Documents with a lower _score are not included in the search results. /// /// @@ -1699,7 +1848,7 @@ public SearchRequestDescriptor MinScore(double? minScore) /// /// - /// Limits the search to a point in time (PIT). + /// Limit the search to a point in time (PIT). /// If you provide a PIT, you cannot specify an <index> in the request path. /// /// @@ -1772,7 +1921,7 @@ public SearchRequestDescriptor Profile(bool? profile = true) /// /// - /// Defines the search definition using the Query DSL. + /// The search definition using the Query DSL. /// /// public SearchRequestDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? query) @@ -1801,7 +1950,7 @@ public SearchRequestDescriptor Query(Action /// - /// Defines the Reciprocal Rank Fusion (RRF) to use. + /// The Reciprocal Rank Fusion (RRF) to use. /// /// public SearchRequestDescriptor Rank(Elastic.Clients.Elasticsearch.Rank? rank) @@ -1871,7 +2020,8 @@ public SearchRequestDescriptor Rescore(params Action /// - /// A retriever is a specification to describe top documents returned from a search. A retriever replaces other elements of the search API that also return top documents such as query and knn. + /// A retriever is a specification to describe top documents returned from a search. + /// A retriever replaces other elements of the search API that also return top documents such as query and knn. /// /// public SearchRequestDescriptor Retriever(Elastic.Clients.Elasticsearch.Retriever? retriever) @@ -1900,7 +2050,7 @@ public SearchRequestDescriptor Retriever(Action /// - /// Defines one or more runtime fields in the search request. + /// One or more runtime fields in the search request. /// These fields take precedence over mapped fields with the same name. /// /// @@ -1934,7 +2084,7 @@ public SearchRequestDescriptor SearchAfter(ICollection /// - /// If true, returns sequence number and primary term of the last modification of each hit. + /// If true, the request returns sequence number and primary term of the last modification of each hit. /// /// public SearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) @@ -1945,9 +2095,9 @@ public SearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTer /// /// - /// The number of hits to return. + /// The number of hits to return, which must not be negative. /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. + /// To page through more hits, use the search_after property. /// /// public SearchRequestDescriptor Size(int? size) @@ -1958,7 +2108,7 @@ public SearchRequestDescriptor Size(int? size) /// /// - /// Can be used to split a scrolled search into multiple slices that can be consumed independently. + /// Split a scrolled search into multiple slices that can be consumed independently. /// /// public SearchRequestDescriptor Slice(Elastic.Clients.Elasticsearch.SlicedScroll? slice) @@ -2028,8 +2178,10 @@ public SearchRequestDescriptor Sort(params Action /// - /// Indicates which source fields are returned for matching documents. - /// These fields are returned in the hits._source property of the search response. + /// The source fields that are returned for matching documents. + /// These fields are returned in the hits._source property of the search response. + /// If the stored_fields property is specified, the _source property defaults to false. + /// Otherwise, it defaults to true. /// /// public SearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) @@ -2040,7 +2192,7 @@ public SearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.C /// /// - /// Stats groups to associate with the search. + /// The stats groups to associate with the search. /// Each group maintains a statistics aggregation for its associated searches. /// You can retrieve these stats using the indices stats API. /// @@ -2053,9 +2205,9 @@ public SearchRequestDescriptor Stats(ICollection? stats) /// /// - /// 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 property defaults to false. /// You can pass _source: true to return both source fields and stored fields in the search response. /// /// @@ -2096,13 +2248,17 @@ public SearchRequestDescriptor Suggest(Action /// - /// 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. + /// + /// + /// IMPORTANT: Use with caution. + /// Elasticsearch applies this property 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. + /// Avoid specifying this property for requests that target data streams with backing indices across multiple data tiers. + /// + /// /// If set to 0 (default), the query does not terminate early. /// /// @@ -2114,7 +2270,7 @@ public SearchRequestDescriptor TerminateAfter(long? terminateAfter) /// /// - /// Specifies the period of time to wait for a response from each shard. + /// The period of time to wait for a response from each shard. /// If no response is received before the timeout expires, the request fails and returns an error. /// Defaults to no timeout. /// @@ -2127,7 +2283,7 @@ public SearchRequestDescriptor Timeout(string? timeout) /// /// - /// If true, calculate and return document scores, even if the scores are not used for sorting. + /// If true, calculate and return document scores, even if the scores are not used for sorting. /// /// public SearchRequestDescriptor TrackScores(bool? trackScores = true) @@ -2151,7 +2307,7 @@ public SearchRequestDescriptor TrackTotalHits(Elastic.Clients.Elastic /// /// - /// If true, returns document version as part of a hit. + /// If true, the request returns the document version as part of a hit. /// /// public SearchRequestDescriptor Version(bool? version = true) @@ -2589,6 +2745,26 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o /// You can provide search queries using the q query string parameter or the request body. /// If both are specified, only the query parameter is used. /// +/// +/// If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges. +/// To search a point in time (PIT) for an alias, you must have the read index privilege for the alias's data streams or indices. +/// +/// +/// Search slicing +/// +/// +/// When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the slice and pit properties. +/// By default the splitting is done first on the shards, then locally on each shard. +/// The local splitting partitions the shard into contiguous ranges based on Lucene document IDs. +/// +/// +/// For instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard. +/// +/// +/// IMPORTANT: The same point-in-time ID should be used for all slices. +/// If different PIT IDs are used, slices can overlap and miss documents. +/// This situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index. +/// /// public sealed partial class SearchRequestDescriptor : RequestDescriptor { @@ -2620,10 +2796,10 @@ public SearchRequestDescriptor() public SearchRequestDescriptor Df(string? df) => Qs("df", df); public SearchRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); public SearchRequestDescriptor ForceSyntheticSource(bool? forceSyntheticSource = true) => Qs("force_synthetic_source", forceSyntheticSource); - public SearchRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled); public SearchRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); public SearchRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); public SearchRequestDescriptor MaxConcurrentShardRequests(long? maxConcurrentShardRequests) => Qs("max_concurrent_shard_requests", maxConcurrentShardRequests); + public SearchRequestDescriptor MinCompatibleShardNode(string? minCompatibleShardNode) => Qs("min_compatible_shard_node", minCompatibleShardNode); public SearchRequestDescriptor Preference(string? preference) => Qs("preference", preference); public SearchRequestDescriptor PreFilterShardSize(long? preFilterShardSize) => Qs("pre_filter_shard_size", preFilterShardSize); public SearchRequestDescriptor QueryLuceneSyntax(string? queryLuceneSyntax) => Qs("q", queryLuceneSyntax); @@ -2756,7 +2932,7 @@ public SearchRequestDescriptor Collapse(Action /// - /// Array of wildcard (*) patterns. + /// An array of wildcard (*) field patterns. /// The request returns doc values for field names matching these patterns in the hits.fields property of the response. /// /// @@ -2798,7 +2974,7 @@ public SearchRequestDescriptor DocvalueFields(params Action /// - /// If true, returns detailed information about score computation as part of a hit. + /// If true, the request returns detailed information about score computation as part of a hit. /// /// public SearchRequestDescriptor Explain(bool? explain = true) @@ -2820,7 +2996,7 @@ public SearchRequestDescriptor Ext(Func, Fluent /// /// - /// Array of wildcard (*) patterns. + /// An array of wildcard (*) field patterns. /// The request returns values for field names matching these patterns in the hits.fields property of the response. /// /// @@ -2862,8 +3038,7 @@ public SearchRequestDescriptor Fields(params Action /// - /// Starting document offset. - /// Needs to be non-negative. + /// The starting document offset, which must be non-negative. /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// @@ -2905,7 +3080,10 @@ public SearchRequestDescriptor Highlight(Action /// - /// Boosts the _score of documents from specified indices. + /// Boost the _score of documents from specified indices. + /// The boost value is the factor by which scores are multiplied. + /// A boost value greater than 1.0 increases the score. + /// A boost value between 0 and 1.0 decreases the score. /// /// public SearchRequestDescriptor IndicesBoost(ICollection>? indicesBoost) @@ -2916,7 +3094,7 @@ public SearchRequestDescriptor IndicesBoost(ICollection /// - /// Defines the approximate kNN search to run. + /// The approximate kNN search to run. /// /// public SearchRequestDescriptor Knn(ICollection? knn) @@ -2957,7 +3135,7 @@ public SearchRequestDescriptor Knn(params Action /// - /// Minimum _score for matching documents. + /// The minimum _score for matching documents. /// Documents with a lower _score are not included in the search results. /// /// @@ -2969,7 +3147,7 @@ public SearchRequestDescriptor MinScore(double? minScore) /// /// - /// Limits the search to a point in time (PIT). + /// Limit the search to a point in time (PIT). /// If you provide a PIT, you cannot specify an <index> in the request path. /// /// @@ -3042,7 +3220,7 @@ public SearchRequestDescriptor Profile(bool? profile = true) /// /// - /// Defines the search definition using the Query DSL. + /// The search definition using the Query DSL. /// /// public SearchRequestDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? query) @@ -3071,7 +3249,7 @@ public SearchRequestDescriptor Query(Action /// - /// Defines the Reciprocal Rank Fusion (RRF) to use. + /// The Reciprocal Rank Fusion (RRF) to use. /// /// public SearchRequestDescriptor Rank(Elastic.Clients.Elasticsearch.Rank? rank) @@ -3141,7 +3319,8 @@ public SearchRequestDescriptor Rescore(params Action /// - /// A retriever is a specification to describe top documents returned from a search. A retriever replaces other elements of the search API that also return top documents such as query and knn. + /// A retriever is a specification to describe top documents returned from a search. + /// A retriever replaces other elements of the search API that also return top documents such as query and knn. /// /// public SearchRequestDescriptor Retriever(Elastic.Clients.Elasticsearch.Retriever? retriever) @@ -3170,7 +3349,7 @@ public SearchRequestDescriptor Retriever(Action /// - /// Defines one or more runtime fields in the search request. + /// One or more runtime fields in the search request. /// These fields take precedence over mapped fields with the same name. /// /// @@ -3204,7 +3383,7 @@ public SearchRequestDescriptor SearchAfter(ICollection /// - /// If true, returns sequence number and primary term of the last modification of each hit. + /// If true, the request returns sequence number and primary term of the last modification of each hit. /// /// public SearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) @@ -3215,9 +3394,9 @@ public SearchRequestDescriptor SeqNoPrimaryTerm(bool? seqNoPrimaryTerm = true) /// /// - /// The number of hits to return. + /// The number of hits to return, which must not be negative. /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. + /// To page through more hits, use the search_after property. /// /// public SearchRequestDescriptor Size(int? size) @@ -3228,7 +3407,7 @@ public SearchRequestDescriptor Size(int? size) /// /// - /// Can be used to split a scrolled search into multiple slices that can be consumed independently. + /// Split a scrolled search into multiple slices that can be consumed independently. /// /// public SearchRequestDescriptor Slice(Elastic.Clients.Elasticsearch.SlicedScroll? slice) @@ -3298,8 +3477,10 @@ public SearchRequestDescriptor Sort(params Action /// - /// Indicates which source fields are returned for matching documents. - /// These fields are returned in the hits._source property of the search response. + /// The source fields that are returned for matching documents. + /// These fields are returned in the hits._source property of the search response. + /// If the stored_fields property is specified, the _source property defaults to false. + /// Otherwise, it defaults to true. /// /// public SearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) @@ -3310,7 +3491,7 @@ public SearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search. /// /// - /// Stats groups to associate with the search. + /// The stats groups to associate with the search. /// Each group maintains a statistics aggregation for its associated searches. /// You can retrieve these stats using the indices stats API. /// @@ -3323,9 +3504,9 @@ public SearchRequestDescriptor Stats(ICollection? stats) /// /// - /// 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 property defaults to false. /// You can pass _source: true to return both source fields and stored fields in the search response. /// /// @@ -3366,13 +3547,17 @@ public SearchRequestDescriptor Suggest(Action /// - /// 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. + /// + /// + /// IMPORTANT: Use with caution. + /// Elasticsearch applies this property 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. + /// Avoid specifying this property for requests that target data streams with backing indices across multiple data tiers. + /// + /// /// If set to 0 (default), the query does not terminate early. /// /// @@ -3384,7 +3569,7 @@ public SearchRequestDescriptor TerminateAfter(long? terminateAfter) /// /// - /// Specifies the period of time to wait for a response from each shard. + /// The period of time to wait for a response from each shard. /// If no response is received before the timeout expires, the request fails and returns an error. /// Defaults to no timeout. /// @@ -3397,7 +3582,7 @@ public SearchRequestDescriptor Timeout(string? timeout) /// /// - /// If true, calculate and return document scores, even if the scores are not used for sorting. + /// If true, calculate and return document scores, even if the scores are not used for sorting. /// /// public SearchRequestDescriptor TrackScores(bool? trackScores = true) @@ -3421,7 +3606,7 @@ public SearchRequestDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Core /// /// - /// If true, returns document version as part of a hit. + /// If true, the request returns the document version as part of a hit. /// /// public SearchRequestDescriptor Version(bool? version = true) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs index 2d2eba622c5..bb1afb949ed 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs @@ -34,6 +34,12 @@ public sealed partial class SearchResponse : 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 SearchResponse : 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/SearchShardsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsRequest.g.cs index 9e3baa8588e..ca5f0caf3ea 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsRequest.g.cs @@ -67,15 +67,15 @@ public sealed partial class SearchShardsRequestParameters : 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. + /// It is random by default. /// /// public string? Preference { get => Q("preference"); set => Q("preference", 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); } @@ -88,7 +88,10 @@ public sealed partial class SearchShardsRequestParameters : RequestParameters /// /// Get the indices and shards that a search request would be run against. /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. -/// When filtered aliases are used, the filter is returned as part of the indices section. +/// When filtered aliases are used, the filter is returned as part of the indices section. +/// +/// +/// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// /// public sealed partial class SearchShardsRequest : PlainRequest @@ -148,8 +151,8 @@ public SearchShardsRequest(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] @@ -157,7 +160,7 @@ public SearchShardsRequest(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] @@ -171,7 +174,10 @@ public SearchShardsRequest(Elastic.Clients.Elasticsearch.Indices? indices) : bas /// /// Get the indices and shards that a search request would be run against. /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. -/// When filtered aliases are used, the filter is returned as part of the indices section. +/// When filtered aliases are used, the filter is returned as part of the indices section. +/// +/// +/// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// /// public sealed partial class SearchShardsRequestDescriptor : RequestDescriptor, SearchShardsRequestParameters> @@ -219,7 +225,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o /// /// Get the indices and shards that a search request would be run against. /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. -/// When filtered aliases are used, the filter is returned as part of the indices section. +/// When filtered aliases are used, the filter is returned as part of the indices section. +/// +/// +/// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// /// public sealed partial class SearchShardsRequestDescriptor : RequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateRequest.g.cs index 79f27aa0434..e72ff281349 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateRequest.g.cs @@ -50,7 +50,7 @@ public sealed partial class SearchTemplateRequestParameters : 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. @@ -58,13 +58,6 @@ public sealed partial class SearchTemplateRequestParameters : RequestParameters /// public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - /// - /// - /// If true, specified concrete, expanded, or aliased indices are not included in the response when throttled. - /// - /// - 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. @@ -74,22 +67,23 @@ public sealed partial class SearchTemplateRequestParameters : 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. + /// It is random by default. /// /// public string? Preference { get => Q("preference"); set => Q("preference", value); } /// /// - /// If true, hits.total are rendered as an integer in the response. + /// If true, hits.total is rendered as an integer in the response. + /// If false, it is rendered as an object. /// /// public bool? RestTotalHitsAsInt { get => Q("rest_total_hits_as_int"); set => Q("rest_total_hits_as_int", 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); } @@ -160,7 +154,7 @@ public SearchTemplateRequest(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. @@ -169,14 +163,6 @@ public SearchTemplateRequest(Elastic.Clients.Elasticsearch.Indices? indices) : b [JsonIgnore] public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } - /// - /// - /// If true, specified concrete, expanded, or aliased indices are not included in the response when throttled. - /// - /// - [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. @@ -187,8 +173,8 @@ public SearchTemplateRequest(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. + /// It is random by default. /// /// [JsonIgnore] @@ -196,7 +182,8 @@ public SearchTemplateRequest(Elastic.Clients.Elasticsearch.Indices? indices) : b /// /// - /// If true, hits.total are rendered as an integer in the response. + /// If true, hits.total is rendered as an integer in the response. + /// If false, it is rendered as an object. /// /// [JsonIgnore] @@ -204,7 +191,7 @@ public SearchTemplateRequest(Elastic.Clients.Elasticsearch.Indices? indices) : b /// /// - /// Custom value used to route operations to a specific shard. + /// A custom value used to route operations to a specific shard. /// /// [JsonIgnore] @@ -238,6 +225,7 @@ public SearchTemplateRequest(Elastic.Clients.Elasticsearch.Indices? indices) : b /// /// /// If true, returns detailed information about score calculation as part of each hit. + /// If you specify both this and the explain query parameter, the API uses only the query parameter. /// /// [JsonInclude, JsonPropertyName("explain")] @@ -245,7 +233,7 @@ public SearchTemplateRequest(Elastic.Clients.Elasticsearch.Indices? indices) : b /// /// - /// ID of the search template to use. If no source is specified, + /// The ID of the search template to use. If no source is specified, /// this parameter is required. /// /// @@ -273,7 +261,7 @@ public SearchTemplateRequest(Elastic.Clients.Elasticsearch.Indices? indices) : b /// /// /// An inline search template. Supports the same parameters as the search API's - /// request body. Also supports Mustache variables. If no id is specified, this + /// request body. It also supports Mustache variables. If no id is specified, this /// parameter is required. /// /// @@ -309,7 +297,6 @@ public SearchTemplateRequestDescriptor() public SearchTemplateRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public SearchTemplateRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); public SearchTemplateRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public SearchTemplateRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled); public SearchTemplateRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); public SearchTemplateRequestDescriptor Preference(string? preference) => Qs("preference", preference); public SearchTemplateRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); @@ -333,6 +320,7 @@ public SearchTemplateRequestDescriptor Indices(Elastic.Clients.Elasti /// /// /// If true, returns detailed information about score calculation as part of each hit. + /// If you specify both this and the explain query parameter, the API uses only the query parameter. /// /// public SearchTemplateRequestDescriptor Explain(bool? explain = true) @@ -343,7 +331,7 @@ public SearchTemplateRequestDescriptor Explain(bool? explain = true) /// /// - /// ID of the search template to use. If no source is specified, + /// The ID of the search template to use. If no source is specified, /// this parameter is required. /// /// @@ -380,7 +368,7 @@ public SearchTemplateRequestDescriptor Profile(bool? profile = true) /// /// /// An inline search template. Supports the same parameters as the search API's - /// request body. Also supports Mustache variables. If no id is specified, this + /// request body. It also supports Mustache variables. If no id is specified, this /// parameter is required. /// /// @@ -455,7 +443,6 @@ public SearchTemplateRequestDescriptor() public SearchTemplateRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); public SearchTemplateRequestDescriptor CcsMinimizeRoundtrips(bool? ccsMinimizeRoundtrips = true) => Qs("ccs_minimize_roundtrips", ccsMinimizeRoundtrips); public SearchTemplateRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); - public SearchTemplateRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled); public SearchTemplateRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); public SearchTemplateRequestDescriptor Preference(string? preference) => Qs("preference", preference); public SearchTemplateRequestDescriptor RestTotalHitsAsInt(bool? restTotalHitsAsInt = true) => Qs("rest_total_hits_as_int", restTotalHitsAsInt); @@ -479,6 +466,7 @@ public SearchTemplateRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Ind /// /// /// If true, returns detailed information about score calculation as part of each hit. + /// If you specify both this and the explain query parameter, the API uses only the query parameter. /// /// public SearchTemplateRequestDescriptor Explain(bool? explain = true) @@ -489,7 +477,7 @@ public SearchTemplateRequestDescriptor Explain(bool? explain = true) /// /// - /// ID of the search template to use. If no source is specified, + /// The ID of the search template to use. If no source is specified, /// this parameter is required. /// /// @@ -526,7 +514,7 @@ public SearchTemplateRequestDescriptor Profile(bool? profile = true) /// /// /// An inline search template. Supports the same parameters as the search API's - /// request body. Also supports Mustache variables. If no id is specified, this + /// request body. It also supports Mustache variables. If no id is specified, this /// parameter is required. /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/MountRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/MountRequest.g.cs index fd393b4da9f..1a5e655ea4c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/MountRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/MountRequest.g.cs @@ -34,21 +34,23 @@ public sealed partial class MountRequestParameters : RequestParameters { /// /// - /// 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); } /// /// - /// Selects the kind of local storage used to accelerate searches. Experimental, and defaults to full_copy + /// The mount option for the searchable snapshot index. /// /// public string? Storage { get => Q("storage"); set => Q("storage", value); } /// /// - /// Should this request wait until the operation has completed before returning + /// If true, the request blocks until the operation is complete. /// /// public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } @@ -78,7 +80,9 @@ public MountRequest(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clien /// /// - /// 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] @@ -86,7 +90,7 @@ public MountRequest(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clien /// /// - /// Selects the kind of local storage used to accelerate searches. Experimental, and defaults to full_copy + /// The mount option for the searchable snapshot index. /// /// [JsonIgnore] @@ -94,17 +98,42 @@ public MountRequest(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clien /// /// - /// Should this request wait until the operation has completed before returning + /// If true, the request blocks until the operation is complete. /// /// [JsonIgnore] public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } + + /// + /// + /// The names of settings that should be removed from the index when it is mounted. + /// + /// [JsonInclude, JsonPropertyName("ignore_index_settings")] public ICollection? IgnoreIndexSettings { get; set; } + + /// + /// + /// The name of the index contained in the snapshot whose data is to be mounted. + /// If no renamed_index is specified, this name will also be used to create the new index. + /// + /// [JsonInclude, JsonPropertyName("index")] public Elastic.Clients.Elasticsearch.IndexName Index { get; set; } + + /// + /// + /// The settings that should be added to the index when it is mounted. + /// + /// [JsonInclude, JsonPropertyName("index_settings")] public IDictionary? IndexSettings { get; set; } + + /// + /// + /// The name of the index that will be created. + /// + /// [JsonInclude, JsonPropertyName("renamed_index")] public Elastic.Clients.Elasticsearch.IndexName? RenamedIndex { get; set; } } @@ -154,24 +183,45 @@ public MountRequestDescriptor Snapshot(Elastic.Clients.Elasticsearch.Name snapsh private IDictionary? IndexSettingsValue { get; set; } private Elastic.Clients.Elasticsearch.IndexName? RenamedIndexValue { get; set; } + /// + /// + /// The names of settings that should be removed from the index when it is mounted. + /// + /// public MountRequestDescriptor IgnoreIndexSettings(ICollection? ignoreIndexSettings) { IgnoreIndexSettingsValue = ignoreIndexSettings; return Self; } + /// + /// + /// The name of the index contained in the snapshot whose data is to be mounted. + /// If no renamed_index is specified, this name will also be used to create the new index. + /// + /// public MountRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName index) { IndexValue = index; return Self; } + /// + /// + /// The settings that should be added to the index when it is mounted. + /// + /// public MountRequestDescriptor IndexSettings(Func, FluentDictionary> selector) { IndexSettingsValue = selector?.Invoke(new FluentDictionary()); return Self; } + /// + /// + /// The name of the index that will be created. + /// + /// public MountRequestDescriptor RenamedIndex(Elastic.Clients.Elasticsearch.IndexName? renamedIndex) { RenamedIndexValue = renamedIndex; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/ActivateUserProfileRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/ActivateUserProfileRequest.g.cs index 6efb0a6afae..9ffd640adb8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/ActivateUserProfileRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/ActivateUserProfileRequest.g.cs @@ -41,6 +41,20 @@ public sealed partial class ActivateUserProfileRequestParameters : RequestParame /// /// Create or update a user profile on behalf of another user. /// +/// +/// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. +/// Individual users and external applications should not call this API directly. +/// The calling application must have either an access_token or a combination of username and password for the user that the profile document is intended for. +/// Elastic reserves the right to change or remove this feature in future releases without prior notice. +/// +/// +/// This API creates or updates a profile document for end users with information that is extracted from the user's authentication object including username, full_name, roles, and the authentication realm. +/// For example, in the JWT access_token case, the profile user's username is extracted from the JWT token claim pointed to by the claims.principal setting of the JWT realm that authenticated the token. +/// +/// +/// When updating a profile document, the API enables the document if it was disabled. +/// Any updates do not change existing content for either the labels or data fields. +/// /// public sealed partial class ActivateUserProfileRequest : PlainRequest { @@ -52,12 +66,42 @@ public sealed partial class ActivateUserProfileRequest : PlainRequest "security.activate_user_profile"; + /// + /// + /// The user's Elasticsearch access token or JWT. + /// Both access and id JWT token types are supported and they depend on the underlying JWT realm configuration. + /// If you specify the access_token grant type, this parameter is required. + /// It is not valid with other grant types. + /// + /// [JsonInclude, JsonPropertyName("access_token")] public string? AccessToken { get; set; } + + /// + /// + /// The type of grant. + /// + /// [JsonInclude, JsonPropertyName("grant_type")] public Elastic.Clients.Elasticsearch.Security.GrantType GrantType { get; set; } + + /// + /// + /// The user's password. + /// If you specify the password grant type, this parameter is required. + /// It is not valid with other grant types. + /// + /// [JsonInclude, JsonPropertyName("password")] public string? Password { get; set; } + + /// + /// + /// The username that identifies the user. + /// If you specify the password grant type, this parameter is required. + /// It is not valid with other grant types. + /// + /// [JsonInclude, JsonPropertyName("username")] public string? Username { get; set; } } @@ -69,6 +113,20 @@ public sealed partial class ActivateUserProfileRequest : PlainRequest /// Create or update a user profile on behalf of another user. /// +/// +/// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. +/// Individual users and external applications should not call this API directly. +/// The calling application must have either an access_token or a combination of username and password for the user that the profile document is intended for. +/// Elastic reserves the right to change or remove this feature in future releases without prior notice. +/// +/// +/// This API creates or updates a profile document for end users with information that is extracted from the user's authentication object including username, full_name, roles, and the authentication realm. +/// For example, in the JWT access_token case, the profile user's username is extracted from the JWT token claim pointed to by the claims.principal setting of the JWT realm that authenticated the token. +/// +/// +/// When updating a profile document, the API enables the document if it was disabled. +/// Any updates do not change existing content for either the labels or data fields. +/// /// public sealed partial class ActivateUserProfileRequestDescriptor : RequestDescriptor { @@ -91,24 +149,51 @@ public ActivateUserProfileRequestDescriptor() private string? PasswordValue { get; set; } private string? UsernameValue { get; set; } + /// + /// + /// The user's Elasticsearch access token or JWT. + /// Both access and id JWT token types are supported and they depend on the underlying JWT realm configuration. + /// If you specify the access_token grant type, this parameter is required. + /// It is not valid with other grant types. + /// + /// public ActivateUserProfileRequestDescriptor AccessToken(string? accessToken) { AccessTokenValue = accessToken; return Self; } + /// + /// + /// The type of grant. + /// + /// public ActivateUserProfileRequestDescriptor GrantType(Elastic.Clients.Elasticsearch.Security.GrantType grantType) { GrantTypeValue = grantType; return Self; } + /// + /// + /// The user's password. + /// If you specify the password grant type, this parameter is required. + /// It is not valid with other grant types. + /// + /// public ActivateUserProfileRequestDescriptor Password(string? password) { PasswordValue = password; return Self; } + /// + /// + /// The username that identifies the user. + /// If you specify the password grant type, this parameter is required. + /// It is not valid with other grant types. + /// + /// public ActivateUserProfileRequestDescriptor Username(string? username) { UsernameValue = username; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/BulkUpdateApiKeysRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/BulkUpdateApiKeysRequest.g.cs new file mode 100644 index 00000000000..c0d3ded7557 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/BulkUpdateApiKeysRequest.g.cs @@ -0,0 +1,371 @@ +// 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.Security; + +public sealed partial class BulkUpdateApiKeysRequestParameters : RequestParameters +{ +} + +/// +/// +/// Bulk update API keys. +/// Update the attributes for multiple API keys. +/// +/// +/// IMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required. +/// +/// +/// This API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates. +/// +/// +/// It is not possible to update expired or invalidated API keys. +/// +/// +/// This API supports updates to API key access scope, metadata and expiration. +/// The access scope of each API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. +/// The snapshot of the owner's permissions is updated automatically on every call. +/// +/// +/// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified. +/// +/// +/// A successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update. +/// +/// +public sealed partial class BulkUpdateApiKeysRequest : PlainRequest +{ + internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityBulkUpdateApiKeys; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "security.bulk_update_api_keys"; + + /// + /// + /// Expiration time for the API keys. + /// By default, API keys never expire. + /// This property can be omitted to leave the value unchanged. + /// + /// + [JsonInclude, JsonPropertyName("expiration")] + public Elastic.Clients.Elasticsearch.Duration? Expiration { get; set; } + + /// + /// + /// The API key identifiers. + /// + /// + [JsonInclude, JsonPropertyName("ids")] + [SingleOrManyCollectionConverter(typeof(string))] + public ICollection Ids { get; set; } + + /// + /// + /// Arbitrary nested metadata to associate with the API keys. + /// Within the metadata object, top-level keys beginning with an underscore (_) are reserved for system usage. + /// Any information specified with this parameter fully replaces metadata previously associated with the API key. + /// + /// + [JsonInclude, JsonPropertyName("metadata")] + public IDictionary? Metadata { get; set; } + + /// + /// + /// The role descriptors to assign to the API keys. + /// An API key's effective permissions are an intersection of its assigned privileges and the point-in-time snapshot of permissions of the owner user. + /// You can assign new privileges by specifying them in this parameter. + /// To remove assigned privileges, supply the role_descriptors parameter as an empty object {}. + /// If an API key has no assigned privileges, it inherits the owner user's full permissions. + /// The snapshot of the owner's permissions is always updated, whether you supply the role_descriptors parameter. + /// The structure of a role descriptor is the same as the request for the create API keys API. + /// + /// + [JsonInclude, JsonPropertyName("role_descriptors")] + public IDictionary? RoleDescriptors { get; set; } +} + +/// +/// +/// Bulk update API keys. +/// Update the attributes for multiple API keys. +/// +/// +/// IMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required. +/// +/// +/// This API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates. +/// +/// +/// It is not possible to update expired or invalidated API keys. +/// +/// +/// This API supports updates to API key access scope, metadata and expiration. +/// The access scope of each API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. +/// The snapshot of the owner's permissions is updated automatically on every call. +/// +/// +/// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified. +/// +/// +/// A successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update. +/// +/// +public sealed partial class BulkUpdateApiKeysRequestDescriptor : RequestDescriptor, BulkUpdateApiKeysRequestParameters> +{ + internal BulkUpdateApiKeysRequestDescriptor(Action> configure) => configure.Invoke(this); + + public BulkUpdateApiKeysRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityBulkUpdateApiKeys; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "security.bulk_update_api_keys"; + + private Elastic.Clients.Elasticsearch.Duration? ExpirationValue { get; set; } + private ICollection IdsValue { get; set; } + private IDictionary? MetadataValue { get; set; } + private IDictionary> RoleDescriptorsValue { get; set; } + + /// + /// + /// Expiration time for the API keys. + /// By default, API keys never expire. + /// This property can be omitted to leave the value unchanged. + /// + /// + public BulkUpdateApiKeysRequestDescriptor Expiration(Elastic.Clients.Elasticsearch.Duration? expiration) + { + ExpirationValue = expiration; + return Self; + } + + /// + /// + /// The API key identifiers. + /// + /// + public BulkUpdateApiKeysRequestDescriptor Ids(ICollection ids) + { + IdsValue = ids; + return Self; + } + + /// + /// + /// Arbitrary nested metadata to associate with the API keys. + /// Within the metadata object, top-level keys beginning with an underscore (_) are reserved for system usage. + /// Any information specified with this parameter fully replaces metadata previously associated with the API key. + /// + /// + public BulkUpdateApiKeysRequestDescriptor Metadata(Func, FluentDictionary> selector) + { + MetadataValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// + /// The role descriptors to assign to the API keys. + /// An API key's effective permissions are an intersection of its assigned privileges and the point-in-time snapshot of permissions of the owner user. + /// You can assign new privileges by specifying them in this parameter. + /// To remove assigned privileges, supply the role_descriptors parameter as an empty object {}. + /// If an API key has no assigned privileges, it inherits the owner user's full permissions. + /// The snapshot of the owner's permissions is always updated, whether you supply the role_descriptors parameter. + /// The structure of a role descriptor is the same as the request for the create API keys API. + /// + /// + public BulkUpdateApiKeysRequestDescriptor RoleDescriptors(Func>, FluentDescriptorDictionary>> selector) + { + RoleDescriptorsValue = selector?.Invoke(new FluentDescriptorDictionary>()); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (ExpirationValue is not null) + { + writer.WritePropertyName("expiration"); + JsonSerializer.Serialize(writer, ExpirationValue, options); + } + + writer.WritePropertyName("ids"); + SingleOrManySerializationHelper.Serialize(IdsValue, writer, options); + if (MetadataValue is not null) + { + writer.WritePropertyName("metadata"); + JsonSerializer.Serialize(writer, MetadataValue, options); + } + + if (RoleDescriptorsValue is not null) + { + writer.WritePropertyName("role_descriptors"); + JsonSerializer.Serialize(writer, RoleDescriptorsValue, options); + } + + writer.WriteEndObject(); + } +} + +/// +/// +/// Bulk update API keys. +/// Update the attributes for multiple API keys. +/// +/// +/// IMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required. +/// +/// +/// This API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates. +/// +/// +/// It is not possible to update expired or invalidated API keys. +/// +/// +/// This API supports updates to API key access scope, metadata and expiration. +/// The access scope of each API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. +/// The snapshot of the owner's permissions is updated automatically on every call. +/// +/// +/// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified. +/// +/// +/// A successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update. +/// +/// +public sealed partial class BulkUpdateApiKeysRequestDescriptor : RequestDescriptor +{ + internal BulkUpdateApiKeysRequestDescriptor(Action configure) => configure.Invoke(this); + + public BulkUpdateApiKeysRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityBulkUpdateApiKeys; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "security.bulk_update_api_keys"; + + private Elastic.Clients.Elasticsearch.Duration? ExpirationValue { get; set; } + private ICollection IdsValue { get; set; } + private IDictionary? MetadataValue { get; set; } + private IDictionary RoleDescriptorsValue { get; set; } + + /// + /// + /// Expiration time for the API keys. + /// By default, API keys never expire. + /// This property can be omitted to leave the value unchanged. + /// + /// + public BulkUpdateApiKeysRequestDescriptor Expiration(Elastic.Clients.Elasticsearch.Duration? expiration) + { + ExpirationValue = expiration; + return Self; + } + + /// + /// + /// The API key identifiers. + /// + /// + public BulkUpdateApiKeysRequestDescriptor Ids(ICollection ids) + { + IdsValue = ids; + return Self; + } + + /// + /// + /// Arbitrary nested metadata to associate with the API keys. + /// Within the metadata object, top-level keys beginning with an underscore (_) are reserved for system usage. + /// Any information specified with this parameter fully replaces metadata previously associated with the API key. + /// + /// + public BulkUpdateApiKeysRequestDescriptor Metadata(Func, FluentDictionary> selector) + { + MetadataValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// + /// The role descriptors to assign to the API keys. + /// An API key's effective permissions are an intersection of its assigned privileges and the point-in-time snapshot of permissions of the owner user. + /// You can assign new privileges by specifying them in this parameter. + /// To remove assigned privileges, supply the role_descriptors parameter as an empty object {}. + /// If an API key has no assigned privileges, it inherits the owner user's full permissions. + /// The snapshot of the owner's permissions is always updated, whether you supply the role_descriptors parameter. + /// The structure of a role descriptor is the same as the request for the create API keys API. + /// + /// + public BulkUpdateApiKeysRequestDescriptor RoleDescriptors(Func, FluentDescriptorDictionary> selector) + { + RoleDescriptorsValue = selector?.Invoke(new FluentDescriptorDictionary()); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (ExpirationValue is not null) + { + writer.WritePropertyName("expiration"); + JsonSerializer.Serialize(writer, ExpirationValue, options); + } + + writer.WritePropertyName("ids"); + SingleOrManySerializationHelper.Serialize(IdsValue, writer, options); + if (MetadataValue is not null) + { + writer.WritePropertyName("metadata"); + JsonSerializer.Serialize(writer, MetadataValue, options); + } + + if (RoleDescriptorsValue is not null) + { + writer.WritePropertyName("role_descriptors"); + JsonSerializer.Serialize(writer, RoleDescriptorsValue, options); + } + + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/BulkUpdateApiKeysResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/BulkUpdateApiKeysResponse.g.cs new file mode 100644 index 00000000000..2cd808cde1d --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/BulkUpdateApiKeysResponse.g.cs @@ -0,0 +1,37 @@ +// 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.Security; + +public sealed partial class BulkUpdateApiKeysResponse : ElasticsearchResponse +{ + [JsonInclude, JsonPropertyName("errors")] + public Elastic.Clients.Elasticsearch.Security.BulkError? Errors { get; init; } + [JsonInclude, JsonPropertyName("noops")] + public IReadOnlyCollection Noops { get; init; } + [JsonInclude, JsonPropertyName("updated")] + public IReadOnlyCollection Updated { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/ClearCachedRealmsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/ClearCachedRealmsRequest.g.cs index 0687c5d5d41..f5be66489ca 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/ClearCachedRealmsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/ClearCachedRealmsRequest.g.cs @@ -34,7 +34,8 @@ public sealed partial class ClearCachedRealmsRequestParameters : RequestParamete { /// /// - /// Comma-separated list of usernames to clear from the cache + /// A comma-separated list of the users to clear from the cache. + /// If you do not specify this parameter, the API evicts all users from the user cache. /// /// public ICollection? Usernames { get => Q?>("usernames"); set => Q("usernames", value); } @@ -45,7 +46,13 @@ public sealed partial class ClearCachedRealmsRequestParameters : RequestParamete /// Clear the user cache. /// /// -/// Evict users from the user cache. You can completely clear the cache or evict specific users. +/// Evict users from the user cache. +/// You can completely clear the cache or evict specific users. +/// +/// +/// User credentials are cached in memory on each node to avoid connecting to a remote authentication service or hitting the disk for every incoming request. +/// There are realm settings that you can use to configure the user cache. +/// For more information, refer to the documentation about controlling the user cache. /// /// public sealed partial class ClearCachedRealmsRequest : PlainRequest @@ -64,7 +71,8 @@ public ClearCachedRealmsRequest(Elastic.Clients.Elasticsearch.Names realms) : ba /// /// - /// Comma-separated list of usernames to clear from the cache + /// A comma-separated list of the users to clear from the cache. + /// If you do not specify this parameter, the API evicts all users from the user cache. /// /// [JsonIgnore] @@ -76,7 +84,13 @@ public ClearCachedRealmsRequest(Elastic.Clients.Elasticsearch.Names realms) : ba /// Clear the user cache. /// /// -/// Evict users from the user cache. You can completely clear the cache or evict specific users. +/// Evict users from the user cache. +/// You can completely clear the cache or evict specific users. +/// +/// +/// User credentials are cached in memory on each node to avoid connecting to a remote authentication service or hitting the disk for every incoming request. +/// There are realm settings that you can use to configure the user cache. +/// For more information, refer to the documentation about controlling the user cache. /// /// public sealed partial class ClearCachedRealmsRequestDescriptor : RequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/ClearCachedServiceTokensRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/ClearCachedServiceTokensRequest.g.cs index a018b729fd4..9619c6c7428 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/ClearCachedServiceTokensRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/ClearCachedServiceTokensRequest.g.cs @@ -40,6 +40,12 @@ public sealed partial class ClearCachedServiceTokensRequestParameters : RequestP /// /// /// Evict a subset of all entries from the service account token caches. +/// Two separate caches exist for service account tokens: one cache for tokens backed by the service_tokens file, and another for tokens backed by the .security index. +/// This API clears matching entries from both caches. +/// +/// +/// The cache for service account tokens backed by the .security index is cleared automatically on state changes of the security index. +/// The cache for tokens backed by the service_tokens file is cleared automatically on file changes. /// /// public sealed partial class ClearCachedServiceTokensRequest : PlainRequest @@ -63,6 +69,12 @@ public ClearCachedServiceTokensRequest(string ns, string service, Elastic.Client /// /// /// Evict a subset of all entries from the service account token caches. +/// Two separate caches exist for service account tokens: one cache for tokens backed by the service_tokens file, and another for tokens backed by the .security index. +/// This API clears matching entries from both caches. +/// +/// +/// The cache for service account tokens backed by the .security index is cleared automatically on state changes of the security index. +/// The cache for tokens backed by the service_tokens file is cleared automatically on file changes. /// /// public sealed partial class ClearCachedServiceTokensRequestDescriptor : RequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateApiKeyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateApiKeyRequest.g.cs index cc79ddf4274..5aea492a048 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateApiKeyRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateApiKeyRequest.g.cs @@ -46,10 +46,22 @@ public sealed partial class CreateApiKeyRequestParameters : RequestParameters /// /// /// Create an API key for access without requiring basic authentication. +/// +/// +/// IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges. +/// If you specify privileges, the API returns an error. +/// +/// /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. /// If applicable, it also returns expiration information for the API key in milliseconds. +/// +/// /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. /// +/// +/// The API keys are created by the Elasticsearch API key service, which is automatically enabled. +/// To configure or turn off the API key service, refer to API key service setting documentation. +/// /// public sealed partial class CreateApiKeyRequest : PlainRequest { @@ -71,7 +83,8 @@ public sealed partial class CreateApiKeyRequest : PlainRequest /// - /// Expiration time for the API key. By default, API keys never expire. + /// The expiration time for the API key. + /// By default, API keys never expire. /// /// [JsonInclude, JsonPropertyName("expiration")] @@ -87,7 +100,7 @@ public sealed partial class CreateApiKeyRequest : PlainRequest /// - /// Specifies the name for this API key. + /// A name for the API key. /// /// [JsonInclude, JsonPropertyName("name")] @@ -95,7 +108,16 @@ public sealed partial class CreateApiKeyRequest : PlainRequest /// - /// An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API. + /// An array of role descriptors for this API key. + /// When it is not specified or it is an empty array, the API key will have a point in time snapshot of permissions of the authenticated user. + /// If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the authenticated user's permissions thereby limiting the access scope for API keys. + /// The structure of role descriptor is the same as the request for the create role API. + /// For more details, refer to the create or update roles API. + /// + /// + /// NOTE: Due to the way in which this permission intersection is calculated, it is not possible to create an API key that is a child of another API key, unless the derived key is created without any privileges. + /// In this case, you must explicitly specify a role descriptor with no privileges. + /// The derived API key can be used for authentication; it will not have authority to call Elasticsearch APIs. /// /// [JsonInclude, JsonPropertyName("role_descriptors")] @@ -108,10 +130,22 @@ public sealed partial class CreateApiKeyRequest : PlainRequest /// /// Create an API key for access without requiring basic authentication. +/// +/// +/// IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges. +/// If you specify privileges, the API returns an error. +/// +/// /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. /// If applicable, it also returns expiration information for the API key in milliseconds. +/// +/// /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. /// +/// +/// The API keys are created by the Elasticsearch API key service, which is automatically enabled. +/// To configure or turn off the API key service, refer to API key service setting documentation. +/// /// public sealed partial class CreateApiKeyRequestDescriptor : RequestDescriptor, CreateApiKeyRequestParameters> { @@ -138,7 +172,8 @@ public CreateApiKeyRequestDescriptor() /// /// - /// Expiration time for the API key. By default, API keys never expire. + /// The expiration time for the API key. + /// By default, API keys never expire. /// /// public CreateApiKeyRequestDescriptor Expiration(Elastic.Clients.Elasticsearch.Duration? expiration) @@ -160,7 +195,7 @@ public CreateApiKeyRequestDescriptor Metadata(Func /// - /// Specifies the name for this API key. + /// A name for the API key. /// /// public CreateApiKeyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name? name) @@ -171,7 +206,16 @@ public CreateApiKeyRequestDescriptor Name(Elastic.Clients.Elasticsear /// /// - /// An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API. + /// An array of role descriptors for this API key. + /// When it is not specified or it is an empty array, the API key will have a point in time snapshot of permissions of the authenticated user. + /// If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the authenticated user's permissions thereby limiting the access scope for API keys. + /// The structure of role descriptor is the same as the request for the create role API. + /// For more details, refer to the create or update roles API. + /// + /// + /// NOTE: Due to the way in which this permission intersection is calculated, it is not possible to create an API key that is a child of another API key, unless the derived key is created without any privileges. + /// In this case, you must explicitly specify a role descriptor with no privileges. + /// The derived API key can be used for authentication; it will not have authority to call Elasticsearch APIs. /// /// public CreateApiKeyRequestDescriptor RoleDescriptors(Func>, FluentDescriptorDictionary>> selector) @@ -217,10 +261,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o /// /// /// Create an API key for access without requiring basic authentication. +/// +/// +/// IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges. +/// If you specify privileges, the API returns an error. +/// +/// /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. /// If applicable, it also returns expiration information for the API key in milliseconds. +/// +/// /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. /// +/// +/// The API keys are created by the Elasticsearch API key service, which is automatically enabled. +/// To configure or turn off the API key service, refer to API key service setting documentation. +/// /// public sealed partial class CreateApiKeyRequestDescriptor : RequestDescriptor { @@ -247,7 +303,8 @@ public CreateApiKeyRequestDescriptor() /// /// - /// Expiration time for the API key. By default, API keys never expire. + /// The expiration time for the API key. + /// By default, API keys never expire. /// /// public CreateApiKeyRequestDescriptor Expiration(Elastic.Clients.Elasticsearch.Duration? expiration) @@ -269,7 +326,7 @@ public CreateApiKeyRequestDescriptor Metadata(Func /// - /// Specifies the name for this API key. + /// A name for the API key. /// /// public CreateApiKeyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name? name) @@ -280,7 +337,16 @@ public CreateApiKeyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name? na /// /// - /// An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API. + /// An array of role descriptors for this API key. + /// When it is not specified or it is an empty array, the API key will have a point in time snapshot of permissions of the authenticated user. + /// If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the authenticated user's permissions thereby limiting the access scope for API keys. + /// The structure of role descriptor is the same as the request for the create role API. + /// For more details, refer to the create or update roles API. + /// + /// + /// NOTE: Due to the way in which this permission intersection is calculated, it is not possible to create an API key that is a child of another API key, unless the derived key is created without any privileges. + /// In this case, you must explicitly specify a role descriptor with no privileges. + /// The derived API key can be used for authentication; it will not have authority to call Elasticsearch APIs. /// /// public CreateApiKeyRequestDescriptor RoleDescriptors(Func, FluentDescriptorDictionary> selector) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateServiceTokenRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateServiceTokenRequest.g.cs index 6b8dd3f4062..7bab67cf459 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateServiceTokenRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateServiceTokenRequest.g.cs @@ -47,6 +47,10 @@ public sealed partial class CreateServiceTokenRequestParameters : RequestParamet /// /// Create a service accounts token for access without requiring basic authentication. /// +/// +/// NOTE: Service account tokens never expire. +/// You must actively delete them if they are no longer needed. +/// /// public sealed partial class CreateServiceTokenRequest : PlainRequest { @@ -82,6 +86,10 @@ public CreateServiceTokenRequest(string ns, string service) : base(r => r.Requir /// /// Create a service accounts token for access without requiring basic authentication. /// +/// +/// NOTE: Service account tokens never expire. +/// You must actively delete them if they are no longer needed. +/// /// public sealed partial class CreateServiceTokenRequestDescriptor : RequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DelegatePkiRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DelegatePkiRequest.g.cs new file mode 100644 index 00000000000..c94ab0015e3 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DelegatePkiRequest.g.cs @@ -0,0 +1,138 @@ +// 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.Security; + +public sealed partial class DelegatePkiRequestParameters : RequestParameters +{ +} + +/// +/// +/// Delegate PKI authentication. +/// +/// +/// This API implements the exchange of an X509Certificate chain for an Elasticsearch access token. +/// The certificate chain is validated, according to RFC 5280, by sequentially considering the trust configuration of every installed PKI realm that has delegation.enabled set to true. +/// A successfully trusted client certificate is also subject to the validation of the subject distinguished name according to thw username_pattern of the respective realm. +/// +/// +/// This API is called by smart and trusted proxies, such as Kibana, which terminate the user's TLS session but still want to authenticate the user by using a PKI realm—-​as if the user connected directly to Elasticsearch. +/// +/// +/// IMPORTANT: The association between the subject public key in the target certificate and the corresponding private key is not validated. +/// This is part of the TLS authentication process and it is delegated to the proxy that calls this API. +/// The proxy is trusted to have performed the TLS authentication and this API translates that authentication into an Elasticsearch access token. +/// +/// +public sealed partial class DelegatePkiRequest : PlainRequest +{ + internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDelegatePki; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "security.delegate_pki"; + + /// + /// + /// The X509Certificate chain, which is represented as an ordered string array. + /// Each string in the array is a base64-encoded (Section 4 of RFC4648 - not base64url-encoded) of the certificate's DER encoding. + /// + /// + /// The first element is the target certificate that contains the subject distinguished name that is requesting access. + /// This may be followed by additional certificates; each subsequent certificate is used to certify the previous one. + /// + /// + [JsonInclude, JsonPropertyName("x509_certificate_chain")] + public ICollection X509CertificateChain { get; set; } +} + +/// +/// +/// Delegate PKI authentication. +/// +/// +/// This API implements the exchange of an X509Certificate chain for an Elasticsearch access token. +/// The certificate chain is validated, according to RFC 5280, by sequentially considering the trust configuration of every installed PKI realm that has delegation.enabled set to true. +/// A successfully trusted client certificate is also subject to the validation of the subject distinguished name according to thw username_pattern of the respective realm. +/// +/// +/// This API is called by smart and trusted proxies, such as Kibana, which terminate the user's TLS session but still want to authenticate the user by using a PKI realm—-​as if the user connected directly to Elasticsearch. +/// +/// +/// IMPORTANT: The association between the subject public key in the target certificate and the corresponding private key is not validated. +/// This is part of the TLS authentication process and it is delegated to the proxy that calls this API. +/// The proxy is trusted to have performed the TLS authentication and this API translates that authentication into an Elasticsearch access token. +/// +/// +public sealed partial class DelegatePkiRequestDescriptor : RequestDescriptor +{ + internal DelegatePkiRequestDescriptor(Action configure) => configure.Invoke(this); + + public DelegatePkiRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDelegatePki; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "security.delegate_pki"; + + private ICollection X509CertificateChainValue { get; set; } + + /// + /// + /// The X509Certificate chain, which is represented as an ordered string array. + /// Each string in the array is a base64-encoded (Section 4 of RFC4648 - not base64url-encoded) of the certificate's DER encoding. + /// + /// + /// The first element is the target certificate that contains the subject distinguished name that is requesting access. + /// This may be followed by additional certificates; each subsequent certificate is used to certify the previous one. + /// + /// + public DelegatePkiRequestDescriptor X509CertificateChain(ICollection x509CertificateChain) + { + X509CertificateChainValue = x509CertificateChain; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("x509_certificate_chain"); + JsonSerializer.Serialize(writer, X509CertificateChainValue, options); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DelegatePkiResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DelegatePkiResponse.g.cs new file mode 100644 index 00000000000..c92c3b2f2ea --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DelegatePkiResponse.g.cs @@ -0,0 +1,56 @@ +// 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.Security; + +public sealed partial class DelegatePkiResponse : ElasticsearchResponse +{ + /// + /// + /// An access token associated with the subject distinguished name of the client's certificate. + /// + /// + [JsonInclude, JsonPropertyName("access_token")] + public string AccessToken { get; init; } + [JsonInclude, JsonPropertyName("authentication")] + public Elastic.Clients.Elasticsearch.Security.Authentication? Authentication { get; init; } + + /// + /// + /// The amount of time (in seconds) before the token expires. + /// + /// + [JsonInclude, JsonPropertyName("expires_in")] + public long ExpiresIn { get; init; } + + /// + /// + /// The type of token. + /// + /// + [JsonInclude, JsonPropertyName("type")] + public string Type { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeletePrivilegesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeletePrivilegesRequest.g.cs index 320489f1431..a90646696de 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeletePrivilegesRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeletePrivilegesRequest.g.cs @@ -44,6 +44,21 @@ public sealed partial class DeletePrivilegesRequestParameters : RequestParameter /// /// Delete application privileges. /// +/// +/// To use this API, you must have one of the following privileges: +/// +/// +/// +/// +/// The manage_security cluster privilege (or a greater privilege such as all). +/// +/// +/// +/// +/// The "Manage Application Privileges" global privilege for the application being referenced in the request. +/// +/// +/// /// public sealed partial class DeletePrivilegesRequest : PlainRequest { @@ -72,6 +87,21 @@ public DeletePrivilegesRequest(Elastic.Clients.Elasticsearch.Name application, E /// /// Delete application privileges. /// +/// +/// To use this API, you must have one of the following privileges: +/// +/// +/// +/// +/// The manage_security cluster privilege (or a greater privilege such as all). +/// +/// +/// +/// +/// The "Manage Application Privileges" global privilege for the application being referenced in the request. +/// +/// +/// /// public sealed partial class DeletePrivilegesRequestDescriptor : RequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteRoleMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteRoleMappingRequest.g.cs index 2421e540477..a749b8bb662 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteRoleMappingRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteRoleMappingRequest.g.cs @@ -44,6 +44,11 @@ public sealed partial class DeleteRoleMappingRequestParameters : RequestParamete /// /// Delete role mappings. /// +/// +/// Role mappings define which roles are assigned to each user. +/// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. +/// The delete role mappings API cannot remove role mappings that are defined in role mapping files. +/// /// public sealed partial class DeleteRoleMappingRequest : PlainRequest { @@ -72,6 +77,11 @@ public DeleteRoleMappingRequest(Elastic.Clients.Elasticsearch.Name name) : base( /// /// Delete role mappings. /// +/// +/// Role mappings define which roles are assigned to each user. +/// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. +/// The delete role mappings API cannot remove role mappings that are defined in role mapping files. +/// /// public sealed partial class DeleteRoleMappingRequestDescriptor : RequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteRoleMappingResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteRoleMappingResponse.g.cs index ba9829eeecf..f35ccfb53bd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteRoleMappingResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteRoleMappingResponse.g.cs @@ -28,6 +28,12 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class DeleteRoleMappingResponse : ElasticsearchResponse { + /// + /// + /// If the mapping is successfully deleted, found is true. + /// Otherwise, found is false. + /// + /// [JsonInclude, JsonPropertyName("found")] public bool Found { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteRoleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteRoleRequest.g.cs index fd976f508f4..f968e565be8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteRoleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteRoleRequest.g.cs @@ -46,6 +46,8 @@ public sealed partial class DeleteRoleRequestParameters : RequestParameters /// /// /// Delete roles in the native realm. +/// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. +/// The delete roles API cannot remove roles that are defined in roles files. /// /// public sealed partial class DeleteRoleRequest : PlainRequest @@ -77,6 +79,8 @@ public DeleteRoleRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r. /// /// /// Delete roles in the native realm. +/// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. +/// The delete roles API cannot remove roles that are defined in roles files. /// /// public sealed partial class DeleteRoleRequestDescriptor : RequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteRoleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteRoleResponse.g.cs index 8733410e218..6e29da67b58 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteRoleResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteRoleResponse.g.cs @@ -28,6 +28,12 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class DeleteRoleResponse : ElasticsearchResponse { + /// + /// + /// If the role is successfully deleted, found is true. + /// Otherwise, found is false. + /// + /// [JsonInclude, JsonPropertyName("found")] public bool Found { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteServiceTokenResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteServiceTokenResponse.g.cs index a9ad6329929..f0957cc140a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteServiceTokenResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteServiceTokenResponse.g.cs @@ -28,6 +28,12 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class DeleteServiceTokenResponse : ElasticsearchResponse { + /// + /// + /// If the service account token is successfully deleted, the request returns {"found": true}. + /// Otherwise, the response will have status code 404 and found is set to false. + /// + /// [JsonInclude, JsonPropertyName("found")] public bool Found { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteUserResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteUserResponse.g.cs index 3ccd3bafba1..702edc36c8a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteUserResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeleteUserResponse.g.cs @@ -28,6 +28,12 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class DeleteUserResponse : ElasticsearchResponse { + /// + /// + /// If the user is successfully deleted, the request returns {"found": true}. + /// Otherwise, found is set to false. + /// + /// [JsonInclude, JsonPropertyName("found")] public bool Found { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DisableUserProfileRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DisableUserProfileRequest.g.cs index ee4991e79cf..f7ebc6d77e7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DisableUserProfileRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DisableUserProfileRequest.g.cs @@ -34,9 +34,9 @@ public sealed partial class DisableUserProfileRequestParameters : RequestParamet { /// /// - /// 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', 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); } @@ -49,6 +49,15 @@ public sealed partial class DisableUserProfileRequestParameters : RequestParamet /// /// Disable user profiles so that they are not visible in user profile searches. /// +/// +/// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. +/// Individual users and external applications should not call this API directly. +/// Elastic reserves the right to change or remove this feature in future releases without prior notice. +/// +/// +/// When you activate a user profile, its automatically enabled and visible in user profile searches. You can use the disable user profile API to disable a user profile so it’s not visible in these searches. +/// To re-enable a disabled user profile, use the enable user profile API . +/// /// public sealed partial class DisableUserProfileRequest : PlainRequest { @@ -66,9 +75,9 @@ public DisableUserProfileRequest(string uid) : base(r => r.Required("uid", uid)) /// /// - /// 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', it waits for a refresh to make this operation visible to search. + /// If 'false', it does nothing with refreshes. /// /// [JsonIgnore] @@ -82,6 +91,15 @@ public DisableUserProfileRequest(string uid) : base(r => r.Required("uid", uid)) /// /// Disable user profiles so that they are not visible in user profile searches. /// +/// +/// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. +/// Individual users and external applications should not call this API directly. +/// Elastic reserves the right to change or remove this feature in future releases without prior notice. +/// +/// +/// When you activate a user profile, its automatically enabled and visible in user profile searches. You can use the disable user profile API to disable a user profile so it’s not visible in these searches. +/// To re-enable a disabled user profile, use the enable user profile API . +/// /// public sealed partial class DisableUserProfileRequestDescriptor : RequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DisableUserRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DisableUserRequest.g.cs index e8f286a5a80..f8344afb71d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DisableUserRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DisableUserRequest.g.cs @@ -46,6 +46,8 @@ public sealed partial class DisableUserRequestParameters : RequestParameters /// /// /// Disable users in the native realm. +/// By default, when you create users, they are enabled. +/// You can use this API to revoke a user's access to Elasticsearch. /// /// public sealed partial class DisableUserRequest : PlainRequest @@ -77,6 +79,8 @@ public DisableUserRequest(Elastic.Clients.Elasticsearch.Username username) : bas /// /// /// Disable users in the native realm. +/// By default, when you create users, they are enabled. +/// You can use this API to revoke a user's access to Elasticsearch. /// /// public sealed partial class DisableUserRequestDescriptor : RequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnableUserProfileRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnableUserProfileRequest.g.cs index 725a5665805..07d530d791a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnableUserProfileRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnableUserProfileRequest.g.cs @@ -35,8 +35,9 @@ public sealed partial class EnableUserProfileRequestParameters : RequestParamete /// /// /// 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. + /// visible to search. + /// If 'wait_for', it waits for a refresh to make this operation visible to search. + /// If 'false', nothing is done with refreshes. /// /// public Elastic.Clients.Elasticsearch.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } @@ -49,6 +50,15 @@ public sealed partial class EnableUserProfileRequestParameters : RequestParamete /// /// Enable user profiles to make them visible in user profile searches. /// +/// +/// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. +/// Individual users and external applications should not call this API directly. +/// Elastic reserves the right to change or remove this feature in future releases without prior notice. +/// +/// +/// When you activate a user profile, it's automatically enabled and visible in user profile searches. +/// If you later disable the user profile, you can use the enable user profile API to make the profile visible in these searches again. +/// /// public sealed partial class EnableUserProfileRequest : PlainRequest { @@ -67,8 +77,9 @@ public EnableUserProfileRequest(string uid) : base(r => r.Required("uid", uid)) /// /// /// 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. + /// visible to search. + /// If 'wait_for', it waits for a refresh to make this operation visible to search. + /// If 'false', nothing is done with refreshes. /// /// [JsonIgnore] @@ -82,6 +93,15 @@ public EnableUserProfileRequest(string uid) : base(r => r.Required("uid", uid)) /// /// Enable user profiles to make them visible in user profile searches. /// +/// +/// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. +/// Individual users and external applications should not call this API directly. +/// Elastic reserves the right to change or remove this feature in future releases without prior notice. +/// +/// +/// When you activate a user profile, it's automatically enabled and visible in user profile searches. +/// If you later disable the user profile, you can use the enable user profile API to make the profile visible in these searches again. +/// /// public sealed partial class EnableUserProfileRequestDescriptor : RequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnableUserRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnableUserRequest.g.cs index 4758880e9f4..87c16d465bf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnableUserRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnableUserRequest.g.cs @@ -46,6 +46,7 @@ public sealed partial class EnableUserRequestParameters : RequestParameters /// /// /// Enable users in the native realm. +/// By default, when you create users, they are enabled. /// /// public sealed partial class EnableUserRequest : PlainRequest @@ -77,6 +78,7 @@ public EnableUserRequest(Elastic.Clients.Elasticsearch.Username username) : base /// /// /// Enable users in the native realm. +/// By default, when you create users, they are enabled. /// /// public sealed partial class EnableUserRequestDescriptor : RequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnrollKibanaRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnrollKibanaRequest.g.cs index 51c0a32e140..78485cf7df6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnrollKibanaRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnrollKibanaRequest.g.cs @@ -41,6 +41,10 @@ public sealed partial class EnrollKibanaRequestParameters : RequestParameters /// /// Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster. /// +/// +/// NOTE: This API is currently intended for internal use only by Kibana. +/// Kibana uses this API internally to configure itself for communications with an Elasticsearch cluster that already has security features enabled. +/// /// public sealed partial class EnrollKibanaRequest : PlainRequest { @@ -60,6 +64,10 @@ public sealed partial class EnrollKibanaRequest : PlainRequest /// Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster. /// +/// +/// NOTE: This API is currently intended for internal use only by Kibana. +/// Kibana uses this API internally to configure itself for communications with an Elasticsearch cluster that already has security features enabled. +/// /// public sealed partial class EnrollKibanaRequestDescriptor : RequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnrollKibanaResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnrollKibanaResponse.g.cs index 79907207140..6e2c48b581e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnrollKibanaResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnrollKibanaResponse.g.cs @@ -28,6 +28,12 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class EnrollKibanaResponse : ElasticsearchResponse { + /// + /// + /// The CA certificate used to sign the node certificates that Elasticsearch uses for TLS on the HTTP layer. + /// The certificate is returned as a Base64 encoded string of the ASN.1 DER encoding of the certificate. + /// + /// [JsonInclude, JsonPropertyName("http_ca")] public string HttpCa { get; init; } [JsonInclude, JsonPropertyName("token")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnrollNodeRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnrollNodeRequest.g.cs index 580b4bc0b0c..28c88d40096 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnrollNodeRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnrollNodeRequest.g.cs @@ -41,6 +41,10 @@ public sealed partial class EnrollNodeRequestParameters : RequestParameters /// /// Enroll a new node to allow it to join an existing cluster with security features enabled. /// +/// +/// The response contains all the necessary information for the joining node to bootstrap discovery and security related settings so that it can successfully join the cluster. +/// The response contains key and certificate material that allows the caller to generate valid signed certificates for the HTTP layer of all nodes in the cluster. +/// /// public sealed partial class EnrollNodeRequest : PlainRequest { @@ -60,6 +64,10 @@ public sealed partial class EnrollNodeRequest : PlainRequest /// Enroll a new node to allow it to join an existing cluster with security features enabled. /// +/// +/// The response contains all the necessary information for the joining node to bootstrap discovery and security related settings so that it can successfully join the cluster. +/// The response contains key and certificate material that allows the caller to generate valid signed certificates for the HTTP layer of all nodes in the cluster. +/// /// public sealed partial class EnrollNodeRequestDescriptor : RequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnrollNodeResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnrollNodeResponse.g.cs index 5d34b09a546..230e2e4cf6c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnrollNodeResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/EnrollNodeResponse.g.cs @@ -28,16 +28,51 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class EnrollNodeResponse : ElasticsearchResponse { + /// + /// + /// The CA certificate that can be used by the new node in order to sign its certificate for the HTTP layer, as a Base64 encoded string of the ASN.1 DER encoding of the certificate. + /// + /// [JsonInclude, JsonPropertyName("http_ca_cert")] public string HttpCaCert { get; init; } + + /// + /// + /// The CA private key that can be used by the new node in order to sign its certificate for the HTTP layer, as a Base64 encoded string of the ASN.1 DER encoding of the key. + /// + /// [JsonInclude, JsonPropertyName("http_ca_key")] public string HttpCaKey { get; init; } + + /// + /// + /// A list of transport addresses in the form of host:port for the nodes that are already members of the cluster. + /// + /// [JsonInclude, JsonPropertyName("nodes_addresses")] public IReadOnlyCollection NodesAddresses { get; init; } + + /// + /// + /// The CA certificate that is used to sign the TLS certificate for the transport layer, as a Base64 encoded string of the ASN.1 DER encoding of the certificate. + /// + /// [JsonInclude, JsonPropertyName("transport_ca_cert")] public string TransportCaCert { get; init; } + + /// + /// + /// The certificate that the node can use for TLS for its transport layer, as a Base64 encoded string of the ASN.1 DER encoding of the certificate. + /// + /// [JsonInclude, JsonPropertyName("transport_cert")] public string TransportCert { get; init; } + + /// + /// + /// The private key that the node can use for TLS for its transport layer, as a Base64 encoded string of the ASN.1 DER encoding of the key. + /// + /// [JsonInclude, JsonPropertyName("transport_key")] public string TransportKey { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetBuiltinPrivilegesResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetBuiltinPrivilegesResponse.g.cs index 2410a2d7776..1884ff7bccf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetBuiltinPrivilegesResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetBuiltinPrivilegesResponse.g.cs @@ -28,10 +28,28 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class GetBuiltinPrivilegesResponse : ElasticsearchResponse { + /// + /// + /// The list of cluster privileges that are understood by this version of Elasticsearch. + /// + /// [JsonInclude, JsonPropertyName("cluster")] public IReadOnlyCollection Cluster { get; init; } + + /// + /// + /// The list of index privileges that are understood by this version of Elasticsearch. + /// + /// [JsonInclude, JsonPropertyName("index")] - public IReadOnlyCollection Index { get; init; } + [SingleOrManyCollectionConverter(typeof(string))] + public IReadOnlyCollection Indices { get; init; } + + /// + /// + /// The list of remote_cluster privileges that are understood by this version of Elasticsearch. + /// + /// [JsonInclude, JsonPropertyName("remote_cluster")] public IReadOnlyCollection RemoteCluster { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetPrivilegesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetPrivilegesRequest.g.cs index 54604deb0ad..b336fdc83e1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetPrivilegesRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetPrivilegesRequest.g.cs @@ -38,6 +38,21 @@ public sealed partial class GetPrivilegesRequestParameters : RequestParameters /// /// Get application privileges. /// +/// +/// To use this API, you must have one of the following privileges: +/// +/// +/// +/// +/// The read_security cluster privilege (or a greater privilege such as manage_security or all). +/// +/// +/// +/// +/// The "Manage Application Privileges" global privilege for the application being referenced in the request. +/// +/// +/// /// public sealed partial class GetPrivilegesRequest : PlainRequest { @@ -66,6 +81,21 @@ public GetPrivilegesRequest(Elastic.Clients.Elasticsearch.Name? application, Ela /// /// Get application privileges. /// +/// +/// To use this API, you must have one of the following privileges: +/// +/// +/// +/// +/// The read_security cluster privilege (or a greater privilege such as manage_security or all). +/// +/// +/// +/// +/// The "Manage Application Privileges" global privilege for the application being referenced in the request. +/// +/// +/// /// public sealed partial class GetPrivilegesRequestDescriptor : RequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetRoleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetRoleRequest.g.cs index 9269177ee80..a065e28fd89 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetRoleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetRoleRequest.g.cs @@ -40,6 +40,8 @@ public sealed partial class GetRoleRequestParameters : RequestParameters /// /// /// Get roles in the native realm. +/// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. +/// The get roles API cannot retrieve roles that are defined in roles files. /// /// public sealed partial class GetRoleRequest : PlainRequest @@ -67,6 +69,8 @@ public GetRoleRequest(Elastic.Clients.Elasticsearch.Names? name) : base(r => r.O /// /// /// Get roles in the native realm. +/// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. +/// The get roles API cannot retrieve roles that are defined in roles files. /// /// public sealed partial class GetRoleRequestDescriptor : RequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetSecuritySettingsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetSecuritySettingsRequest.g.cs new file mode 100644 index 00000000000..d86243a72d9 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetSecuritySettingsRequest.g.cs @@ -0,0 +1,129 @@ +// 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.Security; + +public sealed partial class GetSecuritySettingsRequestParameters : RequestParameters +{ + /// + /// + /// 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); } +} + +/// +/// +/// Get security index settings. +/// +/// +/// Get the user-configurable settings for the security internal index (.security and associated indices). +/// Only a subset of the index settings — those that are user-configurable—will be shown. +/// This includes: +/// +/// +/// +/// +/// index.auto_expand_replicas +/// +/// +/// +/// +/// index.number_of_replicas +/// +/// +/// +/// +public sealed partial class GetSecuritySettingsRequest : PlainRequest +{ + internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetSettings; + + protected override HttpMethod StaticHttpMethod => HttpMethod.GET; + + internal override bool SupportsBody => false; + + internal override string OperationName => "security.get_settings"; + + /// + /// + /// 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); } +} + +/// +/// +/// Get security index settings. +/// +/// +/// Get the user-configurable settings for the security internal index (.security and associated indices). +/// Only a subset of the index settings — those that are user-configurable—will be shown. +/// This includes: +/// +/// +/// +/// +/// index.auto_expand_replicas +/// +/// +/// +/// +/// index.number_of_replicas +/// +/// +/// +/// +public sealed partial class GetSecuritySettingsRequestDescriptor : RequestDescriptor +{ + internal GetSecuritySettingsRequestDescriptor(Action configure) => configure.Invoke(this); + + public GetSecuritySettingsRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetSettings; + + protected override HttpMethod StaticHttpMethod => HttpMethod.GET; + + internal override bool SupportsBody => false; + + internal override string OperationName => "security.get_settings"; + + public GetSecuritySettingsRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); + + 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/Security/GetSecuritySettingsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetSecuritySettingsResponse.g.cs new file mode 100644 index 00000000000..971087523dd --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetSecuritySettingsResponse.g.cs @@ -0,0 +1,54 @@ +// 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.Security; + +public sealed partial class GetSecuritySettingsResponse : ElasticsearchResponse +{ + /// + /// + /// Settings for the index used for most security configuration, including native realm users and roles configured with the API. + /// + /// + [JsonInclude, JsonPropertyName("security")] + public Elastic.Clients.Elasticsearch.Security.SecuritySettings Security { get; init; } + + /// + /// + /// Settings for the index used to store profile information. + /// + /// + [JsonInclude, JsonPropertyName("security-profile")] + public Elastic.Clients.Elasticsearch.Security.SecuritySettings SecurityProfile { get; init; } + + /// + /// + /// Settings for the index used to store tokens. + /// + /// + [JsonInclude, JsonPropertyName("security-tokens")] + public Elastic.Clients.Elasticsearch.Security.SecuritySettings SecurityTokens { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetServiceAccountsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetServiceAccountsRequest.g.cs index 921b203f237..7da44006569 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetServiceAccountsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetServiceAccountsRequest.g.cs @@ -41,6 +41,9 @@ public sealed partial class GetServiceAccountsRequestParameters : RequestParamet /// /// Get a list of service accounts that match the provided path parameters. /// +/// +/// NOTE: Currently, only the elastic/fleet-server service account is available. +/// /// public sealed partial class GetServiceAccountsRequest : PlainRequest { @@ -72,6 +75,9 @@ public GetServiceAccountsRequest(string? ns) : base(r => r.Optional("namespace", /// /// Get a list of service accounts that match the provided path parameters. /// +/// +/// NOTE: Currently, only the elastic/fleet-server service account is available. +/// /// public sealed partial class GetServiceAccountsRequestDescriptor : RequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetServiceCredentialsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetServiceCredentialsRequest.g.cs index a1a5d627f24..3524da47732 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetServiceCredentialsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetServiceCredentialsRequest.g.cs @@ -38,6 +38,16 @@ public sealed partial class GetServiceCredentialsRequestParameters : RequestPara /// /// Get service account credentials. /// +/// +/// To use this API, you must have at least the read_security cluster privilege (or a greater privilege such as manage_service_account or manage_security). +/// +/// +/// The response includes service account tokens that were created with the create service account tokens API as well as file-backed tokens from all nodes of the cluster. +/// +/// +/// NOTE: For tokens backed by the service_tokens file, the API collects them from all nodes of the cluster. +/// Tokens with the same name from different nodes are assumed to be the same token and are only counted once towards the total number of service tokens. +/// /// public sealed partial class GetServiceCredentialsRequest : PlainRequest { @@ -58,6 +68,16 @@ public GetServiceCredentialsRequest(string ns, Elastic.Clients.Elasticsearch.Nam /// /// Get service account credentials. /// +/// +/// To use this API, you must have at least the read_security cluster privilege (or a greater privilege such as manage_service_account or manage_security). +/// +/// +/// The response includes service account tokens that were created with the create service account tokens API as well as file-backed tokens from all nodes of the cluster. +/// +/// +/// NOTE: For tokens backed by the service_tokens file, the API collects them from all nodes of the cluster. +/// Tokens with the same name from different nodes are assumed to be the same token and are only counted once towards the total number of service tokens. +/// /// public sealed partial class GetServiceCredentialsRequestDescriptor : RequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetServiceCredentialsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetServiceCredentialsResponse.g.cs index 7fa558776e9..c4ffbf06f64 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetServiceCredentialsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetServiceCredentialsResponse.g.cs @@ -33,7 +33,7 @@ public sealed partial class GetServiceCredentialsResponse : ElasticsearchRespons /// /// - /// Contains service account credentials collected from all nodes of the cluster + /// Service account credentials collected from all nodes of the cluster. /// /// [JsonInclude, JsonPropertyName("nodes_credentials")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetTokenRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetTokenRequest.g.cs index ee7fd7ce384..bbe54f8bd35 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetTokenRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetTokenRequest.g.cs @@ -40,6 +40,20 @@ public sealed partial class GetTokenRequestParameters : RequestParameters /// /// /// Create a bearer token for access without requiring basic authentication. +/// The tokens are created by the Elasticsearch Token Service, which is automatically enabled when you configure TLS on the HTTP interface. +/// Alternatively, you can explicitly enable the xpack.security.authc.token.enabled setting. +/// When you are running in production mode, a bootstrap check prevents you from enabling the token service unless you also enable TLS on the HTTP interface. +/// +/// +/// The get token API takes the same parameters as a typical OAuth 2.0 token API except for the use of a JSON request body. +/// +/// +/// A successful get token API call returns a JSON structure that contains the access token, the amount of time (seconds) that the token expires in, the type, and the scope if available. +/// +/// +/// The tokens returned by the get token API have a finite period of time for which they are valid and after that time period, they can no longer be used. +/// That time period is defined by the xpack.security.authc.token.timeout setting. +/// If you want to invalidate a token immediately, you can do so by using the invalidate token API. /// /// public sealed partial class GetTokenRequest : PlainRequest @@ -52,16 +66,61 @@ public sealed partial class GetTokenRequest : PlainRequest "security.get_token"; + /// + /// + /// The type of grant. + /// Supported grant types are: password, _kerberos, client_credentials, and refresh_token. + /// + /// [JsonInclude, JsonPropertyName("grant_type")] public Elastic.Clients.Elasticsearch.Security.AccessTokenGrantType? GrantType { get; set; } + + /// + /// + /// The base64 encoded kerberos ticket. + /// If you specify the _kerberos grant type, this parameter is required. + /// This parameter is not valid with any other supported grant type. + /// + /// [JsonInclude, JsonPropertyName("kerberos_ticket")] public string? KerberosTicket { get; set; } + + /// + /// + /// The user's password. + /// If you specify the password grant type, this parameter is required. + /// This parameter is not valid with any other supported grant type. + /// + /// [JsonInclude, JsonPropertyName("password")] public string? Password { get; set; } + + /// + /// + /// The string that was returned when you created the token, which enables you to extend its life. + /// If you specify the refresh_token grant type, this parameter is required. + /// This parameter is not valid with any other supported grant type. + /// + /// [JsonInclude, JsonPropertyName("refresh_token")] public string? RefreshToken { get; set; } + + /// + /// + /// The scope of the token. + /// Currently tokens are only issued for a scope of FULL regardless of the value sent with the request. + /// + /// [JsonInclude, JsonPropertyName("scope")] public string? Scope { get; set; } + + /// + /// + /// The username that identifies the user. + /// If you specify the password grant type, this parameter is required. + /// This parameter is not valid with any other supported grant type. + /// + /// [JsonInclude, JsonPropertyName("username")] public Elastic.Clients.Elasticsearch.Username? Username { get; set; } } @@ -72,6 +131,20 @@ public sealed partial class GetTokenRequest : PlainRequest /// /// Create a bearer token for access without requiring basic authentication. +/// The tokens are created by the Elasticsearch Token Service, which is automatically enabled when you configure TLS on the HTTP interface. +/// Alternatively, you can explicitly enable the xpack.security.authc.token.enabled setting. +/// When you are running in production mode, a bootstrap check prevents you from enabling the token service unless you also enable TLS on the HTTP interface. +/// +/// +/// The get token API takes the same parameters as a typical OAuth 2.0 token API except for the use of a JSON request body. +/// +/// +/// A successful get token API call returns a JSON structure that contains the access token, the amount of time (seconds) that the token expires in, the type, and the scope if available. +/// +/// +/// The tokens returned by the get token API have a finite period of time for which they are valid and after that time period, they can no longer be used. +/// That time period is defined by the xpack.security.authc.token.timeout setting. +/// If you want to invalidate a token immediately, you can do so by using the invalidate token API. /// /// public sealed partial class GetTokenRequestDescriptor : RequestDescriptor @@ -97,36 +170,76 @@ public GetTokenRequestDescriptor() private string? ScopeValue { get; set; } private Elastic.Clients.Elasticsearch.Username? UsernameValue { get; set; } + /// + /// + /// The type of grant. + /// Supported grant types are: password, _kerberos, client_credentials, and refresh_token. + /// + /// public GetTokenRequestDescriptor GrantType(Elastic.Clients.Elasticsearch.Security.AccessTokenGrantType? grantType) { GrantTypeValue = grantType; return Self; } + /// + /// + /// The base64 encoded kerberos ticket. + /// If you specify the _kerberos grant type, this parameter is required. + /// This parameter is not valid with any other supported grant type. + /// + /// public GetTokenRequestDescriptor KerberosTicket(string? kerberosTicket) { KerberosTicketValue = kerberosTicket; return Self; } + /// + /// + /// The user's password. + /// If you specify the password grant type, this parameter is required. + /// This parameter is not valid with any other supported grant type. + /// + /// public GetTokenRequestDescriptor Password(string? password) { PasswordValue = password; return Self; } + /// + /// + /// The string that was returned when you created the token, which enables you to extend its life. + /// If you specify the refresh_token grant type, this parameter is required. + /// This parameter is not valid with any other supported grant type. + /// + /// public GetTokenRequestDescriptor RefreshToken(string? refreshToken) { RefreshTokenValue = refreshToken; return Self; } + /// + /// + /// The scope of the token. + /// Currently tokens are only issued for a scope of FULL regardless of the value sent with the request. + /// + /// public GetTokenRequestDescriptor Scope(string? scope) { ScopeValue = scope; return Self; } + /// + /// + /// The username that identifies the user. + /// If you specify the password grant type, this parameter is required. + /// This parameter is not valid with any other supported grant type. + /// + /// public GetTokenRequestDescriptor Username(Elastic.Clients.Elasticsearch.Username? username) { UsernameValue = username; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserPrivilegesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserPrivilegesRequest.g.cs index 52d790b0458..0f6204998bc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserPrivilegesRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserPrivilegesRequest.g.cs @@ -52,6 +52,12 @@ public sealed partial class GetUserPrivilegesRequestParameters : RequestParamete /// /// Get user privileges. /// +/// +/// Get the security privileges for the logged in user. +/// All users can use this API, but only to determine their own privileges. +/// To check the privileges of other users, you must use the run as feature. +/// To check whether a user has a specific list of privileges, use the has privileges API. +/// /// public sealed partial class GetUserPrivilegesRequest : PlainRequest { @@ -86,6 +92,12 @@ public sealed partial class GetUserPrivilegesRequest : PlainRequest /// Get user privileges. /// +/// +/// Get the security privileges for the logged in user. +/// All users can use this API, but only to determine their own privileges. +/// To check the privileges of other users, you must use the run as feature. +/// To check whether a user has a specific list of privileges, use the has privileges API. +/// /// public sealed partial class GetUserPrivilegesRequestDescriptor : RequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserPrivilegesResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserPrivilegesResponse.g.cs index 521ec2a00f5..fad2cdfadbb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserPrivilegesResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserPrivilegesResponse.g.cs @@ -36,6 +36,10 @@ public sealed partial class GetUserPrivilegesResponse : ElasticsearchResponse public IReadOnlyCollection Global { get; init; } [JsonInclude, JsonPropertyName("indices")] public IReadOnlyCollection Indices { get; init; } + [JsonInclude, JsonPropertyName("remote_cluster")] + public IReadOnlyCollection? RemoteCluster { get; init; } + [JsonInclude, JsonPropertyName("remote_indices")] + public IReadOnlyCollection? RemoteIndices { get; init; } [JsonInclude, JsonPropertyName("run_as")] public IReadOnlyCollection RunAs { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserProfileRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserProfileRequest.g.cs index fa92cf1108f..0775822ceb4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserProfileRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserProfileRequest.g.cs @@ -34,9 +34,9 @@ public sealed partial class GetUserProfileRequestParameters : RequestParameters { /// /// - /// List of filters for the data field of the profile document. - /// To return all content use data=*. To return a subset of content - /// use data=<key> to retrieve content nested under the specified <key>. + /// A comma-separated list of filters for the data field of the profile document. + /// To return all content use data=*. + /// To return a subset of content use data=<key> to retrieve content nested under the specified <key>. /// By default returns no data content. /// /// @@ -50,6 +50,11 @@ public sealed partial class GetUserProfileRequestParameters : RequestParameters /// /// Get a user's profile using the unique profile ID. /// +/// +/// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. +/// Individual users and external applications should not call this API directly. +/// Elastic reserves the right to change or remove this feature in future releases without prior notice. +/// /// public sealed partial class GetUserProfileRequest : PlainRequest { @@ -67,9 +72,9 @@ public GetUserProfileRequest(IReadOnlyCollection uid) : base(r => r.Requ /// /// - /// List of filters for the data field of the profile document. - /// To return all content use data=*. To return a subset of content - /// use data=<key> to retrieve content nested under the specified <key>. + /// A comma-separated list of filters for the data field of the profile document. + /// To return all content use data=*. + /// To return a subset of content use data=<key> to retrieve content nested under the specified <key>. /// By default returns no data content. /// /// @@ -84,6 +89,11 @@ public GetUserProfileRequest(IReadOnlyCollection uid) : base(r => r.Requ /// /// Get a user's profile using the unique profile ID. /// +/// +/// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. +/// Individual users and external applications should not call this API directly. +/// Elastic reserves the right to change or remove this feature in future releases without prior notice. +/// /// public sealed partial class GetUserProfileRequestDescriptor : RequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserProfileResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserProfileResponse.g.cs index 71e2118cb2b..1fb42115499 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserProfileResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserProfileResponse.g.cs @@ -30,6 +30,14 @@ public sealed partial class GetUserProfileResponse : ElasticsearchResponse { [JsonInclude, JsonPropertyName("errors")] public Elastic.Clients.Elasticsearch.Security.GetUserProfileErrors? Errors { get; init; } + + /// + /// + /// A successful call returns the JSON representation of the user profile and its internal versioning numbers. + /// The API returns an empty object if no profile document is found for the provided uid. + /// The content of the data field is not returned by default to avoid deserializing a potential large payload. + /// + /// [JsonInclude, JsonPropertyName("profiles")] public IReadOnlyCollection Profiles { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserRequest.g.cs index 9c77e91e3f6..b10ec69b601 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserRequest.g.cs @@ -34,7 +34,7 @@ public sealed partial class GetUserRequestParameters : RequestParameters { /// /// - /// If true will return the User Profile ID for a user, if any. + /// Determines whether to retrieve the user profile UID, if it exists, for the users. /// /// public bool? WithProfileUid { get => Q("with_profile_uid"); set => Q("with_profile_uid", value); } @@ -68,7 +68,7 @@ public GetUserRequest(IReadOnlyCollection /// - /// If true will return the User Profile ID for a user, if any. + /// Determines whether to retrieve the user profile UID, if it exists, for the users. /// /// [JsonIgnore] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GrantApiKeyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GrantApiKeyRequest.g.cs index c09da87befc..21fc73fc0db 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GrantApiKeyRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GrantApiKeyRequest.g.cs @@ -41,13 +41,34 @@ public sealed partial class GrantApiKeyRequestParameters : RequestParameters /// /// Create an API key on behalf of another user. /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. -/// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. -/// It is not possible to use this API to create an API key without that user’s credentials. +/// The caller must have authentication credentials for the user on whose behalf the API key will be created. +/// It is not possible to use this API to create an API key without that user's credentials. +/// The supported user authentication credential types are: +/// +/// +/// +/// +/// username and password +/// +/// +/// +/// +/// Elasticsearch access tokens +/// +/// +/// +/// +/// JWTs +/// +/// +/// +/// /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. /// In this case, the API key will be created on behalf of the impersonated user. /// /// /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. +/// The API keys are created by the Elasticsearch API key service, which is automatically enabled. /// /// /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. @@ -69,7 +90,7 @@ public sealed partial class GrantApiKeyRequest : PlainRequest /// - /// The user’s access token. + /// The user's access token. /// If you specify the access_token grant type, this parameter is required. /// It is not valid with other grant types. /// @@ -79,7 +100,7 @@ public sealed partial class GrantApiKeyRequest : PlainRequest /// - /// Defines the API key. + /// The API key. /// /// [JsonInclude, JsonPropertyName("api_key")] @@ -95,7 +116,8 @@ public sealed partial class GrantApiKeyRequest : PlainRequest /// - /// The user’s password. If you specify the password grant type, this parameter is required. + /// The user's password. + /// If you specify the password grant type, this parameter is required. /// It is not valid with other grant types. /// /// @@ -128,13 +150,34 @@ public sealed partial class GrantApiKeyRequest : PlainRequest /// Create an API key on behalf of another user. /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. -/// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. -/// It is not possible to use this API to create an API key without that user’s credentials. +/// The caller must have authentication credentials for the user on whose behalf the API key will be created. +/// It is not possible to use this API to create an API key without that user's credentials. +/// The supported user authentication credential types are: +/// +/// +/// +/// +/// username and password +/// +/// +/// +/// +/// Elasticsearch access tokens +/// +/// +/// +/// +/// JWTs +/// +/// +/// +/// /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. /// In this case, the API key will be created on behalf of the impersonated user. /// /// /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. +/// The API keys are created by the Elasticsearch API key service, which is automatically enabled. /// /// /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. @@ -171,7 +214,7 @@ public GrantApiKeyRequestDescriptor() /// /// - /// The user’s access token. + /// The user's access token. /// If you specify the access_token grant type, this parameter is required. /// It is not valid with other grant types. /// @@ -184,7 +227,7 @@ public GrantApiKeyRequestDescriptor AccessToken(string? accessToken) /// /// - /// Defines the API key. + /// The API key. /// /// public GrantApiKeyRequestDescriptor ApiKey(Elastic.Clients.Elasticsearch.Security.GrantApiKey apiKey) @@ -224,7 +267,8 @@ public GrantApiKeyRequestDescriptor GrantType(Elastic.Clients.Elastic /// /// - /// The user’s password. If you specify the password grant type, this parameter is required. + /// The user's password. + /// If you specify the password grant type, this parameter is required. /// It is not valid with other grant types. /// /// @@ -314,13 +358,34 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o /// /// Create an API key on behalf of another user. /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. -/// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. -/// It is not possible to use this API to create an API key without that user’s credentials. +/// The caller must have authentication credentials for the user on whose behalf the API key will be created. +/// It is not possible to use this API to create an API key without that user's credentials. +/// The supported user authentication credential types are: +/// +/// +/// +/// +/// username and password +/// +/// +/// +/// +/// Elasticsearch access tokens +/// +/// +/// +/// +/// JWTs +/// +/// +/// +/// /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. /// In this case, the API key will be created on behalf of the impersonated user. /// /// /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. +/// The API keys are created by the Elasticsearch API key service, which is automatically enabled. /// /// /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. @@ -357,7 +422,7 @@ public GrantApiKeyRequestDescriptor() /// /// - /// The user’s access token. + /// The user's access token. /// If you specify the access_token grant type, this parameter is required. /// It is not valid with other grant types. /// @@ -370,7 +435,7 @@ public GrantApiKeyRequestDescriptor AccessToken(string? accessToken) /// /// - /// Defines the API key. + /// The API key. /// /// public GrantApiKeyRequestDescriptor ApiKey(Elastic.Clients.Elasticsearch.Security.GrantApiKey apiKey) @@ -410,7 +475,8 @@ public GrantApiKeyRequestDescriptor GrantType(Elastic.Clients.Elasticsearch.Secu /// /// - /// The user’s password. If you specify the password grant type, this parameter is required. + /// The user's password. + /// If you specify the password grant type, this parameter is required. /// It is not valid with other grant types. /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/HasPrivilegesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/HasPrivilegesRequest.g.cs index 623c868da87..4806f948b7d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/HasPrivilegesRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/HasPrivilegesRequest.g.cs @@ -40,6 +40,8 @@ public sealed partial class HasPrivilegesRequestParameters : RequestParameters /// /// /// Determine whether the specified user has a specified list of privileges. +/// All users can use this API, but only to determine their own privileges. +/// To check the privileges of other users, you must use the run as feature. /// /// public sealed partial class HasPrivilegesRequest : PlainRequest @@ -80,6 +82,8 @@ public HasPrivilegesRequest(Elastic.Clients.Elasticsearch.Name? user) : base(r = /// /// /// Determine whether the specified user has a specified list of privileges. +/// All users can use this API, but only to determine their own privileges. +/// To check the privileges of other users, you must use the run as feature. /// /// public sealed partial class HasPrivilegesRequestDescriptor : RequestDescriptor diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/HasPrivilegesUserProfileRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/HasPrivilegesUserProfileRequest.g.cs index 81f80132120..d0932e39510 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/HasPrivilegesUserProfileRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/HasPrivilegesUserProfileRequest.g.cs @@ -41,6 +41,10 @@ public sealed partial class HasPrivilegesUserProfileRequestParameters : RequestP /// /// Determine whether the users associated with the specified user profile IDs have all the requested privileges. /// +/// +/// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. +/// Elastic reserves the right to change or remove this feature in future releases without prior notice. +/// /// public sealed partial class HasPrivilegesUserProfileRequest : PlainRequest { @@ -52,6 +56,11 @@ public sealed partial class HasPrivilegesUserProfileRequest : PlainRequest "security.has_privileges_user_profile"; + /// + /// + /// An object containing all the privileges to be checked. + /// + /// [JsonInclude, JsonPropertyName("privileges")] public Elastic.Clients.Elasticsearch.Security.PrivilegesCheck Privileges { get; set; } @@ -71,6 +80,10 @@ public sealed partial class HasPrivilegesUserProfileRequest : PlainRequest /// Determine whether the users associated with the specified user profile IDs have all the requested privileges. /// +/// +/// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. +/// Elastic reserves the right to change or remove this feature in future releases without prior notice. +/// /// public sealed partial class HasPrivilegesUserProfileRequestDescriptor : RequestDescriptor { @@ -93,6 +106,11 @@ public HasPrivilegesUserProfileRequestDescriptor() private Action PrivilegesDescriptorAction { get; set; } private ICollection UidsValue { get; set; } + /// + /// + /// An object containing all the privileges to be checked. + /// + /// public HasPrivilegesUserProfileRequestDescriptor Privileges(Elastic.Clients.Elasticsearch.Security.PrivilegesCheck privileges) { PrivilegesDescriptor = null; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateApiKeyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateApiKeyRequest.g.cs index d648b5974ce..3764e2f5164 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateApiKeyRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateApiKeyRequest.g.cs @@ -41,8 +41,12 @@ public sealed partial class InvalidateApiKeyRequestParameters : RequestParameter /// /// This API invalidates API keys created by the create API key or grant API key APIs. /// Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. -/// The manage_api_key privilege allows deleting any API keys. -/// The manage_own_api_key only allows deleting API keys that are owned by the user. +/// +/// +/// To use this API, you must have at least the manage_security, manage_api_key, or manage_own_api_key cluster privileges. +/// The manage_security privilege allows deleting any API key, including both REST and cross cluster API keys. +/// The manage_api_key privilege allows deleting any REST API key, but not cross cluster API keys. +/// The manage_own_api_key only allows deleting REST API keys that are owned by the user. /// In addition, with the manage_own_api_key privilege, an invalidation request must be issued in one of the three formats: /// /// @@ -53,7 +57,7 @@ public sealed partial class InvalidateApiKeyRequestParameters : RequestParameter /// /// /// -/// Or, set both username and realm_name to match the user’s identity. +/// Or, set both username and realm_name to match the user's identity. /// /// /// @@ -96,9 +100,12 @@ public sealed partial class InvalidateApiKeyRequest : PlainRequest /// - /// Can be used to query API keys owned by the currently authenticated user. + /// Query API keys owned by the currently authenticated user. /// The realm_name or username parameters cannot be specified when this parameter is set to true as they are assumed to be the currently authenticated ones. /// + /// + /// NOTE: At least one of ids, name, username, and realm_name must be specified if owner is false. + /// /// [JsonInclude, JsonPropertyName("owner")] public bool? Owner { get; set; } @@ -115,7 +122,7 @@ public sealed partial class InvalidateApiKeyRequest : PlainRequest /// /// The username of a user. - /// This parameter cannot be used with either ids or name, or when owner flag is set to true. + /// This parameter cannot be used with either ids or name or when owner flag is set to true. /// /// [JsonInclude, JsonPropertyName("username")] @@ -129,8 +136,12 @@ public sealed partial class InvalidateApiKeyRequest : PlainRequest /// This API invalidates API keys created by the create API key or grant API key APIs. /// Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. -/// The manage_api_key privilege allows deleting any API keys. -/// The manage_own_api_key only allows deleting API keys that are owned by the user. +/// +/// +/// To use this API, you must have at least the manage_security, manage_api_key, or manage_own_api_key cluster privileges. +/// The manage_security privilege allows deleting any API key, including both REST and cross cluster API keys. +/// The manage_api_key privilege allows deleting any REST API key, but not cross cluster API keys. +/// The manage_own_api_key only allows deleting REST API keys that are owned by the user. /// In addition, with the manage_own_api_key privilege, an invalidation request must be issued in one of the three formats: /// /// @@ -141,7 +152,7 @@ public sealed partial class InvalidateApiKeyRequest : PlainRequest /// /// -/// Or, set both username and realm_name to match the user’s identity. +/// Or, set both username and realm_name to match the user's identity. /// /// /// @@ -206,9 +217,12 @@ public InvalidateApiKeyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name /// /// - /// Can be used to query API keys owned by the currently authenticated user. + /// Query API keys owned by the currently authenticated user. /// The realm_name or username parameters cannot be specified when this parameter is set to true as they are assumed to be the currently authenticated ones. /// + /// + /// NOTE: At least one of ids, name, username, and realm_name must be specified if owner is false. + /// /// public InvalidateApiKeyRequestDescriptor Owner(bool? owner = true) { @@ -231,7 +245,7 @@ public InvalidateApiKeyRequestDescriptor RealmName(string? realmName) /// /// /// The username of a user. - /// This parameter cannot be used with either ids or name, or when owner flag is set to true. + /// This parameter cannot be used with either ids or name or when owner flag is set to true. /// /// public InvalidateApiKeyRequestDescriptor Username(Elastic.Clients.Elasticsearch.Username? username) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateApiKeyResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateApiKeyResponse.g.cs index c46e96aaf8b..9b3a5dc8f50 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateApiKeyResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateApiKeyResponse.g.cs @@ -28,12 +28,36 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class InvalidateApiKeyResponse : ElasticsearchResponse { + /// + /// + /// The number of errors that were encountered when invalidating the API keys. + /// + /// [JsonInclude, JsonPropertyName("error_count")] public int ErrorCount { get; init; } + + /// + /// + /// Details about the errors. + /// This field is not present in the response when error_count is 0. + /// + /// [JsonInclude, JsonPropertyName("error_details")] public IReadOnlyCollection? ErrorDetails { get; init; } + + /// + /// + /// The IDs of the API keys that were invalidated as part of this request. + /// + /// [JsonInclude, JsonPropertyName("invalidated_api_keys")] public IReadOnlyCollection InvalidatedApiKeys { get; init; } + + /// + /// + /// The IDs of the API keys that were already invalidated. + /// + /// [JsonInclude, JsonPropertyName("previously_invalidated_api_keys")] public IReadOnlyCollection PreviouslyInvalidatedApiKeys { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateTokenRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateTokenRequest.g.cs index 4386ef53852..b3c54fd862f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateTokenRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateTokenRequest.g.cs @@ -44,9 +44,15 @@ public sealed partial class InvalidateTokenRequestParameters : RequestParameters /// The time period is defined by the xpack.security.authc.token.timeout setting. /// /// -/// The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. +/// The refresh tokens returned by the get token API are only valid for 24 hours. +/// They can also be used exactly once. /// If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API. /// +/// +/// NOTE: While all parameters are optional, at least one of them is required. +/// More specifically, either one of token or refresh_token parameters is required. +/// If none of these two are specified, then realm_name and/or username need to be specified. +/// /// public sealed partial class InvalidateTokenRequest : PlainRequest { @@ -58,12 +64,39 @@ public sealed partial class InvalidateTokenRequest : PlainRequest "security.invalidate_token"; + /// + /// + /// The name of an authentication realm. + /// This parameter cannot be used with either refresh_token or token. + /// + /// [JsonInclude, JsonPropertyName("realm_name")] public Elastic.Clients.Elasticsearch.Name? RealmName { get; set; } + + /// + /// + /// A refresh token. + /// This parameter cannot be used if any of refresh_token, realm_name, or username are used. + /// + /// [JsonInclude, JsonPropertyName("refresh_token")] public string? RefreshToken { get; set; } + + /// + /// + /// An access token. + /// This parameter cannot be used if any of refresh_token, realm_name, or username are used. + /// + /// [JsonInclude, JsonPropertyName("token")] public string? Token { get; set; } + + /// + /// + /// The username of a user. + /// This parameter cannot be used with either refresh_token or token. + /// + /// [JsonInclude, JsonPropertyName("username")] public Elastic.Clients.Elasticsearch.Username? Username { get; set; } } @@ -78,9 +111,15 @@ public sealed partial class InvalidateTokenRequest : PlainRequestxpack.security.authc.token.timeout setting. /// /// -/// The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. +/// The refresh tokens returned by the get token API are only valid for 24 hours. +/// They can also be used exactly once. /// If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API. /// +/// +/// NOTE: While all parameters are optional, at least one of them is required. +/// More specifically, either one of token or refresh_token parameters is required. +/// If none of these two are specified, then realm_name and/or username need to be specified. +/// /// public sealed partial class InvalidateTokenRequestDescriptor : RequestDescriptor { @@ -103,24 +142,48 @@ public InvalidateTokenRequestDescriptor() private string? TokenValue { get; set; } private Elastic.Clients.Elasticsearch.Username? UsernameValue { get; set; } + /// + /// + /// The name of an authentication realm. + /// This parameter cannot be used with either refresh_token or token. + /// + /// public InvalidateTokenRequestDescriptor RealmName(Elastic.Clients.Elasticsearch.Name? realmName) { RealmNameValue = realmName; return Self; } + /// + /// + /// A refresh token. + /// This parameter cannot be used if any of refresh_token, realm_name, or username are used. + /// + /// public InvalidateTokenRequestDescriptor RefreshToken(string? refreshToken) { RefreshTokenValue = refreshToken; return Self; } + /// + /// + /// An access token. + /// This parameter cannot be used if any of refresh_token, realm_name, or username are used. + /// + /// public InvalidateTokenRequestDescriptor Token(string? token) { TokenValue = token; return Self; } + /// + /// + /// The username of a user. + /// This parameter cannot be used with either refresh_token or token. + /// + /// public InvalidateTokenRequestDescriptor Username(Elastic.Clients.Elasticsearch.Username? username) { UsernameValue = username; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateTokenResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateTokenResponse.g.cs index d014871850b..7710fd3bb20 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateTokenResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateTokenResponse.g.cs @@ -28,12 +28,36 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class InvalidateTokenResponse : ElasticsearchResponse { + /// + /// + /// The number of errors that were encountered when invalidating the tokens. + /// + /// [JsonInclude, JsonPropertyName("error_count")] public long ErrorCount { get; init; } + + /// + /// + /// Details about the errors. + /// This field is not present in the response when error_count is 0. + /// + /// [JsonInclude, JsonPropertyName("error_details")] public IReadOnlyCollection? ErrorDetails { get; init; } + + /// + /// + /// The number of the tokens that were invalidated as part of this request. + /// + /// [JsonInclude, JsonPropertyName("invalidated_tokens")] public long InvalidatedTokens { get; init; } + + /// + /// + /// The number of tokens that were already invalidated. + /// + /// [JsonInclude, JsonPropertyName("previously_invalidated_tokens")] public long PreviouslyInvalidatedTokens { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/OidcAuthenticateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/OidcAuthenticateRequest.g.cs new file mode 100644 index 00000000000..638ae1a9671 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/OidcAuthenticateRequest.g.cs @@ -0,0 +1,194 @@ +// 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.Security; + +public sealed partial class OidcAuthenticateRequestParameters : RequestParameters +{ +} + +/// +/// +/// Authenticate OpenID Connect. +/// +/// +/// Exchange an OpenID Connect authentication response message for an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. +/// +/// +/// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. +/// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. +/// +/// +public sealed partial class OidcAuthenticateRequest : PlainRequest +{ + internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityOidcAuthenticate; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "security.oidc_authenticate"; + + /// + /// + /// Associate a client session with an ID token and mitigate replay attacks. + /// This value needs to be the same as the one that was provided to the /_security/oidc/prepare API or the one that was generated by Elasticsearch and included in the response to that call. + /// + /// + [JsonInclude, JsonPropertyName("nonce")] + public string Nonce { get; set; } + + /// + /// + /// The name of the OpenID Connect realm. + /// This property is useful in cases where multiple realms are defined. + /// + /// + [JsonInclude, JsonPropertyName("realm")] + public string? Realm { get; set; } + + /// + /// + /// The URL to which the OpenID Connect Provider redirected the User Agent in response to an authentication request after a successful authentication. + /// This URL must be provided as-is (URL encoded), taken from the body of the response or as the value of a location header in the response from the OpenID Connect Provider. + /// + /// + [JsonInclude, JsonPropertyName("redirect_uri")] + public string RedirectUri { get; set; } + + /// + /// + /// Maintain state between the authentication request and the response. + /// This value needs to be the same as the one that was provided to the /_security/oidc/prepare API or the one that was generated by Elasticsearch and included in the response to that call. + /// + /// + [JsonInclude, JsonPropertyName("state")] + public string State { get; set; } +} + +/// +/// +/// Authenticate OpenID Connect. +/// +/// +/// Exchange an OpenID Connect authentication response message for an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. +/// +/// +/// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. +/// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. +/// +/// +public sealed partial class OidcAuthenticateRequestDescriptor : RequestDescriptor +{ + internal OidcAuthenticateRequestDescriptor(Action configure) => configure.Invoke(this); + + public OidcAuthenticateRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityOidcAuthenticate; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "security.oidc_authenticate"; + + private string NonceValue { get; set; } + private string? RealmValue { get; set; } + private string RedirectUriValue { get; set; } + private string StateValue { get; set; } + + /// + /// + /// Associate a client session with an ID token and mitigate replay attacks. + /// This value needs to be the same as the one that was provided to the /_security/oidc/prepare API or the one that was generated by Elasticsearch and included in the response to that call. + /// + /// + public OidcAuthenticateRequestDescriptor Nonce(string nonce) + { + NonceValue = nonce; + return Self; + } + + /// + /// + /// The name of the OpenID Connect realm. + /// This property is useful in cases where multiple realms are defined. + /// + /// + public OidcAuthenticateRequestDescriptor Realm(string? realm) + { + RealmValue = realm; + return Self; + } + + /// + /// + /// The URL to which the OpenID Connect Provider redirected the User Agent in response to an authentication request after a successful authentication. + /// This URL must be provided as-is (URL encoded), taken from the body of the response or as the value of a location header in the response from the OpenID Connect Provider. + /// + /// + public OidcAuthenticateRequestDescriptor RedirectUri(string redirectUri) + { + RedirectUriValue = redirectUri; + return Self; + } + + /// + /// + /// Maintain state between the authentication request and the response. + /// This value needs to be the same as the one that was provided to the /_security/oidc/prepare API or the one that was generated by Elasticsearch and included in the response to that call. + /// + /// + public OidcAuthenticateRequestDescriptor State(string state) + { + StateValue = state; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("nonce"); + writer.WriteStringValue(NonceValue); + if (!string.IsNullOrEmpty(RealmValue)) + { + writer.WritePropertyName("realm"); + writer.WriteStringValue(RealmValue); + } + + writer.WritePropertyName("redirect_uri"); + writer.WriteStringValue(RedirectUriValue); + writer.WritePropertyName("state"); + writer.WriteStringValue(StateValue); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/OidcAuthenticateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/OidcAuthenticateResponse.g.cs new file mode 100644 index 00000000000..3e2363e1ca6 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/OidcAuthenticateResponse.g.cs @@ -0,0 +1,62 @@ +// 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.Security; + +public sealed partial class OidcAuthenticateResponse : ElasticsearchResponse +{ + /// + /// + /// The Elasticsearch access token. + /// + /// + [JsonInclude, JsonPropertyName("access_token")] + public string AccessToken { get; init; } + + /// + /// + /// The duration (in seconds) of the tokens. + /// + /// + [JsonInclude, JsonPropertyName("expires_in")] + public int ExpiresIn { get; init; } + + /// + /// + /// The Elasticsearch refresh token. + /// + /// + [JsonInclude, JsonPropertyName("refresh_token")] + public string RefreshToken { get; init; } + + /// + /// + /// The type of token. + /// + /// + [JsonInclude, JsonPropertyName("type")] + public string Type { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/OidcLogoutRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/OidcLogoutRequest.g.cs new file mode 100644 index 00000000000..30273c570ae --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/OidcLogoutRequest.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.Security; + +public sealed partial class OidcLogoutRequestParameters : RequestParameters +{ +} + +/// +/// +/// Logout of OpenID Connect. +/// +/// +/// Invalidate an access token and a refresh token that were generated as a response to the /_security/oidc/authenticate API. +/// +/// +/// If the OpenID Connect authentication realm in Elasticsearch is accordingly configured, the response to this call will contain a URI pointing to the end session endpoint of the OpenID Connect Provider in order to perform single logout. +/// +/// +/// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. +/// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. +/// +/// +public sealed partial class OidcLogoutRequest : PlainRequest +{ + internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityOidcLogout; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "security.oidc_logout"; + + /// + /// + /// The access token to be invalidated. + /// + /// + [JsonInclude, JsonPropertyName("access_token")] + public string AccessToken { get; set; } + + /// + /// + /// The refresh token to be invalidated. + /// + /// + [JsonInclude, JsonPropertyName("refresh_token")] + public string? RefreshToken { get; set; } +} + +/// +/// +/// Logout of OpenID Connect. +/// +/// +/// Invalidate an access token and a refresh token that were generated as a response to the /_security/oidc/authenticate API. +/// +/// +/// If the OpenID Connect authentication realm in Elasticsearch is accordingly configured, the response to this call will contain a URI pointing to the end session endpoint of the OpenID Connect Provider in order to perform single logout. +/// +/// +/// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. +/// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. +/// +/// +public sealed partial class OidcLogoutRequestDescriptor : RequestDescriptor +{ + internal OidcLogoutRequestDescriptor(Action configure) => configure.Invoke(this); + + public OidcLogoutRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityOidcLogout; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "security.oidc_logout"; + + private string AccessTokenValue { get; set; } + private string? RefreshTokenValue { get; set; } + + /// + /// + /// The access token to be invalidated. + /// + /// + public OidcLogoutRequestDescriptor AccessToken(string accessToken) + { + AccessTokenValue = accessToken; + return Self; + } + + /// + /// + /// The refresh token to be invalidated. + /// + /// + public OidcLogoutRequestDescriptor RefreshToken(string? refreshToken) + { + RefreshTokenValue = refreshToken; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("access_token"); + writer.WriteStringValue(AccessTokenValue); + if (!string.IsNullOrEmpty(RefreshTokenValue)) + { + writer.WritePropertyName("refresh_token"); + writer.WriteStringValue(RefreshTokenValue); + } + + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/OidcLogoutResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/OidcLogoutResponse.g.cs new file mode 100644 index 00000000000..a0952e506fb --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/OidcLogoutResponse.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.Security; + +public sealed partial class OidcLogoutResponse : ElasticsearchResponse +{ + /// + /// + /// A URI that points to the end session endpoint of the OpenID Connect Provider with all the parameters of the logout request as HTTP GET parameters. + /// + /// + [JsonInclude, JsonPropertyName("redirect")] + public string Redirect { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/OidcPrepareAuthenticationRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/OidcPrepareAuthenticationRequest.g.cs new file mode 100644 index 00000000000..5c4cff8f89a --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/OidcPrepareAuthenticationRequest.g.cs @@ -0,0 +1,244 @@ +// 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.Security; + +public sealed partial class OidcPrepareAuthenticationRequestParameters : RequestParameters +{ +} + +/// +/// +/// Prepare OpenID connect authentication. +/// +/// +/// Create an oAuth 2.0 authentication request as a URL string based on the configuration of the OpenID Connect authentication realm in Elasticsearch. +/// +/// +/// The response of this API is a URL pointing to the Authorization Endpoint of the configured OpenID Connect Provider, which can be used to redirect the browser of the user in order to continue the authentication process. +/// +/// +/// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. +/// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. +/// +/// +public sealed partial class OidcPrepareAuthenticationRequest : PlainRequest +{ + internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityOidcPrepareAuthentication; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "security.oidc_prepare_authentication"; + + /// + /// + /// In the case of a third party initiated single sign on, this is the issuer identifier for the OP that the RP is to send the authentication request to. + /// It cannot be specified when realm is specified. + /// One of realm or iss is required. + /// + /// + [JsonInclude, JsonPropertyName("iss")] + public string? Iss { get; set; } + + /// + /// + /// In the case of a third party initiated single sign on, it is a string value that is included in the authentication request as the login_hint parameter. + /// This parameter is not valid when realm is specified. + /// + /// + [JsonInclude, JsonPropertyName("login_hint")] + public string? LoginHint { get; set; } + + /// + /// + /// The value used to associate a client session with an ID token and to mitigate replay attacks. + /// If the caller of the API does not provide a value, Elasticsearch will generate one with sufficient entropy and return it in the response. + /// + /// + [JsonInclude, JsonPropertyName("nonce")] + public string? Nonce { get; set; } + + /// + /// + /// The name of the OpenID Connect realm in Elasticsearch the configuration of which should be used in order to generate the authentication request. + /// It cannot be specified when iss is specified. + /// One of realm or iss is required. + /// + /// + [JsonInclude, JsonPropertyName("realm")] + public string? Realm { get; set; } + + /// + /// + /// The value used to maintain state between the authentication request and the response, typically used as a Cross-Site Request Forgery mitigation. + /// If the caller of the API does not provide a value, Elasticsearch will generate one with sufficient entropy and return it in the response. + /// + /// + [JsonInclude, JsonPropertyName("state")] + public string? State { get; set; } +} + +/// +/// +/// Prepare OpenID connect authentication. +/// +/// +/// Create an oAuth 2.0 authentication request as a URL string based on the configuration of the OpenID Connect authentication realm in Elasticsearch. +/// +/// +/// The response of this API is a URL pointing to the Authorization Endpoint of the configured OpenID Connect Provider, which can be used to redirect the browser of the user in order to continue the authentication process. +/// +/// +/// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. +/// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. +/// +/// +public sealed partial class OidcPrepareAuthenticationRequestDescriptor : RequestDescriptor +{ + internal OidcPrepareAuthenticationRequestDescriptor(Action configure) => configure.Invoke(this); + + public OidcPrepareAuthenticationRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityOidcPrepareAuthentication; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "security.oidc_prepare_authentication"; + + private string? IssValue { get; set; } + private string? LoginHintValue { get; set; } + private string? NonceValue { get; set; } + private string? RealmValue { get; set; } + private string? StateValue { get; set; } + + /// + /// + /// In the case of a third party initiated single sign on, this is the issuer identifier for the OP that the RP is to send the authentication request to. + /// It cannot be specified when realm is specified. + /// One of realm or iss is required. + /// + /// + public OidcPrepareAuthenticationRequestDescriptor Iss(string? iss) + { + IssValue = iss; + return Self; + } + + /// + /// + /// In the case of a third party initiated single sign on, it is a string value that is included in the authentication request as the login_hint parameter. + /// This parameter is not valid when realm is specified. + /// + /// + public OidcPrepareAuthenticationRequestDescriptor LoginHint(string? loginHint) + { + LoginHintValue = loginHint; + return Self; + } + + /// + /// + /// The value used to associate a client session with an ID token and to mitigate replay attacks. + /// If the caller of the API does not provide a value, Elasticsearch will generate one with sufficient entropy and return it in the response. + /// + /// + public OidcPrepareAuthenticationRequestDescriptor Nonce(string? nonce) + { + NonceValue = nonce; + return Self; + } + + /// + /// + /// The name of the OpenID Connect realm in Elasticsearch the configuration of which should be used in order to generate the authentication request. + /// It cannot be specified when iss is specified. + /// One of realm or iss is required. + /// + /// + public OidcPrepareAuthenticationRequestDescriptor Realm(string? realm) + { + RealmValue = realm; + return Self; + } + + /// + /// + /// The value used to maintain state between the authentication request and the response, typically used as a Cross-Site Request Forgery mitigation. + /// If the caller of the API does not provide a value, Elasticsearch will generate one with sufficient entropy and return it in the response. + /// + /// + public OidcPrepareAuthenticationRequestDescriptor State(string? state) + { + StateValue = state; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (!string.IsNullOrEmpty(IssValue)) + { + writer.WritePropertyName("iss"); + writer.WriteStringValue(IssValue); + } + + if (!string.IsNullOrEmpty(LoginHintValue)) + { + writer.WritePropertyName("login_hint"); + writer.WriteStringValue(LoginHintValue); + } + + if (!string.IsNullOrEmpty(NonceValue)) + { + writer.WritePropertyName("nonce"); + writer.WriteStringValue(NonceValue); + } + + if (!string.IsNullOrEmpty(RealmValue)) + { + writer.WritePropertyName("realm"); + writer.WriteStringValue(RealmValue); + } + + if (!string.IsNullOrEmpty(StateValue)) + { + writer.WritePropertyName("state"); + writer.WriteStringValue(StateValue); + } + + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/OidcPrepareAuthenticationResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/OidcPrepareAuthenticationResponse.g.cs new file mode 100644 index 00000000000..39e1e97d39e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/OidcPrepareAuthenticationResponse.g.cs @@ -0,0 +1,45 @@ +// 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.Security; + +public sealed partial class OidcPrepareAuthenticationResponse : ElasticsearchResponse +{ + [JsonInclude, JsonPropertyName("nonce")] + public string Nonce { get; init; } + [JsonInclude, JsonPropertyName("realm")] + public string Realm { get; init; } + + /// + /// + /// A URI that points to the authorization endpoint of the OpenID Connect Provider with all the parameters of the authentication request as HTTP GET parameters. + /// + /// + [JsonInclude, JsonPropertyName("redirect")] + public string Redirect { get; init; } + [JsonInclude, JsonPropertyName("state")] + public string State { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutPrivilegesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutPrivilegesRequest.g.cs index 9ba02c01239..5d886651927 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutPrivilegesRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutPrivilegesRequest.g.cs @@ -46,6 +46,62 @@ public sealed partial class PutPrivilegesRequestParameters : RequestParameters /// /// Create or update application privileges. /// +/// +/// To use this API, you must have one of the following privileges: +/// +/// +/// +/// +/// The manage_security cluster privilege (or a greater privilege such as all). +/// +/// +/// +/// +/// The "Manage Application Privileges" global privilege for the application being referenced in the request. +/// +/// +/// +/// +/// Application names are formed from a prefix, with an optional suffix that conform to the following rules: +/// +/// +/// +/// +/// The prefix must begin with a lowercase ASCII letter. +/// +/// +/// +/// +/// The prefix must contain only ASCII letters or digits. +/// +/// +/// +/// +/// The prefix must be at least 3 characters long. +/// +/// +/// +/// +/// If the suffix exists, it must begin with either a dash - or _. +/// +/// +/// +/// +/// The suffix cannot contain any of the following characters: \, /, *, ?, ", <, >, |, ,, *. +/// +/// +/// +/// +/// No part of the name can contain whitespace. +/// +/// +/// +/// +/// Privilege names must begin with a lowercase ASCII letter and must contain only ASCII letters and digits along with the characters _, -, and .. +/// +/// +/// Action names can contain any number of printable ASCII characters and must contain at least one of the following characters: /, *, :. +/// /// public sealed partial class PutPrivilegesRequest : PlainRequest, ISelfSerializable { @@ -76,6 +132,62 @@ void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions op /// /// Create or update application privileges. /// +/// +/// To use this API, you must have one of the following privileges: +/// +/// +/// +/// +/// The manage_security cluster privilege (or a greater privilege such as all). +/// +/// +/// +/// +/// The "Manage Application Privileges" global privilege for the application being referenced in the request. +/// +/// +/// +/// +/// Application names are formed from a prefix, with an optional suffix that conform to the following rules: +/// +/// +/// +/// +/// The prefix must begin with a lowercase ASCII letter. +/// +/// +/// +/// +/// The prefix must contain only ASCII letters or digits. +/// +/// +/// +/// +/// The prefix must be at least 3 characters long. +/// +/// +/// +/// +/// If the suffix exists, it must begin with either a dash - or _. +/// +/// +/// +/// +/// The suffix cannot contain any of the following characters: \, /, *, ?, ", <, >, |, ,, *. +/// +/// +/// +/// +/// No part of the name can contain whitespace. +/// +/// +/// +/// +/// Privilege names must begin with a lowercase ASCII letter and must contain only ASCII letters and digits along with the characters _, -, and .. +/// +/// +/// Action names can contain any number of printable ASCII characters and must contain at least one of the following characters: /, *, :. +/// /// public sealed partial class PutPrivilegesRequestDescriptor : RequestDescriptor, ISelfSerializable { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingRequest.g.cs index e0713523d9f..3a335fae9cc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingRequest.g.cs @@ -50,9 +50,33 @@ public sealed partial class PutRoleMappingRequestParameters : RequestParameters /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. /// /// -/// This API does not create roles. Rather, it maps users to existing roles. +/// NOTE: This API does not create roles. Rather, it maps users to existing roles. /// Roles can be created by using the create or update roles API or roles files. /// +/// +/// Role templates +/// +/// +/// The most common use for role mappings is to create a mapping from a known value on the user to a fixed role name. +/// For example, all users in the cn=admin,dc=example,dc=com LDAP group should be given the superuser role in Elasticsearch. +/// The roles field is used for this purpose. +/// +/// +/// For more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user. +/// The role_templates field is used for this purpose. +/// +/// +/// NOTE: To use role templates successfully, the relevant scripting feature must be enabled. +/// Otherwise, all attempts to create a role mapping with role templates fail. +/// +/// +/// All of the user fields that are available in the role mapping rules are also available in the role templates. +/// Thus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated. +/// +/// +/// By default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user. +/// If the format of the template is set to "json" then the template is expected to produce a JSON string or an array of JSON strings for the role names. +/// /// public sealed partial class PutRoleMappingRequest : PlainRequest { @@ -75,14 +99,48 @@ public PutRoleMappingRequest(Elastic.Clients.Elasticsearch.Name name) : base(r = /// [JsonIgnore] public Elastic.Clients.Elasticsearch.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } + + /// + /// + /// Mappings that have enabled set to false are ignored when role mapping is performed. + /// + /// [JsonInclude, JsonPropertyName("enabled")] public bool? Enabled { get; set; } + + /// + /// + /// Additional metadata that helps define which roles are assigned to each user. + /// Within the metadata object, keys beginning with _ are reserved for system usage. + /// + /// [JsonInclude, JsonPropertyName("metadata")] public IDictionary? Metadata { get; set; } + + /// + /// + /// A list of role names that are granted to the users that match the role mapping rules. + /// Exactly one of roles or role_templates must be specified. + /// + /// [JsonInclude, JsonPropertyName("roles")] public ICollection? Roles { get; set; } + + /// + /// + /// A list of Mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules. + /// Exactly one of roles or role_templates must be specified. + /// + /// [JsonInclude, JsonPropertyName("role_templates")] public ICollection? RoleTemplates { get; set; } + + /// + /// + /// The rules that determine which users should be matched by the mapping. + /// A rule is a logical condition that is expressed by using a JSON DSL. + /// + /// [JsonInclude, JsonPropertyName("rules")] public Elastic.Clients.Elasticsearch.Security.RoleMappingRule? Rules { get; set; } [JsonInclude, JsonPropertyName("run_as")] @@ -99,9 +157,33 @@ public PutRoleMappingRequest(Elastic.Clients.Elasticsearch.Name name) : base(r = /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. /// /// -/// This API does not create roles. Rather, it maps users to existing roles. +/// NOTE: This API does not create roles. Rather, it maps users to existing roles. /// Roles can be created by using the create or update roles API or roles files. /// +/// +/// Role templates +/// +/// +/// The most common use for role mappings is to create a mapping from a known value on the user to a fixed role name. +/// For example, all users in the cn=admin,dc=example,dc=com LDAP group should be given the superuser role in Elasticsearch. +/// The roles field is used for this purpose. +/// +/// +/// For more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user. +/// The role_templates field is used for this purpose. +/// +/// +/// NOTE: To use role templates successfully, the relevant scripting feature must be enabled. +/// Otherwise, all attempts to create a role mapping with role templates fail. +/// +/// +/// All of the user fields that are available in the role mapping rules are also available in the role templates. +/// Thus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated. +/// +/// +/// By default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user. +/// If the format of the template is set to "json" then the template is expected to produce a JSON string or an array of JSON strings for the role names. +/// /// public sealed partial class PutRoleMappingRequestDescriptor : RequestDescriptor { @@ -139,24 +221,47 @@ public PutRoleMappingRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name n private Action RulesDescriptorAction { get; set; } private ICollection? RunAsValue { get; set; } + /// + /// + /// Mappings that have enabled set to false are ignored when role mapping is performed. + /// + /// public PutRoleMappingRequestDescriptor Enabled(bool? enabled = true) { EnabledValue = enabled; return Self; } + /// + /// + /// Additional metadata that helps define which roles are assigned to each user. + /// Within the metadata object, keys beginning with _ are reserved for system usage. + /// + /// public PutRoleMappingRequestDescriptor Metadata(Func, FluentDictionary> selector) { MetadataValue = selector?.Invoke(new FluentDictionary()); return Self; } + /// + /// + /// A list of role names that are granted to the users that match the role mapping rules. + /// Exactly one of roles or role_templates must be specified. + /// + /// public PutRoleMappingRequestDescriptor Roles(ICollection? roles) { RolesValue = roles; return Self; } + /// + /// + /// A list of Mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules. + /// Exactly one of roles or role_templates must be specified. + /// + /// public PutRoleMappingRequestDescriptor RoleTemplates(ICollection? roleTemplates) { RoleTemplatesDescriptor = null; @@ -193,6 +298,12 @@ public PutRoleMappingRequestDescriptor RoleTemplates(params Action + /// + /// The rules that determine which users should be matched by the mapping. + /// A rule is a logical condition that is expressed by using a JSON DSL. + /// + /// public PutRoleMappingRequestDescriptor Rules(Elastic.Clients.Elasticsearch.Security.RoleMappingRule? rules) { RulesDescriptor = null; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleRequest.g.cs index 300912ec21c..01e434d9717 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleRequest.g.cs @@ -132,6 +132,10 @@ public PutRoleRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r.Req /// /// A list of remote indices permissions entries. /// + /// + /// NOTE: Remote indices are effective for remote clusters configured with the API key based model. + /// They have no effect for remote clusters configured with the certificate based model. + /// /// [JsonInclude, JsonPropertyName("remote_indices")] public ICollection? RemoteIndices { get; set; } @@ -381,6 +385,10 @@ public PutRoleRequestDescriptor RemoteCluster(params Action /// A list of remote indices permissions entries. /// + /// + /// NOTE: Remote indices are effective for remote clusters configured with the API key based model. + /// They have no effect for remote clusters configured with the certificate based model. + /// /// public PutRoleRequestDescriptor RemoteIndices(ICollection? remoteIndices) { @@ -835,6 +843,10 @@ public PutRoleRequestDescriptor RemoteCluster(params Action /// A list of remote indices permissions entries. /// + /// + /// NOTE: Remote indices are effective for remote clusters configured with the API key based model. + /// They have no effect for remote clusters configured with the certificate based model. + /// /// public PutRoleRequestDescriptor RemoteIndices(ICollection? remoteIndices) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleResponse.g.cs index 6c6b329cdb4..bd63075fa2d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleResponse.g.cs @@ -28,6 +28,11 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class PutRoleResponse : ElasticsearchResponse { + /// + /// + /// When an existing role is updated, created is set to false. + /// + /// [JsonInclude, JsonPropertyName("role")] public Elastic.Clients.Elasticsearch.Security.CreatedStatus Role { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserRequest.g.cs index be4076b0394..91245e22493 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserRequest.g.cs @@ -34,7 +34,8 @@ public sealed partial class PutUserRequestParameters : RequestParameters { /// /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. + /// Valid values are true, false, and wait_for. + /// These values have the same meaning as in the index API, but the default value for this API is true. /// /// public Elastic.Clients.Elasticsearch.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } @@ -45,8 +46,9 @@ public sealed partial class PutUserRequestParameters : RequestParameters /// Create or update users. /// /// +/// Add and update users in the native realm. /// A password is required for adding a new user but is optional when updating an existing user. -/// To change a user’s password without updating any other fields, use the change password API. +/// To change a user's password without updating any other fields, use the change password API. /// /// public sealed partial class PutUserRequest : PlainRequest @@ -65,23 +67,75 @@ public PutUserRequest(Elastic.Clients.Elasticsearch.Username username) : base(r /// /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. + /// Valid values are true, false, and wait_for. + /// These values have the same meaning as in the index API, but the default value for this API is true. /// /// [JsonIgnore] public Elastic.Clients.Elasticsearch.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } + + /// + /// + /// The email of the user. + /// + /// [JsonInclude, JsonPropertyName("email")] public string? Email { get; set; } + + /// + /// + /// Specifies whether the user is enabled. + /// + /// [JsonInclude, JsonPropertyName("enabled")] public bool? Enabled { get; set; } + + /// + /// + /// The full name of the user. + /// + /// [JsonInclude, JsonPropertyName("full_name")] public string? FullName { get; set; } + + /// + /// + /// Arbitrary metadata that you want to associate with the user. + /// + /// [JsonInclude, JsonPropertyName("metadata")] public IDictionary? Metadata { get; set; } + + /// + /// + /// The user's password. + /// Passwords must be at least 6 characters long. + /// When adding a user, one of password or password_hash is required. + /// When updating an existing user, the password is optional, so that other fields on the user (such as their roles) may be updated without modifying the user's password + /// + /// [JsonInclude, JsonPropertyName("password")] public string? Password { get; set; } + + /// + /// + /// A hash of the user's password. + /// This must be produced using the same hashing algorithm as has been configured for password storage. + /// For more details, see the explanation of the xpack.security.authc.password_hashing.algorithm setting in the user cache and password hash algorithm documentation. + /// Using this parameter allows the client to pre-hash the password for performance and/or confidentiality reasons. + /// The password parameter and the password_hash parameter cannot be used in the same request. + /// + /// [JsonInclude, JsonPropertyName("password_hash")] public string? PasswordHash { get; set; } + + /// + /// + /// A set of roles the user has. + /// The roles determine the user's access permissions. + /// To create a user without any roles, specify an empty list ([]). + /// + /// [JsonInclude, JsonPropertyName("roles")] public ICollection? Roles { get; set; } [JsonInclude, JsonPropertyName("username")] @@ -93,8 +147,9 @@ public PutUserRequest(Elastic.Clients.Elasticsearch.Username username) : base(r /// Create or update users. /// /// +/// Add and update users in the native realm. /// A password is required for adding a new user but is optional when updating an existing user. -/// To change a user’s password without updating any other fields, use the change password API. +/// To change a user's password without updating any other fields, use the change password API. /// /// public sealed partial class PutUserRequestDescriptor : RequestDescriptor @@ -120,42 +175,86 @@ public sealed partial class PutUserRequestDescriptor : RequestDescriptor? RolesValue { get; set; } private Elastic.Clients.Elasticsearch.Username? UsernameValue { get; set; } + /// + /// + /// The email of the user. + /// + /// public PutUserRequestDescriptor Email(string? email) { EmailValue = email; return Self; } + /// + /// + /// Specifies whether the user is enabled. + /// + /// public PutUserRequestDescriptor Enabled(bool? enabled = true) { EnabledValue = enabled; return Self; } + /// + /// + /// The full name of the user. + /// + /// public PutUserRequestDescriptor FullName(string? fullName) { FullNameValue = fullName; return Self; } + /// + /// + /// Arbitrary metadata that you want to associate with the user. + /// + /// public PutUserRequestDescriptor Metadata(Func, FluentDictionary> selector) { MetadataValue = selector?.Invoke(new FluentDictionary()); return Self; } + /// + /// + /// The user's password. + /// Passwords must be at least 6 characters long. + /// When adding a user, one of password or password_hash is required. + /// When updating an existing user, the password is optional, so that other fields on the user (such as their roles) may be updated without modifying the user's password + /// + /// public PutUserRequestDescriptor Password(string? password) { PasswordValue = password; return Self; } + /// + /// + /// A hash of the user's password. + /// This must be produced using the same hashing algorithm as has been configured for password storage. + /// For more details, see the explanation of the xpack.security.authc.password_hashing.algorithm setting in the user cache and password hash algorithm documentation. + /// Using this parameter allows the client to pre-hash the password for performance and/or confidentiality reasons. + /// The password parameter and the password_hash parameter cannot be used in the same request. + /// + /// public PutUserRequestDescriptor PasswordHash(string? passwordHash) { PasswordHashValue = passwordHash; return Self; } + /// + /// + /// A set of roles the user has. + /// The roles determine the user's access permissions. + /// To create a user without any roles, specify an empty list ([]). + /// + /// public PutUserRequestDescriptor Roles(ICollection? roles) { RolesValue = roles; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserResponse.g.cs index 5941437d1cc..83f742893a9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserResponse.g.cs @@ -28,6 +28,12 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class PutUserResponse : ElasticsearchResponse { + /// + /// + /// A successful call returns a JSON structure that shows whether the user has been created or updated. + /// When an existing user is updated, created is set to false. + /// + /// [JsonInclude, JsonPropertyName("created")] public bool Created { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryApiKeysRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryApiKeysRequest.g.cs index fdd42b6136d..73bab3d943d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryApiKeysRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryApiKeysRequest.g.cs @@ -42,14 +42,16 @@ public sealed partial class QueryApiKeysRequestParameters : RequestParameters /// /// /// Return the snapshot of the owner user's role descriptors associated with the API key. - /// An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors. + /// An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors (effectively limited by it). + /// An API key cannot retrieve any API key’s limited-by role descriptors (including itself) unless it has manage_api_key or higher privileges. /// /// public bool? WithLimitedBy { get => Q("with_limited_by"); set => Q("with_limited_by", value); } /// /// - /// Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists. + /// Determines whether to also retrieve the profile UID for the API key owner principal. + /// If it exists, the profile UID is returned under the profile_uid response field for each API key. /// /// public bool? WithProfileUid { get => Q("with_profile_uid"); set => Q("with_profile_uid", value); } @@ -156,7 +158,13 @@ public override void Write(Utf8JsonWriter writer, QueryApiKeysRequest value, Jso /// Find API keys with a query. /// /// -/// Get a paginated list of API keys and their information. You can optionally filter the results with a query. +/// Get a paginated list of API keys and their information. +/// You can optionally filter the results with a query. +/// +/// +/// To use this API, you must have at least the manage_own_api_key or the read_security cluster privileges. +/// If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. +/// If you have the read_security, manage_api_key, or greater privileges (including manage_security), this API returns all API keys regardless of ownership. /// /// [JsonConverter(typeof(QueryApiKeysRequestConverter))] @@ -185,7 +193,8 @@ public QueryApiKeysRequest() /// /// /// Return the snapshot of the owner user's role descriptors associated with the API key. - /// An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors. + /// An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors (effectively limited by it). + /// An API key cannot retrieve any API key’s limited-by role descriptors (including itself) unless it has manage_api_key or higher privileges. /// /// [JsonIgnore] @@ -193,7 +202,8 @@ public QueryApiKeysRequest() /// /// - /// Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists. + /// Determines whether to also retrieve the profile UID for the API key owner principal. + /// If it exists, the profile UID is returned under the profile_uid response field for each API key. /// /// [JsonIgnore] @@ -213,8 +223,9 @@ public QueryApiKeysRequest() /// /// - /// Starting document offset. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. + /// The starting document offset. + /// It must not be negative. + /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// /// @@ -230,13 +241,18 @@ public QueryApiKeysRequest() /// You can query the following public information associated with an API key: id, type, name, /// creation, expiration, invalidated, invalidation, username, realm, and metadata. /// + /// + /// NOTE: The queryable string values associated with API keys are internally mapped as keywords. + /// Consequently, if no analyzer parameter is specified for a match query, then the provided match query string is interpreted as a single keyword value. + /// Such a match query is hence equivalent to a term query. + /// /// [JsonInclude, JsonPropertyName("query")] public Elastic.Clients.Elasticsearch.Security.ApiKeyQuery? Query { get; set; } /// /// - /// Search after definition + /// The search after definition. /// /// [JsonInclude, JsonPropertyName("search_after")] @@ -245,6 +261,8 @@ public QueryApiKeysRequest() /// /// /// The number of hits to return. + /// It must not be negative. + /// The size parameter can be set to 0, in which case no API key matches are returned, only the aggregation results. /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// @@ -254,6 +272,7 @@ public QueryApiKeysRequest() /// /// + /// The sort definition. /// Other than id, all public fields of an API key are eligible for sorting. /// In addition, sort can also be applied to the _doc field to sort by index order. /// @@ -268,7 +287,13 @@ public QueryApiKeysRequest() /// Find API keys with a query. /// /// -/// Get a paginated list of API keys and their information. You can optionally filter the results with a query. +/// Get a paginated list of API keys and their information. +/// You can optionally filter the results with a query. +/// +/// +/// To use this API, you must have at least the manage_own_api_key or the read_security cluster privileges. +/// If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. +/// If you have the read_security, manage_api_key, or greater privileges (including manage_security), this API returns all API keys regardless of ownership. /// /// public sealed partial class QueryApiKeysRequestDescriptor : RequestDescriptor, QueryApiKeysRequestParameters> @@ -320,8 +345,9 @@ public QueryApiKeysRequestDescriptor Aggregations(Func /// - /// Starting document offset. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. + /// The starting document offset. + /// It must not be negative. + /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// /// @@ -340,6 +366,11 @@ public QueryApiKeysRequestDescriptor From(int? from) /// You can query the following public information associated with an API key: id, type, name, /// creation, expiration, invalidated, invalidation, username, realm, and metadata. /// + /// + /// NOTE: The queryable string values associated with API keys are internally mapped as keywords. + /// Consequently, if no analyzer parameter is specified for a match query, then the provided match query string is interpreted as a single keyword value. + /// Such a match query is hence equivalent to a term query. + /// /// public QueryApiKeysRequestDescriptor Query(Elastic.Clients.Elasticsearch.Security.ApiKeyQuery? query) { @@ -367,7 +398,7 @@ public QueryApiKeysRequestDescriptor Query(Action /// - /// Search after definition + /// The search after definition. /// /// public QueryApiKeysRequestDescriptor SearchAfter(ICollection? searchAfter) @@ -379,6 +410,8 @@ public QueryApiKeysRequestDescriptor SearchAfter(ICollection /// /// The number of hits to return. + /// It must not be negative. + /// The size parameter can be set to 0, in which case no API key matches are returned, only the aggregation results. /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// @@ -391,6 +424,7 @@ public QueryApiKeysRequestDescriptor Size(int? size) /// /// + /// The sort definition. /// Other than id, all public fields of an API key are eligible for sorting. /// In addition, sort can also be applied to the _doc field to sort by index order. /// @@ -512,7 +546,13 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o /// Find API keys with a query. /// /// -/// Get a paginated list of API keys and their information. You can optionally filter the results with a query. +/// Get a paginated list of API keys and their information. +/// You can optionally filter the results with a query. +/// +/// +/// To use this API, you must have at least the manage_own_api_key or the read_security cluster privileges. +/// If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. +/// If you have the read_security, manage_api_key, or greater privileges (including manage_security), this API returns all API keys regardless of ownership. /// /// public sealed partial class QueryApiKeysRequestDescriptor : RequestDescriptor @@ -564,8 +604,9 @@ public QueryApiKeysRequestDescriptor Aggregations(Func /// - /// Starting document offset. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. + /// The starting document offset. + /// It must not be negative. + /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// /// @@ -584,6 +625,11 @@ public QueryApiKeysRequestDescriptor From(int? from) /// You can query the following public information associated with an API key: id, type, name, /// creation, expiration, invalidated, invalidation, username, realm, and metadata. /// + /// + /// NOTE: The queryable string values associated with API keys are internally mapped as keywords. + /// Consequently, if no analyzer parameter is specified for a match query, then the provided match query string is interpreted as a single keyword value. + /// Such a match query is hence equivalent to a term query. + /// /// public QueryApiKeysRequestDescriptor Query(Elastic.Clients.Elasticsearch.Security.ApiKeyQuery? query) { @@ -611,7 +657,7 @@ public QueryApiKeysRequestDescriptor Query(Action /// - /// Search after definition + /// The search after definition. /// /// public QueryApiKeysRequestDescriptor SearchAfter(ICollection? searchAfter) @@ -623,6 +669,8 @@ public QueryApiKeysRequestDescriptor SearchAfter(ICollection /// /// The number of hits to return. + /// It must not be negative. + /// The size parameter can be set to 0, in which case no API key matches are returned, only the aggregation results. /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// @@ -635,6 +683,7 @@ public QueryApiKeysRequestDescriptor Size(int? size) /// /// + /// The sort definition. /// Other than id, all public fields of an API key are eligible for sorting. /// In addition, sort can also be applied to the _doc field to sort by index order. /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryRoleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryRoleRequest.g.cs index e55732256d7..f5f97c5ab6e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryRoleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryRoleRequest.g.cs @@ -39,7 +39,11 @@ public sealed partial class QueryRoleRequestParameters : RequestParameters /// Find roles with a query. /// /// -/// Get roles in a paginated manner. You can optionally filter the results with a query. +/// Get roles in a paginated manner. +/// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. +/// The query roles API does not retrieve roles that are defined in roles files, nor built-in ones. +/// You can optionally filter the results with a query. +/// Also, the results can be paginated and sorted. /// /// public sealed partial class QueryRoleRequest : PlainRequest @@ -54,8 +58,9 @@ public sealed partial class QueryRoleRequest : PlainRequest /// - /// Starting document offset. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. + /// The starting document offset. + /// It must not be negative. + /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// /// @@ -69,7 +74,7 @@ public sealed partial class QueryRoleRequest : PlainRequestmatch_all, bool, term, terms, match, /// ids, prefix, wildcard, exists, range, and simple_query_string. /// You can query the following information associated with roles: name, description, metadata, - /// applications.application, applications.privileges, applications.resources. + /// applications.application, applications.privileges, and applications.resources. /// /// [JsonInclude, JsonPropertyName("query")] @@ -77,7 +82,7 @@ public sealed partial class QueryRoleRequest : PlainRequest /// - /// Search after definition + /// The search after definition. /// /// [JsonInclude, JsonPropertyName("search_after")] @@ -86,6 +91,7 @@ public sealed partial class QueryRoleRequest : PlainRequest /// /// The number of hits to return. + /// It must not be negative. /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// @@ -95,7 +101,8 @@ public sealed partial class QueryRoleRequest : PlainRequest /// - /// All public fields of a role are eligible for sorting. + /// The sort definition. + /// You can sort on username, roles, or enabled. /// In addition, sort can also be applied to the _doc field to sort by index order. /// /// @@ -109,7 +116,11 @@ public sealed partial class QueryRoleRequest : PlainRequest /// -/// Get roles in a paginated manner. You can optionally filter the results with a query. +/// Get roles in a paginated manner. +/// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. +/// The query roles API does not retrieve roles that are defined in roles files, nor built-in ones. +/// You can optionally filter the results with a query. +/// Also, the results can be paginated and sorted. /// /// public sealed partial class QueryRoleRequestDescriptor : RequestDescriptor, QueryRoleRequestParameters> @@ -141,8 +152,9 @@ public QueryRoleRequestDescriptor() /// /// - /// Starting document offset. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. + /// The starting document offset. + /// It must not be negative. + /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// /// @@ -159,7 +171,7 @@ public QueryRoleRequestDescriptor From(int? from) /// The query supports a subset of query types, including match_all, bool, term, terms, match, /// ids, prefix, wildcard, exists, range, and simple_query_string. /// You can query the following information associated with roles: name, description, metadata, - /// applications.application, applications.privileges, applications.resources. + /// applications.application, applications.privileges, and applications.resources. /// /// public QueryRoleRequestDescriptor Query(Elastic.Clients.Elasticsearch.Security.RoleQuery? query) @@ -188,7 +200,7 @@ public QueryRoleRequestDescriptor Query(Action /// - /// Search after definition + /// The search after definition. /// /// public QueryRoleRequestDescriptor SearchAfter(ICollection? searchAfter) @@ -200,6 +212,7 @@ public QueryRoleRequestDescriptor SearchAfter(ICollection /// /// The number of hits to return. + /// It must not be negative. /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// @@ -212,7 +225,8 @@ public QueryRoleRequestDescriptor Size(int? size) /// /// - /// All public fields of a role are eligible for sorting. + /// The sort definition. + /// You can sort on username, roles, or enabled. /// In addition, sort can also be applied to the _doc field to sort by index order. /// /// @@ -327,7 +341,11 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o /// Find roles with a query. /// /// -/// Get roles in a paginated manner. You can optionally filter the results with a query. +/// Get roles in a paginated manner. +/// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. +/// The query roles API does not retrieve roles that are defined in roles files, nor built-in ones. +/// You can optionally filter the results with a query. +/// Also, the results can be paginated and sorted. /// /// public sealed partial class QueryRoleRequestDescriptor : RequestDescriptor @@ -359,8 +377,9 @@ public QueryRoleRequestDescriptor() /// /// - /// Starting document offset. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. + /// The starting document offset. + /// It must not be negative. + /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// /// @@ -377,7 +396,7 @@ public QueryRoleRequestDescriptor From(int? from) /// The query supports a subset of query types, including match_all, bool, term, terms, match, /// ids, prefix, wildcard, exists, range, and simple_query_string. /// You can query the following information associated with roles: name, description, metadata, - /// applications.application, applications.privileges, applications.resources. + /// applications.application, applications.privileges, and applications.resources. /// /// public QueryRoleRequestDescriptor Query(Elastic.Clients.Elasticsearch.Security.RoleQuery? query) @@ -406,7 +425,7 @@ public QueryRoleRequestDescriptor Query(Action /// - /// Search after definition + /// The search after definition. /// /// public QueryRoleRequestDescriptor SearchAfter(ICollection? searchAfter) @@ -418,6 +437,7 @@ public QueryRoleRequestDescriptor SearchAfter(ICollection /// /// The number of hits to return. + /// It must not be negative. /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// @@ -430,7 +450,8 @@ public QueryRoleRequestDescriptor Size(int? size) /// /// - /// All public fields of a role are eligible for sorting. + /// The sort definition. + /// You can sort on username, roles, or enabled. /// In addition, sort can also be applied to the _doc field to sort by index order. /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryRoleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryRoleResponse.g.cs index dab72c52d73..56a0deeb981 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryRoleResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryRoleResponse.g.cs @@ -38,7 +38,12 @@ public sealed partial class QueryRoleResponse : ElasticsearchResponse /// /// - /// The list of roles. + /// A list of roles that match the query. + /// The returned role format is an extension of the role definition format. + /// It adds the transient_metadata.enabled and the _sort fields. + /// transient_metadata.enabled is set to false in case the role is automatically disabled, for example when the role grants privileges that are not allowed by the installed license. + /// _sort is present when the search query sorts on some field. + /// It contains the array of values that have been used for sorting. /// /// [JsonInclude, JsonPropertyName("roles")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryUserRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryUserRequest.g.cs index c5d98d22452..eca270c307e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryUserRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryUserRequest.g.cs @@ -34,7 +34,7 @@ public sealed partial class QueryUserRequestParameters : RequestParameters { /// /// - /// If true will return the User Profile ID for the users in the query result, if any. + /// Determines whether to retrieve the user profile UID, if it exists, for the users. /// /// public bool? WithProfileUid { get => Q("with_profile_uid"); set => Q("with_profile_uid", value); } @@ -48,6 +48,10 @@ public sealed partial class QueryUserRequestParameters : RequestParameters /// Get information for users in a paginated manner. /// You can optionally filter the results with a query. /// +/// +/// NOTE: As opposed to the get user API, built-in users are excluded from the result. +/// This API is only for native users. +/// /// public sealed partial class QueryUserRequest : PlainRequest { @@ -61,7 +65,7 @@ public sealed partial class QueryUserRequest : PlainRequest /// - /// If true will return the User Profile ID for the users in the query result, if any. + /// Determines whether to retrieve the user profile UID, if it exists, for the users. /// /// [JsonIgnore] @@ -69,8 +73,9 @@ public sealed partial class QueryUserRequest : PlainRequest /// - /// Starting document offset. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. + /// The starting document offset. + /// It must not be negative. + /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// /// @@ -83,7 +88,7 @@ public sealed partial class QueryUserRequest : PlainRequestmatch_all query. /// The query supports a subset of query types, including match_all, bool, term, terms, match, /// ids, prefix, wildcard, exists, range, and simple_query_string. - /// You can query the following information associated with user: username, roles, enabled + /// You can query the following information associated with user: username, roles, enabled, full_name, and email. /// /// [JsonInclude, JsonPropertyName("query")] @@ -91,7 +96,7 @@ public sealed partial class QueryUserRequest : PlainRequest /// - /// Search after definition + /// The search after definition /// /// [JsonInclude, JsonPropertyName("search_after")] @@ -100,6 +105,7 @@ public sealed partial class QueryUserRequest : PlainRequest /// /// The number of hits to return. + /// It must not be negative. /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// @@ -109,7 +115,8 @@ public sealed partial class QueryUserRequest : PlainRequest /// - /// Fields eligible for sorting are: username, roles, enabled + /// The sort definition. + /// Fields eligible for sorting are: username, roles, enabled. /// In addition, sort can also be applied to the _doc field to sort by index order. /// /// @@ -126,6 +133,10 @@ public sealed partial class QueryUserRequest : PlainRequest +/// +/// NOTE: As opposed to the get user API, built-in users are excluded from the result. +/// This API is only for native users. +/// /// public sealed partial class QueryUserRequestDescriptor : RequestDescriptor, QueryUserRequestParameters> { @@ -158,8 +169,9 @@ public QueryUserRequestDescriptor() /// /// - /// Starting document offset. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. + /// The starting document offset. + /// It must not be negative. + /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// /// @@ -175,7 +187,7 @@ public QueryUserRequestDescriptor From(int? from) /// If the query parameter is missing, it is equivalent to a match_all query. /// The query supports a subset of query types, including match_all, bool, term, terms, match, /// ids, prefix, wildcard, exists, range, and simple_query_string. - /// You can query the following information associated with user: username, roles, enabled + /// You can query the following information associated with user: username, roles, enabled, full_name, and email. /// /// public QueryUserRequestDescriptor Query(Elastic.Clients.Elasticsearch.Security.UserQuery? query) @@ -204,7 +216,7 @@ public QueryUserRequestDescriptor Query(Action /// - /// Search after definition + /// The search after definition /// /// public QueryUserRequestDescriptor SearchAfter(ICollection? searchAfter) @@ -216,6 +228,7 @@ public QueryUserRequestDescriptor SearchAfter(ICollection /// /// The number of hits to return. + /// It must not be negative. /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// @@ -228,7 +241,8 @@ public QueryUserRequestDescriptor Size(int? size) /// /// - /// Fields eligible for sorting are: username, roles, enabled + /// The sort definition. + /// Fields eligible for sorting are: username, roles, enabled. /// In addition, sort can also be applied to the _doc field to sort by index order. /// /// @@ -346,6 +360,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o /// Get information for users in a paginated manner. /// You can optionally filter the results with a query. /// +/// +/// NOTE: As opposed to the get user API, built-in users are excluded from the result. +/// This API is only for native users. +/// /// public sealed partial class QueryUserRequestDescriptor : RequestDescriptor { @@ -378,8 +396,9 @@ public QueryUserRequestDescriptor() /// /// - /// Starting document offset. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. + /// The starting document offset. + /// It must not be negative. + /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// /// @@ -395,7 +414,7 @@ public QueryUserRequestDescriptor From(int? from) /// If the query parameter is missing, it is equivalent to a match_all query. /// The query supports a subset of query types, including match_all, bool, term, terms, match, /// ids, prefix, wildcard, exists, range, and simple_query_string. - /// You can query the following information associated with user: username, roles, enabled + /// You can query the following information associated with user: username, roles, enabled, full_name, and email. /// /// public QueryUserRequestDescriptor Query(Elastic.Clients.Elasticsearch.Security.UserQuery? query) @@ -424,7 +443,7 @@ public QueryUserRequestDescriptor Query(Action /// - /// Search after definition + /// The search after definition /// /// public QueryUserRequestDescriptor SearchAfter(ICollection? searchAfter) @@ -436,6 +455,7 @@ public QueryUserRequestDescriptor SearchAfter(ICollection /// /// The number of hits to return. + /// It must not be negative. /// By default, you cannot page through more than 10,000 hits using the from and size parameters. /// To page through more hits, use the search_after parameter. /// @@ -448,7 +468,8 @@ public QueryUserRequestDescriptor Size(int? size) /// /// - /// Fields eligible for sorting are: username, roles, enabled + /// The sort definition. + /// Fields eligible for sorting are: username, roles, enabled. /// In addition, sort can also be applied to the _doc field to sort by index order. /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryUserResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryUserResponse.g.cs index 36090081fc3..bdadd02bb4b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryUserResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryUserResponse.g.cs @@ -46,7 +46,7 @@ public sealed partial class QueryUserResponse : ElasticsearchResponse /// /// - /// A list of user information. + /// A list of users that match the query. /// /// [JsonInclude, JsonPropertyName("users")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlAuthenticateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlAuthenticateRequest.g.cs index 478b941c9d3..ee1e858e3d4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlAuthenticateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlAuthenticateRequest.g.cs @@ -39,7 +39,33 @@ public sealed partial class SamlAuthenticateRequestParameters : RequestParameter /// Authenticate SAML. /// /// -/// Submits a SAML response message to Elasticsearch for consumption. +/// Submit a SAML response message to Elasticsearch for consumption. +/// +/// +/// NOTE: This API is intended for use by custom web applications other than Kibana. +/// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. +/// +/// +/// The SAML message that is submitted can be: +/// +/// +/// +/// +/// A response to a SAML authentication request that was previously created using the SAML prepare authentication API. +/// +/// +/// +/// +/// An unsolicited SAML message in the case of an IdP-initiated single sign-on (SSO) flow. +/// +/// +/// +/// +/// In either case, the SAML message needs to be a base64 encoded XML document with a root element of <Response>. +/// +/// +/// After successful validation, Elasticsearch responds with an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. +/// This API endpoint essentially exchanges SAML responses that indicate successful authentication in the IdP for Elasticsearch access and refresh tokens, which can be used for authentication against Elasticsearch. /// /// public sealed partial class SamlAuthenticateRequest : PlainRequest @@ -54,7 +80,7 @@ public sealed partial class SamlAuthenticateRequest : PlainRequest /// - /// The SAML response as it was sent by the user’s browser, usually a Base64 encoded XML document. + /// The SAML response as it was sent by the user's browser, usually a Base64 encoded XML document. /// /// [JsonInclude, JsonPropertyName("content")] @@ -62,7 +88,7 @@ public sealed partial class SamlAuthenticateRequest : PlainRequest /// - /// A json array with all the valid SAML Request Ids that the caller of the API has for the current user. + /// A JSON array with all the valid SAML Request Ids that the caller of the API has for the current user. /// /// [JsonInclude, JsonPropertyName("ids")] @@ -82,7 +108,33 @@ public sealed partial class SamlAuthenticateRequest : PlainRequest /// -/// Submits a SAML response message to Elasticsearch for consumption. +/// Submit a SAML response message to Elasticsearch for consumption. +/// +/// +/// NOTE: This API is intended for use by custom web applications other than Kibana. +/// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. +/// +/// +/// The SAML message that is submitted can be: +/// +/// +/// +/// +/// A response to a SAML authentication request that was previously created using the SAML prepare authentication API. +/// +/// +/// +/// +/// An unsolicited SAML message in the case of an IdP-initiated single sign-on (SSO) flow. +/// +/// +/// +/// +/// In either case, the SAML message needs to be a base64 encoded XML document with a root element of <Response>. +/// +/// +/// After successful validation, Elasticsearch responds with an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. +/// This API endpoint essentially exchanges SAML responses that indicate successful authentication in the IdP for Elasticsearch access and refresh tokens, which can be used for authentication against Elasticsearch. /// /// public sealed partial class SamlAuthenticateRequestDescriptor : RequestDescriptor @@ -107,7 +159,7 @@ public SamlAuthenticateRequestDescriptor() /// /// - /// The SAML response as it was sent by the user’s browser, usually a Base64 encoded XML document. + /// The SAML response as it was sent by the user's browser, usually a Base64 encoded XML document. /// /// public SamlAuthenticateRequestDescriptor Content(string content) @@ -118,7 +170,7 @@ public SamlAuthenticateRequestDescriptor Content(string content) /// /// - /// A json array with all the valid SAML Request Ids that the caller of the API has for the current user. + /// A JSON array with all the valid SAML Request Ids that the caller of the API has for the current user. /// /// public SamlAuthenticateRequestDescriptor Ids(Elastic.Clients.Elasticsearch.Ids ids) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlAuthenticateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlAuthenticateResponse.g.cs index 563c505d691..c79371c6f6a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlAuthenticateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlAuthenticateResponse.g.cs @@ -28,14 +28,43 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class SamlAuthenticateResponse : ElasticsearchResponse { + /// + /// + /// The access token that was generated by Elasticsearch. + /// + /// [JsonInclude, JsonPropertyName("access_token")] public string AccessToken { get; init; } + + /// + /// + /// The amount of time (in seconds) left until the token expires. + /// + /// [JsonInclude, JsonPropertyName("expires_in")] public int ExpiresIn { get; init; } + + /// + /// + /// The name of the realm where the user was authenticated. + /// + /// [JsonInclude, JsonPropertyName("realm")] public string Realm { get; init; } + + /// + /// + /// The refresh token that was generated by Elasticsearch. + /// + /// [JsonInclude, JsonPropertyName("refresh_token")] public string RefreshToken { get; init; } + + /// + /// + /// The authenticated user's name. + /// + /// [JsonInclude, JsonPropertyName("username")] public string Username { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlCompleteLogoutRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlCompleteLogoutRequest.g.cs index 9224bf81328..1783bafce95 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlCompleteLogoutRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlCompleteLogoutRequest.g.cs @@ -41,6 +41,17 @@ public sealed partial class SamlCompleteLogoutRequestParameters : RequestParamet /// /// Verifies the logout response sent from the SAML IdP. /// +/// +/// NOTE: This API is intended for use by custom web applications other than Kibana. +/// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. +/// +/// +/// The SAML IdP may send a logout response back to the SP after handling the SP-initiated SAML Single Logout. +/// This API verifies the response by ensuring the content is relevant and validating its signature. +/// An empty response is returned if the verification process is successful. +/// The response can be sent by the IdP with either the HTTP-Redirect or the HTTP-Post binding. +/// The caller of this API must prepare the request accordingly so that this API can handle either of them. +/// /// public sealed partial class SamlCompleteLogoutRequest : PlainRequest { @@ -62,7 +73,7 @@ public sealed partial class SamlCompleteLogoutRequest : PlainRequest /// - /// A json array with all the valid SAML Request Ids that the caller of the API has for the current user. + /// A JSON array with all the valid SAML Request Ids that the caller of the API has for the current user. /// /// [JsonInclude, JsonPropertyName("ids")] @@ -92,6 +103,17 @@ public sealed partial class SamlCompleteLogoutRequest : PlainRequest /// Verifies the logout response sent from the SAML IdP. /// +/// +/// NOTE: This API is intended for use by custom web applications other than Kibana. +/// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. +/// +/// +/// The SAML IdP may send a logout response back to the SP after handling the SP-initiated SAML Single Logout. +/// This API verifies the response by ensuring the content is relevant and validating its signature. +/// An empty response is returned if the verification process is successful. +/// The response can be sent by the IdP with either the HTTP-Redirect or the HTTP-Post binding. +/// The caller of this API must prepare the request accordingly so that this API can handle either of them. +/// /// public sealed partial class SamlCompleteLogoutRequestDescriptor : RequestDescriptor { @@ -127,7 +149,7 @@ public SamlCompleteLogoutRequestDescriptor Content(string? content) /// /// - /// A json array with all the valid SAML Request Ids that the caller of the API has for the current user. + /// A JSON array with all the valid SAML Request Ids that the caller of the API has for the current user. /// /// public SamlCompleteLogoutRequestDescriptor Ids(Elastic.Clients.Elasticsearch.Ids ids) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlInvalidateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlInvalidateRequest.g.cs index 987ee8fde44..f428cb87bcf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlInvalidateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlInvalidateRequest.g.cs @@ -39,7 +39,17 @@ public sealed partial class SamlInvalidateRequestParameters : RequestParameters /// Invalidate SAML. /// /// -/// Submits a SAML LogoutRequest message to Elasticsearch for consumption. +/// Submit a SAML LogoutRequest message to Elasticsearch for consumption. +/// +/// +/// NOTE: This API is intended for use by custom web applications other than Kibana. +/// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. +/// +/// +/// The logout request comes from the SAML IdP during an IdP initiated Single Logout. +/// The custom web application can use this API to have Elasticsearch process the LogoutRequest. +/// After successful validation of the request, Elasticsearch invalidates the access token and refresh token that corresponds to that specific SAML principal and provides a URL that contains a SAML LogoutResponse message. +/// Thus the user can be redirected back to their IdP. /// /// public sealed partial class SamlInvalidateRequest : PlainRequest @@ -54,7 +64,7 @@ public sealed partial class SamlInvalidateRequest : PlainRequest /// - /// The Assertion Consumer Service URL that matches the one of the SAML realm in Elasticsearch that should be used. You must specify either this parameter or the realm parameter. + /// The Assertion Consumer Service URL that matches the one of the SAML realm in Elasticsearch that should be used. You must specify either this parameter or the realm parameter. /// /// [JsonInclude, JsonPropertyName("acs")] @@ -63,9 +73,9 @@ public sealed partial class SamlInvalidateRequest : PlainRequest /// /// The query part of the URL that the user was redirected to by the SAML IdP to initiate the Single Logout. - /// This query should include a single parameter named SAMLRequest that contains a SAML logout request that is deflated and Base64 encoded. - /// If the SAML IdP has signed the logout request, the URL should include two extra parameters named SigAlg and Signature that contain the algorithm used for the signature and the signature value itself. - /// In order for Elasticsearch to be able to verify the IdP’s signature, the value of the query_string field must be an exact match to the string provided by the browser. + /// This query should include a single parameter named SAMLRequest that contains a SAML logout request that is deflated and Base64 encoded. + /// If the SAML IdP has signed the logout request, the URL should include two extra parameters named SigAlg and Signature that contain the algorithm used for the signature and the signature value itself. + /// In order for Elasticsearch to be able to verify the IdP's signature, the value of the query_string field must be an exact match to the string provided by the browser. /// The client application must not attempt to parse or process the string in any way. /// /// @@ -74,7 +84,7 @@ public sealed partial class SamlInvalidateRequest : PlainRequest /// - /// The name of the SAML realm in Elasticsearch the configuration. You must specify either this parameter or the acs parameter. + /// The name of the SAML realm in Elasticsearch the configuration. You must specify either this parameter or the acs parameter. /// /// [JsonInclude, JsonPropertyName("realm")] @@ -86,7 +96,17 @@ public sealed partial class SamlInvalidateRequest : PlainRequest /// -/// Submits a SAML LogoutRequest message to Elasticsearch for consumption. +/// Submit a SAML LogoutRequest message to Elasticsearch for consumption. +/// +/// +/// NOTE: This API is intended for use by custom web applications other than Kibana. +/// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. +/// +/// +/// The logout request comes from the SAML IdP during an IdP initiated Single Logout. +/// The custom web application can use this API to have Elasticsearch process the LogoutRequest. +/// After successful validation of the request, Elasticsearch invalidates the access token and refresh token that corresponds to that specific SAML principal and provides a URL that contains a SAML LogoutResponse message. +/// Thus the user can be redirected back to their IdP. /// /// public sealed partial class SamlInvalidateRequestDescriptor : RequestDescriptor @@ -111,7 +131,7 @@ public SamlInvalidateRequestDescriptor() /// /// - /// The Assertion Consumer Service URL that matches the one of the SAML realm in Elasticsearch that should be used. You must specify either this parameter or the realm parameter. + /// The Assertion Consumer Service URL that matches the one of the SAML realm in Elasticsearch that should be used. You must specify either this parameter or the realm parameter. /// /// public SamlInvalidateRequestDescriptor Acs(string? acs) @@ -123,9 +143,9 @@ public SamlInvalidateRequestDescriptor Acs(string? acs) /// /// /// The query part of the URL that the user was redirected to by the SAML IdP to initiate the Single Logout. - /// This query should include a single parameter named SAMLRequest that contains a SAML logout request that is deflated and Base64 encoded. - /// If the SAML IdP has signed the logout request, the URL should include two extra parameters named SigAlg and Signature that contain the algorithm used for the signature and the signature value itself. - /// In order for Elasticsearch to be able to verify the IdP’s signature, the value of the query_string field must be an exact match to the string provided by the browser. + /// This query should include a single parameter named SAMLRequest that contains a SAML logout request that is deflated and Base64 encoded. + /// If the SAML IdP has signed the logout request, the URL should include two extra parameters named SigAlg and Signature that contain the algorithm used for the signature and the signature value itself. + /// In order for Elasticsearch to be able to verify the IdP's signature, the value of the query_string field must be an exact match to the string provided by the browser. /// The client application must not attempt to parse or process the string in any way. /// /// @@ -137,7 +157,7 @@ public SamlInvalidateRequestDescriptor QueryString(string queryString) /// /// - /// The name of the SAML realm in Elasticsearch the configuration. You must specify either this parameter or the acs parameter. + /// The name of the SAML realm in Elasticsearch the configuration. You must specify either this parameter or the acs parameter. /// /// public SamlInvalidateRequestDescriptor Realm(string? realm) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlInvalidateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlInvalidateResponse.g.cs index afb8237ad22..d905cc45799 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlInvalidateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlInvalidateResponse.g.cs @@ -28,10 +28,27 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class SamlInvalidateResponse : ElasticsearchResponse { + /// + /// + /// The number of tokens that were invalidated as part of this logout. + /// + /// [JsonInclude, JsonPropertyName("invalidated")] public int Invalidated { get; init; } + + /// + /// + /// The realm name of the SAML realm in Elasticsearch that authenticated the user. + /// + /// [JsonInclude, JsonPropertyName("realm")] public string Realm { get; init; } + + /// + /// + /// A SAML logout response as a parameter so that the user can be redirected back to the SAML IdP. + /// + /// [JsonInclude, JsonPropertyName("redirect")] public string Redirect { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlLogoutRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlLogoutRequest.g.cs index ffa0b19985c..3da82e55162 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlLogoutRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlLogoutRequest.g.cs @@ -41,6 +41,14 @@ public sealed partial class SamlLogoutRequestParameters : RequestParameters /// /// Submits a request to invalidate an access token and refresh token. /// +/// +/// NOTE: This API is intended for use by custom web applications other than Kibana. +/// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. +/// +/// +/// This API invalidates the tokens that were generated for a user by the SAML authenticate API. +/// If the SAML realm in Elasticsearch is configured accordingly and the SAML IdP supports this, the Elasticsearch response contains a URL to redirect the user to the IdP that contains a SAML logout request (starting an SP-initiated SAML Single Logout). +/// /// public sealed partial class SamlLogoutRequest : PlainRequest { @@ -64,7 +72,7 @@ public sealed partial class SamlLogoutRequest : PlainRequest /// /// The access token that was returned as a response to calling the SAML authenticate API. - /// Alternatively, the most recent token that was received after refreshing the original one by using a refresh_token. + /// Alternatively, the most recent token that was received after refreshing the original one by using a refresh_token. /// /// [JsonInclude, JsonPropertyName("token")] @@ -78,6 +86,14 @@ public sealed partial class SamlLogoutRequest : PlainRequest /// Submits a request to invalidate an access token and refresh token. /// +/// +/// NOTE: This API is intended for use by custom web applications other than Kibana. +/// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. +/// +/// +/// This API invalidates the tokens that were generated for a user by the SAML authenticate API. +/// If the SAML realm in Elasticsearch is configured accordingly and the SAML IdP supports this, the Elasticsearch response contains a URL to redirect the user to the IdP that contains a SAML logout request (starting an SP-initiated SAML Single Logout). +/// /// public sealed partial class SamlLogoutRequestDescriptor : RequestDescriptor { @@ -113,7 +129,7 @@ public SamlLogoutRequestDescriptor RefreshToken(string? refreshToken) /// /// /// The access token that was returned as a response to calling the SAML authenticate API. - /// Alternatively, the most recent token that was received after refreshing the original one by using a refresh_token. + /// Alternatively, the most recent token that was received after refreshing the original one by using a refresh_token. /// /// public SamlLogoutRequestDescriptor Token(string token) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlLogoutResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlLogoutResponse.g.cs index 07e111b2a2b..865d73829e5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlLogoutResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlLogoutResponse.g.cs @@ -28,6 +28,12 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class SamlLogoutResponse : ElasticsearchResponse { + /// + /// + /// A URL that contains a SAML logout request as a parameter. + /// You can use this URL to be redirected back to the SAML IdP and to initiate Single Logout. + /// + /// [JsonInclude, JsonPropertyName("redirect")] public string Redirect { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlPrepareAuthenticationRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlPrepareAuthenticationRequest.g.cs index 9afa7d595d4..6184b009bdc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlPrepareAuthenticationRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlPrepareAuthenticationRequest.g.cs @@ -39,7 +39,20 @@ public sealed partial class SamlPrepareAuthenticationRequestParameters : Request /// Prepare SAML authentication. /// /// -/// Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch. +/// Create a SAML authentication request (<AuthnRequest>) as a URL string based on the configuration of the respective SAML realm in Elasticsearch. +/// +/// +/// NOTE: This API is intended for use by custom web applications other than Kibana. +/// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. +/// +/// +/// This API returns a URL pointing to the SAML Identity Provider. +/// You can use the URL to redirect the browser of the user in order to continue the authentication process. +/// The URL includes a single parameter named SAMLRequest, which contains a SAML Authentication request that is deflated and Base64 encoded. +/// If the configuration dictates that SAML authentication requests should be signed, the URL has two extra parameters named SigAlg and Signature. +/// These parameters contain the algorithm used for the signature and the signature value itself. +/// It also returns a random string that uniquely identifies this SAML Authentication request. +/// The caller of this API needs to store this identifier as it needs to be used in a following step of the authentication process. /// /// public sealed partial class SamlPrepareAuthenticationRequest : PlainRequest @@ -55,7 +68,7 @@ public sealed partial class SamlPrepareAuthenticationRequest : PlainRequest /// /// The Assertion Consumer Service URL that matches the one of the SAML realms in Elasticsearch. - /// The realm is used to generate the authentication request. You must specify either this parameter or the realm parameter. + /// The realm is used to generate the authentication request. You must specify either this parameter or the realm parameter. /// /// [JsonInclude, JsonPropertyName("acs")] @@ -64,7 +77,7 @@ public sealed partial class SamlPrepareAuthenticationRequest : PlainRequest /// /// The name of the SAML realm in Elasticsearch for which the configuration is used to generate the authentication request. - /// You must specify either this parameter or the acs parameter. + /// You must specify either this parameter or the acs parameter. /// /// [JsonInclude, JsonPropertyName("realm")] @@ -72,7 +85,7 @@ public sealed partial class SamlPrepareAuthenticationRequest : PlainRequest /// - /// A string that will be included in the redirect URL that this API returns as the RelayState query parameter. + /// A string that will be included in the redirect URL that this API returns as the RelayState query parameter. /// If the Authentication Request is signed, this value is used as part of the signature computation. /// /// @@ -85,7 +98,20 @@ public sealed partial class SamlPrepareAuthenticationRequest : PlainRequest /// -/// Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch. +/// Create a SAML authentication request (<AuthnRequest>) as a URL string based on the configuration of the respective SAML realm in Elasticsearch. +/// +/// +/// NOTE: This API is intended for use by custom web applications other than Kibana. +/// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. +/// +/// +/// This API returns a URL pointing to the SAML Identity Provider. +/// You can use the URL to redirect the browser of the user in order to continue the authentication process. +/// The URL includes a single parameter named SAMLRequest, which contains a SAML Authentication request that is deflated and Base64 encoded. +/// If the configuration dictates that SAML authentication requests should be signed, the URL has two extra parameters named SigAlg and Signature. +/// These parameters contain the algorithm used for the signature and the signature value itself. +/// It also returns a random string that uniquely identifies this SAML Authentication request. +/// The caller of this API needs to store this identifier as it needs to be used in a following step of the authentication process. /// /// public sealed partial class SamlPrepareAuthenticationRequestDescriptor : RequestDescriptor @@ -111,7 +137,7 @@ public SamlPrepareAuthenticationRequestDescriptor() /// /// /// The Assertion Consumer Service URL that matches the one of the SAML realms in Elasticsearch. - /// The realm is used to generate the authentication request. You must specify either this parameter or the realm parameter. + /// The realm is used to generate the authentication request. You must specify either this parameter or the realm parameter. /// /// public SamlPrepareAuthenticationRequestDescriptor Acs(string? acs) @@ -123,7 +149,7 @@ public SamlPrepareAuthenticationRequestDescriptor Acs(string? acs) /// /// /// The name of the SAML realm in Elasticsearch for which the configuration is used to generate the authentication request. - /// You must specify either this parameter or the acs parameter. + /// You must specify either this parameter or the acs parameter. /// /// public SamlPrepareAuthenticationRequestDescriptor Realm(string? realm) @@ -134,7 +160,7 @@ public SamlPrepareAuthenticationRequestDescriptor Realm(string? realm) /// /// - /// A string that will be included in the redirect URL that this API returns as the RelayState query parameter. + /// A string that will be included in the redirect URL that this API returns as the RelayState query parameter. /// If the Authentication Request is signed, this value is used as part of the signature computation. /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlPrepareAuthenticationResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlPrepareAuthenticationResponse.g.cs index dd6dd3b5d56..898d103b4ec 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlPrepareAuthenticationResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlPrepareAuthenticationResponse.g.cs @@ -28,10 +28,27 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class SamlPrepareAuthenticationResponse : ElasticsearchResponse { + /// + /// + /// A unique identifier for the SAML Request to be stored by the caller of the API. + /// + /// [JsonInclude, JsonPropertyName("id")] public string Id { get; init; } + + /// + /// + /// The name of the Elasticsearch realm that was used to construct the authentication request. + /// + /// [JsonInclude, JsonPropertyName("realm")] public string Realm { get; init; } + + /// + /// + /// The URL to redirect the user to. + /// + /// [JsonInclude, JsonPropertyName("redirect")] public string Redirect { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlServiceProviderMetadataRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlServiceProviderMetadataRequest.g.cs index 009395c49bc..cfc267d2636 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlServiceProviderMetadataRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlServiceProviderMetadataRequest.g.cs @@ -41,6 +41,10 @@ public sealed partial class SamlServiceProviderMetadataRequestParameters : Reque /// /// Generate SAML metadata for a SAML 2.0 Service Provider. /// +/// +/// The SAML 2.0 specification provides a mechanism for Service Providers to describe their capabilities and configuration using a metadata file. +/// This API generates Service Provider metadata based on the configuration of a SAML realm in Elasticsearch. +/// /// public sealed partial class SamlServiceProviderMetadataRequest : PlainRequest { @@ -64,6 +68,10 @@ public SamlServiceProviderMetadataRequest(Elastic.Clients.Elasticsearch.Name rea /// /// Generate SAML metadata for a SAML 2.0 Service Provider. /// +/// +/// The SAML 2.0 specification provides a mechanism for Service Providers to describe their capabilities and configuration using a metadata file. +/// This API generates Service Provider metadata based on the configuration of a SAML realm in Elasticsearch. +/// /// public sealed partial class SamlServiceProviderMetadataRequestDescriptor : RequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlServiceProviderMetadataResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlServiceProviderMetadataResponse.g.cs index b64c8776d95..6535cf400cf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlServiceProviderMetadataResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SamlServiceProviderMetadataResponse.g.cs @@ -28,6 +28,11 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class SamlServiceProviderMetadataResponse : ElasticsearchResponse { + /// + /// + /// An XML string that contains a SAML Service Provider's metadata for the realm. + /// + /// [JsonInclude, JsonPropertyName("metadata")] public string Metadata { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SuggestUserProfilesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SuggestUserProfilesRequest.g.cs index c6596d47ecb..26583a14faf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SuggestUserProfilesRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SuggestUserProfilesRequest.g.cs @@ -41,6 +41,11 @@ public sealed partial class SuggestUserProfilesRequestParameters : RequestParame /// /// Get suggestions for user profiles that match specified search criteria. /// +/// +/// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. +/// Individual users and external applications should not call this API directly. +/// Elastic reserves the right to change or remove this feature in future releases without prior notice. +/// /// public sealed partial class SuggestUserProfilesRequest : PlainRequest { @@ -54,10 +59,11 @@ public sealed partial class SuggestUserProfilesRequest : PlainRequest /// - /// List of filters for the data field of the profile document. - /// To return all content use data=*. To return a subset of content - /// use data=<key> to retrieve content nested under the specified <key>. - /// By default returns no data content. + /// A comma-separated list of filters for the data field of the profile document. + /// To return all content use data=*. + /// To return a subset of content, use data=<key> to retrieve content nested under the specified <key>. + /// By default, the API returns no data content. + /// It is an error to specify data as both the query parameter and the request body field. /// /// [JsonInclude, JsonPropertyName("data")] @@ -68,8 +74,7 @@ public sealed partial class SuggestUserProfilesRequest : PlainRequest /// Extra search criteria to improve relevance of the suggestion result. /// Profiles matching the spcified hint are ranked higher in the response. - /// Profiles not matching the hint don't exclude the profile from the response - /// as long as the profile matches the name field query. + /// Profiles not matching the hint aren't excluded from the response as long as the profile matches the name field query. /// /// [JsonInclude, JsonPropertyName("hint")] @@ -77,7 +82,7 @@ public sealed partial class SuggestUserProfilesRequest : PlainRequest /// - /// Query string used to match name-related fields in user profile documents. + /// A query string used to match name-related fields in user profile documents. /// Name-related fields are the user's username, full_name, and email. /// /// @@ -86,7 +91,7 @@ public sealed partial class SuggestUserProfilesRequest : PlainRequest /// - /// Number of profiles to return. + /// The number of profiles to return. /// /// [JsonInclude, JsonPropertyName("size")] @@ -100,6 +105,11 @@ public sealed partial class SuggestUserProfilesRequest : PlainRequest /// Get suggestions for user profiles that match specified search criteria. /// +/// +/// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. +/// Individual users and external applications should not call this API directly. +/// Elastic reserves the right to change or remove this feature in future releases without prior notice. +/// /// public sealed partial class SuggestUserProfilesRequestDescriptor : RequestDescriptor { @@ -126,10 +136,11 @@ public SuggestUserProfilesRequestDescriptor() /// /// - /// List of filters for the data field of the profile document. - /// To return all content use data=*. To return a subset of content - /// use data=<key> to retrieve content nested under the specified <key>. - /// By default returns no data content. + /// A comma-separated list of filters for the data field of the profile document. + /// To return all content use data=*. + /// To return a subset of content, use data=<key> to retrieve content nested under the specified <key>. + /// By default, the API returns no data content. + /// It is an error to specify data as both the query parameter and the request body field. /// /// public SuggestUserProfilesRequestDescriptor Data(ICollection? data) @@ -142,8 +153,7 @@ public SuggestUserProfilesRequestDescriptor Data(ICollection? data) /// /// Extra search criteria to improve relevance of the suggestion result. /// Profiles matching the spcified hint are ranked higher in the response. - /// Profiles not matching the hint don't exclude the profile from the response - /// as long as the profile matches the name field query. + /// Profiles not matching the hint aren't excluded from the response as long as the profile matches the name field query. /// /// public SuggestUserProfilesRequestDescriptor Hint(Elastic.Clients.Elasticsearch.Security.Hint? hint) @@ -172,7 +182,7 @@ public SuggestUserProfilesRequestDescriptor Hint(Action /// - /// Query string used to match name-related fields in user profile documents. + /// A query string used to match name-related fields in user profile documents. /// Name-related fields are the user's username, full_name, and email. /// /// @@ -184,7 +194,7 @@ public SuggestUserProfilesRequestDescriptor Name(string? name) /// /// - /// Number of profiles to return. + /// The number of profiles to return. /// /// public SuggestUserProfilesRequestDescriptor Size(long? size) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SuggestUserProfilesResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SuggestUserProfilesResponse.g.cs index 9ab634abb11..442800a1a8a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SuggestUserProfilesResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SuggestUserProfilesResponse.g.cs @@ -28,10 +28,27 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class SuggestUserProfilesResponse : ElasticsearchResponse { + /// + /// + /// A list of profile documents, ordered by relevance, that match the search criteria. + /// + /// [JsonInclude, JsonPropertyName("profiles")] public IReadOnlyCollection Profiles { get; init; } + + /// + /// + /// The number of milliseconds it took Elasticsearch to run the request. + /// + /// [JsonInclude, JsonPropertyName("took")] public long Took { get; init; } + + /// + /// + /// Metadata about the number of matching profiles. + /// + /// [JsonInclude, JsonPropertyName("total")] public Elastic.Clients.Elasticsearch.Security.TotalUserProfiles Total { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateApiKeyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateApiKeyRequest.g.cs index 15a488a199c..0c219cdf8c7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateApiKeyRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateApiKeyRequest.g.cs @@ -39,19 +39,29 @@ public sealed partial class UpdateApiKeyRequestParameters : RequestParameters /// Update an API key. /// /// -/// Updates attributes of an existing API key. +/// Update attributes of an existing API key. +/// This API supports updates to an API key's access scope, expiration, and metadata. +/// +/// +/// To use this API, you must have at least the manage_own_api_key cluster privilege. /// Users can only update API keys that they created or that were granted to them. -/// Use this API to update API keys created by the create API Key or grant API Key APIs. -/// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. -/// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. -/// This API supports updates to an API key’s access scope and metadata. -/// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. -/// The snapshot of the owner’s permissions is updated automatically on every call. -/// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. -/// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. -/// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. -/// To update an API key, the owner user’s credentials are required. +/// +/// +/// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required. +/// +/// +/// Use this API to update API keys created by the create API key or grant API Key APIs. +/// If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead. +/// It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API. +/// +/// +/// The access scope of an API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. +/// The snapshot of the owner's permissions is updated automatically on every call. +/// +/// +/// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change the API key's access scope. +/// This change can occur if the owner user's permissions have changed since the API key was created or last modified. /// /// public sealed partial class UpdateApiKeyRequest : PlainRequest @@ -70,7 +80,9 @@ public UpdateApiKeyRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Re /// /// - /// Expiration time for the API key. + /// The expiration time for the API key. + /// By default, API keys never expire. + /// This property can be omitted to leave the expiration unchanged. /// /// [JsonInclude, JsonPropertyName("expiration")] @@ -78,7 +90,10 @@ public UpdateApiKeyRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Re /// /// - /// Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage. + /// Arbitrary metadata that you want to associate with the API key. + /// It supports a nested data structure. + /// Within the metadata object, keys beginning with _ are reserved for system usage. + /// When specified, this value fully replaces the metadata previously associated with the API key. /// /// [JsonInclude, JsonPropertyName("metadata")] @@ -86,7 +101,13 @@ public UpdateApiKeyRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Re /// /// - /// An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API. + /// The role descriptors to assign to this API key. + /// The API key's effective permissions are an intersection of its assigned privileges and the point in time snapshot of permissions of the owner user. + /// You can assign new privileges by specifying them in this parameter. + /// To remove assigned privileges, you can supply an empty role_descriptors parameter, that is to say, an empty object {}. + /// If an API key has no assigned privileges, it inherits the owner user's full permissions. + /// The snapshot of the owner's permissions is always updated, whether you supply the role_descriptors parameter or not. + /// The structure of a role descriptor is the same as the request for the create API keys API. /// /// [JsonInclude, JsonPropertyName("role_descriptors")] @@ -98,19 +119,29 @@ public UpdateApiKeyRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Re /// Update an API key. /// /// -/// Updates attributes of an existing API key. +/// Update attributes of an existing API key. +/// This API supports updates to an API key's access scope, expiration, and metadata. +/// +/// +/// To use this API, you must have at least the manage_own_api_key cluster privilege. /// Users can only update API keys that they created or that were granted to them. -/// Use this API to update API keys created by the create API Key or grant API Key APIs. -/// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. -/// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. -/// This API supports updates to an API key’s access scope and metadata. -/// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. -/// The snapshot of the owner’s permissions is updated automatically on every call. -/// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. -/// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. -/// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. -/// To update an API key, the owner user’s credentials are required. +/// +/// +/// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required. +/// +/// +/// Use this API to update API keys created by the create API key or grant API Key APIs. +/// If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead. +/// It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API. +/// +/// +/// The access scope of an API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. +/// The snapshot of the owner's permissions is updated automatically on every call. +/// +/// +/// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change the API key's access scope. +/// This change can occur if the owner user's permissions have changed since the API key was created or last modified. /// /// public sealed partial class UpdateApiKeyRequestDescriptor : RequestDescriptor, UpdateApiKeyRequestParameters> @@ -141,7 +172,9 @@ public UpdateApiKeyRequestDescriptor Id(Elastic.Clients.Elasticsearch /// /// - /// Expiration time for the API key. + /// The expiration time for the API key. + /// By default, API keys never expire. + /// This property can be omitted to leave the expiration unchanged. /// /// public UpdateApiKeyRequestDescriptor Expiration(Elastic.Clients.Elasticsearch.Duration? expiration) @@ -152,7 +185,10 @@ public UpdateApiKeyRequestDescriptor Expiration(Elastic.Clients.Elast /// /// - /// Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage. + /// Arbitrary metadata that you want to associate with the API key. + /// It supports a nested data structure. + /// Within the metadata object, keys beginning with _ are reserved for system usage. + /// When specified, this value fully replaces the metadata previously associated with the API key. /// /// public UpdateApiKeyRequestDescriptor Metadata(Func, FluentDictionary> selector) @@ -163,7 +199,13 @@ public UpdateApiKeyRequestDescriptor Metadata(Func /// - /// An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API. + /// The role descriptors to assign to this API key. + /// The API key's effective permissions are an intersection of its assigned privileges and the point in time snapshot of permissions of the owner user. + /// You can assign new privileges by specifying them in this parameter. + /// To remove assigned privileges, you can supply an empty role_descriptors parameter, that is to say, an empty object {}. + /// If an API key has no assigned privileges, it inherits the owner user's full permissions. + /// The snapshot of the owner's permissions is always updated, whether you supply the role_descriptors parameter or not. + /// The structure of a role descriptor is the same as the request for the create API keys API. /// /// public UpdateApiKeyRequestDescriptor RoleDescriptors(Func>, FluentDescriptorDictionary>> selector) @@ -202,19 +244,29 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o /// Update an API key. /// /// -/// Updates attributes of an existing API key. +/// Update attributes of an existing API key. +/// This API supports updates to an API key's access scope, expiration, and metadata. +/// +/// +/// To use this API, you must have at least the manage_own_api_key cluster privilege. /// Users can only update API keys that they created or that were granted to them. -/// Use this API to update API keys created by the create API Key or grant API Key APIs. -/// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. -/// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. -/// This API supports updates to an API key’s access scope and metadata. -/// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. -/// The snapshot of the owner’s permissions is updated automatically on every call. -/// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. -/// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. -/// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. -/// To update an API key, the owner user’s credentials are required. +/// +/// +/// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required. +/// +/// +/// Use this API to update API keys created by the create API key or grant API Key APIs. +/// If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead. +/// It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API. +/// +/// +/// The access scope of an API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. +/// The snapshot of the owner's permissions is updated automatically on every call. +/// +/// +/// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change the API key's access scope. +/// This change can occur if the owner user's permissions have changed since the API key was created or last modified. /// /// public sealed partial class UpdateApiKeyRequestDescriptor : RequestDescriptor @@ -245,7 +297,9 @@ public UpdateApiKeyRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) /// /// - /// Expiration time for the API key. + /// The expiration time for the API key. + /// By default, API keys never expire. + /// This property can be omitted to leave the expiration unchanged. /// /// public UpdateApiKeyRequestDescriptor Expiration(Elastic.Clients.Elasticsearch.Duration? expiration) @@ -256,7 +310,10 @@ public UpdateApiKeyRequestDescriptor Expiration(Elastic.Clients.Elasticsearch.Du /// /// - /// Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage. + /// Arbitrary metadata that you want to associate with the API key. + /// It supports a nested data structure. + /// Within the metadata object, keys beginning with _ are reserved for system usage. + /// When specified, this value fully replaces the metadata previously associated with the API key. /// /// public UpdateApiKeyRequestDescriptor Metadata(Func, FluentDictionary> selector) @@ -267,7 +324,13 @@ public UpdateApiKeyRequestDescriptor Metadata(Func /// - /// An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API. + /// The role descriptors to assign to this API key. + /// The API key's effective permissions are an intersection of its assigned privileges and the point in time snapshot of permissions of the owner user. + /// You can assign new privileges by specifying them in this parameter. + /// To remove assigned privileges, you can supply an empty role_descriptors parameter, that is to say, an empty object {}. + /// If an API key has no assigned privileges, it inherits the owner user's full permissions. + /// The snapshot of the owner's permissions is always updated, whether you supply the role_descriptors parameter or not. + /// The structure of a role descriptor is the same as the request for the create API keys API. /// /// public UpdateApiKeyRequestDescriptor RoleDescriptors(Func, FluentDescriptorDictionary> selector) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateApiKeyResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateApiKeyResponse.g.cs index ceeb922e33e..601c40bae2e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateApiKeyResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateApiKeyResponse.g.cs @@ -31,7 +31,7 @@ public sealed partial class UpdateApiKeyResponse : ElasticsearchResponse /// /// /// If true, the API key was updated. - /// If false, the API key didn’t change because no change was detected. + /// If false, the API key didn't change because no change was detected. /// /// [JsonInclude, JsonPropertyName("updated")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateCrossClusterApiKeyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateCrossClusterApiKeyRequest.g.cs index c93f01a473e..ddb44dbad2a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateCrossClusterApiKeyRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateCrossClusterApiKeyRequest.g.cs @@ -41,6 +41,25 @@ public sealed partial class UpdateCrossClusterApiKeyRequestParameters : RequestP /// /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. /// +/// +/// To use this API, you must have at least the manage_security cluster privilege. +/// Users can only update API keys that they created. +/// To update another user's API key, use the run_as feature to submit a request on behalf of another user. +/// +/// +/// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. +/// To update an API key, the owner user's credentials are required. +/// +/// +/// It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API. +/// +/// +/// This API supports updates to an API key's access scope, metadata, and expiration. +/// The owner user's information, such as the username and realm, is also updated automatically on every call. +/// +/// +/// NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API. +/// /// public sealed partial class UpdateCrossClusterApiKeyRequest : PlainRequest { @@ -69,7 +88,7 @@ public UpdateCrossClusterApiKeyRequest(Elastic.Clients.Elasticsearch.Id id) : ba /// /// - /// Expiration time for the API key. + /// The expiration time for the API key. /// By default, API keys never expire. This property can be omitted to leave the value unchanged. /// /// @@ -95,6 +114,25 @@ public UpdateCrossClusterApiKeyRequest(Elastic.Clients.Elasticsearch.Id id) : ba /// /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. /// +/// +/// To use this API, you must have at least the manage_security cluster privilege. +/// Users can only update API keys that they created. +/// To update another user's API key, use the run_as feature to submit a request on behalf of another user. +/// +/// +/// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. +/// To update an API key, the owner user's credentials are required. +/// +/// +/// It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API. +/// +/// +/// This API supports updates to an API key's access scope, metadata, and expiration. +/// The owner user's information, such as the username and realm, is also updated automatically on every call. +/// +/// +/// NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API. +/// /// public sealed partial class UpdateCrossClusterApiKeyRequestDescriptor : RequestDescriptor, UpdateCrossClusterApiKeyRequestParameters> { @@ -158,7 +196,7 @@ public UpdateCrossClusterApiKeyRequestDescriptor Access(Action /// - /// Expiration time for the API key. + /// The expiration time for the API key. /// By default, API keys never expire. This property can be omitted to leave the value unchanged. /// /// @@ -224,6 +262,25 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o /// /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. /// +/// +/// To use this API, you must have at least the manage_security cluster privilege. +/// Users can only update API keys that they created. +/// To update another user's API key, use the run_as feature to submit a request on behalf of another user. +/// +/// +/// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. +/// To update an API key, the owner user's credentials are required. +/// +/// +/// It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API. +/// +/// +/// This API supports updates to an API key's access scope, metadata, and expiration. +/// The owner user's information, such as the username and realm, is also updated automatically on every call. +/// +/// +/// NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API. +/// /// public sealed partial class UpdateCrossClusterApiKeyRequestDescriptor : RequestDescriptor { @@ -287,7 +344,7 @@ public UpdateCrossClusterApiKeyRequestDescriptor Access(Action /// - /// Expiration time for the API key. + /// The expiration time for the API key. /// By default, API keys never expire. This property can be omitted to leave the value unchanged. /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateSettingsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateSettingsRequest.g.cs new file mode 100644 index 00000000000..2564ff8cc9e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateSettingsRequest.g.cs @@ -0,0 +1,490 @@ +// 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.Security; + +public sealed partial class UpdateSettingsRequestParameters : RequestParameters +{ + /// + /// + /// 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. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// The period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } +} + +/// +/// +/// Update security index settings. +/// +/// +/// Update the user-configurable settings for the security internal index (.security and associated indices). Only a subset of settings are allowed to be modified. This includes index.auto_expand_replicas and index.number_of_replicas. +/// +/// +/// NOTE: If index.auto_expand_replicas is set, index.number_of_replicas will be ignored during updates. +/// +/// +/// If a specific index is not in use on the system and settings are provided for it, the request will be rejected. +/// This API does not yet support configuring the settings for indices before they are in use. +/// +/// +public sealed partial class UpdateSettingsRequest : PlainRequest +{ + internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityUpdateSettings; + + protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; + + internal override bool SupportsBody => true; + + internal override string OperationName => "security.update_settings"; + + /// + /// + /// 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. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// The period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + + /// + /// + /// Settings for the index used for most security configuration, including native realm users and roles configured with the API. + /// + /// + [JsonInclude, JsonPropertyName("security")] + public Elastic.Clients.Elasticsearch.Security.SecuritySettings? Security { get; set; } + + /// + /// + /// Settings for the index used to store profile information. + /// + /// + [JsonInclude, JsonPropertyName("security-profile")] + public Elastic.Clients.Elasticsearch.Security.SecuritySettings? SecurityProfile { get; set; } + + /// + /// + /// Settings for the index used to store tokens. + /// + /// + [JsonInclude, JsonPropertyName("security-tokens")] + public Elastic.Clients.Elasticsearch.Security.SecuritySettings? SecurityTokens { get; set; } +} + +/// +/// +/// Update security index settings. +/// +/// +/// Update the user-configurable settings for the security internal index (.security and associated indices). Only a subset of settings are allowed to be modified. This includes index.auto_expand_replicas and index.number_of_replicas. +/// +/// +/// NOTE: If index.auto_expand_replicas is set, index.number_of_replicas will be ignored during updates. +/// +/// +/// If a specific index is not in use on the system and settings are provided for it, the request will be rejected. +/// This API does not yet support configuring the settings for indices before they are in use. +/// +/// +public sealed partial class UpdateSettingsRequestDescriptor : RequestDescriptor, UpdateSettingsRequestParameters> +{ + internal UpdateSettingsRequestDescriptor(Action> configure) => configure.Invoke(this); + + public UpdateSettingsRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityUpdateSettings; + + protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; + + internal override bool SupportsBody => true; + + internal override string OperationName => "security.update_settings"; + + public UpdateSettingsRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); + public UpdateSettingsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); + + private Elastic.Clients.Elasticsearch.Security.SecuritySettings? SecurityValue { get; set; } + private Elastic.Clients.Elasticsearch.Security.SecuritySettingsDescriptor SecurityDescriptor { get; set; } + private Action> SecurityDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Security.SecuritySettings? SecurityProfileValue { get; set; } + private Elastic.Clients.Elasticsearch.Security.SecuritySettingsDescriptor SecurityProfileDescriptor { get; set; } + private Action> SecurityProfileDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Security.SecuritySettings? SecurityTokensValue { get; set; } + private Elastic.Clients.Elasticsearch.Security.SecuritySettingsDescriptor SecurityTokensDescriptor { get; set; } + private Action> SecurityTokensDescriptorAction { get; set; } + + /// + /// + /// Settings for the index used for most security configuration, including native realm users and roles configured with the API. + /// + /// + public UpdateSettingsRequestDescriptor Security(Elastic.Clients.Elasticsearch.Security.SecuritySettings? security) + { + SecurityDescriptor = null; + SecurityDescriptorAction = null; + SecurityValue = security; + return Self; + } + + public UpdateSettingsRequestDescriptor Security(Elastic.Clients.Elasticsearch.Security.SecuritySettingsDescriptor descriptor) + { + SecurityValue = null; + SecurityDescriptorAction = null; + SecurityDescriptor = descriptor; + return Self; + } + + public UpdateSettingsRequestDescriptor Security(Action> configure) + { + SecurityValue = null; + SecurityDescriptor = null; + SecurityDescriptorAction = configure; + return Self; + } + + /// + /// + /// Settings for the index used to store profile information. + /// + /// + public UpdateSettingsRequestDescriptor SecurityProfile(Elastic.Clients.Elasticsearch.Security.SecuritySettings? securityProfile) + { + SecurityProfileDescriptor = null; + SecurityProfileDescriptorAction = null; + SecurityProfileValue = securityProfile; + return Self; + } + + public UpdateSettingsRequestDescriptor SecurityProfile(Elastic.Clients.Elasticsearch.Security.SecuritySettingsDescriptor descriptor) + { + SecurityProfileValue = null; + SecurityProfileDescriptorAction = null; + SecurityProfileDescriptor = descriptor; + return Self; + } + + public UpdateSettingsRequestDescriptor SecurityProfile(Action> configure) + { + SecurityProfileValue = null; + SecurityProfileDescriptor = null; + SecurityProfileDescriptorAction = configure; + return Self; + } + + /// + /// + /// Settings for the index used to store tokens. + /// + /// + public UpdateSettingsRequestDescriptor SecurityTokens(Elastic.Clients.Elasticsearch.Security.SecuritySettings? securityTokens) + { + SecurityTokensDescriptor = null; + SecurityTokensDescriptorAction = null; + SecurityTokensValue = securityTokens; + return Self; + } + + public UpdateSettingsRequestDescriptor SecurityTokens(Elastic.Clients.Elasticsearch.Security.SecuritySettingsDescriptor descriptor) + { + SecurityTokensValue = null; + SecurityTokensDescriptorAction = null; + SecurityTokensDescriptor = descriptor; + return Self; + } + + public UpdateSettingsRequestDescriptor SecurityTokens(Action> configure) + { + SecurityTokensValue = null; + SecurityTokensDescriptor = null; + SecurityTokensDescriptorAction = configure; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (SecurityDescriptor is not null) + { + writer.WritePropertyName("security"); + JsonSerializer.Serialize(writer, SecurityDescriptor, options); + } + else if (SecurityDescriptorAction is not null) + { + writer.WritePropertyName("security"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Security.SecuritySettingsDescriptor(SecurityDescriptorAction), options); + } + else if (SecurityValue is not null) + { + writer.WritePropertyName("security"); + JsonSerializer.Serialize(writer, SecurityValue, options); + } + + if (SecurityProfileDescriptor is not null) + { + writer.WritePropertyName("security-profile"); + JsonSerializer.Serialize(writer, SecurityProfileDescriptor, options); + } + else if (SecurityProfileDescriptorAction is not null) + { + writer.WritePropertyName("security-profile"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Security.SecuritySettingsDescriptor(SecurityProfileDescriptorAction), options); + } + else if (SecurityProfileValue is not null) + { + writer.WritePropertyName("security-profile"); + JsonSerializer.Serialize(writer, SecurityProfileValue, options); + } + + if (SecurityTokensDescriptor is not null) + { + writer.WritePropertyName("security-tokens"); + JsonSerializer.Serialize(writer, SecurityTokensDescriptor, options); + } + else if (SecurityTokensDescriptorAction is not null) + { + writer.WritePropertyName("security-tokens"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Security.SecuritySettingsDescriptor(SecurityTokensDescriptorAction), options); + } + else if (SecurityTokensValue is not null) + { + writer.WritePropertyName("security-tokens"); + JsonSerializer.Serialize(writer, SecurityTokensValue, options); + } + + writer.WriteEndObject(); + } +} + +/// +/// +/// Update security index settings. +/// +/// +/// Update the user-configurable settings for the security internal index (.security and associated indices). Only a subset of settings are allowed to be modified. This includes index.auto_expand_replicas and index.number_of_replicas. +/// +/// +/// NOTE: If index.auto_expand_replicas is set, index.number_of_replicas will be ignored during updates. +/// +/// +/// If a specific index is not in use on the system and settings are provided for it, the request will be rejected. +/// This API does not yet support configuring the settings for indices before they are in use. +/// +/// +public sealed partial class UpdateSettingsRequestDescriptor : RequestDescriptor +{ + internal UpdateSettingsRequestDescriptor(Action configure) => configure.Invoke(this); + + public UpdateSettingsRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityUpdateSettings; + + protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; + + internal override bool SupportsBody => true; + + internal override string OperationName => "security.update_settings"; + + public UpdateSettingsRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); + public UpdateSettingsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); + + private Elastic.Clients.Elasticsearch.Security.SecuritySettings? SecurityValue { get; set; } + private Elastic.Clients.Elasticsearch.Security.SecuritySettingsDescriptor SecurityDescriptor { get; set; } + private Action SecurityDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Security.SecuritySettings? SecurityProfileValue { get; set; } + private Elastic.Clients.Elasticsearch.Security.SecuritySettingsDescriptor SecurityProfileDescriptor { get; set; } + private Action SecurityProfileDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Security.SecuritySettings? SecurityTokensValue { get; set; } + private Elastic.Clients.Elasticsearch.Security.SecuritySettingsDescriptor SecurityTokensDescriptor { get; set; } + private Action SecurityTokensDescriptorAction { get; set; } + + /// + /// + /// Settings for the index used for most security configuration, including native realm users and roles configured with the API. + /// + /// + public UpdateSettingsRequestDescriptor Security(Elastic.Clients.Elasticsearch.Security.SecuritySettings? security) + { + SecurityDescriptor = null; + SecurityDescriptorAction = null; + SecurityValue = security; + return Self; + } + + public UpdateSettingsRequestDescriptor Security(Elastic.Clients.Elasticsearch.Security.SecuritySettingsDescriptor descriptor) + { + SecurityValue = null; + SecurityDescriptorAction = null; + SecurityDescriptor = descriptor; + return Self; + } + + public UpdateSettingsRequestDescriptor Security(Action configure) + { + SecurityValue = null; + SecurityDescriptor = null; + SecurityDescriptorAction = configure; + return Self; + } + + /// + /// + /// Settings for the index used to store profile information. + /// + /// + public UpdateSettingsRequestDescriptor SecurityProfile(Elastic.Clients.Elasticsearch.Security.SecuritySettings? securityProfile) + { + SecurityProfileDescriptor = null; + SecurityProfileDescriptorAction = null; + SecurityProfileValue = securityProfile; + return Self; + } + + public UpdateSettingsRequestDescriptor SecurityProfile(Elastic.Clients.Elasticsearch.Security.SecuritySettingsDescriptor descriptor) + { + SecurityProfileValue = null; + SecurityProfileDescriptorAction = null; + SecurityProfileDescriptor = descriptor; + return Self; + } + + public UpdateSettingsRequestDescriptor SecurityProfile(Action configure) + { + SecurityProfileValue = null; + SecurityProfileDescriptor = null; + SecurityProfileDescriptorAction = configure; + return Self; + } + + /// + /// + /// Settings for the index used to store tokens. + /// + /// + public UpdateSettingsRequestDescriptor SecurityTokens(Elastic.Clients.Elasticsearch.Security.SecuritySettings? securityTokens) + { + SecurityTokensDescriptor = null; + SecurityTokensDescriptorAction = null; + SecurityTokensValue = securityTokens; + return Self; + } + + public UpdateSettingsRequestDescriptor SecurityTokens(Elastic.Clients.Elasticsearch.Security.SecuritySettingsDescriptor descriptor) + { + SecurityTokensValue = null; + SecurityTokensDescriptorAction = null; + SecurityTokensDescriptor = descriptor; + return Self; + } + + public UpdateSettingsRequestDescriptor SecurityTokens(Action configure) + { + SecurityTokensValue = null; + SecurityTokensDescriptor = null; + SecurityTokensDescriptorAction = configure; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (SecurityDescriptor is not null) + { + writer.WritePropertyName("security"); + JsonSerializer.Serialize(writer, SecurityDescriptor, options); + } + else if (SecurityDescriptorAction is not null) + { + writer.WritePropertyName("security"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Security.SecuritySettingsDescriptor(SecurityDescriptorAction), options); + } + else if (SecurityValue is not null) + { + writer.WritePropertyName("security"); + JsonSerializer.Serialize(writer, SecurityValue, options); + } + + if (SecurityProfileDescriptor is not null) + { + writer.WritePropertyName("security-profile"); + JsonSerializer.Serialize(writer, SecurityProfileDescriptor, options); + } + else if (SecurityProfileDescriptorAction is not null) + { + writer.WritePropertyName("security-profile"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Security.SecuritySettingsDescriptor(SecurityProfileDescriptorAction), options); + } + else if (SecurityProfileValue is not null) + { + writer.WritePropertyName("security-profile"); + JsonSerializer.Serialize(writer, SecurityProfileValue, options); + } + + if (SecurityTokensDescriptor is not null) + { + writer.WritePropertyName("security-tokens"); + JsonSerializer.Serialize(writer, SecurityTokensDescriptor, options); + } + else if (SecurityTokensDescriptorAction is not null) + { + writer.WritePropertyName("security-tokens"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Security.SecuritySettingsDescriptor(SecurityTokensDescriptorAction), options); + } + else if (SecurityTokensValue is not null) + { + writer.WritePropertyName("security-tokens"); + JsonSerializer.Serialize(writer, SecurityTokensValue, options); + } + + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateSettingsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateSettingsResponse.g.cs new file mode 100644 index 00000000000..0aeb2aa7ab6 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateSettingsResponse.g.cs @@ -0,0 +1,33 @@ +// 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.Security; + +public sealed partial class UpdateSettingsResponse : ElasticsearchResponse +{ + [JsonInclude, JsonPropertyName("acknowledged")] + public bool Acknowledged { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateUserProfileDataRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateUserProfileDataRequest.g.cs index 98048ccd890..1b23f342c53 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateUserProfileDataRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/UpdateUserProfileDataRequest.g.cs @@ -49,8 +49,9 @@ public sealed partial class UpdateUserProfileDataRequestParameters : RequestPara /// /// /// 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. + /// visible to search. + /// If 'wait_for', it waits for a refresh to make this operation visible to search. + /// If 'false', nothing is done with refreshes. /// /// public Elastic.Clients.Elasticsearch.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); } @@ -63,6 +64,34 @@ public sealed partial class UpdateUserProfileDataRequestParameters : RequestPara /// /// Update specific data for the user profile that is associated with a unique ID. /// +/// +/// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. +/// Individual users and external applications should not call this API directly. +/// Elastic reserves the right to change or remove this feature in future releases without prior notice. +/// +/// +/// To use this API, you must have one of the following privileges: +/// +/// +/// +/// +/// The manage_user_profile cluster privilege. +/// +/// +/// +/// +/// The update_profile_data global privilege for the namespaces that are referenced in the request. +/// +/// +/// +/// +/// This API updates the labels and data fields of an existing user profile document with JSON objects. +/// New keys and their values are added to the profile document and conflicting keys are replaced by data that's included in the request. +/// +/// +/// For both labels and data, content is namespaced by the top-level fields. +/// The update_profile_data global privilege grants privileges for updating only the allowed namespaces. +/// /// public sealed partial class UpdateUserProfileDataRequest : PlainRequest { @@ -97,8 +126,9 @@ public UpdateUserProfileDataRequest(string uid) : base(r => r.Required("uid", ui /// /// /// 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. + /// visible to search. + /// If 'wait_for', it waits for a refresh to make this operation visible to search. + /// If 'false', nothing is done with refreshes. /// /// [JsonIgnore] @@ -108,6 +138,8 @@ public UpdateUserProfileDataRequest(string uid) : base(r => r.Required("uid", ui /// /// Non-searchable data that you want to associate with the user profile. /// This field supports a nested data structure. + /// Within the data object, top-level keys cannot begin with an underscore (_) or contain a period (.). + /// The data object is not searchable, but can be retrieved with the get user profile API. /// /// [JsonInclude, JsonPropertyName("data")] @@ -115,8 +147,9 @@ public UpdateUserProfileDataRequest(string uid) : base(r => r.Required("uid", ui /// /// - /// Searchable data that you want to associate with the user profile. This - /// field supports a nested data structure. + /// Searchable data that you want to associate with the user profile. + /// This field supports a nested data structure. + /// Within the labels object, top-level keys cannot begin with an underscore (_) or contain a period (.). /// /// [JsonInclude, JsonPropertyName("labels")] @@ -130,6 +163,34 @@ public UpdateUserProfileDataRequest(string uid) : base(r => r.Required("uid", ui /// /// Update specific data for the user profile that is associated with a unique ID. /// +/// +/// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. +/// Individual users and external applications should not call this API directly. +/// Elastic reserves the right to change or remove this feature in future releases without prior notice. +/// +/// +/// To use this API, you must have one of the following privileges: +/// +/// +/// +/// +/// The manage_user_profile cluster privilege. +/// +/// +/// +/// +/// The update_profile_data global privilege for the namespaces that are referenced in the request. +/// +/// +/// +/// +/// This API updates the labels and data fields of an existing user profile document with JSON objects. +/// New keys and their values are added to the profile document and conflicting keys are replaced by data that's included in the request. +/// +/// +/// For both labels and data, content is namespaced by the top-level fields. +/// The update_profile_data global privilege grants privileges for updating only the allowed namespaces. +/// /// public sealed partial class UpdateUserProfileDataRequestDescriptor : RequestDescriptor { @@ -164,6 +225,8 @@ public UpdateUserProfileDataRequestDescriptor Uid(string uid) /// /// Non-searchable data that you want to associate with the user profile. /// This field supports a nested data structure. + /// Within the data object, top-level keys cannot begin with an underscore (_) or contain a period (.). + /// The data object is not searchable, but can be retrieved with the get user profile API. /// /// public UpdateUserProfileDataRequestDescriptor Data(Func, FluentDictionary> selector) @@ -174,8 +237,9 @@ public UpdateUserProfileDataRequestDescriptor Data(Func /// - /// Searchable data that you want to associate with the user profile. This - /// field supports a nested data structure. + /// Searchable data that you want to associate with the user profile. + /// This field supports a nested data structure. + /// Within the labels object, top-level keys cannot begin with an underscore (_) or contain a period (.). /// /// public UpdateUserProfileDataRequestDescriptor Labels(Func, FluentDictionary> selector) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Simulate/IngestRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Simulate/IngestRequest.g.cs new file mode 100644 index 00000000000..6f70593e752 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Simulate/IngestRequest.g.cs @@ -0,0 +1,603 @@ +// 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.Simulate; + +public sealed partial class IngestRequestParameters : RequestParameters +{ + /// + /// + /// The pipeline to use as the default pipeline. + /// This value can be used to override the default pipeline of the index. + /// + /// + public string? Pipeline { get => Q("pipeline"); set => Q("pipeline", value); } +} + +/// +/// +/// Simulate data ingestion. +/// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. +/// +/// +/// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. +/// +/// +/// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. +/// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. +/// No data is indexed into Elasticsearch. +/// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. +/// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. +/// +/// +/// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. +/// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. +/// +/// +/// By default, the pipeline definitions that are currently in the system are used. +/// However, you can supply substitute pipeline definitions in the body of the request. +/// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. +/// +/// +public sealed partial class IngestRequest : PlainRequest +{ + public IngestRequest() + { + } + + public IngestRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r.Optional("index", index)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.SimulateIngest; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "simulate.ingest"; + + /// + /// + /// The pipeline to use as the default pipeline. + /// This value can be used to override the default pipeline of the index. + /// + /// + [JsonIgnore] + public string? Pipeline { get => Q("pipeline"); set => Q("pipeline", value); } + + /// + /// + /// A map of component template names to substitute component template definition objects. + /// + /// + [JsonInclude, JsonPropertyName("component_template_substitutions")] + public IDictionary? ComponentTemplateSubstitutions { get; set; } + + /// + /// + /// Sample documents to test in the pipeline. + /// + /// + [JsonInclude, JsonPropertyName("docs")] + public ICollection Docs { get; set; } + + /// + /// + /// A map of index template names to substitute index template definition objects. + /// + /// + [JsonInclude, JsonPropertyName("index_template_substitutions")] + public IDictionary? IndexTemplateSubstitutions { get; set; } + [JsonInclude, JsonPropertyName("mapping_addition")] + public Elastic.Clients.Elasticsearch.Mapping.TypeMapping? MappingAddition { get; set; } + + /// + /// + /// Pipelines to test. + /// If you don’t specify the pipeline request path parameter, this parameter is required. + /// If you specify both this and the request path parameter, the API only uses the request path parameter. + /// + /// + [JsonInclude, JsonPropertyName("pipeline_substitutions")] + public IDictionary? PipelineSubstitutions { get; set; } +} + +/// +/// +/// Simulate data ingestion. +/// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. +/// +/// +/// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. +/// +/// +/// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. +/// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. +/// No data is indexed into Elasticsearch. +/// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. +/// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. +/// +/// +/// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. +/// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. +/// +/// +/// By default, the pipeline definitions that are currently in the system are used. +/// However, you can supply substitute pipeline definitions in the body of the request. +/// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. +/// +/// +public sealed partial class IngestRequestDescriptor : RequestDescriptor, IngestRequestParameters> +{ + internal IngestRequestDescriptor(Action> configure) => configure.Invoke(this); + + public IngestRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r.Optional("index", index)) + { + } + + public IngestRequestDescriptor() : this(typeof(TDocument)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.SimulateIngest; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "simulate.ingest"; + + public IngestRequestDescriptor Pipeline(string? pipeline) => Qs("pipeline", pipeline); + + public IngestRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? index) + { + RouteValues.Optional("index", index); + return Self; + } + + private IDictionary> ComponentTemplateSubstitutionsValue { get; set; } + private ICollection DocsValue { get; set; } + private Elastic.Clients.Elasticsearch.Ingest.DocumentDescriptor DocsDescriptor { get; set; } + private Action DocsDescriptorAction { get; set; } + private Action[] DocsDescriptorActions { get; set; } + private IDictionary> IndexTemplateSubstitutionsValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.TypeMapping? MappingAdditionValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor MappingAdditionDescriptor { get; set; } + private Action> MappingAdditionDescriptorAction { get; set; } + private IDictionary> PipelineSubstitutionsValue { get; set; } + + /// + /// + /// A map of component template names to substitute component template definition objects. + /// + /// + public IngestRequestDescriptor ComponentTemplateSubstitutions(Func>, FluentDescriptorDictionary>> selector) + { + ComponentTemplateSubstitutionsValue = selector?.Invoke(new FluentDescriptorDictionary>()); + return Self; + } + + /// + /// + /// Sample documents to test in the pipeline. + /// + /// + public IngestRequestDescriptor Docs(ICollection docs) + { + DocsDescriptor = null; + DocsDescriptorAction = null; + DocsDescriptorActions = null; + DocsValue = docs; + return Self; + } + + public IngestRequestDescriptor Docs(Elastic.Clients.Elasticsearch.Ingest.DocumentDescriptor descriptor) + { + DocsValue = null; + DocsDescriptorAction = null; + DocsDescriptorActions = null; + DocsDescriptor = descriptor; + return Self; + } + + public IngestRequestDescriptor Docs(Action configure) + { + DocsValue = null; + DocsDescriptor = null; + DocsDescriptorActions = null; + DocsDescriptorAction = configure; + return Self; + } + + public IngestRequestDescriptor Docs(params Action[] configure) + { + DocsValue = null; + DocsDescriptor = null; + DocsDescriptorAction = null; + DocsDescriptorActions = configure; + return Self; + } + + /// + /// + /// A map of index template names to substitute index template definition objects. + /// + /// + public IngestRequestDescriptor IndexTemplateSubstitutions(Func>, FluentDescriptorDictionary>> selector) + { + IndexTemplateSubstitutionsValue = selector?.Invoke(new FluentDescriptorDictionary>()); + return Self; + } + + public IngestRequestDescriptor MappingAddition(Elastic.Clients.Elasticsearch.Mapping.TypeMapping? mappingAddition) + { + MappingAdditionDescriptor = null; + MappingAdditionDescriptorAction = null; + MappingAdditionValue = mappingAddition; + return Self; + } + + public IngestRequestDescriptor MappingAddition(Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor descriptor) + { + MappingAdditionValue = null; + MappingAdditionDescriptorAction = null; + MappingAdditionDescriptor = descriptor; + return Self; + } + + public IngestRequestDescriptor MappingAddition(Action> configure) + { + MappingAdditionValue = null; + MappingAdditionDescriptor = null; + MappingAdditionDescriptorAction = configure; + return Self; + } + + /// + /// + /// Pipelines to test. + /// If you don’t specify the pipeline request path parameter, this parameter is required. + /// If you specify both this and the request path parameter, the API only uses the request path parameter. + /// + /// + public IngestRequestDescriptor PipelineSubstitutions(Func>, FluentDescriptorDictionary>> selector) + { + PipelineSubstitutionsValue = selector?.Invoke(new FluentDescriptorDictionary>()); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (ComponentTemplateSubstitutionsValue is not null) + { + writer.WritePropertyName("component_template_substitutions"); + JsonSerializer.Serialize(writer, ComponentTemplateSubstitutionsValue, options); + } + + if (DocsDescriptor is not null) + { + writer.WritePropertyName("docs"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, DocsDescriptor, options); + writer.WriteEndArray(); + } + else if (DocsDescriptorAction is not null) + { + writer.WritePropertyName("docs"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Ingest.DocumentDescriptor(DocsDescriptorAction), options); + writer.WriteEndArray(); + } + else if (DocsDescriptorActions is not null) + { + writer.WritePropertyName("docs"); + writer.WriteStartArray(); + foreach (var action in DocsDescriptorActions) + { + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Ingest.DocumentDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else + { + writer.WritePropertyName("docs"); + JsonSerializer.Serialize(writer, DocsValue, options); + } + + if (IndexTemplateSubstitutionsValue is not null) + { + writer.WritePropertyName("index_template_substitutions"); + JsonSerializer.Serialize(writer, IndexTemplateSubstitutionsValue, options); + } + + if (MappingAdditionDescriptor is not null) + { + writer.WritePropertyName("mapping_addition"); + JsonSerializer.Serialize(writer, MappingAdditionDescriptor, options); + } + else if (MappingAdditionDescriptorAction is not null) + { + writer.WritePropertyName("mapping_addition"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor(MappingAdditionDescriptorAction), options); + } + else if (MappingAdditionValue is not null) + { + writer.WritePropertyName("mapping_addition"); + JsonSerializer.Serialize(writer, MappingAdditionValue, options); + } + + if (PipelineSubstitutionsValue is not null) + { + writer.WritePropertyName("pipeline_substitutions"); + JsonSerializer.Serialize(writer, PipelineSubstitutionsValue, options); + } + + writer.WriteEndObject(); + } +} + +/// +/// +/// Simulate data ingestion. +/// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. +/// +/// +/// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. +/// +/// +/// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. +/// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. +/// No data is indexed into Elasticsearch. +/// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. +/// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. +/// +/// +/// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. +/// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. +/// +/// +/// By default, the pipeline definitions that are currently in the system are used. +/// However, you can supply substitute pipeline definitions in the body of the request. +/// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. +/// +/// +public sealed partial class IngestRequestDescriptor : RequestDescriptor +{ + internal IngestRequestDescriptor(Action configure) => configure.Invoke(this); + + public IngestRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r.Optional("index", index)) + { + } + + public IngestRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.SimulateIngest; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "simulate.ingest"; + + public IngestRequestDescriptor Pipeline(string? pipeline) => Qs("pipeline", pipeline); + + public IngestRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? index) + { + RouteValues.Optional("index", index); + return Self; + } + + private IDictionary ComponentTemplateSubstitutionsValue { get; set; } + private ICollection DocsValue { get; set; } + private Elastic.Clients.Elasticsearch.Ingest.DocumentDescriptor DocsDescriptor { get; set; } + private Action DocsDescriptorAction { get; set; } + private Action[] DocsDescriptorActions { get; set; } + private IDictionary IndexTemplateSubstitutionsValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.TypeMapping? MappingAdditionValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor MappingAdditionDescriptor { get; set; } + private Action MappingAdditionDescriptorAction { get; set; } + private IDictionary PipelineSubstitutionsValue { get; set; } + + /// + /// + /// A map of component template names to substitute component template definition objects. + /// + /// + public IngestRequestDescriptor ComponentTemplateSubstitutions(Func, FluentDescriptorDictionary> selector) + { + ComponentTemplateSubstitutionsValue = selector?.Invoke(new FluentDescriptorDictionary()); + return Self; + } + + /// + /// + /// Sample documents to test in the pipeline. + /// + /// + public IngestRequestDescriptor Docs(ICollection docs) + { + DocsDescriptor = null; + DocsDescriptorAction = null; + DocsDescriptorActions = null; + DocsValue = docs; + return Self; + } + + public IngestRequestDescriptor Docs(Elastic.Clients.Elasticsearch.Ingest.DocumentDescriptor descriptor) + { + DocsValue = null; + DocsDescriptorAction = null; + DocsDescriptorActions = null; + DocsDescriptor = descriptor; + return Self; + } + + public IngestRequestDescriptor Docs(Action configure) + { + DocsValue = null; + DocsDescriptor = null; + DocsDescriptorActions = null; + DocsDescriptorAction = configure; + return Self; + } + + public IngestRequestDescriptor Docs(params Action[] configure) + { + DocsValue = null; + DocsDescriptor = null; + DocsDescriptorAction = null; + DocsDescriptorActions = configure; + return Self; + } + + /// + /// + /// A map of index template names to substitute index template definition objects. + /// + /// + public IngestRequestDescriptor IndexTemplateSubstitutions(Func, FluentDescriptorDictionary> selector) + { + IndexTemplateSubstitutionsValue = selector?.Invoke(new FluentDescriptorDictionary()); + return Self; + } + + public IngestRequestDescriptor MappingAddition(Elastic.Clients.Elasticsearch.Mapping.TypeMapping? mappingAddition) + { + MappingAdditionDescriptor = null; + MappingAdditionDescriptorAction = null; + MappingAdditionValue = mappingAddition; + return Self; + } + + public IngestRequestDescriptor MappingAddition(Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor descriptor) + { + MappingAdditionValue = null; + MappingAdditionDescriptorAction = null; + MappingAdditionDescriptor = descriptor; + return Self; + } + + public IngestRequestDescriptor MappingAddition(Action configure) + { + MappingAdditionValue = null; + MappingAdditionDescriptor = null; + MappingAdditionDescriptorAction = configure; + return Self; + } + + /// + /// + /// Pipelines to test. + /// If you don’t specify the pipeline request path parameter, this parameter is required. + /// If you specify both this and the request path parameter, the API only uses the request path parameter. + /// + /// + public IngestRequestDescriptor PipelineSubstitutions(Func, FluentDescriptorDictionary> selector) + { + PipelineSubstitutionsValue = selector?.Invoke(new FluentDescriptorDictionary()); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (ComponentTemplateSubstitutionsValue is not null) + { + writer.WritePropertyName("component_template_substitutions"); + JsonSerializer.Serialize(writer, ComponentTemplateSubstitutionsValue, options); + } + + if (DocsDescriptor is not null) + { + writer.WritePropertyName("docs"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, DocsDescriptor, options); + writer.WriteEndArray(); + } + else if (DocsDescriptorAction is not null) + { + writer.WritePropertyName("docs"); + writer.WriteStartArray(); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Ingest.DocumentDescriptor(DocsDescriptorAction), options); + writer.WriteEndArray(); + } + else if (DocsDescriptorActions is not null) + { + writer.WritePropertyName("docs"); + writer.WriteStartArray(); + foreach (var action in DocsDescriptorActions) + { + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Ingest.DocumentDescriptor(action), options); + } + + writer.WriteEndArray(); + } + else + { + writer.WritePropertyName("docs"); + JsonSerializer.Serialize(writer, DocsValue, options); + } + + if (IndexTemplateSubstitutionsValue is not null) + { + writer.WritePropertyName("index_template_substitutions"); + JsonSerializer.Serialize(writer, IndexTemplateSubstitutionsValue, options); + } + + if (MappingAdditionDescriptor is not null) + { + writer.WritePropertyName("mapping_addition"); + JsonSerializer.Serialize(writer, MappingAdditionDescriptor, options); + } + else if (MappingAdditionDescriptorAction is not null) + { + writer.WritePropertyName("mapping_addition"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor(MappingAdditionDescriptorAction), options); + } + else if (MappingAdditionValue is not null) + { + writer.WritePropertyName("mapping_addition"); + JsonSerializer.Serialize(writer, MappingAdditionValue, options); + } + + if (PipelineSubstitutionsValue is not null) + { + writer.WritePropertyName("pipeline_substitutions"); + JsonSerializer.Serialize(writer, PipelineSubstitutionsValue, options); + } + + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Simulate/IngestResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Simulate/IngestResponse.g.cs new file mode 100644 index 00000000000..dbf42007b2a --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Simulate/IngestResponse.g.cs @@ -0,0 +1,33 @@ +// 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.Simulate; + +public sealed partial class IngestResponse : ElasticsearchResponse +{ + [JsonInclude, JsonPropertyName("docs")] + public IReadOnlyCollection Docs { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RepositoryAnalyzeRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RepositoryAnalyzeRequest.g.cs new file mode 100644 index 00000000000..c433c15e4f4 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RepositoryAnalyzeRequest.g.cs @@ -0,0 +1,547 @@ +// 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.Snapshot; + +public sealed partial class RepositoryAnalyzeRequestParameters : RequestParameters +{ + /// + /// + /// The total number of blobs to write to the repository during the test. + /// For realistic experiments, you should set it to at least 2000. + /// + /// + public int? BlobCount { get => Q("blob_count"); set => Q("blob_count", value); } + + /// + /// + /// The number of operations to run concurrently during the test. + /// + /// + public int? Concurrency { get => Q("concurrency"); set => Q("concurrency", value); } + + /// + /// + /// Indicates whether to return detailed results, including timing information for every operation performed during the analysis. + /// If false, it returns only a summary of the analysis. + /// + /// + public bool? Detailed { get => Q("detailed"); set => Q("detailed", value); } + + /// + /// + /// The number of nodes on which to perform an early read operation while writing each blob. + /// Early read operations are only rarely performed. + /// + /// + public int? EarlyReadNodeCount { get => Q("early_read_node_count"); set => Q("early_read_node_count", value); } + + /// + /// + /// The maximum size of a blob to be written during the test. + /// For realistic experiments, you should set it to at least 2gb. + /// + /// + public Elastic.Clients.Elasticsearch.ByteSize? MaxBlobSize { get => Q("max_blob_size"); set => Q("max_blob_size", value); } + + /// + /// + /// An upper limit on the total size of all the blobs written during the test. + /// For realistic experiments, you should set it to at least 1tb. + /// + /// + public Elastic.Clients.Elasticsearch.ByteSize? MaxTotalDataSize { get => Q("max_total_data_size"); set => Q("max_total_data_size", value); } + + /// + /// + /// The probability of performing a rare action such as an early read, an overwrite, or an aborted write on each blob. + /// + /// + public double? RareActionProbability { get => Q("rare_action_probability"); set => Q("rare_action_probability", value); } + + /// + /// + /// Indicates whether to rarely cancel writes before they complete. + /// + /// + public bool? RarelyAbortWrites { get => Q("rarely_abort_writes"); set => Q("rarely_abort_writes", value); } + + /// + /// + /// The number of nodes on which to read a blob after writing. + /// + /// + public int? ReadNodeCount { get => Q("read_node_count"); set => Q("read_node_count", value); } + + /// + /// + /// The minimum number of linearizable register operations to perform in total. + /// For realistic experiments, you should set it to at least 100. + /// + /// + public int? RegisterOperationCount { get => Q("register_operation_count"); set => Q("register_operation_count", value); } + + /// + /// + /// The seed for the pseudo-random number generator used to generate the list of operations performed during the test. + /// To repeat the same set of operations in multiple experiments, use the same seed in each experiment. + /// Note that the operations are performed concurrently so might not always happen in the same order on each run. + /// + /// + public int? Seed { get => Q("seed"); set => Q("seed", value); } + + /// + /// + /// The period of time to wait for the test to complete. + /// If no response is received before the timeout expires, the test is cancelled and returns an error. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } +} + +/// +/// +/// Analyze a snapshot repository. +/// Analyze the performance characteristics and any incorrect behaviour found in a repository. +/// +/// +/// The response exposes implementation details of the analysis which may change from version to version. +/// The response body format is therefore not considered stable and may be different in newer versions. +/// +/// +/// There are a large number of third-party storage systems available, not all of which are suitable for use as a snapshot repository by Elasticsearch. +/// Some storage systems behave incorrectly, or perform poorly, especially when accessed concurrently by multiple clients as the nodes of an Elasticsearch cluster do. This API performs a collection of read and write operations on your repository which are designed to detect incorrect behaviour and to measure the performance characteristics of your storage system. +/// +/// +/// The default values for the parameters are deliberately low to reduce the impact of running an analysis inadvertently and to provide a sensible starting point for your investigations. +/// Run your first analysis with the default parameter values to check for simple problems. +/// If successful, run a sequence of increasingly large analyses until you encounter a failure or you reach a blob_count of at least 2000, a max_blob_size of at least 2gb, a max_total_data_size of at least 1tb, and a register_operation_count of at least 100. +/// Always specify a generous timeout, possibly 1h or longer, to allow time for each analysis to run to completion. +/// Perform the analyses using a multi-node cluster of a similar size to your production cluster so that it can detect any problems that only arise when the repository is accessed by many nodes at once. +/// +/// +/// If the analysis fails, Elasticsearch detected that your repository behaved unexpectedly. +/// This usually means you are using a third-party storage system with an incorrect or incompatible implementation of the API it claims to support. +/// If so, this storage system is not suitable for use as a snapshot repository. +/// You will need to work with the supplier of your storage system to address the incompatibilities that Elasticsearch detects. +/// +/// +/// If the analysis is successful, the API returns details of the testing process, optionally including how long each operation took. +/// You can use this information to determine the performance of your storage system. +/// If any operation fails or returns an incorrect result, the API returns an error. +/// If the API returns an error, it may not have removed all the data it wrote to the repository. +/// The error will indicate the location of any leftover data and this path is also recorded in the Elasticsearch logs. +/// You should verify that this location has been cleaned up correctly. +/// If there is still leftover data at the specified location, you should manually remove it. +/// +/// +/// If the connection from your client to Elasticsearch is closed while the client is waiting for the result of the analysis, the test is cancelled. +/// Some clients are configured to close their connection if no response is received within a certain timeout. +/// An analysis takes a long time to complete so you might need to relax any such client-side timeouts. +/// On cancellation the analysis attempts to clean up the data it was writing, but it may not be able to remove it all. +/// The path to the leftover data is recorded in the Elasticsearch logs. +/// You should verify that this location has been cleaned up correctly. +/// If there is still leftover data at the specified location, you should manually remove it. +/// +/// +/// If the analysis is successful then it detected no incorrect behaviour, but this does not mean that correct behaviour is guaranteed. +/// The analysis attempts to detect common bugs but it does not offer 100% coverage. +/// Additionally, it does not test the following: +/// +/// +/// +/// +/// Your repository must perform durable writes. Once a blob has been written it must remain in place until it is deleted, even after a power loss or similar disaster. +/// +/// +/// +/// +/// Your repository must not suffer from silent data corruption. Once a blob has been written, its contents must remain unchanged until it is deliberately modified or deleted. +/// +/// +/// +/// +/// Your repository must behave correctly even if connectivity from the cluster is disrupted. Reads and writes may fail in this case, but they must not return incorrect results. +/// +/// +/// +/// +/// IMPORTANT: An analysis writes a substantial amount of data to your repository and then reads it back again. +/// This consumes bandwidth on the network between the cluster and the repository, and storage space and I/O bandwidth on the repository itself. +/// You must ensure this load does not affect other users of these systems. +/// Analyses respect the repository settings max_snapshot_bytes_per_sec and max_restore_bytes_per_sec if available and the cluster setting indices.recovery.max_bytes_per_sec which you can use to limit the bandwidth they consume. +/// +/// +/// NOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions. +/// +/// +/// NOTE: Different versions of Elasticsearch may perform different checks for repository compatibility, with newer versions typically being stricter than older ones. +/// A storage system that passes repository analysis with one version of Elasticsearch may fail with a different version. +/// This indicates it behaves incorrectly in ways that the former version did not detect. +/// You must work with the supplier of your storage system to address the incompatibilities detected by the repository analysis API in any version of Elasticsearch. +/// +/// +/// NOTE: This API may not work correctly in a mixed-version cluster. +/// +/// +/// Implementation details +/// +/// +/// NOTE: This section of documentation describes how the repository analysis API works in this version of Elasticsearch, but you should expect the implementation to vary between versions. The request parameters and response format depend on details of the implementation so may also be different in newer versions. +/// +/// +/// The analysis comprises a number of blob-level tasks, as set by the blob_count parameter and a number of compare-and-exchange operations on linearizable registers, as set by the register_operation_count parameter. +/// These tasks are distributed over the data and master-eligible nodes in the cluster for execution. +/// +/// +/// For most blob-level tasks, the executing node first writes a blob to the repository and then instructs some of the other nodes in the cluster to attempt to read the data it just wrote. +/// The size of the blob is chosen randomly, according to the max_blob_size and max_total_data_size parameters. +/// If any of these reads fails then the repository does not implement the necessary read-after-write semantics that Elasticsearch requires. +/// +/// +/// For some blob-level tasks, the executing node will instruct some of its peers to attempt to read the data before the writing process completes. +/// These reads are permitted to fail, but must not return partial data. +/// If any read returns partial data then the repository does not implement the necessary atomicity semantics that Elasticsearch requires. +/// +/// +/// For some blob-level tasks, the executing node will overwrite the blob while its peers are reading it. +/// In this case the data read may come from either the original or the overwritten blob, but the read operation must not return partial data or a mix of data from the two blobs. +/// If any of these reads returns partial data or a mix of the two blobs then the repository does not implement the necessary atomicity semantics that Elasticsearch requires for overwrites. +/// +/// +/// The executing node will use a variety of different methods to write the blob. +/// For instance, where applicable, it will use both single-part and multi-part uploads. +/// Similarly, the reading nodes will use a variety of different methods to read the data back again. +/// For instance they may read the entire blob from start to end or may read only a subset of the data. +/// +/// +/// For some blob-level tasks, the executing node will cancel the write before it is complete. +/// In this case, it still instructs some of the other nodes in the cluster to attempt to read the blob but all of these reads must fail to find the blob. +/// +/// +/// Linearizable registers are special blobs that Elasticsearch manipulates using an atomic compare-and-exchange operation. +/// This operation ensures correct and strongly-consistent behavior even when the blob is accessed by multiple nodes at the same time. +/// The detailed implementation of the compare-and-exchange operation on linearizable registers varies by repository type. +/// Repository analysis verifies that that uncontended compare-and-exchange operations on a linearizable register blob always succeed. +/// Repository analysis also verifies that contended operations either succeed or report the contention but do not return incorrect results. +/// If an operation fails due to contention, Elasticsearch retries the operation until it succeeds. +/// Most of the compare-and-exchange operations performed by repository analysis atomically increment a counter which is represented as an 8-byte blob. +/// Some operations also verify the behavior on small blobs with sizes other than 8 bytes. +/// +/// +public sealed partial class RepositoryAnalyzeRequest : PlainRequest +{ + public RepositoryAnalyzeRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r.Required("repository", name)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotRepositoryAnalyze; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => false; + + internal override string OperationName => "snapshot.repository_analyze"; + + /// + /// + /// The total number of blobs to write to the repository during the test. + /// For realistic experiments, you should set it to at least 2000. + /// + /// + [JsonIgnore] + public int? BlobCount { get => Q("blob_count"); set => Q("blob_count", value); } + + /// + /// + /// The number of operations to run concurrently during the test. + /// + /// + [JsonIgnore] + public int? Concurrency { get => Q("concurrency"); set => Q("concurrency", value); } + + /// + /// + /// Indicates whether to return detailed results, including timing information for every operation performed during the analysis. + /// If false, it returns only a summary of the analysis. + /// + /// + [JsonIgnore] + public bool? Detailed { get => Q("detailed"); set => Q("detailed", value); } + + /// + /// + /// The number of nodes on which to perform an early read operation while writing each blob. + /// Early read operations are only rarely performed. + /// + /// + [JsonIgnore] + public int? EarlyReadNodeCount { get => Q("early_read_node_count"); set => Q("early_read_node_count", value); } + + /// + /// + /// The maximum size of a blob to be written during the test. + /// For realistic experiments, you should set it to at least 2gb. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ByteSize? MaxBlobSize { get => Q("max_blob_size"); set => Q("max_blob_size", value); } + + /// + /// + /// An upper limit on the total size of all the blobs written during the test. + /// For realistic experiments, you should set it to at least 1tb. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ByteSize? MaxTotalDataSize { get => Q("max_total_data_size"); set => Q("max_total_data_size", value); } + + /// + /// + /// The probability of performing a rare action such as an early read, an overwrite, or an aborted write on each blob. + /// + /// + [JsonIgnore] + public double? RareActionProbability { get => Q("rare_action_probability"); set => Q("rare_action_probability", value); } + + /// + /// + /// Indicates whether to rarely cancel writes before they complete. + /// + /// + [JsonIgnore] + public bool? RarelyAbortWrites { get => Q("rarely_abort_writes"); set => Q("rarely_abort_writes", value); } + + /// + /// + /// The number of nodes on which to read a blob after writing. + /// + /// + [JsonIgnore] + public int? ReadNodeCount { get => Q("read_node_count"); set => Q("read_node_count", value); } + + /// + /// + /// The minimum number of linearizable register operations to perform in total. + /// For realistic experiments, you should set it to at least 100. + /// + /// + [JsonIgnore] + public int? RegisterOperationCount { get => Q("register_operation_count"); set => Q("register_operation_count", value); } + + /// + /// + /// The seed for the pseudo-random number generator used to generate the list of operations performed during the test. + /// To repeat the same set of operations in multiple experiments, use the same seed in each experiment. + /// Note that the operations are performed concurrently so might not always happen in the same order on each run. + /// + /// + [JsonIgnore] + public int? Seed { get => Q("seed"); set => Q("seed", value); } + + /// + /// + /// The period of time to wait for the test to complete. + /// If no response is received before the timeout expires, the test is cancelled and returns an error. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } +} + +/// +/// +/// Analyze a snapshot repository. +/// Analyze the performance characteristics and any incorrect behaviour found in a repository. +/// +/// +/// The response exposes implementation details of the analysis which may change from version to version. +/// The response body format is therefore not considered stable and may be different in newer versions. +/// +/// +/// There are a large number of third-party storage systems available, not all of which are suitable for use as a snapshot repository by Elasticsearch. +/// Some storage systems behave incorrectly, or perform poorly, especially when accessed concurrently by multiple clients as the nodes of an Elasticsearch cluster do. This API performs a collection of read and write operations on your repository which are designed to detect incorrect behaviour and to measure the performance characteristics of your storage system. +/// +/// +/// The default values for the parameters are deliberately low to reduce the impact of running an analysis inadvertently and to provide a sensible starting point for your investigations. +/// Run your first analysis with the default parameter values to check for simple problems. +/// If successful, run a sequence of increasingly large analyses until you encounter a failure or you reach a blob_count of at least 2000, a max_blob_size of at least 2gb, a max_total_data_size of at least 1tb, and a register_operation_count of at least 100. +/// Always specify a generous timeout, possibly 1h or longer, to allow time for each analysis to run to completion. +/// Perform the analyses using a multi-node cluster of a similar size to your production cluster so that it can detect any problems that only arise when the repository is accessed by many nodes at once. +/// +/// +/// If the analysis fails, Elasticsearch detected that your repository behaved unexpectedly. +/// This usually means you are using a third-party storage system with an incorrect or incompatible implementation of the API it claims to support. +/// If so, this storage system is not suitable for use as a snapshot repository. +/// You will need to work with the supplier of your storage system to address the incompatibilities that Elasticsearch detects. +/// +/// +/// If the analysis is successful, the API returns details of the testing process, optionally including how long each operation took. +/// You can use this information to determine the performance of your storage system. +/// If any operation fails or returns an incorrect result, the API returns an error. +/// If the API returns an error, it may not have removed all the data it wrote to the repository. +/// The error will indicate the location of any leftover data and this path is also recorded in the Elasticsearch logs. +/// You should verify that this location has been cleaned up correctly. +/// If there is still leftover data at the specified location, you should manually remove it. +/// +/// +/// If the connection from your client to Elasticsearch is closed while the client is waiting for the result of the analysis, the test is cancelled. +/// Some clients are configured to close their connection if no response is received within a certain timeout. +/// An analysis takes a long time to complete so you might need to relax any such client-side timeouts. +/// On cancellation the analysis attempts to clean up the data it was writing, but it may not be able to remove it all. +/// The path to the leftover data is recorded in the Elasticsearch logs. +/// You should verify that this location has been cleaned up correctly. +/// If there is still leftover data at the specified location, you should manually remove it. +/// +/// +/// If the analysis is successful then it detected no incorrect behaviour, but this does not mean that correct behaviour is guaranteed. +/// The analysis attempts to detect common bugs but it does not offer 100% coverage. +/// Additionally, it does not test the following: +/// +/// +/// +/// +/// Your repository must perform durable writes. Once a blob has been written it must remain in place until it is deleted, even after a power loss or similar disaster. +/// +/// +/// +/// +/// Your repository must not suffer from silent data corruption. Once a blob has been written, its contents must remain unchanged until it is deliberately modified or deleted. +/// +/// +/// +/// +/// Your repository must behave correctly even if connectivity from the cluster is disrupted. Reads and writes may fail in this case, but they must not return incorrect results. +/// +/// +/// +/// +/// IMPORTANT: An analysis writes a substantial amount of data to your repository and then reads it back again. +/// This consumes bandwidth on the network between the cluster and the repository, and storage space and I/O bandwidth on the repository itself. +/// You must ensure this load does not affect other users of these systems. +/// Analyses respect the repository settings max_snapshot_bytes_per_sec and max_restore_bytes_per_sec if available and the cluster setting indices.recovery.max_bytes_per_sec which you can use to limit the bandwidth they consume. +/// +/// +/// NOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions. +/// +/// +/// NOTE: Different versions of Elasticsearch may perform different checks for repository compatibility, with newer versions typically being stricter than older ones. +/// A storage system that passes repository analysis with one version of Elasticsearch may fail with a different version. +/// This indicates it behaves incorrectly in ways that the former version did not detect. +/// You must work with the supplier of your storage system to address the incompatibilities detected by the repository analysis API in any version of Elasticsearch. +/// +/// +/// NOTE: This API may not work correctly in a mixed-version cluster. +/// +/// +/// Implementation details +/// +/// +/// NOTE: This section of documentation describes how the repository analysis API works in this version of Elasticsearch, but you should expect the implementation to vary between versions. The request parameters and response format depend on details of the implementation so may also be different in newer versions. +/// +/// +/// The analysis comprises a number of blob-level tasks, as set by the blob_count parameter and a number of compare-and-exchange operations on linearizable registers, as set by the register_operation_count parameter. +/// These tasks are distributed over the data and master-eligible nodes in the cluster for execution. +/// +/// +/// For most blob-level tasks, the executing node first writes a blob to the repository and then instructs some of the other nodes in the cluster to attempt to read the data it just wrote. +/// The size of the blob is chosen randomly, according to the max_blob_size and max_total_data_size parameters. +/// If any of these reads fails then the repository does not implement the necessary read-after-write semantics that Elasticsearch requires. +/// +/// +/// For some blob-level tasks, the executing node will instruct some of its peers to attempt to read the data before the writing process completes. +/// These reads are permitted to fail, but must not return partial data. +/// If any read returns partial data then the repository does not implement the necessary atomicity semantics that Elasticsearch requires. +/// +/// +/// For some blob-level tasks, the executing node will overwrite the blob while its peers are reading it. +/// In this case the data read may come from either the original or the overwritten blob, but the read operation must not return partial data or a mix of data from the two blobs. +/// If any of these reads returns partial data or a mix of the two blobs then the repository does not implement the necessary atomicity semantics that Elasticsearch requires for overwrites. +/// +/// +/// The executing node will use a variety of different methods to write the blob. +/// For instance, where applicable, it will use both single-part and multi-part uploads. +/// Similarly, the reading nodes will use a variety of different methods to read the data back again. +/// For instance they may read the entire blob from start to end or may read only a subset of the data. +/// +/// +/// For some blob-level tasks, the executing node will cancel the write before it is complete. +/// In this case, it still instructs some of the other nodes in the cluster to attempt to read the blob but all of these reads must fail to find the blob. +/// +/// +/// Linearizable registers are special blobs that Elasticsearch manipulates using an atomic compare-and-exchange operation. +/// This operation ensures correct and strongly-consistent behavior even when the blob is accessed by multiple nodes at the same time. +/// The detailed implementation of the compare-and-exchange operation on linearizable registers varies by repository type. +/// Repository analysis verifies that that uncontended compare-and-exchange operations on a linearizable register blob always succeed. +/// Repository analysis also verifies that contended operations either succeed or report the contention but do not return incorrect results. +/// If an operation fails due to contention, Elasticsearch retries the operation until it succeeds. +/// Most of the compare-and-exchange operations performed by repository analysis atomically increment a counter which is represented as an 8-byte blob. +/// Some operations also verify the behavior on small blobs with sizes other than 8 bytes. +/// +/// +public sealed partial class RepositoryAnalyzeRequestDescriptor : RequestDescriptor +{ + internal RepositoryAnalyzeRequestDescriptor(Action configure) => configure.Invoke(this); + + public RepositoryAnalyzeRequestDescriptor(Elastic.Clients.Elasticsearch.Name name) : base(r => r.Required("repository", name)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.SnapshotRepositoryAnalyze; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => false; + + internal override string OperationName => "snapshot.repository_analyze"; + + public RepositoryAnalyzeRequestDescriptor BlobCount(int? blobCount) => Qs("blob_count", blobCount); + public RepositoryAnalyzeRequestDescriptor Concurrency(int? concurrency) => Qs("concurrency", concurrency); + public RepositoryAnalyzeRequestDescriptor Detailed(bool? detailed = true) => Qs("detailed", detailed); + public RepositoryAnalyzeRequestDescriptor EarlyReadNodeCount(int? earlyReadNodeCount) => Qs("early_read_node_count", earlyReadNodeCount); + public RepositoryAnalyzeRequestDescriptor MaxBlobSize(Elastic.Clients.Elasticsearch.ByteSize? maxBlobSize) => Qs("max_blob_size", maxBlobSize); + public RepositoryAnalyzeRequestDescriptor MaxTotalDataSize(Elastic.Clients.Elasticsearch.ByteSize? maxTotalDataSize) => Qs("max_total_data_size", maxTotalDataSize); + public RepositoryAnalyzeRequestDescriptor RareActionProbability(double? rareActionProbability) => Qs("rare_action_probability", rareActionProbability); + public RepositoryAnalyzeRequestDescriptor RarelyAbortWrites(bool? rarelyAbortWrites = true) => Qs("rarely_abort_writes", rarelyAbortWrites); + public RepositoryAnalyzeRequestDescriptor ReadNodeCount(int? readNodeCount) => Qs("read_node_count", readNodeCount); + public RepositoryAnalyzeRequestDescriptor RegisterOperationCount(int? registerOperationCount) => Qs("register_operation_count", registerOperationCount); + public RepositoryAnalyzeRequestDescriptor Seed(int? seed) => Qs("seed", seed); + public RepositoryAnalyzeRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); + + public RepositoryAnalyzeRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name) + { + RouteValues.Required("repository", name); + 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/Snapshot/RepositoryAnalyzeResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RepositoryAnalyzeResponse.g.cs new file mode 100644 index 00000000000..0ed58394662 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RepositoryAnalyzeResponse.g.cs @@ -0,0 +1,191 @@ +// 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.Snapshot; + +public sealed partial class RepositoryAnalyzeResponse : ElasticsearchResponse +{ + /// + /// + /// The number of blobs written to the repository during the test. + /// + /// + [JsonInclude, JsonPropertyName("blob_count")] + public int BlobCount { get; init; } + + /// + /// + /// The path in the repository under which all the blobs were written during the test. + /// + /// + [JsonInclude, JsonPropertyName("blob_path")] + public string BlobPath { get; init; } + + /// + /// + /// The number of write operations performed concurrently during the test. + /// + /// + [JsonInclude, JsonPropertyName("concurrency")] + public int Concurrency { get; init; } + + /// + /// + /// The node that coordinated the analysis and performed the final cleanup. + /// + /// + [JsonInclude, JsonPropertyName("coordinating_node")] + public Elastic.Clients.Elasticsearch.Snapshot.SnapshotNodeInfo CoordinatingNode { get; init; } + + /// + /// + /// The time it took to delete all the blobs in the container. + /// + /// + [JsonInclude, JsonPropertyName("delete_elapsed")] + public Elastic.Clients.Elasticsearch.Duration DeleteElapsed { get; init; } + + /// + /// + /// The time it took to delete all the blobs in the container, in nanoseconds. + /// + /// + [JsonInclude, JsonPropertyName("delete_elapsed_nanos")] + public long DeleteElapsedNanos { get; init; } + + /// + /// + /// A description of every read and write operation performed during the test. + /// + /// + [JsonInclude, JsonPropertyName("details")] + public Elastic.Clients.Elasticsearch.Snapshot.DetailsInfo Details { get; init; } + + /// + /// + /// The limit on the number of nodes on which early read operations were performed after writing each blob. + /// + /// + [JsonInclude, JsonPropertyName("early_read_node_count")] + public int EarlyReadNodeCount { get; init; } + + /// + /// + /// A list of correctness issues detected, which is empty if the API succeeded. + /// It is included to emphasize that a successful response does not guarantee correct behaviour in future. + /// + /// + [JsonInclude, JsonPropertyName("issues_detected")] + public IReadOnlyCollection IssuesDetected { get; init; } + + /// + /// + /// The time it took to retrieve a list of all the blobs in the container. + /// + /// + [JsonInclude, JsonPropertyName("listing_elapsed")] + public Elastic.Clients.Elasticsearch.Duration ListingElapsed { get; init; } + + /// + /// + /// The time it took to retrieve a list of all the blobs in the container, in nanoseconds. + /// + /// + [JsonInclude, JsonPropertyName("listing_elapsed_nanos")] + public long ListingElapsedNanos { get; init; } + + /// + /// + /// The limit on the size of a blob written during the test. + /// + /// + [JsonInclude, JsonPropertyName("max_blob_size")] + public Elastic.Clients.Elasticsearch.ByteSize MaxBlobSize { get; init; } + + /// + /// + /// The limit, in bytes, on the size of a blob written during the test. + /// + /// + [JsonInclude, JsonPropertyName("max_blob_size_bytes")] + public long MaxBlobSizeBytes { get; init; } + + /// + /// + /// The limit on the total size of all blob written during the test. + /// + /// + [JsonInclude, JsonPropertyName("max_total_data_size")] + public Elastic.Clients.Elasticsearch.ByteSize MaxTotalDataSize { get; init; } + + /// + /// + /// The limit, in bytes, on the total size of all blob written during the test. + /// + /// + [JsonInclude, JsonPropertyName("max_total_data_size_bytes")] + public long MaxTotalDataSizeBytes { get; init; } + + /// + /// + /// The probability of performing rare actions during the test. + /// + /// + [JsonInclude, JsonPropertyName("rare_action_probability")] + public double RareActionProbability { get; init; } + + /// + /// + /// The limit on the number of nodes on which read operations were performed after writing each blob. + /// + /// + [JsonInclude, JsonPropertyName("read_node_count")] + public int ReadNodeCount { get; init; } + + /// + /// + /// The name of the repository that was the subject of the analysis. + /// + /// + [JsonInclude, JsonPropertyName("repository")] + public string Repository { get; init; } + + /// + /// + /// The seed for the pseudo-random number generator used to generate the operations used during the test. + /// + /// + [JsonInclude, JsonPropertyName("seed")] + public long Seed { get; init; } + + /// + /// + /// A collection of statistics that summarize the results of the test. + /// + /// + [JsonInclude, JsonPropertyName("summary")] + public Elastic.Clients.Elasticsearch.Snapshot.SummaryInfo Summary { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/DeleteLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/DeleteLifecycleRequest.g.cs index e50ac965692..73128b67ad4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/DeleteLifecycleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/DeleteLifecycleRequest.g.cs @@ -32,6 +32,21 @@ namespace Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement; public sealed partial class DeleteLifecycleRequestParameters : RequestParameters { + /// + /// + /// 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. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// The period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -54,6 +69,24 @@ public DeleteLifecycleRequest(Elastic.Clients.Elasticsearch.Name policyId) : bas internal override bool SupportsBody => false; internal override string OperationName => "slm.delete_lifecycle"; + + /// + /// + /// 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. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// The period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -79,6 +112,9 @@ public DeleteLifecycleRequestDescriptor(Elastic.Clients.Elasticsearch.Name polic internal override string OperationName => "slm.delete_lifecycle"; + public DeleteLifecycleRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); + public DeleteLifecycleRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); + public DeleteLifecycleRequestDescriptor PolicyId(Elastic.Clients.Elasticsearch.Name policyId) { RouteValues.Required("policy_id", policyId); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/ExecuteLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/ExecuteLifecycleRequest.g.cs index 46c763acd3a..c16b8ed0aae 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/ExecuteLifecycleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/ExecuteLifecycleRequest.g.cs @@ -32,6 +32,21 @@ namespace Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement; public sealed partial class ExecuteLifecycleRequestParameters : RequestParameters { + /// + /// + /// 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. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// The period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -54,6 +69,24 @@ public ExecuteLifecycleRequest(Elastic.Clients.Elasticsearch.Name policyId) : ba internal override bool SupportsBody => false; internal override string OperationName => "slm.execute_lifecycle"; + + /// + /// + /// 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. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// The period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -79,6 +112,9 @@ public ExecuteLifecycleRequestDescriptor(Elastic.Clients.Elasticsearch.Name poli internal override string OperationName => "slm.execute_lifecycle"; + public ExecuteLifecycleRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); + public ExecuteLifecycleRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); + public ExecuteLifecycleRequestDescriptor PolicyId(Elastic.Clients.Elasticsearch.Name policyId) { RouteValues.Required("policy_id", policyId); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/ExecuteRetentionRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/ExecuteRetentionRequest.g.cs index 14f759460ca..c4e9c78952a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/ExecuteRetentionRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/ExecuteRetentionRequest.g.cs @@ -32,6 +32,21 @@ namespace Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement; public sealed partial class ExecuteRetentionRequestParameters : RequestParameters { + /// + /// + /// 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. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// The period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -50,6 +65,24 @@ public sealed partial class ExecuteRetentionRequest : PlainRequest false; internal override string OperationName => "slm.execute_retention"; + + /// + /// + /// 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. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// The period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -75,6 +108,9 @@ public ExecuteRetentionRequestDescriptor() internal override string OperationName => "slm.execute_retention"; + public ExecuteRetentionRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); + public ExecuteRetentionRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetLifecycleRequest.g.cs index e647bd33bb8..94b96f6bd9d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetLifecycleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetLifecycleRequest.g.cs @@ -32,6 +32,21 @@ namespace Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement; public sealed partial class GetLifecycleRequestParameters : RequestParameters { + /// + /// + /// 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. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// The period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -57,6 +72,24 @@ public GetLifecycleRequest(Elastic.Clients.Elasticsearch.Names? policyId) : base internal override bool SupportsBody => false; internal override string OperationName => "slm.get_lifecycle"; + + /// + /// + /// 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. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// The period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -85,6 +118,9 @@ public GetLifecycleRequestDescriptor() internal override string OperationName => "slm.get_lifecycle"; + public GetLifecycleRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); + public GetLifecycleRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); + public GetLifecycleRequestDescriptor PolicyId(Elastic.Clients.Elasticsearch.Names? policyId) { RouteValues.Optional("policy_id", policyId); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetSlmStatusRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetSlmStatusRequest.g.cs index 3b0fc096ab6..cca9b56579b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetSlmStatusRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetSlmStatusRequest.g.cs @@ -32,6 +32,23 @@ namespace Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement; public sealed partial class GetSlmStatusRequestParameters : RequestParameters { + /// + /// + /// 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. + /// 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); } + + /// + /// + /// The period to wait for a response. + /// If no response is received 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? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -48,6 +65,26 @@ public sealed partial class GetSlmStatusRequest : PlainRequest false; internal override string OperationName => "slm.get_status"; + + /// + /// + /// 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. + /// To indicate that the request should never timeout, set it to -1. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// The period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// To indicate that the request should never timeout, set it to -1. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -71,6 +108,9 @@ public GetSlmStatusRequestDescriptor() internal override string OperationName => "slm.get_status"; + public GetSlmStatusRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); + public GetSlmStatusRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetStatsRequest.g.cs index 183295795da..32d4b1a5b6d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetStatsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetStatsRequest.g.cs @@ -32,6 +32,19 @@ namespace Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement; public sealed partial class GetStatsRequestParameters : RequestParameters { + /// + /// + /// 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); } + + /// + /// + /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -49,6 +62,22 @@ public sealed partial class GetStatsRequest : PlainRequest false; internal override string OperationName => "slm.get_stats"; + + /// + /// + /// 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); } + + /// + /// + /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -73,6 +102,9 @@ public GetStatsRequestDescriptor() internal override string OperationName => "slm.get_stats"; + public GetStatsRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); + public GetStatsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/PutLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/PutLifecycleRequest.g.cs index 865a2baf563..a474b64957a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/PutLifecycleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/PutLifecycleRequest.g.cs @@ -34,14 +34,18 @@ public sealed partial class PutLifecycleRequestParameters : RequestParameters { /// /// - /// 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. + /// 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. + /// 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); } /// /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + /// The period to wait for a response. + /// If no response is received 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? Timeout { get => Q("timeout"); set => Q("timeout", value); } @@ -71,7 +75,9 @@ public PutLifecycleRequest(Elastic.Clients.Elasticsearch.Name policyId) : base(r /// /// - /// 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. + /// 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. + /// To indicate that the request should never timeout, set it to -1. /// /// [JsonIgnore] @@ -79,7 +85,9 @@ public PutLifecycleRequest(Elastic.Clients.Elasticsearch.Name policyId) : base(r /// /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + /// The period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// To indicate that the request should never timeout, set it to -1. /// /// [JsonIgnore] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/StartSlmRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/StartSlmRequest.g.cs index f45719cc0a0..a11234ab25c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/StartSlmRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/StartSlmRequest.g.cs @@ -32,6 +32,23 @@ namespace Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement; public sealed partial class StartSlmRequestParameters : RequestParameters { + /// + /// + /// 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. + /// 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); } + + /// + /// + /// The period to wait for a response. + /// If no response is received 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? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -50,6 +67,26 @@ public sealed partial class StartSlmRequest : PlainRequest false; internal override string OperationName => "slm.start"; + + /// + /// + /// 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. + /// To indicate that the request should never timeout, set it to -1. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// The period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// To indicate that the request should never timeout, set it to -1. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -75,6 +112,9 @@ public StartSlmRequestDescriptor() internal override string OperationName => "slm.start"; + public StartSlmRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); + public StartSlmRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/StopSlmRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/StopSlmRequest.g.cs index 4f8e240975d..e3d150b7356 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/StopSlmRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/StopSlmRequest.g.cs @@ -32,6 +32,23 @@ namespace Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement; public sealed partial class StopSlmRequestParameters : RequestParameters { + /// + /// + /// 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. + /// 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); } + + /// + /// + /// The period to wait for a response. + /// If no response is received 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? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -56,6 +73,26 @@ public sealed partial class StopSlmRequest : PlainRequest false; internal override string OperationName => "slm.stop"; + + /// + /// + /// 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. + /// To indicate that the request should never timeout, set it to -1. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// The period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// To indicate that the request should never timeout, set it to -1. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -87,6 +124,9 @@ public StopSlmRequestDescriptor() internal override string OperationName => "slm.stop"; + public StopSlmRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); + public StopSlmRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/DeleteAsyncRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/DeleteAsyncRequest.g.cs index d306d8916d2..126cfaca0cc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/DeleteAsyncRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/DeleteAsyncRequest.g.cs @@ -40,6 +40,21 @@ public sealed partial class DeleteAsyncRequestParameters : RequestParameters /// Delete an async SQL search or a stored synchronous SQL search. /// If the search is still running, the API cancels it. /// +/// +/// If the Elasticsearch security features are enabled, only the following users can use this API to delete a search: +/// +/// +/// +/// +/// Users with the cancel_task cluster privilege. +/// +/// +/// +/// +/// The user who first submitted the search. +/// +/// +/// /// public sealed partial class DeleteAsyncRequest : PlainRequest { @@ -62,6 +77,21 @@ public DeleteAsyncRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Req /// Delete an async SQL search or a stored synchronous SQL search. /// If the search is still running, the API cancels it. /// +/// +/// If the Elasticsearch security features are enabled, only the following users can use this API to delete a search: +/// +/// +/// +/// +/// Users with the cancel_task cluster privilege. +/// +/// +/// +/// +/// The user who first submitted the search. +/// +/// +/// /// public sealed partial class DeleteAsyncRequestDescriptor : RequestDescriptor, DeleteAsyncRequestParameters> { @@ -96,6 +126,21 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o /// Delete an async SQL search or a stored synchronous SQL search. /// If the search is still running, the API cancels it. /// +/// +/// If the Elasticsearch security features are enabled, only the following users can use this API to delete a search: +/// +/// +/// +/// +/// Users with the cancel_task cluster privilege. +/// +/// +/// +/// +/// The user who first submitted the search. +/// +/// +/// /// public sealed partial class DeleteAsyncRequestDescriptor : RequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncRequest.g.cs index a725dcd4bd3..c4808c31240 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncRequest.g.cs @@ -34,31 +34,33 @@ public sealed partial class GetAsyncRequestParameters : RequestParameters { /// /// - /// Separator for CSV results. The API only supports this parameter for CSV responses. + /// The separator for CSV results. + /// The API supports this parameter only for CSV responses. /// /// public string? Delimiter { get => Q("delimiter"); set => Q("delimiter", value); } /// /// - /// Format for the response. You must specify a format using this parameter or the - /// Accept HTTP header. If you specify both, the API uses this parameter. + /// The format for the response. + /// You must specify a format using this parameter or the Accept HTTP header. + /// If you specify both, the API uses this parameter. /// /// public string? Format { get => Q("format"); set => Q("format", value); } /// /// - /// Retention period for the search and its results. Defaults - /// to the keep_alive period for the original SQL search. + /// The retention period for the search and its results. + /// It defaults to the keep_alive period for the original SQL search. /// /// public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } /// /// - /// Period to wait for complete results. Defaults to no timeout, - /// meaning the request waits for complete search results. + /// The period to wait for complete results. + /// It defaults to no timeout, meaning the request waits for complete search results. /// /// public Elastic.Clients.Elasticsearch.Duration? WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); set => Q("wait_for_completion_timeout", value); } @@ -69,6 +71,9 @@ public sealed partial class GetAsyncRequestParameters : RequestParameters /// Get async SQL search results. /// Get the current status and available results for an async SQL search or stored synchronous SQL search. /// +/// +/// If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API. +/// /// public sealed partial class GetAsyncRequest : PlainRequest { @@ -86,7 +91,8 @@ public GetAsyncRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Requir /// /// - /// Separator for CSV results. The API only supports this parameter for CSV responses. + /// The separator for CSV results. + /// The API supports this parameter only for CSV responses. /// /// [JsonIgnore] @@ -94,8 +100,9 @@ public GetAsyncRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Requir /// /// - /// Format for the response. You must specify a format using this parameter or the - /// Accept HTTP header. If you specify both, the API uses this parameter. + /// The format for the response. + /// You must specify a format using this parameter or the Accept HTTP header. + /// If you specify both, the API uses this parameter. /// /// [JsonIgnore] @@ -103,8 +110,8 @@ public GetAsyncRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Requir /// /// - /// Retention period for the search and its results. Defaults - /// to the keep_alive period for the original SQL search. + /// The retention period for the search and its results. + /// It defaults to the keep_alive period for the original SQL search. /// /// [JsonIgnore] @@ -112,8 +119,8 @@ public GetAsyncRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Requir /// /// - /// Period to wait for complete results. Defaults to no timeout, - /// meaning the request waits for complete search results. + /// The period to wait for complete results. + /// It defaults to no timeout, meaning the request waits for complete search results. /// /// [JsonIgnore] @@ -125,6 +132,9 @@ public GetAsyncRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Requir /// Get async SQL search results. /// Get the current status and available results for an async SQL search or stored synchronous SQL search. /// +/// +/// If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API. +/// /// public sealed partial class GetAsyncRequestDescriptor : RequestDescriptor, GetAsyncRequestParameters> { @@ -163,6 +173,9 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o /// Get async SQL search results. /// Get the current status and available results for an async SQL search or stored synchronous SQL search. /// +/// +/// If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API. +/// /// public sealed partial class GetAsyncRequestDescriptor : RequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncResponse.g.cs index 9762bd7bd96..77feb20b3d2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncResponse.g.cs @@ -38,8 +38,8 @@ public sealed partial class GetAsyncResponse : ElasticsearchResponse /// /// - /// Cursor for the next set of paginated results. For CSV, TSV, and - /// TXT responses, this value is returned in the Cursor HTTP header. + /// The cursor for the next set of paginated results. + /// For CSV, TSV, and TXT responses, this value is returned in the Cursor HTTP header. /// /// [JsonInclude, JsonPropertyName("cursor")] @@ -47,9 +47,9 @@ public sealed partial class GetAsyncResponse : ElasticsearchResponse /// /// - /// Identifier for the search. This value is only returned for async and saved - /// synchronous searches. For CSV, TSV, and TXT responses, this value is returned - /// in the Async-ID HTTP header. + /// Identifier for the search. + /// This value is returned only for async and saved synchronous searches. + /// For CSV, TSV, and TXT responses, this value is returned in the Async-ID HTTP header. /// /// [JsonInclude, JsonPropertyName("id")] @@ -57,10 +57,10 @@ public sealed partial class GetAsyncResponse : ElasticsearchResponse /// /// - /// If true, the response does not contain complete search results. If is_partial - /// is true and is_running is true, the search is still running. If is_partial - /// is true but is_running is false, the results are partial due to a failure or - /// timeout. This value is only returned for async and saved synchronous searches. + /// If true, the response does not contain complete search results. + /// If is_partial is true and is_running is true, the search is still running. + /// If is_partial is true but is_running is false, the results are partial due to a failure or timeout. + /// This value is returned only for async and saved synchronous searches. /// For CSV, TSV, and TXT responses, this value is returned in the Async-partial HTTP header. /// /// @@ -69,10 +69,10 @@ public sealed partial class GetAsyncResponse : ElasticsearchResponse /// /// - /// If true, the search is still running. If false, the search has finished. - /// This value is only returned for async and saved synchronous searches. For - /// CSV, TSV, and TXT responses, this value is returned in the Async-partial - /// HTTP header. + /// If true, the search is still running. + /// If false, the search has finished. + /// This value is returned only for async and saved synchronous searches. + /// For CSV, TSV, and TXT responses, this value is returned in the Async-partial HTTP header. /// /// [JsonInclude, JsonPropertyName("is_running")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncStatusResponse.g.cs index 8dd9a09e22b..10d924dfbdd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncStatusResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncStatusResponse.g.cs @@ -30,7 +30,8 @@ public sealed partial class GetAsyncStatusResponse : ElasticsearchResponse { /// /// - /// HTTP status code for the search. The API only returns this property for completed searches. + /// The HTTP status code for the search. + /// The API returns this property only for completed searches. /// /// [JsonInclude, JsonPropertyName("completion_status")] @@ -38,8 +39,7 @@ public sealed partial class GetAsyncStatusResponse : ElasticsearchResponse /// /// - /// Timestamp, in milliseconds since the Unix epoch, when Elasticsearch will delete - /// the search and its results, even if the search is still running. + /// The timestamp, in milliseconds since the Unix epoch, when Elasticsearch will delete the search and its results, even if the search is still running. /// /// [JsonInclude, JsonPropertyName("expiration_time_in_millis")] @@ -47,7 +47,7 @@ public sealed partial class GetAsyncStatusResponse : ElasticsearchResponse /// /// - /// Identifier for the search. + /// The identifier for the search. /// /// [JsonInclude, JsonPropertyName("id")] @@ -55,10 +55,9 @@ public sealed partial class GetAsyncStatusResponse : ElasticsearchResponse /// /// - /// If true, the response does not contain complete search results. If is_partial - /// is true and is_running is true, the search is still running. If is_partial - /// is true but is_running is false, the results are partial due to a failure or - /// timeout. + /// If true, the response does not contain complete search results. + /// If is_partial is true and is_running is true, the search is still running. + /// If is_partial is true but is_running is false, the results are partial due to a failure or timeout. /// /// [JsonInclude, JsonPropertyName("is_partial")] @@ -66,7 +65,8 @@ public sealed partial class GetAsyncStatusResponse : ElasticsearchResponse /// /// - /// If true, the search is still running. If false, the search has finished. + /// If true, the search is still running. + /// If false, the search has finished. /// /// [JsonInclude, JsonPropertyName("is_running")] @@ -74,8 +74,8 @@ public sealed partial class GetAsyncStatusResponse : ElasticsearchResponse /// /// - /// Timestamp, in milliseconds since the Unix epoch, when the search started. - /// The API only returns this property for running searches. + /// The timestamp, in milliseconds since the Unix epoch, when the search started. + /// The API returns this property only for running searches. /// /// [JsonInclude, JsonPropertyName("start_time_in_millis")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs index a45bfdcc1cd..247b732a256 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs @@ -34,7 +34,9 @@ public sealed partial class QueryRequestParameters : RequestParameters { /// /// - /// Format for the response. + /// The format for the response. + /// You can also specify a format using the Accept HTTP header. + /// If you specify both this parameter and the Accept HTTP header, this parameter takes precedence. /// /// public Elastic.Clients.Elasticsearch.Sql.SqlFormat? Format { get => Q("format"); set => Q("format", value); } @@ -58,7 +60,9 @@ public sealed partial class QueryRequest : PlainRequest /// /// - /// Format for the response. + /// The format for the response. + /// You can also specify a format using the Accept HTTP header. + /// If you specify both this parameter and the Accept HTTP header, this parameter takes precedence. /// /// [JsonIgnore] @@ -66,7 +70,17 @@ public sealed partial class QueryRequest : PlainRequest /// /// - /// Default catalog (cluster) for queries. If unspecified, the queries execute on the data in the local cluster only. + /// If true, the response has partial results when there are shard request timeouts or shard failures. + /// If false, the API returns an error with no partial results. + /// + /// + [JsonInclude, JsonPropertyName("allow_partial_search_results")] + public bool? AllowPartialSearchResults { get; set; } + + /// + /// + /// The default catalog (cluster) for queries. + /// If unspecified, the queries execute on the data in the local cluster only. /// /// [JsonInclude, JsonPropertyName("catalog")] @@ -74,7 +88,8 @@ public sealed partial class QueryRequest : PlainRequest /// /// - /// If true, the results in a columnar fashion: one row represents all the values of a certain column from the current page of results. + /// If true, the results are in a columnar fashion: one row represents all the values of a certain column from the current page of results. + /// The API supports this parameter only for CBOR, JSON, SMILE, and YAML responses. /// /// [JsonInclude, JsonPropertyName("columnar")] @@ -82,7 +97,7 @@ public sealed partial class QueryRequest : PlainRequest /// /// - /// Cursor used to retrieve a set of paginated results. + /// The cursor used to retrieve a set of paginated results. /// If you specify a cursor, the API only uses the columnar and time_zone request body parameters. /// It ignores other request body parameters. /// @@ -92,7 +107,7 @@ public sealed partial class QueryRequest : PlainRequest /// /// - /// The maximum number of rows (or entries) to return in one response + /// The maximum number of rows (or entries) to return in one response. /// /// [JsonInclude, JsonPropertyName("fetch_size")] @@ -100,7 +115,8 @@ public sealed partial class QueryRequest : PlainRequest /// /// - /// Throw an exception when encountering multiple values for a field (default) or be lenient and return the first value from the list (without any guarantees of what that will be - typically the first in natural ascending order). + /// If false, the API returns an exception when encountering multiple values for a field. + /// If true, the API is lenient and returns the first value from the array with no guarantee of consistent results. /// /// [JsonInclude, JsonPropertyName("field_multi_value_leniency")] @@ -108,7 +124,7 @@ public sealed partial class QueryRequest : PlainRequest /// /// - /// Elasticsearch query DSL for additional filtering. + /// The Elasticsearch query DSL for additional filtering. /// /// [JsonInclude, JsonPropertyName("filter")] @@ -116,7 +132,7 @@ public sealed partial class QueryRequest : PlainRequest /// /// - /// If true, the search can run on frozen indices. Defaults to false. + /// If true, the search can run on frozen indices. /// /// [JsonInclude, JsonPropertyName("index_using_frozen")] @@ -124,7 +140,7 @@ public sealed partial class QueryRequest : PlainRequest /// /// - /// Retention period for an async or saved synchronous search. + /// The retention period for an async or saved synchronous search. /// /// [JsonInclude, JsonPropertyName("keep_alive")] @@ -132,7 +148,8 @@ public sealed partial class QueryRequest : PlainRequest /// /// - /// If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter. If false, Elasticsearch only stores async searches that don’t finish before the wait_for_completion_timeout. + /// If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter. + /// If false, Elasticsearch only stores async searches that don't finish before the wait_for_completion_timeout. /// /// [JsonInclude, JsonPropertyName("keep_on_completion")] @@ -140,7 +157,9 @@ public sealed partial class QueryRequest : PlainRequest /// /// - /// The timeout before a pagination request fails. + /// The minimum retention period for the scroll cursor. + /// After this time period, a pagination request might fail because the scroll cursor is no longer available. + /// Subsequent scroll requests prolong the lifetime of the scroll cursor by the duration of page_timeout in the scroll request. /// /// [JsonInclude, JsonPropertyName("page_timeout")] @@ -148,7 +167,7 @@ public sealed partial class QueryRequest : PlainRequest /// /// - /// Values for parameters in the query. + /// The values for parameters in the query. /// /// [JsonInclude, JsonPropertyName("params")] @@ -156,7 +175,7 @@ public sealed partial class QueryRequest : PlainRequest /// /// - /// SQL query to run. + /// The SQL query to run. /// /// [JsonInclude, JsonPropertyName("query")] @@ -172,8 +191,8 @@ public sealed partial class QueryRequest : PlainRequest /// /// - /// Defines one or more runtime fields in the search request. These fields take - /// precedence over mapped fields with the same name. + /// One or more runtime fields for the search request. + /// These fields take precedence over mapped fields with the same name. /// /// [JsonInclude, JsonPropertyName("runtime_mappings")] @@ -181,7 +200,7 @@ public sealed partial class QueryRequest : PlainRequest /// /// - /// ISO-8601 time zone ID for the search. + /// The ISO-8601 time zone ID for the search. /// /// [JsonInclude, JsonPropertyName("time_zone")] @@ -189,7 +208,12 @@ public sealed partial class QueryRequest : PlainRequest /// /// - /// Period to wait for complete results. Defaults to no timeout, meaning the request waits for complete search results. If the search doesn’t finish within this period, the search becomes async. + /// The period to wait for complete results. + /// It defaults to no timeout, meaning the request waits for complete search results. + /// If the search doesn't finish within this period, the search becomes async. + /// + /// + /// To save a synchronous search, you must specify this parameter and the keep_on_completion parameter. /// /// [JsonInclude, JsonPropertyName("wait_for_completion_timeout")] @@ -220,6 +244,7 @@ public QueryRequestDescriptor() public QueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Sql.SqlFormat? format) => Qs("format", format); + private bool? AllowPartialSearchResultsValue { get; set; } private string? CatalogValue { get; set; } private bool? ColumnarValue { get; set; } private string? CursorValue { get; set; } @@ -241,7 +266,20 @@ public QueryRequestDescriptor() /// /// - /// Default catalog (cluster) for queries. If unspecified, the queries execute on the data in the local cluster only. + /// If true, the response has partial results when there are shard request timeouts or shard failures. + /// If false, the API returns an error with no partial results. + /// + /// + public QueryRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) + { + AllowPartialSearchResultsValue = allowPartialSearchResults; + return Self; + } + + /// + /// + /// The default catalog (cluster) for queries. + /// If unspecified, the queries execute on the data in the local cluster only. /// /// public QueryRequestDescriptor Catalog(string? catalog) @@ -252,7 +290,8 @@ public QueryRequestDescriptor Catalog(string? catalog) /// /// - /// If true, the results in a columnar fashion: one row represents all the values of a certain column from the current page of results. + /// If true, the results are in a columnar fashion: one row represents all the values of a certain column from the current page of results. + /// The API supports this parameter only for CBOR, JSON, SMILE, and YAML responses. /// /// public QueryRequestDescriptor Columnar(bool? columnar = true) @@ -263,7 +302,7 @@ public QueryRequestDescriptor Columnar(bool? columnar = true) /// /// - /// Cursor used to retrieve a set of paginated results. + /// The cursor used to retrieve a set of paginated results. /// If you specify a cursor, the API only uses the columnar and time_zone request body parameters. /// It ignores other request body parameters. /// @@ -276,7 +315,7 @@ public QueryRequestDescriptor Cursor(string? cursor) /// /// - /// The maximum number of rows (or entries) to return in one response + /// The maximum number of rows (or entries) to return in one response. /// /// public QueryRequestDescriptor FetchSize(int? fetchSize) @@ -287,7 +326,8 @@ public QueryRequestDescriptor FetchSize(int? fetchSize) /// /// - /// Throw an exception when encountering multiple values for a field (default) or be lenient and return the first value from the list (without any guarantees of what that will be - typically the first in natural ascending order). + /// If false, the API returns an exception when encountering multiple values for a field. + /// If true, the API is lenient and returns the first value from the array with no guarantee of consistent results. /// /// public QueryRequestDescriptor FieldMultiValueLeniency(bool? fieldMultiValueLeniency = true) @@ -298,7 +338,7 @@ public QueryRequestDescriptor FieldMultiValueLeniency(bool? fieldMult /// /// - /// Elasticsearch query DSL for additional filtering. + /// The Elasticsearch query DSL for additional filtering. /// /// public QueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? filter) @@ -327,7 +367,7 @@ public QueryRequestDescriptor Filter(Action /// - /// If true, the search can run on frozen indices. Defaults to false. + /// If true, the search can run on frozen indices. /// /// public QueryRequestDescriptor IndexUsingFrozen(bool? indexUsingFrozen = true) @@ -338,7 +378,7 @@ public QueryRequestDescriptor IndexUsingFrozen(bool? indexUsingFrozen /// /// - /// Retention period for an async or saved synchronous search. + /// The retention period for an async or saved synchronous search. /// /// public QueryRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? keepAlive) @@ -349,7 +389,8 @@ public QueryRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch /// /// - /// If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter. If false, Elasticsearch only stores async searches that don’t finish before the wait_for_completion_timeout. + /// If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter. + /// If false, Elasticsearch only stores async searches that don't finish before the wait_for_completion_timeout. /// /// public QueryRequestDescriptor KeepOnCompletion(bool? keepOnCompletion = true) @@ -360,7 +401,9 @@ public QueryRequestDescriptor KeepOnCompletion(bool? keepOnCompletion /// /// - /// The timeout before a pagination request fails. + /// The minimum retention period for the scroll cursor. + /// After this time period, a pagination request might fail because the scroll cursor is no longer available. + /// Subsequent scroll requests prolong the lifetime of the scroll cursor by the duration of page_timeout in the scroll request. /// /// public QueryRequestDescriptor PageTimeout(Elastic.Clients.Elasticsearch.Duration? pageTimeout) @@ -371,7 +414,7 @@ public QueryRequestDescriptor PageTimeout(Elastic.Clients.Elasticsear /// /// - /// Values for parameters in the query. + /// The values for parameters in the query. /// /// public QueryRequestDescriptor Params(Func, FluentDictionary> selector) @@ -382,7 +425,7 @@ public QueryRequestDescriptor Params(Func /// - /// SQL query to run. + /// The SQL query to run. /// /// public QueryRequestDescriptor Query(string? query) @@ -404,8 +447,8 @@ public QueryRequestDescriptor RequestTimeout(Elastic.Clients.Elastics /// /// - /// Defines one or more runtime fields in the search request. These fields take - /// precedence over mapped fields with the same name. + /// One or more runtime fields for the search request. + /// These fields take precedence over mapped fields with the same name. /// /// public QueryRequestDescriptor RuntimeMappings(Func>, FluentDescriptorDictionary>> selector) @@ -416,7 +459,7 @@ public QueryRequestDescriptor RuntimeMappings(Func /// - /// ISO-8601 time zone ID for the search. + /// The ISO-8601 time zone ID for the search. /// /// public QueryRequestDescriptor TimeZone(string? timeZone) @@ -427,7 +470,12 @@ public QueryRequestDescriptor TimeZone(string? timeZone) /// /// - /// Period to wait for complete results. Defaults to no timeout, meaning the request waits for complete search results. If the search doesn’t finish within this period, the search becomes async. + /// The period to wait for complete results. + /// It defaults to no timeout, meaning the request waits for complete search results. + /// If the search doesn't finish within this period, the search becomes async. + /// + /// + /// To save a synchronous search, you must specify this parameter and the keep_on_completion parameter. /// /// public QueryRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Duration? waitForCompletionTimeout) @@ -439,6 +487,12 @@ public QueryRequestDescriptor WaitForCompletionTimeout(Elastic.Client 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 (!string.IsNullOrEmpty(CatalogValue)) { writer.WritePropertyName("catalog"); @@ -573,6 +627,7 @@ public QueryRequestDescriptor() public QueryRequestDescriptor Format(Elastic.Clients.Elasticsearch.Sql.SqlFormat? format) => Qs("format", format); + private bool? AllowPartialSearchResultsValue { get; set; } private string? CatalogValue { get; set; } private bool? ColumnarValue { get; set; } private string? CursorValue { get; set; } @@ -594,7 +649,20 @@ public QueryRequestDescriptor() /// /// - /// Default catalog (cluster) for queries. If unspecified, the queries execute on the data in the local cluster only. + /// If true, the response has partial results when there are shard request timeouts or shard failures. + /// If false, the API returns an error with no partial results. + /// + /// + public QueryRequestDescriptor AllowPartialSearchResults(bool? allowPartialSearchResults = true) + { + AllowPartialSearchResultsValue = allowPartialSearchResults; + return Self; + } + + /// + /// + /// The default catalog (cluster) for queries. + /// If unspecified, the queries execute on the data in the local cluster only. /// /// public QueryRequestDescriptor Catalog(string? catalog) @@ -605,7 +673,8 @@ public QueryRequestDescriptor Catalog(string? catalog) /// /// - /// If true, the results in a columnar fashion: one row represents all the values of a certain column from the current page of results. + /// If true, the results are in a columnar fashion: one row represents all the values of a certain column from the current page of results. + /// The API supports this parameter only for CBOR, JSON, SMILE, and YAML responses. /// /// public QueryRequestDescriptor Columnar(bool? columnar = true) @@ -616,7 +685,7 @@ public QueryRequestDescriptor Columnar(bool? columnar = true) /// /// - /// Cursor used to retrieve a set of paginated results. + /// The cursor used to retrieve a set of paginated results. /// If you specify a cursor, the API only uses the columnar and time_zone request body parameters. /// It ignores other request body parameters. /// @@ -629,7 +698,7 @@ public QueryRequestDescriptor Cursor(string? cursor) /// /// - /// The maximum number of rows (or entries) to return in one response + /// The maximum number of rows (or entries) to return in one response. /// /// public QueryRequestDescriptor FetchSize(int? fetchSize) @@ -640,7 +709,8 @@ public QueryRequestDescriptor FetchSize(int? fetchSize) /// /// - /// Throw an exception when encountering multiple values for a field (default) or be lenient and return the first value from the list (without any guarantees of what that will be - typically the first in natural ascending order). + /// If false, the API returns an exception when encountering multiple values for a field. + /// If true, the API is lenient and returns the first value from the array with no guarantee of consistent results. /// /// public QueryRequestDescriptor FieldMultiValueLeniency(bool? fieldMultiValueLeniency = true) @@ -651,7 +721,7 @@ public QueryRequestDescriptor FieldMultiValueLeniency(bool? fieldMultiValueLenie /// /// - /// Elasticsearch query DSL for additional filtering. + /// The Elasticsearch query DSL for additional filtering. /// /// public QueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? filter) @@ -680,7 +750,7 @@ public QueryRequestDescriptor Filter(Action /// - /// If true, the search can run on frozen indices. Defaults to false. + /// If true, the search can run on frozen indices. /// /// public QueryRequestDescriptor IndexUsingFrozen(bool? indexUsingFrozen = true) @@ -691,7 +761,7 @@ public QueryRequestDescriptor IndexUsingFrozen(bool? indexUsingFrozen = true) /// /// - /// Retention period for an async or saved synchronous search. + /// The retention period for an async or saved synchronous search. /// /// public QueryRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? keepAlive) @@ -702,7 +772,8 @@ public QueryRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? /// /// - /// If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter. If false, Elasticsearch only stores async searches that don’t finish before the wait_for_completion_timeout. + /// If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter. + /// If false, Elasticsearch only stores async searches that don't finish before the wait_for_completion_timeout. /// /// public QueryRequestDescriptor KeepOnCompletion(bool? keepOnCompletion = true) @@ -713,7 +784,9 @@ public QueryRequestDescriptor KeepOnCompletion(bool? keepOnCompletion = true) /// /// - /// The timeout before a pagination request fails. + /// The minimum retention period for the scroll cursor. + /// After this time period, a pagination request might fail because the scroll cursor is no longer available. + /// Subsequent scroll requests prolong the lifetime of the scroll cursor by the duration of page_timeout in the scroll request. /// /// public QueryRequestDescriptor PageTimeout(Elastic.Clients.Elasticsearch.Duration? pageTimeout) @@ -724,7 +797,7 @@ public QueryRequestDescriptor PageTimeout(Elastic.Clients.Elasticsearch.Duration /// /// - /// Values for parameters in the query. + /// The values for parameters in the query. /// /// public QueryRequestDescriptor Params(Func, FluentDictionary> selector) @@ -735,7 +808,7 @@ public QueryRequestDescriptor Params(Func, Flue /// /// - /// SQL query to run. + /// The SQL query to run. /// /// public QueryRequestDescriptor Query(string? query) @@ -757,8 +830,8 @@ public QueryRequestDescriptor RequestTimeout(Elastic.Clients.Elasticsearch.Durat /// /// - /// Defines one or more runtime fields in the search request. These fields take - /// precedence over mapped fields with the same name. + /// One or more runtime fields for the search request. + /// These fields take precedence over mapped fields with the same name. /// /// public QueryRequestDescriptor RuntimeMappings(Func, FluentDescriptorDictionary> selector) @@ -769,7 +842,7 @@ public QueryRequestDescriptor RuntimeMappings(Func /// - /// ISO-8601 time zone ID for the search. + /// The ISO-8601 time zone ID for the search. /// /// public QueryRequestDescriptor TimeZone(string? timeZone) @@ -780,7 +853,12 @@ public QueryRequestDescriptor TimeZone(string? timeZone) /// /// - /// Period to wait for complete results. Defaults to no timeout, meaning the request waits for complete search results. If the search doesn’t finish within this period, the search becomes async. + /// The period to wait for complete results. + /// It defaults to no timeout, meaning the request waits for complete search results. + /// If the search doesn't finish within this period, the search becomes async. + /// + /// + /// To save a synchronous search, you must specify this parameter and the keep_on_completion parameter. /// /// public QueryRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticsearch.Duration? waitForCompletionTimeout) @@ -792,6 +870,12 @@ public QueryRequestDescriptor WaitForCompletionTimeout(Elastic.Clients.Elasticse 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 (!string.IsNullOrEmpty(CatalogValue)) { writer.WritePropertyName("catalog"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryResponse.g.cs index 68a8c3c72ca..30bb2dceda4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryResponse.g.cs @@ -38,8 +38,8 @@ public sealed partial class QueryResponse : ElasticsearchResponse /// /// - /// Cursor for the next set of paginated results. For CSV, TSV, and - /// TXT responses, this value is returned in the Cursor HTTP header. + /// The cursor for the next set of paginated results. + /// For CSV, TSV, and TXT responses, this value is returned in the Cursor HTTP header. /// /// [JsonInclude, JsonPropertyName("cursor")] @@ -47,9 +47,9 @@ public sealed partial class QueryResponse : ElasticsearchResponse /// /// - /// Identifier for the search. This value is only returned for async and saved - /// synchronous searches. For CSV, TSV, and TXT responses, this value is returned - /// in the Async-ID HTTP header. + /// The identifier for the search. + /// This value is returned only for async and saved synchronous searches. + /// For CSV, TSV, and TXT responses, this value is returned in the Async-ID HTTP header. /// /// [JsonInclude, JsonPropertyName("id")] @@ -57,10 +57,10 @@ public sealed partial class QueryResponse : ElasticsearchResponse /// /// - /// If true, the response does not contain complete search results. If is_partial - /// is true and is_running is true, the search is still running. If is_partial - /// is true but is_running is false, the results are partial due to a failure or - /// timeout. This value is only returned for async and saved synchronous searches. + /// If true, the response does not contain complete search results. + /// If is_partial is true and is_running is true, the search is still running. + /// If is_partial is true but is_running is false, the results are partial due to a failure or timeout. + /// This value is returned only for async and saved synchronous searches. /// For CSV, TSV, and TXT responses, this value is returned in the Async-partial HTTP header. /// /// @@ -69,10 +69,10 @@ public sealed partial class QueryResponse : ElasticsearchResponse /// /// - /// If true, the search is still running. If false, the search has finished. - /// This value is only returned for async and saved synchronous searches. For - /// CSV, TSV, and TXT responses, this value is returned in the Async-partial - /// HTTP header. + /// If true, the search is still running. + /// If false, the search has finished. + /// This value is returned only for async and saved synchronous searches. + /// For CSV, TSV, and TXT responses, this value is returned in the Async-partial HTTP header. /// /// [JsonInclude, JsonPropertyName("is_running")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/TranslateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/TranslateRequest.g.cs index 33dd98cbf08..072b4acbd93 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/TranslateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/TranslateRequest.g.cs @@ -38,6 +38,7 @@ public sealed partial class TranslateRequestParameters : RequestParameters /// /// Translate SQL into Elasticsearch queries. /// Translate an SQL search into a search API request containing Query DSL. +/// It accepts the same request body parameters as the SQL search API, excluding cursor. /// /// public sealed partial class TranslateRequest : PlainRequest @@ -60,7 +61,7 @@ public sealed partial class TranslateRequest : PlainRequest /// - /// Elasticsearch query DSL for additional filtering. + /// The Elasticsearch query DSL for additional filtering. /// /// [JsonInclude, JsonPropertyName("filter")] @@ -68,7 +69,7 @@ public sealed partial class TranslateRequest : PlainRequest /// - /// SQL query to run. + /// The SQL query to run. /// /// [JsonInclude, JsonPropertyName("query")] @@ -76,7 +77,7 @@ public sealed partial class TranslateRequest : PlainRequest /// - /// ISO-8601 time zone ID for the search. + /// The ISO-8601 time zone ID for the search. /// /// [JsonInclude, JsonPropertyName("time_zone")] @@ -87,6 +88,7 @@ public sealed partial class TranslateRequest : PlainRequest /// Translate SQL into Elasticsearch queries. /// Translate an SQL search into a search API request containing Query DSL. +/// It accepts the same request body parameters as the SQL search API, excluding cursor. /// /// public sealed partial class TranslateRequestDescriptor : RequestDescriptor, TranslateRequestParameters> @@ -125,7 +127,7 @@ public TranslateRequestDescriptor FetchSize(int? fetchSize) /// /// - /// Elasticsearch query DSL for additional filtering. + /// The Elasticsearch query DSL for additional filtering. /// /// public TranslateRequestDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? filter) @@ -154,7 +156,7 @@ public TranslateRequestDescriptor Filter(Action /// - /// SQL query to run. + /// The SQL query to run. /// /// public TranslateRequestDescriptor Query(string query) @@ -165,7 +167,7 @@ public TranslateRequestDescriptor Query(string query) /// /// - /// ISO-8601 time zone ID for the search. + /// The ISO-8601 time zone ID for the search. /// /// public TranslateRequestDescriptor TimeZone(string? timeZone) @@ -215,6 +217,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o /// /// Translate SQL into Elasticsearch queries. /// Translate an SQL search into a search API request containing Query DSL. +/// It accepts the same request body parameters as the SQL search API, excluding cursor. /// /// public sealed partial class TranslateRequestDescriptor : RequestDescriptor @@ -253,7 +256,7 @@ public TranslateRequestDescriptor FetchSize(int? fetchSize) /// /// - /// Elasticsearch query DSL for additional filtering. + /// The Elasticsearch query DSL for additional filtering. /// /// public TranslateRequestDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? filter) @@ -282,7 +285,7 @@ public TranslateRequestDescriptor Filter(Action /// - /// SQL query to run. + /// The SQL query to run. /// /// public TranslateRequestDescriptor Query(string query) @@ -293,7 +296,7 @@ public TranslateRequestDescriptor Query(string query) /// /// - /// ISO-8601 time zone ID for the search. + /// The ISO-8601 time zone ID for the search. /// /// public TranslateRequestDescriptor TimeZone(string? timeZone) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/DeleteSynonymRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/DeleteSynonymRequest.g.cs index 8468d27085d..387db94bba7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/DeleteSynonymRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/DeleteSynonymRequest.g.cs @@ -38,6 +38,28 @@ public sealed partial class DeleteSynonymRequestParameters : RequestParameters /// /// Delete a synonym set. /// +/// +/// You can only delete a synonyms set that is not in use by any index analyzer. +/// +/// +/// Synonyms sets can be used in synonym graph token filters and synonym token filters. +/// These synonym filters can be used as part of search analyzers. +/// +/// +/// Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open). +/// Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase. +/// +/// +/// If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available. +/// To prevent that, synonyms sets that are used in analyzers can't be deleted. +/// A delete request in this case will return a 400 response code. +/// +/// +/// To remove a synonyms set, you must first remove all indices that contain analyzers using it. +/// You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data. +/// Once finished, you can delete the index. +/// When the synonyms set is not used in analyzers, you will be able to delete it. +/// /// public sealed partial class DeleteSynonymRequest : PlainRequest { @@ -58,6 +80,28 @@ public DeleteSynonymRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.R /// /// Delete a synonym set. /// +/// +/// You can only delete a synonyms set that is not in use by any index analyzer. +/// +/// +/// Synonyms sets can be used in synonym graph token filters and synonym token filters. +/// These synonym filters can be used as part of search analyzers. +/// +/// +/// Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open). +/// Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase. +/// +/// +/// If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available. +/// To prevent that, synonyms sets that are used in analyzers can't be deleted. +/// A delete request in this case will return a 400 response code. +/// +/// +/// To remove a synonyms set, you must first remove all indices that contain analyzers using it. +/// You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data. +/// Once finished, you can delete the index. +/// When the synonyms set is not used in analyzers, you will be able to delete it. +/// /// public sealed partial class DeleteSynonymRequestDescriptor : RequestDescriptor, DeleteSynonymRequestParameters> { @@ -90,6 +134,28 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o /// /// Delete a synonym set. /// +/// +/// You can only delete a synonyms set that is not in use by any index analyzer. +/// +/// +/// Synonyms sets can be used in synonym graph token filters and synonym token filters. +/// These synonym filters can be used as part of search analyzers. +/// +/// +/// Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open). +/// Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase. +/// +/// +/// If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available. +/// To prevent that, synonyms sets that are used in analyzers can't be deleted. +/// A delete request in this case will return a 400 response code. +/// +/// +/// To remove a synonyms set, you must first remove all indices that contain analyzers using it. +/// You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data. +/// Once finished, you can delete the index. +/// When the synonyms set is not used in analyzers, you will be able to delete it. +/// /// public sealed partial class DeleteSynonymRequestDescriptor : RequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/DeleteSynonymRuleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/DeleteSynonymRuleResponse.g.cs index 7a128cafa53..433948244ec 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/DeleteSynonymRuleResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/DeleteSynonymRuleResponse.g.cs @@ -31,7 +31,7 @@ public sealed partial class DeleteSynonymRuleResponse : ElasticsearchResponse /// /// /// Updating synonyms in a synonym set reloads the associated analyzers. - /// This is the analyzers reloading result + /// This information is the analyzers reloading result. /// /// [JsonInclude, JsonPropertyName("reload_analyzers_details")] @@ -39,7 +39,7 @@ public sealed partial class DeleteSynonymRuleResponse : ElasticsearchResponse /// /// - /// Update operation result + /// The update operation result. /// /// [JsonInclude, JsonPropertyName("result")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymRequest.g.cs index 4a03450e469..1a1c2913a29 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymRequest.g.cs @@ -34,14 +34,14 @@ public sealed partial class GetSynonymRequestParameters : RequestParameters { /// /// - /// Starting offset for query rules to be retrieved + /// The starting offset for query rules to retrieve. /// /// public int? From { get => Q("from"); set => Q("from", value); } /// /// - /// specifies a max number of query rules to retrieve + /// The max number of query rules to retrieve. /// /// public int? Size { get => Q("size"); set => Q("size", value); } @@ -68,7 +68,7 @@ public GetSynonymRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Requ /// /// - /// Starting offset for query rules to be retrieved + /// The starting offset for query rules to retrieve. /// /// [JsonIgnore] @@ -76,7 +76,7 @@ public GetSynonymRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Requ /// /// - /// specifies a max number of query rules to retrieve + /// The max number of query rules to retrieve. /// /// [JsonIgnore] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymResponse.g.cs index e61b17766d2..b60eca5b7fc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymResponse.g.cs @@ -28,8 +28,19 @@ namespace Elastic.Clients.Elasticsearch.Synonyms; public sealed partial class GetSynonymResponse : ElasticsearchResponse { + /// + /// + /// The total number of synonyms rules that the synonyms set contains. + /// + /// [JsonInclude, JsonPropertyName("count")] public int Count { get; init; } + + /// + /// + /// Synonym rule details. + /// + /// [JsonInclude, JsonPropertyName("synonyms_set")] public IReadOnlyCollection SynonymsSet { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymsSetsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymsSetsRequest.g.cs index ff263268dcd..0904230c63f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymsSetsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymsSetsRequest.g.cs @@ -34,14 +34,14 @@ public sealed partial class GetSynonymsSetsRequestParameters : RequestParameters { /// /// - /// Starting offset + /// The starting offset for synonyms sets to retrieve. /// /// public int? From { get => Q("from"); set => Q("from", value); } /// /// - /// specifies a max number of results to get + /// The maximum number of synonyms sets to retrieve. /// /// public int? Size { get => Q("size"); set => Q("size", value); } @@ -65,7 +65,7 @@ public sealed partial class GetSynonymsSetsRequest : PlainRequest /// - /// Starting offset + /// The starting offset for synonyms sets to retrieve. /// /// [JsonIgnore] @@ -73,7 +73,7 @@ public sealed partial class GetSynonymsSetsRequest : PlainRequest /// - /// specifies a max number of results to get + /// The maximum number of synonyms sets to retrieve. /// /// [JsonIgnore] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymsSetsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymsSetsResponse.g.cs index 62143e3725b..a076a0a397c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymsSetsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymsSetsResponse.g.cs @@ -28,8 +28,19 @@ namespace Elastic.Clients.Elasticsearch.Synonyms; public sealed partial class GetSynonymsSetsResponse : ElasticsearchResponse { + /// + /// + /// The total number of synonyms sets defined. + /// + /// [JsonInclude, JsonPropertyName("count")] public int Count { get; init; } + + /// + /// + /// The identifier and total number of defined synonym rules for each synonyms set. + /// + /// [JsonInclude, JsonPropertyName("results")] public IReadOnlyCollection Results { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/PutSynonymRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/PutSynonymRequest.g.cs index ebde087aa42..ce973aee8d6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/PutSynonymRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/PutSynonymRequest.g.cs @@ -40,6 +40,10 @@ public sealed partial class PutSynonymRequestParameters : RequestParameters /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. /// If you need to manage more synonym rules, you can create multiple synonym sets. /// +/// +/// When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. +/// This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. +/// /// public sealed partial class PutSynonymRequest : PlainRequest { @@ -57,7 +61,7 @@ public PutSynonymRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Requ /// /// - /// The synonym set information to update + /// The synonym rules definitions for the synonyms set. /// /// [JsonInclude, JsonPropertyName("synonyms_set")] @@ -71,6 +75,10 @@ public PutSynonymRequest(Elastic.Clients.Elasticsearch.Id id) : base(r => r.Requ /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. /// If you need to manage more synonym rules, you can create multiple synonym sets. /// +/// +/// When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. +/// This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. +/// /// public sealed partial class PutSynonymRequestDescriptor : RequestDescriptor, PutSynonymRequestParameters> { @@ -101,7 +109,7 @@ public PutSynonymRequestDescriptor Id(Elastic.Clients.Elasticsearch.I /// /// - /// The synonym set information to update + /// The synonym rules definitions for the synonyms set. /// /// public PutSynonymRequestDescriptor SynonymsSet(ICollection synonymsSet) @@ -182,6 +190,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. /// If you need to manage more synonym rules, you can create multiple synonym sets. /// +/// +/// When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. +/// This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. +/// /// public sealed partial class PutSynonymRequestDescriptor : RequestDescriptor { @@ -212,7 +224,7 @@ public PutSynonymRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id) /// /// - /// The synonym set information to update + /// The synonym rules definitions for the synonyms set. /// /// public PutSynonymRequestDescriptor SynonymsSet(ICollection synonymsSet) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/PutSynonymRuleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/PutSynonymRuleRequest.g.cs index 30b670af3d5..21e739027ad 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/PutSynonymRuleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/PutSynonymRuleRequest.g.cs @@ -39,6 +39,12 @@ public sealed partial class PutSynonymRuleRequestParameters : RequestParameters /// Create or update a synonym rule. /// Create or update a synonym rule in a synonym set. /// +/// +/// If any of the synonym rules included is invalid, the API returns an error. +/// +/// +/// When you update a synonym rule, all analyzers using the synonyms set will be reloaded automatically to reflect the new rule. +/// /// public sealed partial class PutSynonymRuleRequest : PlainRequest { @@ -54,6 +60,11 @@ public PutSynonymRuleRequest(Elastic.Clients.Elasticsearch.Id setId, Elastic.Cli internal override string OperationName => "synonyms.put_synonym_rule"; + /// + /// + /// The synonym rule information definition, which must be in Solr format. + /// + /// [JsonInclude, JsonPropertyName("synonyms")] public string Synonyms { get; set; } } @@ -63,6 +74,12 @@ public PutSynonymRuleRequest(Elastic.Clients.Elasticsearch.Id setId, Elastic.Cli /// Create or update a synonym rule. /// Create or update a synonym rule in a synonym set. /// +/// +/// If any of the synonym rules included is invalid, the API returns an error. +/// +/// +/// When you update a synonym rule, all analyzers using the synonyms set will be reloaded automatically to reflect the new rule. +/// /// public sealed partial class PutSynonymRuleRequestDescriptor : RequestDescriptor { @@ -94,6 +111,11 @@ public PutSynonymRuleRequestDescriptor SetId(Elastic.Clients.Elasticsearch.Id se private string SynonymsValue { get; set; } + /// + /// + /// The synonym rule information definition, which must be in Solr format. + /// + /// public PutSynonymRuleRequestDescriptor Synonyms(string synonyms) { SynonymsValue = synonyms; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/PutSynonymRuleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/PutSynonymRuleResponse.g.cs index 652aebc8333..f539cd6fe61 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/PutSynonymRuleResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/PutSynonymRuleResponse.g.cs @@ -31,7 +31,7 @@ public sealed partial class PutSynonymRuleResponse : ElasticsearchResponse /// /// /// Updating synonyms in a synonym set reloads the associated analyzers. - /// This is the analyzers reloading result + /// This information is the analyzers reloading result. /// /// [JsonInclude, JsonPropertyName("reload_analyzers_details")] @@ -39,7 +39,7 @@ public sealed partial class PutSynonymRuleResponse : ElasticsearchResponse /// /// - /// Update operation result + /// The update operation result. /// /// [JsonInclude, JsonPropertyName("result")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/CancelRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/CancelRequest.g.cs index ecf9f2c38c1..efeb0a68d20 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/CancelRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/CancelRequest.g.cs @@ -34,28 +34,28 @@ public sealed partial class CancelRequestParameters : RequestParameters { /// /// - /// Comma-separated list or wildcard expression of actions used to limit the request. + /// A comma-separated list or wildcard expression of actions that is used to limit the request. /// /// public ICollection? Actions { get => Q?>("actions"); set => Q("actions", value); } /// /// - /// Comma-separated list of node IDs or names used to limit the request. + /// A comma-separated list of node IDs or names that is used to limit the request. /// /// public ICollection? Nodes { get => Q?>("nodes"); set => Q("nodes", value); } /// /// - /// Parent task ID used to limit the tasks. + /// A parent task ID that is used to limit the tasks. /// /// public string? ParentTaskId { get => Q("parent_task_id"); set => Q("parent_task_id", value); } /// /// - /// Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false + /// If true, the request blocks until all found tasks are complete. /// /// public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } @@ -64,6 +64,12 @@ public sealed partial class CancelRequestParameters : RequestParameters /// /// /// Cancel a task. +/// +/// +/// WARNING: The task management API is new and should still be considered a beta feature. +/// The API may change in ways that are not backwards compatible. +/// +/// /// A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. /// It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. /// The get task information API will continue to list these cancelled tasks until they complete. @@ -94,7 +100,7 @@ public CancelRequest(Elastic.Clients.Elasticsearch.TaskId? taskId) : base(r => r /// /// - /// Comma-separated list or wildcard expression of actions used to limit the request. + /// A comma-separated list or wildcard expression of actions that is used to limit the request. /// /// [JsonIgnore] @@ -102,7 +108,7 @@ public CancelRequest(Elastic.Clients.Elasticsearch.TaskId? taskId) : base(r => r /// /// - /// Comma-separated list of node IDs or names used to limit the request. + /// A comma-separated list of node IDs or names that is used to limit the request. /// /// [JsonIgnore] @@ -110,7 +116,7 @@ public CancelRequest(Elastic.Clients.Elasticsearch.TaskId? taskId) : base(r => r /// /// - /// Parent task ID used to limit the tasks. + /// A parent task ID that is used to limit the tasks. /// /// [JsonIgnore] @@ -118,7 +124,7 @@ public CancelRequest(Elastic.Clients.Elasticsearch.TaskId? taskId) : base(r => r /// /// - /// Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false + /// If true, the request blocks until all found tasks are complete. /// /// [JsonIgnore] @@ -128,6 +134,12 @@ public CancelRequest(Elastic.Clients.Elasticsearch.TaskId? taskId) : base(r => r /// /// /// Cancel a task. +/// +/// +/// WARNING: The task management API is new and should still be considered a beta feature. +/// The API may change in ways that are not backwards compatible. +/// +/// /// A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. /// It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. /// The get task information API will continue to list these cancelled tasks until they complete. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/GetTasksRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/GetTasksRequest.g.cs index 543a2fadcd0..b3f67333a91 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/GetTasksRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/GetTasksRequest.g.cs @@ -34,7 +34,7 @@ public sealed partial class GetTasksRequestParameters : RequestParameters { /// /// - /// 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. /// /// @@ -53,6 +53,13 @@ public sealed partial class GetTasksRequestParameters : RequestParameters /// Get task information. /// Get information about a task currently running in the cluster. /// +/// +/// WARNING: The task management API is new and should still be considered a beta feature. +/// The API may change in ways that are not backwards compatible. +/// +/// +/// If the task identifier is not found, a 404 response code indicates that there are no resources that match the request. +/// /// public sealed partial class GetTasksRequest : PlainRequest { @@ -70,7 +77,7 @@ public GetTasksRequest(Elastic.Clients.Elasticsearch.Id taskId) : 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. /// /// @@ -91,6 +98,13 @@ public GetTasksRequest(Elastic.Clients.Elasticsearch.Id taskId) : base(r => r.Re /// Get task information. /// Get information about a task currently running in the cluster. /// +/// +/// WARNING: The task management API is new and should still be considered a beta feature. +/// The API may change in ways that are not backwards compatible. +/// +/// +/// If the task identifier is not found, a 404 response code indicates that there are no resources that match the request. +/// /// public sealed partial class GetTasksRequestDescriptor : RequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/ListRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/ListRequest.g.cs index f20af93fc1b..257c676096f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/ListRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/ListRequest.g.cs @@ -34,14 +34,15 @@ public sealed partial class ListRequestParameters : RequestParameters { /// /// - /// Comma-separated list or wildcard expression of actions used to limit the request. + /// A comma-separated list or wildcard expression of actions used to limit the request. + /// For example, you can use cluser:* to retrieve all cluster-related tasks. /// /// public ICollection? Actions { get => Q?>("actions"); set => Q("actions", value); } /// /// - /// If true, the response includes detailed information about shard recoveries. + /// If true, the response includes detailed information about the running tasks. /// This information is useful to distinguish tasks from each other but is more costly to run. /// /// @@ -49,35 +50,41 @@ public sealed partial class ListRequestParameters : RequestParameters /// /// - /// Key used to group tasks in the response. + /// A key that is used to group tasks in the response. + /// The task lists can be grouped either by nodes or by parent tasks. /// /// public Elastic.Clients.Elasticsearch.Tasks.GroupBy? GroupBy { get => Q("group_by"); set => Q("group_by", 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. + /// 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. /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } /// /// - /// Comma-separated list of node IDs or names used to limit returned information. + /// A comma-separated list of node IDs or names that is used to limit the returned information. /// /// public Elastic.Clients.Elasticsearch.NodeIds? Nodes { get => Q("nodes"); set => Q("nodes", value); } /// /// - /// Parent task ID used to limit returned information. To return all tasks, omit this parameter or use a value of -1. + /// A parent task identifier that is used to limit returned information. + /// To return all tasks, omit this parameter or use a value of -1. + /// If the parent task is not found, the API does not return a 404 response code. /// /// public Elastic.Clients.Elasticsearch.Id? ParentTaskId { get => Q("parent_task_id"); set => Q("parent_task_id", value); } /// /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + /// The period to wait for each node to respond. + /// If a node does not respond before its timeout expires, the response does not include its information. + /// However, timed out nodes are included in the node_failures property. /// /// public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } @@ -95,6 +102,67 @@ public sealed partial class ListRequestParameters : RequestParameters /// Get all tasks. /// Get information about the tasks currently running on one or more nodes in the cluster. /// +/// +/// WARNING: The task management API is new and should still be considered a beta feature. +/// The API may change in ways that are not backwards compatible. +/// +/// +/// Identifying running tasks +/// +/// +/// The X-Opaque-Id header, when provided on the HTTP request header, is going to be returned as a header in the response as well as in the headers field for in the task information. +/// This enables you to track certain calls or associate certain tasks with the client that started them. +/// For example: +/// +/// +/// curl -i -H "X-Opaque-Id: 123456" "http://localhost:9200/_tasks?group_by=parents" +/// +/// +/// The API returns the following result: +/// +/// +/// HTTP/1.1 200 OK +/// X-Opaque-Id: 123456 +/// content-type: application/json; charset=UTF-8 +/// content-length: 831 +/// +/// { +/// "tasks" : { +/// "u5lcZHqcQhu-rUoFaqDphA:45" : { +/// "node" : "u5lcZHqcQhu-rUoFaqDphA", +/// "id" : 45, +/// "type" : "transport", +/// "action" : "cluster:monitor/tasks/lists", +/// "start_time_in_millis" : 1513823752749, +/// "running_time_in_nanos" : 293139, +/// "cancellable" : false, +/// "headers" : { +/// "X-Opaque-Id" : "123456" +/// }, +/// "children" : [ +/// { +/// "node" : "u5lcZHqcQhu-rUoFaqDphA", +/// "id" : 46, +/// "type" : "direct", +/// "action" : "cluster:monitor/tasks/lists[n]", +/// "start_time_in_millis" : 1513823752750, +/// "running_time_in_nanos" : 92133, +/// "cancellable" : false, +/// "parent_task_id" : "u5lcZHqcQhu-rUoFaqDphA:45", +/// "headers" : { +/// "X-Opaque-Id" : "123456" +/// } +/// } +/// ] +/// } +/// } +/// } +/// +/// +/// In this example, X-Opaque-Id: 123456 is the ID as a part of the response header. +/// The X-Opaque-Id in the task headers is the ID for the task that was initiated by the REST request. +/// The X-Opaque-Id in the children headers is the child task of the task that was initiated by the REST request. +/// /// public sealed partial class ListRequest : PlainRequest { @@ -108,7 +176,8 @@ public sealed partial class ListRequest : PlainRequest /// /// - /// Comma-separated list or wildcard expression of actions used to limit the request. + /// A comma-separated list or wildcard expression of actions used to limit the request. + /// For example, you can use cluser:* to retrieve all cluster-related tasks. /// /// [JsonIgnore] @@ -116,7 +185,7 @@ public sealed partial class ListRequest : PlainRequest /// /// - /// If true, the response includes detailed information about shard recoveries. + /// If true, the response includes detailed information about the running tasks. /// This information is useful to distinguish tasks from each other but is more costly to run. /// /// @@ -125,7 +194,8 @@ public sealed partial class ListRequest : PlainRequest /// /// - /// Key used to group tasks in the response. + /// A key that is used to group tasks in the response. + /// The task lists can be grouped either by nodes or by parent tasks. /// /// [JsonIgnore] @@ -133,7 +203,8 @@ public sealed partial class ListRequest : PlainRequest /// /// - /// 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. + /// 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. /// /// [JsonIgnore] @@ -141,7 +212,7 @@ public sealed partial class ListRequest : PlainRequest /// /// - /// Comma-separated list of node IDs or names used to limit returned information. + /// A comma-separated list of node IDs or names that is used to limit the returned information. /// /// [JsonIgnore] @@ -149,7 +220,9 @@ public sealed partial class ListRequest : PlainRequest /// /// - /// Parent task ID used to limit returned information. To return all tasks, omit this parameter or use a value of -1. + /// A parent task identifier that is used to limit returned information. + /// To return all tasks, omit this parameter or use a value of -1. + /// If the parent task is not found, the API does not return a 404 response code. /// /// [JsonIgnore] @@ -157,7 +230,9 @@ public sealed partial class ListRequest : PlainRequest /// /// - /// Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + /// The period to wait for each node to respond. + /// If a node does not respond before its timeout expires, the response does not include its information. + /// However, timed out nodes are included in the node_failures property. /// /// [JsonIgnore] @@ -177,6 +252,67 @@ public sealed partial class ListRequest : PlainRequest /// Get all tasks. /// Get information about the tasks currently running on one or more nodes in the cluster. /// +/// +/// WARNING: The task management API is new and should still be considered a beta feature. +/// The API may change in ways that are not backwards compatible. +/// +/// +/// Identifying running tasks +/// +/// +/// The X-Opaque-Id header, when provided on the HTTP request header, is going to be returned as a header in the response as well as in the headers field for in the task information. +/// This enables you to track certain calls or associate certain tasks with the client that started them. +/// For example: +/// +/// +/// curl -i -H "X-Opaque-Id: 123456" "http://localhost:9200/_tasks?group_by=parents" +/// +/// +/// The API returns the following result: +/// +/// +/// HTTP/1.1 200 OK +/// X-Opaque-Id: 123456 +/// content-type: application/json; charset=UTF-8 +/// content-length: 831 +/// +/// { +/// "tasks" : { +/// "u5lcZHqcQhu-rUoFaqDphA:45" : { +/// "node" : "u5lcZHqcQhu-rUoFaqDphA", +/// "id" : 45, +/// "type" : "transport", +/// "action" : "cluster:monitor/tasks/lists", +/// "start_time_in_millis" : 1513823752749, +/// "running_time_in_nanos" : 293139, +/// "cancellable" : false, +/// "headers" : { +/// "X-Opaque-Id" : "123456" +/// }, +/// "children" : [ +/// { +/// "node" : "u5lcZHqcQhu-rUoFaqDphA", +/// "id" : 46, +/// "type" : "direct", +/// "action" : "cluster:monitor/tasks/lists[n]", +/// "start_time_in_millis" : 1513823752750, +/// "running_time_in_nanos" : 92133, +/// "cancellable" : false, +/// "parent_task_id" : "u5lcZHqcQhu-rUoFaqDphA:45", +/// "headers" : { +/// "X-Opaque-Id" : "123456" +/// } +/// } +/// ] +/// } +/// } +/// } +/// +/// +/// In this example, X-Opaque-Id: 123456 is the ID as a part of the response header. +/// The X-Opaque-Id in the task headers is the ID for the task that was initiated by the REST request. +/// The X-Opaque-Id in the children headers is the child task of the task that was initiated by the REST request. +/// /// public sealed partial class ListRequestDescriptor : RequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermVectorsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermVectorsRequest.g.cs index f9052ff3303..9b7d2037c92 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermVectorsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermVectorsRequest.g.cs @@ -34,16 +34,33 @@ public sealed partial class TermVectorsRequestParameters : RequestParameters { /// /// - /// 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); } /// /// - /// If true, the response includes the document count, sum of document frequencies, and sum of total term frequencies. + /// If true, the response includes: /// + /// + /// + /// + /// The document count (how many documents contain this field). + /// + /// + /// + /// + /// The sum of document frequencies (the sum of document frequencies for all terms in this field). + /// + /// + /// + /// + /// The sum of total term frequencies (the sum of total term frequencies of each term in this field). + /// + /// + /// /// public bool? FieldStatistics { get => Q("field_statistics"); set => Q("field_statistics", value); } @@ -70,8 +87,8 @@ public sealed partial class TermVectorsRequestParameters : 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. + /// It is random by default. /// /// public string? Preference { get => Q("preference"); set => Q("preference", value); } @@ -85,14 +102,29 @@ public sealed partial class TermVectorsRequestParameters : 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); } /// /// - /// If true, the response includes term frequency and document frequency. + /// If true, the response includes: + /// + /// + /// + /// + /// The total term frequency (how often a term occurs in all documents). + /// + /// + /// + /// + /// The document frequency (the number of documents containing the current term). + /// + /// + /// + /// + /// By default these values are not returned since term statistics can have a serious performance impact. /// /// public bool? TermStatistics { get => Q("term_statistics"); set => Q("term_statistics", value); } @@ -106,7 +138,7 @@ public sealed partial class TermVectorsRequestParameters : RequestParameters /// /// - /// Specific version type. + /// The version type. /// /// public Elastic.Clients.Elasticsearch.VersionType? VersionType { get => Q("version_type"); set => Q("version_type", value); } @@ -119,6 +151,69 @@ public sealed partial class TermVectorsRequestParameters : RequestParameters /// /// Get information and statistics about terms in the fields of a particular document. /// +/// +/// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. +/// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. +/// For example: +/// +/// +/// GET /my-index-000001/_termvectors/1?fields=message +/// +/// +/// Fields can be specified using wildcards, similar to the multi match query. +/// +/// +/// Term vectors are real-time by default, not near real-time. +/// This can be changed by setting realtime parameter to false. +/// +/// +/// You can request three types of values: term information, term statistics, and field statistics. +/// By default, all term information and field statistics are returned for all fields but term statistics are excluded. +/// +/// +/// Term information +/// +/// +/// +/// +/// term frequency in the field (always returned) +/// +/// +/// +/// +/// term positions (positions: true) +/// +/// +/// +/// +/// start and end offsets (offsets: true) +/// +/// +/// +/// +/// term payloads (payloads: true), as base64 encoded bytes +/// +/// +/// +/// +/// If the requested information wasn't stored in the index, it will be computed on the fly if possible. +/// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. +/// +/// +/// warn +/// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. +/// +/// +/// Behaviour +/// +/// +/// The term and field statistics are not accurate. +/// Deleted documents are not taken into account. +/// The information is only retrieved for the shard the requested document resides in. +/// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. +/// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. +/// Use routing only to hit a particular shard. +/// /// public sealed partial class TermVectorsRequest : PlainRequest { @@ -140,8 +235,8 @@ public TermVectorsRequest(Elastic.Clients.Elasticsearch.IndexName index) : base( /// /// - /// 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] @@ -149,8 +244,25 @@ public TermVectorsRequest(Elastic.Clients.Elasticsearch.IndexName index) : base( /// /// - /// If true, the response includes the document count, sum of document frequencies, and sum of total term frequencies. + /// If true, the response includes: /// + /// + /// + /// + /// The document count (how many documents contain this field). + /// + /// + /// + /// + /// The sum of document frequencies (the sum of document frequencies for all terms in this field). + /// + /// + /// + /// + /// The sum of total term frequencies (the sum of total term frequencies of each term in this field). + /// + /// + /// /// [JsonIgnore] public bool? FieldStatistics { get => Q("field_statistics"); set => Q("field_statistics", value); } @@ -181,8 +293,8 @@ public TermVectorsRequest(Elastic.Clients.Elasticsearch.IndexName index) : base( /// /// - /// 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] @@ -198,7 +310,7 @@ public TermVectorsRequest(Elastic.Clients.Elasticsearch.IndexName index) : base( /// /// - /// Custom value used to route operations to a specific shard. + /// A custom value that is used to route operations to a specific shard. /// /// [JsonIgnore] @@ -206,7 +318,22 @@ public TermVectorsRequest(Elastic.Clients.Elasticsearch.IndexName index) : base( /// /// - /// If true, the response includes term frequency and document frequency. + /// If true, the response includes: + /// + /// + /// + /// + /// The total term frequency (how often a term occurs in all documents). + /// + /// + /// + /// + /// The document frequency (the number of documents containing the current term). + /// + /// + /// + /// + /// By default these values are not returned since term statistics can have a serious performance impact. /// /// [JsonIgnore] @@ -222,7 +349,7 @@ public TermVectorsRequest(Elastic.Clients.Elasticsearch.IndexName index) : base( /// /// - /// Specific version type. + /// The version type. /// /// [JsonIgnore] @@ -240,6 +367,8 @@ public TermVectorsRequest(Elastic.Clients.Elasticsearch.IndexName index) : base( /// /// /// Filter terms based on their tf-idf scores. + /// This could be useful in order find out a good characteristic vector of a document. + /// This feature works in a similar manner to the second phase of the More Like This Query. /// /// [JsonInclude, JsonPropertyName("filter")] @@ -247,7 +376,9 @@ public TermVectorsRequest(Elastic.Clients.Elasticsearch.IndexName index) : base( /// /// - /// Overrides the default per-field analyzer. + /// Override the default per-field analyzer. + /// This is useful in order to generate term vectors in any fashion, especially when using artificial documents. + /// When providing an analyzer for a field that already stores term vectors, the term vectors will be regenerated. /// /// [JsonInclude, JsonPropertyName("per_field_analyzer")] @@ -261,6 +392,69 @@ public TermVectorsRequest(Elastic.Clients.Elasticsearch.IndexName index) : base( /// /// Get information and statistics about terms in the fields of a particular document. /// +/// +/// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. +/// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. +/// For example: +/// +/// +/// GET /my-index-000001/_termvectors/1?fields=message +/// +/// +/// Fields can be specified using wildcards, similar to the multi match query. +/// +/// +/// Term vectors are real-time by default, not near real-time. +/// This can be changed by setting realtime parameter to false. +/// +/// +/// You can request three types of values: term information, term statistics, and field statistics. +/// By default, all term information and field statistics are returned for all fields but term statistics are excluded. +/// +/// +/// Term information +/// +/// +/// +/// +/// term frequency in the field (always returned) +/// +/// +/// +/// +/// term positions (positions: true) +/// +/// +/// +/// +/// start and end offsets (offsets: true) +/// +/// +/// +/// +/// term payloads (payloads: true), as base64 encoded bytes +/// +/// +/// +/// +/// If the requested information wasn't stored in the index, it will be computed on the fly if possible. +/// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. +/// +/// +/// warn +/// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. +/// +/// +/// Behaviour +/// +/// +/// The term and field statistics are not accurate. +/// Deleted documents are not taken into account. +/// The information is only retrieved for the shard the requested document resides in. +/// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. +/// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. +/// Use routing only to hit a particular shard. +/// /// public sealed partial class TermVectorsRequestDescriptor : RequestDescriptor, TermVectorsRequestParameters> { @@ -342,6 +536,8 @@ public TermVectorsRequestDescriptor Doc(TDocument? doc) /// /// /// Filter terms based on their tf-idf scores. + /// This could be useful in order find out a good characteristic vector of a document. + /// This feature works in a similar manner to the second phase of the More Like This Query. /// /// public TermVectorsRequestDescriptor Filter(Elastic.Clients.Elasticsearch.Core.TermVectors.Filter? filter) @@ -370,7 +566,9 @@ public TermVectorsRequestDescriptor Filter(Action /// - /// Overrides the default per-field analyzer. + /// Override the default per-field analyzer. + /// This is useful in order to generate term vectors in any fashion, especially when using artificial documents. + /// When providing an analyzer for a field that already stores term vectors, the term vectors will be regenerated. /// /// public TermVectorsRequestDescriptor PerFieldAnalyzer(Func, FluentDictionary> selector) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs index 60b90b70370..6e0014e722a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs @@ -40,14 +40,11 @@ public sealed partial class TermsEnumRequestParameters : RequestParameters /// /// /// Discover terms that match a partial string in an index. -/// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. +/// This API is designed for low-latency look-ups used in auto-complete scenarios. /// /// -/// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. -/// This can occur due to a few reasons, such as a request timeout or a node error. -/// -/// -/// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. +/// info +/// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. /// /// public sealed partial class TermsEnumRequest : PlainRequest @@ -66,7 +63,7 @@ public TermsEnumRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r /// /// - /// When true the provided search string is matched against index terms without case sensitivity. + /// When true, the provided search string is matched against index terms without case sensitivity. /// /// [JsonInclude, JsonPropertyName("case_insensitive")] @@ -82,17 +79,24 @@ public TermsEnumRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r /// /// - /// Allows to filter an index shard if the provided query rewrites to match_none. + /// Filter an index shard if the provided query rewrites to match_none. /// /// [JsonInclude, JsonPropertyName("index_filter")] public Elastic.Clients.Elasticsearch.QueryDsl.Query? IndexFilter { get; set; } + + /// + /// + /// The string after which terms in the index should be returned. + /// It allows for a form of pagination if the last result from one request is passed as the search_after parameter for a subsequent request. + /// + /// [JsonInclude, JsonPropertyName("search_after")] public string? SearchAfter { get; set; } /// /// - /// How many matching terms to return. + /// The number of matching terms to return. /// /// [JsonInclude, JsonPropertyName("size")] @@ -100,7 +104,12 @@ public TermsEnumRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r /// /// - /// The string after which terms in the index should be returned. Allows for a form of pagination if the last result from one request is passed as the search_after parameter for a subsequent request. + /// The string to match at the start of indexed terms. + /// If it is not provided, all terms in the field are considered. + /// + /// + /// info + /// The prefix string cannot be larger than the largest possible keyword value, which is Lucene's term byte-length limit of 32766. /// /// [JsonInclude, JsonPropertyName("string")] @@ -108,7 +117,8 @@ public TermsEnumRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r /// /// - /// The maximum length of time to spend collecting results. Defaults to "1s" (one second). If the timeout is exceeded the complete flag set to false in the response and the results may be partial or empty. + /// The maximum length of time to spend collecting results. + /// If the timeout is exceeded the complete flag set to false in the response and the results may be partial or empty. /// /// [JsonInclude, JsonPropertyName("timeout")] @@ -121,14 +131,11 @@ public TermsEnumRequest(Elastic.Clients.Elasticsearch.IndexName index) : base(r /// /// /// Discover terms that match a partial string in an index. -/// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. -/// -/// -/// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. -/// This can occur due to a few reasons, such as a request timeout or a node error. +/// This API is designed for low-latency look-ups used in auto-complete scenarios. /// /// -/// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. +/// info +/// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. /// /// public sealed partial class TermsEnumRequestDescriptor : RequestDescriptor, TermsEnumRequestParameters> @@ -169,7 +176,7 @@ public TermsEnumRequestDescriptor Index(Elastic.Clients.Elasticsearch /// /// - /// When true the provided search string is matched against index terms without case sensitivity. + /// When true, the provided search string is matched against index terms without case sensitivity. /// /// public TermsEnumRequestDescriptor CaseInsensitive(bool? caseInsensitive = true) @@ -213,7 +220,7 @@ public TermsEnumRequestDescriptor Field(Expression /// - /// Allows to filter an index shard if the provided query rewrites to match_none. + /// Filter an index shard if the provided query rewrites to match_none. /// /// public TermsEnumRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? indexFilter) @@ -240,6 +247,12 @@ public TermsEnumRequestDescriptor IndexFilter(Action + /// + /// The string after which terms in the index should be returned. + /// It allows for a form of pagination if the last result from one request is passed as the search_after parameter for a subsequent request. + /// + /// public TermsEnumRequestDescriptor SearchAfter(string? searchAfter) { SearchAfterValue = searchAfter; @@ -248,7 +261,7 @@ public TermsEnumRequestDescriptor SearchAfter(string? searchAfter) /// /// - /// How many matching terms to return. + /// The number of matching terms to return. /// /// public TermsEnumRequestDescriptor Size(int? size) @@ -259,7 +272,12 @@ public TermsEnumRequestDescriptor Size(int? size) /// /// - /// The string after which terms in the index should be returned. Allows for a form of pagination if the last result from one request is passed as the search_after parameter for a subsequent request. + /// The string to match at the start of indexed terms. + /// If it is not provided, all terms in the field are considered. + /// + /// + /// info + /// The prefix string cannot be larger than the largest possible keyword value, which is Lucene's term byte-length limit of 32766. /// /// public TermsEnumRequestDescriptor String(string? value) @@ -270,7 +288,8 @@ public TermsEnumRequestDescriptor String(string? value) /// /// - /// The maximum length of time to spend collecting results. Defaults to "1s" (one second). If the timeout is exceeded the complete flag set to false in the response and the results may be partial or empty. + /// The maximum length of time to spend collecting results. + /// If the timeout is exceeded the complete flag set to false in the response and the results may be partial or empty. /// /// public TermsEnumRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) @@ -340,14 +359,11 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o /// /// /// Discover terms that match a partial string in an index. -/// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. -/// -/// -/// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. -/// This can occur due to a few reasons, such as a request timeout or a node error. +/// This API is designed for low-latency look-ups used in auto-complete scenarios. /// /// -/// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. +/// info +/// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. /// /// public sealed partial class TermsEnumRequestDescriptor : RequestDescriptor @@ -384,7 +400,7 @@ public TermsEnumRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName /// /// - /// When true the provided search string is matched against index terms without case sensitivity. + /// When true, the provided search string is matched against index terms without case sensitivity. /// /// public TermsEnumRequestDescriptor CaseInsensitive(bool? caseInsensitive = true) @@ -428,7 +444,7 @@ public TermsEnumRequestDescriptor Field(Expression /// - /// Allows to filter an index shard if the provided query rewrites to match_none. + /// Filter an index shard if the provided query rewrites to match_none. /// /// public TermsEnumRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? indexFilter) @@ -455,6 +471,12 @@ public TermsEnumRequestDescriptor IndexFilter(Action + /// + /// The string after which terms in the index should be returned. + /// It allows for a form of pagination if the last result from one request is passed as the search_after parameter for a subsequent request. + /// + /// public TermsEnumRequestDescriptor SearchAfter(string? searchAfter) { SearchAfterValue = searchAfter; @@ -463,7 +485,7 @@ public TermsEnumRequestDescriptor SearchAfter(string? searchAfter) /// /// - /// How many matching terms to return. + /// The number of matching terms to return. /// /// public TermsEnumRequestDescriptor Size(int? size) @@ -474,7 +496,12 @@ public TermsEnumRequestDescriptor Size(int? size) /// /// - /// The string after which terms in the index should be returned. Allows for a form of pagination if the last result from one request is passed as the search_after parameter for a subsequent request. + /// The string to match at the start of indexed terms. + /// If it is not provided, all terms in the field are considered. + /// + /// + /// info + /// The prefix string cannot be larger than the largest possible keyword value, which is Lucene's term byte-length limit of 32766. /// /// public TermsEnumRequestDescriptor String(string? value) @@ -485,7 +512,8 @@ public TermsEnumRequestDescriptor String(string? value) /// /// - /// The maximum length of time to spend collecting results. Defaults to "1s" (one second). If the timeout is exceeded the complete flag set to false in the response and the results may be partial or empty. + /// The maximum length of time to spend collecting results. + /// If the timeout is exceeded the complete flag set to false in the response and the results may be partial or empty. /// /// public TermsEnumRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumResponse.g.cs index 0c18094311e..f09e804b78d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumResponse.g.cs @@ -28,6 +28,12 @@ namespace Elastic.Clients.Elasticsearch; public sealed partial class TermsEnumResponse : ElasticsearchResponse { + /// + /// + /// If false, the returned terms set may be incomplete and should be treated as approximate. + /// This can occur due to a few reasons, such as a request timeout or a node error. + /// + /// [JsonInclude, JsonPropertyName("complete")] public bool Complete { get; init; } [JsonInclude, JsonPropertyName("_shards")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindFieldStructureRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindFieldStructureRequest.g.cs index 0e810f8dd67..2fa590ddda5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindFieldStructureRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindFieldStructureRequest.g.cs @@ -73,7 +73,7 @@ public sealed partial class FindFieldStructureRequestParameters : RequestParamet /// /// - /// If true, the response includes a field named explanation, which is an array of strings that indicate how the structure finder produced its result. + /// If true, the response includes a field named explanation, which is an array of strings that indicate how the structure finder produced its result. /// /// public bool? Explain { get => Q("explain"); set => Q("explain", value); } @@ -126,7 +126,7 @@ public sealed partial class FindFieldStructureRequestParameters : RequestParamet /// /// If the format is delimited, you can specify whether values between delimiters should have whitespace trimmed from them. /// If this parameter is not specified and the delimiter is pipe (|), the default value is true. - /// Otherwise, the default value is false. + /// Otherwise, the default value is false. /// /// public bool? ShouldTrimFields { get => Q("should_trim_fields"); set => Q("should_trim_fields", value); } @@ -285,6 +285,43 @@ public sealed partial class FindFieldStructureRequestParameters : RequestParamet /// Find the structure of a text field. /// Find the structure of a text field in an Elasticsearch index. /// +/// +/// This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch. +/// For example, if you have ingested data into a very simple index that has just @timestamp and message fields, you can use this API to see what common structure exists in the message field. +/// +/// +/// The response from the API contains: +/// +/// +/// +/// +/// Sample messages. +/// +/// +/// +/// +/// Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. +/// +/// +/// +/// +/// Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. +/// +/// +/// +/// +/// Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. +/// +/// +/// +/// +/// All this information can be calculated by the structure finder with no guidance. +/// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. +/// +/// +/// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. +/// It helps determine why the returned structure was chosen. +/// /// public sealed partial class FindFieldStructureRequest : PlainRequest { @@ -341,7 +378,7 @@ public sealed partial class FindFieldStructureRequest : PlainRequest /// - /// If true, the response includes a field named explanation, which is an array of strings that indicate how the structure finder produced its result. + /// If true, the response includes a field named explanation, which is an array of strings that indicate how the structure finder produced its result. /// /// [JsonIgnore] @@ -400,7 +437,7 @@ public sealed partial class FindFieldStructureRequest : PlainRequest /// If the format is delimited, you can specify whether values between delimiters should have whitespace trimmed from them. /// If this parameter is not specified and the delimiter is pipe (|), the default value is true. - /// Otherwise, the default value is false. + /// Otherwise, the default value is false. /// /// [JsonIgnore] @@ -563,6 +600,43 @@ public sealed partial class FindFieldStructureRequest : PlainRequest +/// +/// This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch. +/// For example, if you have ingested data into a very simple index that has just @timestamp and message fields, you can use this API to see what common structure exists in the message field. +/// +/// +/// The response from the API contains: +/// +/// +/// +/// +/// Sample messages. +/// +/// +/// +/// +/// Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. +/// +/// +/// +/// +/// Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. +/// +/// +/// +/// +/// Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. +/// +/// +/// +/// +/// All this information can be calculated by the structure finder with no guidance. +/// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. +/// +/// +/// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. +/// It helps determine why the returned structure was chosen. +/// /// public sealed partial class FindFieldStructureRequestDescriptor : RequestDescriptor, FindFieldStructureRequestParameters> { @@ -605,6 +679,43 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o /// Find the structure of a text field. /// Find the structure of a text field in an Elasticsearch index. /// +/// +/// This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch. +/// For example, if you have ingested data into a very simple index that has just @timestamp and message fields, you can use this API to see what common structure exists in the message field. +/// +/// +/// The response from the API contains: +/// +/// +/// +/// +/// Sample messages. +/// +/// +/// +/// +/// Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. +/// +/// +/// +/// +/// Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. +/// +/// +/// +/// +/// Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. +/// +/// +/// +/// +/// All this information can be calculated by the structure finder with no guidance. +/// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. +/// +/// +/// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. +/// It helps determine why the returned structure was chosen. +/// /// public sealed partial class FindFieldStructureRequestDescriptor : RequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindMessageStructureRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindMessageStructureRequest.g.cs index b50c0cabef5..598446e4b63 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindMessageStructureRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindMessageStructureRequest.g.cs @@ -103,7 +103,7 @@ public sealed partial class FindMessageStructureRequestParameters : RequestParam /// /// If the format is delimited, you can specify whether values between delimiters should have whitespace trimmed from them. /// If this parameter is not specified and the delimiter is pipe (|), the default value is true. - /// Otherwise, the default value is false. + /// Otherwise, the default value is false. /// /// public bool? ShouldTrimFields { get => Q("should_trim_fields"); set => Q("should_trim_fields", value); } @@ -266,6 +266,8 @@ public sealed partial class FindMessageStructureRequestParameters : RequestParam /// /// This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. /// Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process. +/// +/// /// The response from the API contains: /// /// @@ -290,6 +292,10 @@ public sealed partial class FindMessageStructureRequestParameters : RequestParam /// All this information can be calculated by the structure finder with no guidance. /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. /// +/// +/// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. +/// It helps determine why the returned structure was chosen. +/// /// public sealed partial class FindMessageStructureRequest : PlainRequest { @@ -379,7 +385,7 @@ public sealed partial class FindMessageStructureRequest : PlainRequest /// If the format is delimited, you can specify whether values between delimiters should have whitespace trimmed from them. /// If this parameter is not specified and the delimiter is pipe (|), the default value is true. - /// Otherwise, the default value is false. + /// Otherwise, the default value is false. /// /// [JsonIgnore] @@ -554,6 +560,8 @@ public sealed partial class FindMessageStructureRequest : PlainRequest /// This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. /// Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process. +/// +/// /// The response from the API contains: /// /// @@ -578,6 +586,10 @@ public sealed partial class FindMessageStructureRequest : PlainRequest +/// +/// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. +/// It helps determine why the returned structure was chosen. +/// /// public sealed partial class FindMessageStructureRequestDescriptor : RequestDescriptor, FindMessageStructureRequestParameters> { @@ -638,6 +650,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o /// /// This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. /// Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process. +/// +/// /// The response from the API contains: /// /// @@ -662,6 +676,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o /// All this information can be calculated by the structure finder with no guidance. /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. /// +/// +/// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. +/// It helps determine why the returned structure was chosen. +/// /// public sealed partial class FindMessageStructureRequestDescriptor : RequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/TestGrokPatternRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/TestGrokPatternRequest.g.cs index 247d72941e7..a5739c82910 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/TestGrokPatternRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/TestGrokPatternRequest.g.cs @@ -34,7 +34,9 @@ public sealed partial class TestGrokPatternRequestParameters : RequestParameters { /// /// - /// The mode of compatibility with ECS compliant Grok patterns (disabled or v1, default: disabled). + /// The mode of compatibility with ECS compliant Grok patterns. + /// Use this parameter to specify whether to use ECS Grok patterns instead of legacy ones when the structure finder creates a Grok pattern. + /// Valid values are disabled and v1. /// /// public string? EcsCompatibility { get => Q("ecs_compatibility"); set => Q("ecs_compatibility", value); } @@ -59,7 +61,9 @@ public sealed partial class TestGrokPatternRequest : PlainRequest /// - /// The mode of compatibility with ECS compliant Grok patterns (disabled or v1, default: disabled). + /// The mode of compatibility with ECS compliant Grok patterns. + /// Use this parameter to specify whether to use ECS Grok patterns instead of legacy ones when the structure finder creates a Grok pattern. + /// Valid values are disabled and v1. /// /// [JsonIgnore] @@ -67,7 +71,7 @@ public sealed partial class TestGrokPatternRequest : PlainRequest /// - /// Grok pattern to run on the text. + /// The Grok pattern to run on the text. /// /// [JsonInclude, JsonPropertyName("grok_pattern")] @@ -75,7 +79,7 @@ public sealed partial class TestGrokPatternRequest : PlainRequest /// - /// Lines of text to run the Grok pattern on. + /// The lines of text to run the Grok pattern on. /// /// [JsonInclude, JsonPropertyName("text")] @@ -112,7 +116,7 @@ public TestGrokPatternRequestDescriptor() /// /// - /// Grok pattern to run on the text. + /// The Grok pattern to run on the text. /// /// public TestGrokPatternRequestDescriptor GrokPattern(string grokPattern) @@ -123,7 +127,7 @@ public TestGrokPatternRequestDescriptor GrokPattern(string grokPattern) /// /// - /// Lines of text to run the Grok pattern on. + /// The lines of text to run the Grok pattern on. /// /// public TestGrokPatternRequestDescriptor Text(ICollection text) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs index 26842bb705f..62ddddb5ae9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs @@ -43,7 +43,8 @@ public sealed partial class UpdateByQueryRequestParameters : RequestParameters /// /// - /// Analyzer to use for the query string. + /// 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,6 +52,7 @@ public sealed partial class UpdateByQueryRequestParameters : 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); } @@ -58,22 +60,24 @@ public sealed partial class UpdateByQueryRequestParameters : 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. + /// It supports comma-separated values, such as open,hidden. /// Valid values are: all, open, closed, hidden, none. /// /// @@ -96,13 +100,14 @@ public sealed partial class UpdateByQueryRequestParameters : 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); } /// /// - /// 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. /// @@ -111,22 +116,23 @@ public sealed partial class UpdateByQueryRequestParameters : 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. + /// 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); } /// /// - /// If true, Elasticsearch refreshes affected shards to make the operation visible to search. + /// If true, Elasticsearch refreshes affected shards to make the operation visible to search after the request completes. + /// This is different than the update API's refresh parameter, which causes just the shard that received the request to be refreshed. /// /// public bool? Refresh { get => Q("refresh"); set => Q("refresh", value); } @@ -134,6 +140,7 @@ public sealed partial class UpdateByQueryRequestParameters : RequestParameters /// /// /// If true, the request cache is used for this request. + /// It defaults to the index-level setting. /// /// public bool? RequestCache { get => Q("request_cache"); set => Q("request_cache", value); } @@ -147,35 +154,36 @@ public sealed partial class UpdateByQueryRequestParameters : 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. + /// An explicit timeout for each search request. + /// By default, there is no timeout. /// /// public Elastic.Clients.Elasticsearch.Duration? SearchTimeout { get => Q("search_timeout"); set => Q("search_timeout", value); } /// /// - /// The type of the search operation. Available options: query_then_fetch, dfs_query_then_fetch. + /// The type of the search operation. 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); } @@ -196,17 +204,19 @@ public sealed partial class UpdateByQueryRequestParameters : RequestParameters /// /// - /// 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. + /// + /// + /// 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. @@ -216,7 +226,10 @@ public sealed partial class UpdateByQueryRequestParameters : RequestParameters /// /// - /// Period each update request waits for the following operations: dynamic mapping updates, waiting for active shards. + /// The period each update request waits for the following operations: dynamic mapping updates, waiting for active shards. + /// By default, it is one minute. + /// This 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); } @@ -239,6 +252,8 @@ public sealed partial class UpdateByQueryRequestParameters : 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). + /// The timeout parameter controls how long each write request waits for unavailable shards to become available. + /// Both work exactly the way they work in the bulk API. /// /// public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } @@ -246,6 +261,8 @@ public sealed partial class UpdateByQueryRequestParameters : 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 ID that 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}. /// /// public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } @@ -257,6 +274,157 @@ public sealed partial class UpdateByQueryRequestParameters : RequestParameters /// Updates documents that match the specified query. /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. /// +/// +/// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: +/// +/// +/// +/// +/// read +/// +/// +/// +/// +/// index 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 an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. +/// When the versions match, the document is updated and the version number is incremented. +/// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. +/// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. +/// +/// +/// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. +/// +/// +/// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. +/// A bulk update request is performed for each batch of matching documents. +/// Any query or update failures cause the update by query request to fail and the failures are shown in the response. +/// Any update requests that completed successfully still stick, they are not rolled back. +/// +/// +/// Throttling update requests +/// +/// +/// To control the rate at which update by query issues batches of update 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 turn off 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 +/// +/// +/// Update by query supports sliced scroll to parallelize the update process. +/// This can improve efficiency and provide a convenient way to break the request down into smaller parts. +/// +/// +/// Setting slices to auto chooses a reasonable number for most data streams and indices. +/// 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 _update_by_query just automates the manual process of creating 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 point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. +/// +/// +/// +/// +/// 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. +/// +/// +/// +/// +/// Update performance scales linearly across available resources with the number of slices. +/// +/// +/// +/// +/// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. +/// +/// +/// Update the document source +/// +/// +/// Update by query supports scripts to update the document source. +/// As with the update API, you can set ctx.op to change the operation that is performed. +/// +/// +/// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. +/// The update by query operation skips updating the document and increments the noop counter. +/// +/// +/// Set ctx.op = "delete" if your script decides that the document should be deleted. +/// The update by query operation deletes the document and increments the deleted counter. +/// +/// +/// Update by query supports only index, noop, and delete. +/// Setting ctx.op to anything else is an error. +/// Setting any other field in ctx is an error. +/// This API enables you to only modify the source of matching documents; you cannot move them. +/// /// public sealed partial class UpdateByQueryRequest : PlainRequest { @@ -284,7 +452,8 @@ public UpdateByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas /// /// - /// Analyzer to use for the query string. + /// The analyzer to use for the query string. + /// This parameter can be used only when the q query string parameter is specified. /// /// [JsonIgnore] @@ -293,6 +462,7 @@ public UpdateByQueryRequest(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 +471,7 @@ public UpdateByQueryRequest(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 +479,8 @@ public UpdateByQueryRequest(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 +488,9 @@ public UpdateByQueryRequest(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. + /// It supports comma-separated values, such as open,hidden. /// Valid values are: all, open, closed, hidden, none. /// /// @@ -344,6 +516,7 @@ public UpdateByQueryRequest(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] @@ -351,7 +524,7 @@ public UpdateByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas /// /// - /// 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. /// @@ -361,8 +534,8 @@ public UpdateByQueryRequest(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] @@ -370,7 +543,7 @@ public UpdateByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas /// /// - /// Query in the Lucene query string syntax. + /// A query in the Lucene query string syntax. /// /// [JsonIgnore] @@ -378,7 +551,8 @@ public UpdateByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas /// /// - /// If true, Elasticsearch refreshes affected shards to make the operation visible to search. + /// If true, Elasticsearch refreshes affected shards to make the operation visible to search after the request completes. + /// This is different than the update API's refresh parameter, which causes just the shard that received the request to be refreshed. /// /// [JsonIgnore] @@ -387,6 +561,7 @@ public UpdateByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas /// /// /// If true, the request cache is used for this request. + /// It defaults to the index-level setting. /// /// [JsonIgnore] @@ -402,7 +577,7 @@ public UpdateByQueryRequest(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] @@ -410,7 +585,7 @@ public UpdateByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas /// /// - /// Period to retain the search context for scrolling. + /// The period to retain the search context for scrolling. /// /// [JsonIgnore] @@ -418,7 +593,7 @@ public UpdateByQueryRequest(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] @@ -426,7 +601,8 @@ public UpdateByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas /// /// - /// Explicit timeout for each search request. + /// An explicit timeout for each search request. + /// By default, there is no timeout. /// /// [JsonIgnore] @@ -434,7 +610,7 @@ public UpdateByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas /// /// - /// The type of the search operation. Available options: query_then_fetch, dfs_query_then_fetch. + /// The type of the search operation. Available options include query_then_fetch and dfs_query_then_fetch. /// /// [JsonIgnore] @@ -458,7 +634,7 @@ public UpdateByQueryRequest(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] @@ -466,10 +642,12 @@ public UpdateByQueryRequest(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. + /// + /// + /// 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. @@ -480,7 +658,10 @@ public UpdateByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas /// /// - /// Period each update request waits for the following operations: dynamic mapping updates, waiting for active shards. + /// The period each update request waits for the following operations: dynamic mapping updates, waiting for active shards. + /// By default, it is one minute. + /// This guarantees Elasticsearch waits for at least the timeout before failing. + /// The actual wait time could be longer, particularly when multiple waits occur. /// /// [JsonIgnore] @@ -506,6 +687,8 @@ public UpdateByQueryRequest(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). + /// The timeout parameter controls how long each write request waits for unavailable shards to become available. + /// Both work exactly the way they work in the bulk API. /// /// [JsonIgnore] @@ -514,6 +697,8 @@ public UpdateByQueryRequest(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 ID that 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}. /// /// [JsonIgnore] @@ -521,7 +706,7 @@ public UpdateByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas /// /// - /// What to do if update by query hits version conflicts: abort or proceed. + /// The preferred behavior when update by query hits version conflicts: abort or proceed. /// /// [JsonInclude, JsonPropertyName("conflicts")] @@ -537,7 +722,7 @@ public UpdateByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas /// /// - /// Specifies the documents to update using the Query DSL. + /// The documents to update using the Query DSL. /// /// [JsonInclude, JsonPropertyName("query")] @@ -566,6 +751,157 @@ public UpdateByQueryRequest(Elastic.Clients.Elasticsearch.Indices indices) : bas /// Updates documents that match the specified query. /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. /// +/// +/// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: +/// +/// +/// +/// +/// read +/// +/// +/// +/// +/// index 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 an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. +/// When the versions match, the document is updated and the version number is incremented. +/// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. +/// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. +/// +/// +/// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. +/// +/// +/// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. +/// A bulk update request is performed for each batch of matching documents. +/// Any query or update failures cause the update by query request to fail and the failures are shown in the response. +/// Any update requests that completed successfully still stick, they are not rolled back. +/// +/// +/// Throttling update requests +/// +/// +/// To control the rate at which update by query issues batches of update 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 turn off 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 +/// +/// +/// Update by query supports sliced scroll to parallelize the update process. +/// This can improve efficiency and provide a convenient way to break the request down into smaller parts. +/// +/// +/// Setting slices to auto chooses a reasonable number for most data streams and indices. +/// 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 _update_by_query just automates the manual process of creating 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 point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. +/// +/// +/// +/// +/// 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. +/// +/// +/// +/// +/// Update performance scales linearly across available resources with the number of slices. +/// +/// +/// +/// +/// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. +/// +/// +/// Update the document source +/// +/// +/// Update by query supports scripts to update the document source. +/// As with the update API, you can set ctx.op to change the operation that is performed. +/// +/// +/// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. +/// The update by query operation skips updating the document and increments the noop counter. +/// +/// +/// Set ctx.op = "delete" if your script decides that the document should be deleted. +/// The update by query operation deletes the document and increments the deleted counter. +/// +/// +/// Update by query supports only index, noop, and delete. +/// Setting ctx.op to anything else is an error. +/// Setting any other field in ctx is an error. +/// This API enables you to only modify the source of matching documents; you cannot move them. +/// /// public sealed partial class UpdateByQueryRequestDescriptor : RequestDescriptor, UpdateByQueryRequestParameters> { @@ -637,7 +973,7 @@ public UpdateByQueryRequestDescriptor Indices(Elastic.Clients.Elastic /// /// - /// What to do if update by query hits version conflicts: abort or proceed. + /// The preferred behavior when update by query hits version conflicts: abort or proceed. /// /// public UpdateByQueryRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Conflicts? conflicts) @@ -659,7 +995,7 @@ public UpdateByQueryRequestDescriptor MaxDocs(long? maxDocs) /// /// - /// Specifies the documents to update using the Query DSL. + /// The documents to update using the Query DSL. /// /// public UpdateByQueryRequestDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? query) @@ -817,6 +1153,157 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o /// Updates documents that match the specified query. /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. /// +/// +/// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: +/// +/// +/// +/// +/// read +/// +/// +/// +/// +/// index 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 an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. +/// When the versions match, the document is updated and the version number is incremented. +/// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. +/// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. +/// +/// +/// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. +/// +/// +/// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. +/// A bulk update request is performed for each batch of matching documents. +/// Any query or update failures cause the update by query request to fail and the failures are shown in the response. +/// Any update requests that completed successfully still stick, they are not rolled back. +/// +/// +/// Throttling update requests +/// +/// +/// To control the rate at which update by query issues batches of update 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 turn off 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 +/// +/// +/// Update by query supports sliced scroll to parallelize the update process. +/// This can improve efficiency and provide a convenient way to break the request down into smaller parts. +/// +/// +/// Setting slices to auto chooses a reasonable number for most data streams and indices. +/// 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 _update_by_query just automates the manual process of creating 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 point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. +/// +/// +/// +/// +/// 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. +/// +/// +/// +/// +/// Update performance scales linearly across available resources with the number of slices. +/// +/// +/// +/// +/// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. +/// +/// +/// Update the document source +/// +/// +/// Update by query supports scripts to update the document source. +/// As with the update API, you can set ctx.op to change the operation that is performed. +/// +/// +/// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. +/// The update by query operation skips updating the document and increments the noop counter. +/// +/// +/// Set ctx.op = "delete" if your script decides that the document should be deleted. +/// The update by query operation deletes the document and increments the deleted counter. +/// +/// +/// Update by query supports only index, noop, and delete. +/// Setting ctx.op to anything else is an error. +/// Setting any other field in ctx is an error. +/// This API enables you to only modify the source of matching documents; you cannot move them. +/// /// public sealed partial class UpdateByQueryRequestDescriptor : RequestDescriptor { @@ -884,7 +1371,7 @@ public UpdateByQueryRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indi /// /// - /// What to do if update by query hits version conflicts: abort or proceed. + /// The preferred behavior when update by query hits version conflicts: abort or proceed. /// /// public UpdateByQueryRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Conflicts? conflicts) @@ -906,7 +1393,7 @@ public UpdateByQueryRequestDescriptor MaxDocs(long? maxDocs) /// /// - /// Specifies the documents to update using the Query DSL. + /// The documents to update using the Query DSL. /// /// public UpdateByQueryRequestDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? query) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryResponse.g.cs index c08f04aa435..6fe3e3fca59 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryResponse.g.cs @@ -28,36 +28,120 @@ namespace Elastic.Clients.Elasticsearch; public sealed partial class UpdateByQueryResponse : ElasticsearchResponse { + /// + /// + /// The number of scroll responses pulled back by the update 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; } + + /// + /// + /// Array of failures if there were any unrecoverable errors during the process. + /// If this is non-empty then the request ended because of those failures. + /// Update by query is implemented using batches. + /// 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 reindex from ending when version conflicts occur. + /// + /// [JsonInclude, JsonPropertyName("failures")] public IReadOnlyCollection? Failures { get; init; } + + /// + /// + /// The number of documents that were ignored because the script used for the update by query 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 update by query. + /// + /// [JsonInclude, JsonPropertyName("requests_per_second")] public float? RequestsPerSecond { get; init; } + + /// + /// + /// The number of retries attempted by update 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("task")] 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 an _update_by_query response. + /// It only has meaning when using the task API, where it indicates the next time (in milliseconds since epoch) a throttled request will be run again in order to conform to requests_per_second. + /// + /// [JsonInclude, JsonPropertyName("throttled_until_millis")] public long? ThrottledUntilMillis { get; init; } + + /// + /// + /// If true, some requests timed out during the update by query. + /// + /// [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 documents that were successfully updated. + /// + /// [JsonInclude, JsonPropertyName("updated")] public long? Updated { get; init; } + + /// + /// + /// The number of version conflicts that the update 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/UpdateByQueryRethrottleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRethrottleRequest.g.cs index 6ee3ca87ed4..0444bab4be6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRethrottleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRethrottleRequest.g.cs @@ -35,6 +35,7 @@ public sealed partial class UpdateByQueryRethrottleRequestParameters : RequestPa /// /// /// The throttle for this request in sub-requests per second. + /// To turn off throttling, set it to -1. /// /// public float? RequestsPerSecond { get => Q("requests_per_second"); set => Q("requests_per_second", value); } @@ -66,6 +67,7 @@ public UpdateByQueryRethrottleRequest(Elastic.Clients.Elasticsearch.Id taskId) : /// /// /// The throttle for this request in sub-requests per second. + /// To turn off throttling, set it to -1. /// /// [JsonIgnore] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs index 2b7fb9ce352..04e8cf18581 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs @@ -55,52 +55,52 @@ public sealed partial class UpdateRequestParameters : 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. + /// 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); } /// /// - /// If true, the destination must be an index alias. + /// If true, the destination must be an index alias. /// /// public bool? RequireAlias { get => Q("require_alias"); set => Q("require_alias", value); } /// /// - /// Specify how many times should the operation be retried when a conflict occurs. + /// The number of times the operation should be retried when a conflict occurs. /// /// public int? RetryOnConflict { get => Q("retry_on_conflict"); set => Q("retry_on_conflict", 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); } /// /// - /// Specify the source fields you want to exclude. + /// The source fields you want to exclude. /// /// public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } /// /// - /// Specify the source fields you want to retrieve. + /// The source fields you want to retrieve. /// /// public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q("_source_includes"); set => Q("_source_includes", value); } /// /// - /// Period to wait for dynamic mapping updates and active shards. - /// This guarantees Elasticsearch waits for at least the timeout before failing. + /// The period to wait for the following operations: dynamic mapping updates and waiting for active shards. + /// Elasticsearch waits for at least the timeout period before failing. /// The actual wait time could be longer, particularly when multiple waits occur. /// /// @@ -108,9 +108,9 @@ public sealed partial class UpdateRequestParameters : RequestParameters /// /// - /// The number of shard copies that must be active before proceeding with the operations. - /// Set to 'all' or any positive integer up to the total number of shards in the index - /// (number_of_replicas+1). Defaults to 1 meaning the primary shard. + /// The number of copies of each shard 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 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); } @@ -119,7 +119,42 @@ public sealed partial class UpdateRequestParameters : RequestParameters /// /// /// Update a document. -/// Updates a document by running a script or passing a partial document. +/// +/// +/// Update a document by running a script or passing a partial document. +/// +/// +/// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. +/// +/// +/// The script can update, delete, or skip modifying the document. +/// The API also supports passing a partial document, which is merged into the existing document. +/// To fully replace an existing document, use the index API. +/// This operation: +/// +/// +/// +/// +/// Gets the document (collocated with the shard) from the index. +/// +/// +/// +/// +/// Runs the specified script. +/// +/// +/// +/// +/// Indexes the result. +/// +/// +/// +/// +/// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. +/// +/// +/// The _source field must be enabled to use this API. +/// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). /// /// public sealed partial class UpdateRequest : PlainRequest @@ -162,9 +197,9 @@ public UpdateRequest(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. + /// 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] @@ -172,7 +207,7 @@ public UpdateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie /// /// - /// If true, the destination must be an index alias. + /// If true, the destination must be an index alias. /// /// [JsonIgnore] @@ -180,7 +215,7 @@ public UpdateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie /// /// - /// Specify how many times should the operation be retried when a conflict occurs. + /// The number of times the operation should be retried when a conflict occurs. /// /// [JsonIgnore] @@ -188,7 +223,7 @@ public UpdateRequest(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] @@ -196,7 +231,7 @@ public UpdateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie /// /// - /// Specify the source fields you want to exclude. + /// The source fields you want to exclude. /// /// [JsonIgnore] @@ -204,7 +239,7 @@ public UpdateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie /// /// - /// Specify the source fields you want to retrieve. + /// The source fields you want to retrieve. /// /// [JsonIgnore] @@ -212,8 +247,8 @@ public UpdateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie /// /// - /// Period to wait for dynamic mapping updates and active shards. - /// This guarantees Elasticsearch waits for at least the timeout before failing. + /// The period to wait for the following operations: dynamic mapping updates and waiting for active shards. + /// Elasticsearch waits for at least the timeout period before failing. /// The actual wait time could be longer, particularly when multiple waits occur. /// /// @@ -222,9 +257,9 @@ public UpdateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie /// /// - /// The number of shard copies that must be active before proceeding with the operations. - /// Set to 'all' or any positive integer up to the total number of shards in the index - /// (number_of_replicas+1). Defaults to 1 meaning the primary shard. + /// The number of copies of each shard 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 default value of 1 means it waits for each primary shard to be active. /// /// [JsonIgnore] @@ -232,8 +267,7 @@ public UpdateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie /// /// - /// Set to false to disable setting 'result' in the response - /// to 'noop' if no change to the document occurred. + /// If true, the result in the response is set to noop (no operation) when there are no changes to the document. /// /// [JsonInclude, JsonPropertyName("detect_noop")] @@ -242,6 +276,7 @@ public UpdateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie /// /// /// A partial update to an existing document. + /// If both doc and script are specified, doc is ignored. /// /// [JsonInclude, JsonPropertyName("doc")] @@ -250,7 +285,8 @@ public UpdateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie /// /// - /// Set to true to use the contents of 'doc' as the value of 'upsert' + /// If true, use the contents of 'doc' as the value of 'upsert'. + /// NOTE: Using ingest pipelines with doc_as_upsert is not supported. /// /// [JsonInclude, JsonPropertyName("doc_as_upsert")] @@ -258,7 +294,7 @@ public UpdateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie /// /// - /// Script to execute to update the document. + /// The script to run to update the document. /// /// [JsonInclude, JsonPropertyName("script")] @@ -266,7 +302,7 @@ public UpdateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie /// /// - /// Set to true to execute the script whether or not the document exists. + /// If true, run the script whether or not the document exists. /// /// [JsonInclude, JsonPropertyName("scripted_upsert")] @@ -274,8 +310,8 @@ public UpdateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie /// /// - /// Set to false to disable source retrieval. You can also specify a comma-separated - /// list of the fields you want to retrieve. + /// If false, turn off source retrieval. + /// You can also specify a comma-separated list of the fields you want to retrieve. /// /// [JsonInclude, JsonPropertyName("_source")] @@ -283,8 +319,8 @@ public UpdateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie /// /// - /// If the document does not already exist, the contents of 'upsert' are inserted as a - /// new document. If the document exists, the 'script' is executed. + /// If the document does not already exist, the contents of 'upsert' are inserted as a new document. + /// If the document exists, the 'script' is run. /// /// [JsonInclude, JsonPropertyName("upsert")] @@ -295,7 +331,42 @@ public UpdateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie /// /// /// Update a document. -/// Updates a document by running a script or passing a partial document. +/// +/// +/// Update a document by running a script or passing a partial document. +/// +/// +/// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. +/// +/// +/// The script can update, delete, or skip modifying the document. +/// The API also supports passing a partial document, which is merged into the existing document. +/// To fully replace an existing document, use the index API. +/// This operation: +/// +/// +/// +/// +/// Gets the document (collocated with the shard) from the index. +/// +/// +/// +/// +/// Runs the specified script. +/// +/// +/// +/// +/// Indexes the result. +/// +/// +/// +/// +/// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. +/// +/// +/// The _source field must be enabled to use this API. +/// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). /// /// public sealed partial class UpdateRequestDescriptor : RequestDescriptor, UpdateRequestParameters> @@ -366,8 +437,7 @@ public UpdateRequestDescriptor Index(Elastic.Client /// /// - /// Set to false to disable setting 'result' in the response - /// to 'noop' if no change to the document occurred. + /// If true, the result in the response is set to noop (no operation) when there are no changes to the document. /// /// public UpdateRequestDescriptor DetectNoop(bool? detectNoop = true) @@ -379,6 +449,7 @@ public UpdateRequestDescriptor DetectNoop(bool? det /// /// /// A partial update to an existing document. + /// If both doc and script are specified, doc is ignored. /// /// public UpdateRequestDescriptor Doc(TPartialDocument? doc) @@ -389,7 +460,8 @@ public UpdateRequestDescriptor Doc(TPartialDocument /// /// - /// Set to true to use the contents of 'doc' as the value of 'upsert' + /// If true, use the contents of 'doc' as the value of 'upsert'. + /// NOTE: Using ingest pipelines with doc_as_upsert is not supported. /// /// public UpdateRequestDescriptor DocAsUpsert(bool? docAsUpsert = true) @@ -400,7 +472,7 @@ public UpdateRequestDescriptor DocAsUpsert(bool? do /// /// - /// Script to execute to update the document. + /// The script to run to update the document. /// /// public UpdateRequestDescriptor Script(Elastic.Clients.Elasticsearch.Script? script) @@ -429,7 +501,7 @@ public UpdateRequestDescriptor Script(Action /// - /// Set to true to execute the script whether or not the document exists. + /// If true, run the script whether or not the document exists. /// /// public UpdateRequestDescriptor ScriptedUpsert(bool? scriptedUpsert = true) @@ -440,8 +512,8 @@ public UpdateRequestDescriptor ScriptedUpsert(bool? /// /// - /// Set to false to disable source retrieval. You can also specify a comma-separated - /// list of the fields you want to retrieve. + /// If false, turn off source retrieval. + /// You can also specify a comma-separated list of the fields you want to retrieve. /// /// public UpdateRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) @@ -452,8 +524,8 @@ public UpdateRequestDescriptor Source(Elastic.Clien /// /// - /// If the document does not already exist, the contents of 'upsert' are inserted as a - /// new document. If the document exists, the 'script' is executed. + /// If the document does not already exist, the contents of 'upsert' are inserted as a new document. + /// If the document exists, the 'script' is run. /// /// public UpdateRequestDescriptor Upsert(TDocument? upsert) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateResponse.g.cs index fb1f7195afe..5a2685e9bdf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateResponse.g.cs @@ -32,18 +32,61 @@ public sealed partial class UpdateResponse : ElasticsearchResponse public bool? ForcedRefresh { get; init; } [JsonInclude, JsonPropertyName("get")] public Elastic.Clients.Elasticsearch.InlineGet? Get { 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/Xpack/XpackInfoRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Xpack/XpackInfoRequest.g.cs index 42b67ad0cb0..770c668527f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Xpack/XpackInfoRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Xpack/XpackInfoRequest.g.cs @@ -41,7 +41,8 @@ public sealed partial class XpackInfoRequestParameters : RequestParameters /// /// - /// A comma-separated list of the information categories to include in the response. For example, build,license,features. + /// A comma-separated list of the information categories to include in the response. + /// For example, build,license,features. /// /// public ICollection? Categories { get => Q?>("categories"); set => Q("categories", value); } @@ -90,7 +91,8 @@ public sealed partial class XpackInfoRequest : PlainRequest /// - /// A comma-separated list of the information categories to include in the response. For example, build,license,features. + /// A comma-separated list of the information categories to include in the response. + /// For example, build,license,features. /// /// [JsonIgnore] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Xpack/XpackUsageRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Xpack/XpackUsageRequest.g.cs index f166a00e6dc..206d8f11788 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Xpack/XpackUsageRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Xpack/XpackUsageRequest.g.cs @@ -34,7 +34,9 @@ public sealed partial class XpackUsageRequestParameters : RequestParameters { /// /// - /// 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. + /// 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. + /// 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); } @@ -59,7 +61,9 @@ public sealed partial class XpackUsageRequest : PlainRequest /// - /// 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. + /// 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. + /// To indicate that the request should never timeout, set it to -1. /// /// [JsonIgnore] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Cluster.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Cluster.g.cs index 12a5de69299..64dc90ee161 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Cluster.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Cluster.g.cs @@ -180,7 +180,6 @@ public virtual Task AllocationExplainAsync(Action /// /// Delete component templates. - /// Deletes component templates. /// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. /// /// Learn more about this API in the Elasticsearch documentation. @@ -195,7 +194,6 @@ public virtual DeleteComponentTemplateResponse DeleteComponentTemplate(DeleteCom /// /// /// Delete component templates. - /// Deletes component templates. /// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. /// /// Learn more about this API in the Elasticsearch documentation. @@ -209,7 +207,6 @@ public virtual Task DeleteComponentTemplateAsyn /// /// /// Delete component templates. - /// Deletes component templates. /// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. /// /// Learn more about this API in the Elasticsearch documentation. @@ -224,7 +221,6 @@ public virtual DeleteComponentTemplateResponse DeleteComponentTemplate(DeleteCom /// /// /// Delete component templates. - /// Deletes component templates. /// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. /// /// Learn more about this API in the Elasticsearch documentation. @@ -240,7 +236,6 @@ public virtual DeleteComponentTemplateResponse DeleteComponentTemplate(Elastic.C /// /// /// Delete component templates. - /// Deletes component templates. /// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. /// /// Learn more about this API in the Elasticsearch documentation. @@ -257,7 +252,6 @@ public virtual DeleteComponentTemplateResponse DeleteComponentTemplate(Elastic.C /// /// /// Delete component templates. - /// Deletes component templates. /// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. /// /// Learn more about this API in the Elasticsearch documentation. @@ -271,7 +265,6 @@ public virtual Task DeleteComponentTemplateAsyn /// /// /// Delete component templates. - /// Deletes component templates. /// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. /// /// Learn more about this API in the Elasticsearch documentation. @@ -286,7 +279,6 @@ public virtual Task DeleteComponentTemplateAsyn /// /// /// Delete component templates. - /// Deletes component templates. /// Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. /// /// Learn more about this API in the Elasticsearch documentation. @@ -530,7 +522,7 @@ public virtual Task ExistsComponentTemplateAsyn /// /// /// Get component templates. - /// Retrieves information about component templates. + /// Get information about component templates. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -544,7 +536,7 @@ public virtual GetComponentTemplateResponse GetComponentTemplate(GetComponentTem /// /// /// Get component templates. - /// Retrieves information about component templates. + /// Get information about component templates. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -557,7 +549,7 @@ public virtual Task GetComponentTemplateAsync(GetC /// /// /// Get component templates. - /// Retrieves information about component templates. + /// Get information about component templates. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -571,7 +563,7 @@ public virtual GetComponentTemplateResponse GetComponentTemplate(GetComponentTem /// /// /// Get component templates. - /// Retrieves information about component templates. + /// Get information about component templates. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -586,7 +578,7 @@ public virtual GetComponentTemplateResponse GetComponentTemplate(Elastic.Clients /// /// /// Get component templates. - /// Retrieves information about component templates. + /// Get information about component templates. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -602,7 +594,7 @@ public virtual GetComponentTemplateResponse GetComponentTemplate(Elastic.Clients /// /// /// Get component templates. - /// Retrieves information about component templates. + /// Get information about component templates. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -617,7 +609,7 @@ public virtual GetComponentTemplateResponse GetComponentTemplate() /// /// /// Get component templates. - /// Retrieves information about component templates. + /// Get information about component templates. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -633,7 +625,7 @@ public virtual GetComponentTemplateResponse GetComponentTemplate(Action /// /// Get component templates. - /// Retrieves information about component templates. + /// Get information about component templates. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -646,7 +638,7 @@ public virtual Task GetComponentTemplateAsync(GetC /// /// /// Get component templates. - /// Retrieves information about component templates. + /// Get information about component templates. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -660,7 +652,7 @@ public virtual Task GetComponentTemplateAsync(Elas /// /// /// Get component templates. - /// Retrieves information about component templates. + /// Get information about component templates. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -675,7 +667,7 @@ public virtual Task GetComponentTemplateAsync(Elas /// /// /// Get component templates. - /// Retrieves information about component templates. + /// Get information about component templates. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -689,7 +681,7 @@ public virtual Task GetComponentTemplateAsync(Canc /// /// /// Get component templates. - /// Retrieves information about component templates. + /// Get information about component templates. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -1893,7 +1885,6 @@ public virtual Task PostVotingConfigExclusio /// /// /// 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. /// /// @@ -1913,6 +1904,13 @@ public virtual Task PostVotingConfigExclusio /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -1925,7 +1923,6 @@ public virtual PutComponentTemplateResponse PutComponentTemplate(PutComponentTem /// /// /// 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. /// /// @@ -1945,6 +1942,13 @@ public virtual PutComponentTemplateResponse PutComponentTemplate(PutComponentTem /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutComponentTemplateAsync(PutComponentTemplateRequest request, CancellationToken cancellationToken = default) @@ -1956,7 +1960,6 @@ public virtual Task PutComponentTemplateAsync(PutC /// /// /// 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. /// /// @@ -1976,6 +1979,13 @@ public virtual Task PutComponentTemplateAsync(PutC /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -1988,7 +1998,6 @@ public virtual PutComponentTemplateResponse PutComponentTemplate(PutC /// /// /// 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. /// /// @@ -2008,6 +2017,13 @@ public virtual PutComponentTemplateResponse PutComponentTemplate(PutC /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -2021,7 +2037,6 @@ public virtual PutComponentTemplateResponse PutComponentTemplate(Elas /// /// /// 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. /// /// @@ -2041,6 +2056,13 @@ public virtual PutComponentTemplateResponse PutComponentTemplate(Elas /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -2055,7 +2077,6 @@ public virtual PutComponentTemplateResponse PutComponentTemplate(Elas /// /// /// 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. /// /// @@ -2075,6 +2096,13 @@ public virtual PutComponentTemplateResponse PutComponentTemplate(Elas /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -2087,7 +2115,6 @@ public virtual PutComponentTemplateResponse PutComponentTemplate(PutComponentTem /// /// /// 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. /// /// @@ -2107,6 +2134,13 @@ public virtual PutComponentTemplateResponse PutComponentTemplate(PutComponentTem /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -2120,7 +2154,6 @@ public virtual PutComponentTemplateResponse PutComponentTemplate(Elastic.Clients /// /// /// 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. /// /// @@ -2140,6 +2173,13 @@ public virtual PutComponentTemplateResponse PutComponentTemplate(Elastic.Clients /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -2154,7 +2194,6 @@ public virtual PutComponentTemplateResponse PutComponentTemplate(Elastic.Clients /// /// /// 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. /// /// @@ -2174,6 +2213,13 @@ public virtual PutComponentTemplateResponse PutComponentTemplate(Elastic.Clients /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutComponentTemplateAsync(PutComponentTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) @@ -2185,7 +2231,6 @@ public virtual Task PutComponentTemplateAsync /// /// 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. /// /// @@ -2205,6 +2250,13 @@ public virtual Task PutComponentTemplateAsync/* *\/ 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutComponentTemplateAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) @@ -2217,7 +2269,6 @@ public virtual Task PutComponentTemplateAsync /// /// 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. /// /// @@ -2237,6 +2288,13 @@ public virtual Task PutComponentTemplateAsync/* *\/ 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutComponentTemplateAsync(Elastic.Clients.Elasticsearch.Name name, Action> configureRequest, CancellationToken cancellationToken = default) @@ -2250,7 +2308,6 @@ public virtual Task PutComponentTemplateAsync /// /// 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. /// /// @@ -2270,6 +2327,13 @@ public virtual Task PutComponentTemplateAsync/* *\/ 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutComponentTemplateAsync(PutComponentTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) @@ -2281,7 +2345,6 @@ public virtual Task PutComponentTemplateAsync(PutC /// /// /// 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. /// /// @@ -2301,6 +2364,13 @@ public virtual Task PutComponentTemplateAsync(PutC /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutComponentTemplateAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) @@ -2313,7 +2383,6 @@ public virtual Task PutComponentTemplateAsync(Elas /// /// /// 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. /// /// @@ -2333,6 +2402,13 @@ public virtual Task PutComponentTemplateAsync(Elas /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutComponentTemplateAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.DanglingIndices.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.DanglingIndices.g.cs index 544af02adfa..f35e1605024 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.DanglingIndices.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.DanglingIndices.g.cs @@ -50,7 +50,7 @@ internal DanglingIndicesNamespacedClient(ElasticsearchClient client) : base(clie /// /// Use this API to list dangling indices, which you can then import or delete. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ListDanglingIndicesResponse ListDanglingIndices(ListDanglingIndicesRequest request) @@ -70,7 +70,7 @@ public virtual ListDanglingIndicesResponse ListDanglingIndices(ListDanglingIndic /// /// Use this API to list dangling indices, which you can then import or delete. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ListDanglingIndicesAsync(ListDanglingIndicesRequest request, CancellationToken cancellationToken = default) { @@ -89,7 +89,7 @@ public virtual Task ListDanglingIndicesAsync(ListDa /// /// Use this API to list dangling indices, which you can then import or delete. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ListDanglingIndicesResponse ListDanglingIndices(ListDanglingIndicesRequestDescriptor descriptor) @@ -109,7 +109,7 @@ public virtual ListDanglingIndicesResponse ListDanglingIndices(ListDanglingIndic /// /// Use this API to list dangling indices, which you can then import or delete. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ListDanglingIndicesResponse ListDanglingIndices() @@ -130,7 +130,7 @@ public virtual ListDanglingIndicesResponse ListDanglingIndices() /// /// Use this API to list dangling indices, which you can then import or delete. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ListDanglingIndicesResponse ListDanglingIndices(Action configureRequest) @@ -152,7 +152,7 @@ public virtual ListDanglingIndicesResponse ListDanglingIndices(Action /// Use this API to list dangling indices, which you can then import or delete. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ListDanglingIndicesAsync(ListDanglingIndicesRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -171,7 +171,7 @@ public virtual Task ListDanglingIndicesAsync(ListDa /// /// Use this API to list dangling indices, which you can then import or delete. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ListDanglingIndicesAsync(CancellationToken cancellationToken = default) { @@ -191,7 +191,7 @@ public virtual Task ListDanglingIndicesAsync(Cancel /// /// Use this API to list dangling indices, which you can then import or delete. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ListDanglingIndicesAsync(Action configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Esql.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Esql.g.cs index 53ae4b23514..3a425ae05b8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Esql.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Esql.g.cs @@ -39,6 +39,889 @@ internal EsqlNamespacedClient(ElasticsearchClient client) : base(client) { } + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryResponse AsyncQuery(AsyncQueryRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryAsync(AsyncQueryRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryResponse AsyncQuery(AsyncQueryRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, AsyncQueryResponse, AsyncQueryRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryResponse AsyncQuery() + { + var descriptor = new AsyncQueryRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest, AsyncQueryResponse, AsyncQueryRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryResponse AsyncQuery(Action> configureRequest) + { + var descriptor = new AsyncQueryRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, AsyncQueryResponse, AsyncQueryRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryResponse AsyncQuery(AsyncQueryRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryResponse AsyncQuery() + { + var descriptor = new AsyncQueryRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryResponse AsyncQuery(Action configureRequest) + { + var descriptor = new AsyncQueryRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryAsync(AsyncQueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, AsyncQueryResponse, AsyncQueryRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryAsync(CancellationToken cancellationToken = default) + { + var descriptor = new AsyncQueryRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync, AsyncQueryResponse, AsyncQueryRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryAsync(Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new AsyncQueryRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, AsyncQueryResponse, AsyncQueryRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryAsync(AsyncQueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryAsync(CancellationToken cancellationToken = default) + { + var descriptor = new AsyncQueryRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new AsyncQueryRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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 + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryDeleteResponse AsyncQueryDelete(AsyncQueryDeleteRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// 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 + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryDeleteAsync(AsyncQueryDeleteRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// 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 + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryDeleteResponse AsyncQueryDelete(AsyncQueryDeleteRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, AsyncQueryDeleteResponse, AsyncQueryDeleteRequestParameters>(descriptor); + } + + /// + /// + /// 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 + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryDeleteResponse AsyncQueryDelete(Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new AsyncQueryDeleteRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequest, AsyncQueryDeleteResponse, AsyncQueryDeleteRequestParameters>(descriptor); + } + + /// + /// + /// 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 + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryDeleteResponse AsyncQueryDelete(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new AsyncQueryDeleteRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, AsyncQueryDeleteResponse, AsyncQueryDeleteRequestParameters>(descriptor); + } + + /// + /// + /// 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 + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryDeleteResponse AsyncQueryDelete(AsyncQueryDeleteRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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 + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryDeleteResponse AsyncQueryDelete(Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new AsyncQueryDeleteRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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 + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryDeleteResponse AsyncQueryDelete(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) + { + var descriptor = new AsyncQueryDeleteRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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 + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryDeleteAsync(AsyncQueryDeleteRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, AsyncQueryDeleteResponse, AsyncQueryDeleteRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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 + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryDeleteAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new AsyncQueryDeleteRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequestAsync, AsyncQueryDeleteResponse, AsyncQueryDeleteRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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 + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryDeleteAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new AsyncQueryDeleteRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, AsyncQueryDeleteResponse, AsyncQueryDeleteRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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 + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryDeleteAsync(AsyncQueryDeleteRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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 + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryDeleteAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new AsyncQueryDeleteRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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 + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryDeleteAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new AsyncQueryDeleteRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryGetResponse AsyncQueryGet(AsyncQueryGetRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryGetAsync(AsyncQueryGetRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryGetResponse AsyncQueryGet(AsyncQueryGetRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, AsyncQueryGetResponse, AsyncQueryGetRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryGetResponse AsyncQueryGet(Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new AsyncQueryGetRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequest, AsyncQueryGetResponse, AsyncQueryGetRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryGetResponse AsyncQueryGet(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new AsyncQueryGetRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, AsyncQueryGetResponse, AsyncQueryGetRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryGetResponse AsyncQueryGet(AsyncQueryGetRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryGetResponse AsyncQueryGet(Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new AsyncQueryGetRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual AsyncQueryGetResponse AsyncQueryGet(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) + { + var descriptor = new AsyncQueryGetRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryGetAsync(AsyncQueryGetRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, AsyncQueryGetResponse, AsyncQueryGetRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryGetAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new AsyncQueryGetRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequestAsync, AsyncQueryGetResponse, AsyncQueryGetRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryGetAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new AsyncQueryGetRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, AsyncQueryGetResponse, AsyncQueryGetRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryGetAsync(AsyncQueryGetRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryGetAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new AsyncQueryGetRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task AsyncQueryGetAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new AsyncQueryGetRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + /// /// /// Run an ES|QL query. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Indices.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Indices.g.cs index a47f5e10434..7eee58bcd92 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Indices.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Indices.g.cs @@ -42,7 +42,13 @@ internal IndicesNamespacedClient(ElasticsearchClient client) : base(client) /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -56,7 +62,13 @@ public virtual AnalyzeIndexResponse Analyze(AnalyzeIndexRequest request) /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -69,7 +81,13 @@ public virtual Task AnalyzeAsync(AnalyzeIndexRequest reque /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -83,7 +101,13 @@ public virtual AnalyzeIndexResponse Analyze(AnalyzeIndexRequestDescri /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -98,7 +122,13 @@ public virtual AnalyzeIndexResponse Analyze(Elastic.Clients.Elasticse /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -114,7 +144,13 @@ public virtual AnalyzeIndexResponse Analyze(Elastic.Clients.Elasticse /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -129,7 +165,13 @@ public virtual AnalyzeIndexResponse Analyze() /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -145,7 +187,13 @@ public virtual AnalyzeIndexResponse Analyze(Action /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -159,7 +207,13 @@ public virtual AnalyzeIndexResponse Analyze(AnalyzeIndexRequestDescriptor descri /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -174,7 +228,13 @@ public virtual AnalyzeIndexResponse Analyze(Elastic.Clients.Elasticsearch.IndexN /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -190,7 +250,13 @@ public virtual AnalyzeIndexResponse Analyze(Elastic.Clients.Elasticsearch.IndexN /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -205,7 +271,13 @@ public virtual AnalyzeIndexResponse Analyze() /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -221,7 +293,13 @@ public virtual AnalyzeIndexResponse Analyze(Action /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -234,7 +312,13 @@ public virtual Task AnalyzeAsync(AnalyzeIndexRe /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -248,7 +332,13 @@ public virtual Task AnalyzeAsync(Elastic.Client /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -263,7 +353,13 @@ public virtual Task AnalyzeAsync(Elastic.Client /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -277,7 +373,13 @@ public virtual Task AnalyzeAsync(CancellationTo /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -292,7 +394,13 @@ public virtual Task AnalyzeAsync(Action /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -305,7 +413,13 @@ public virtual Task AnalyzeAsync(AnalyzeIndexRequestDescri /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -319,7 +433,13 @@ public virtual Task AnalyzeAsync(Elastic.Clients.Elasticse /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -334,7 +454,13 @@ public virtual Task AnalyzeAsync(Elastic.Clients.Elasticse /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -348,7 +474,13 @@ public virtual Task AnalyzeAsync(CancellationToken cancell /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -366,6 +498,11 @@ public virtual Task AnalyzeAsync(Action + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -381,6 +518,11 @@ public virtual ClearCacheResponse ClearCache(ClearCacheRequest request) /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(ClearCacheRequest request, CancellationToken cancellationToken = default) @@ -395,6 +537,11 @@ public virtual Task ClearCacheAsync(ClearCacheRequest reques /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -410,6 +557,11 @@ public virtual ClearCacheResponse ClearCache(ClearCacheRequestDescrip /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -426,6 +578,11 @@ public virtual ClearCacheResponse ClearCache(Elastic.Clients.Elastics /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -443,6 +600,11 @@ public virtual ClearCacheResponse ClearCache(Elastic.Clients.Elastics /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -459,6 +621,11 @@ public virtual ClearCacheResponse ClearCache() /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -476,6 +643,11 @@ public virtual ClearCacheResponse ClearCache(Action + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -491,6 +663,11 @@ public virtual ClearCacheResponse ClearCache(ClearCacheRequestDescriptor descrip /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -507,6 +684,11 @@ public virtual ClearCacheResponse ClearCache(Elastic.Clients.Elasticsearch.Indic /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -524,6 +706,11 @@ public virtual ClearCacheResponse ClearCache(Elastic.Clients.Elasticsearch.Indic /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -540,6 +727,11 @@ public virtual ClearCacheResponse ClearCache() /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -557,6 +749,11 @@ public virtual ClearCacheResponse ClearCache(Action /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(ClearCacheRequestDescriptor descriptor, CancellationToken cancellationToken = default) @@ -571,6 +768,11 @@ public virtual Task ClearCacheAsync(ClearCacheReq /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) @@ -586,6 +788,11 @@ public virtual Task ClearCacheAsync(Elastic.Clien /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) @@ -602,6 +809,11 @@ public virtual Task ClearCacheAsync(Elastic.Clien /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(CancellationToken cancellationToken = default) @@ -617,6 +829,11 @@ public virtual Task ClearCacheAsync(CancellationT /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(Action> configureRequest, CancellationToken cancellationToken = default) @@ -633,6 +850,11 @@ public virtual Task ClearCacheAsync(Action + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(ClearCacheRequestDescriptor descriptor, CancellationToken cancellationToken = default) @@ -647,6 +869,11 @@ public virtual Task ClearCacheAsync(ClearCacheRequestDescrip /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) @@ -662,6 +889,11 @@ public virtual Task ClearCacheAsync(Elastic.Clients.Elastics /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) @@ -678,6 +910,11 @@ public virtual Task ClearCacheAsync(Elastic.Clients.Elastics /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(CancellationToken cancellationToken = default) @@ -693,6 +930,11 @@ public virtual Task ClearCacheAsync(CancellationToken cancel /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(Action configureRequest, CancellationToken cancellationToken = default) @@ -745,6 +987,11 @@ public virtual Task ClearCacheAsync(Action /// /// + /// The index must be marked as read-only and have a cluster health status of green. + /// + /// + /// + /// /// The target index must not exist. /// /// @@ -759,6 +1006,35 @@ public virtual Task ClearCacheAsync(Action /// /// + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -810,6 +1086,11 @@ public virtual CloneIndexResponse Clone(CloneIndexRequest request) /// /// /// + /// The index must be marked as read-only and have a cluster health status of green. + /// + /// + /// + /// /// The target index must not exist. /// /// @@ -824,6 +1105,35 @@ public virtual CloneIndexResponse Clone(CloneIndexRequest request) /// /// /// + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloneAsync(CloneIndexRequest request, CancellationToken cancellationToken = default) @@ -874,6 +1184,11 @@ public virtual Task CloneAsync(CloneIndexRequest request, Ca /// /// /// + /// The index must be marked as read-only and have a cluster health status of green. + /// + /// + /// + /// /// The target index must not exist. /// /// @@ -888,6 +1203,35 @@ public virtual Task CloneAsync(CloneIndexRequest request, Ca /// /// /// + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -939,6 +1283,11 @@ public virtual CloneIndexResponse Clone(CloneIndexRequestDescriptor /// /// + /// The index must be marked as read-only and have a cluster health status of green. + /// + /// + /// + /// /// The target index must not exist. /// /// @@ -953,6 +1302,35 @@ public virtual CloneIndexResponse Clone(CloneIndexRequestDescriptor /// /// + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -1005,6 +1383,11 @@ public virtual CloneIndexResponse Clone(Elastic.Clients.Elasticsearch /// /// /// + /// The index must be marked as read-only and have a cluster health status of green. + /// + /// + /// + /// /// The target index must not exist. /// /// @@ -1019,6 +1402,35 @@ public virtual CloneIndexResponse Clone(Elastic.Clients.Elasticsearch /// /// /// + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -1072,6 +1484,11 @@ public virtual CloneIndexResponse Clone(Elastic.Clients.Elasticsearch /// /// /// + /// The index must be marked as read-only and have a cluster health status of green. + /// + /// + /// + /// /// The target index must not exist. /// /// @@ -1086,6 +1503,35 @@ public virtual CloneIndexResponse Clone(Elastic.Clients.Elasticsearch /// /// /// + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -1138,6 +1584,11 @@ public virtual CloneIndexResponse Clone(Elastic.Clients.Elasticsearch /// /// /// + /// The index must be marked as read-only and have a cluster health status of green. + /// + /// + /// + /// /// The target index must not exist. /// /// @@ -1152,6 +1603,35 @@ public virtual CloneIndexResponse Clone(Elastic.Clients.Elasticsearch /// /// /// + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -1205,6 +1685,11 @@ public virtual CloneIndexResponse Clone(Elastic.Clients.Elasticsearch /// /// /// + /// The index must be marked as read-only and have a cluster health status of green. + /// + /// + /// + /// /// The target index must not exist. /// /// @@ -1219,6 +1704,35 @@ public virtual CloneIndexResponse Clone(Elastic.Clients.Elasticsearch /// /// /// + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -1270,6 +1784,11 @@ public virtual CloneIndexResponse Clone(CloneIndexRequestDescriptor descriptor) /// /// /// + /// The index must be marked as read-only and have a cluster health status of green. + /// + /// + /// + /// /// The target index must not exist. /// /// @@ -1284,10 +1803,39 @@ public virtual CloneIndexResponse Clone(CloneIndexRequestDescriptor descriptor) /// /// /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CloneIndexResponse Clone(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Name target) + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CloneIndexResponse Clone(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Name target) { var descriptor = new CloneIndexRequestDescriptor(index, target); descriptor.BeforeRequest(); @@ -1336,6 +1884,11 @@ public virtual CloneIndexResponse Clone(Elastic.Clients.Elasticsearch.IndexName /// /// /// + /// The index must be marked as read-only and have a cluster health status of green. + /// + /// + /// + /// /// The target index must not exist. /// /// @@ -1350,6 +1903,35 @@ public virtual CloneIndexResponse Clone(Elastic.Clients.Elasticsearch.IndexName /// /// /// + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -1403,6 +1985,11 @@ public virtual CloneIndexResponse Clone(Elastic.Clients.Elasticsearch.IndexName /// /// /// + /// The index must be marked as read-only and have a cluster health status of green. + /// + /// + /// + /// /// The target index must not exist. /// /// @@ -1417,6 +2004,35 @@ public virtual CloneIndexResponse Clone(Elastic.Clients.Elasticsearch.IndexName /// /// /// + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloneAsync(CloneIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) @@ -1467,6 +2083,11 @@ public virtual Task CloneAsync(CloneIndexRequestD /// /// /// + /// The index must be marked as read-only and have a cluster health status of green. + /// + /// + /// + /// /// The target index must not exist. /// /// @@ -1481,6 +2102,35 @@ public virtual Task CloneAsync(CloneIndexRequestD /// /// /// + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloneAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Name target, CancellationToken cancellationToken = default) @@ -1532,6 +2182,11 @@ public virtual Task CloneAsync(Elastic.Clients.El /// /// /// + /// The index must be marked as read-only and have a cluster health status of green. + /// + /// + /// + /// /// The target index must not exist. /// /// @@ -1546,6 +2201,35 @@ public virtual Task CloneAsync(Elastic.Clients.El /// /// /// + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloneAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Name target, Action> configureRequest, CancellationToken cancellationToken = default) @@ -1598,6 +2282,11 @@ public virtual Task CloneAsync(Elastic.Clients.El /// /// /// + /// The index must be marked as read-only and have a cluster health status of green. + /// + /// + /// + /// /// The target index must not exist. /// /// @@ -1612,6 +2301,35 @@ public virtual Task CloneAsync(Elastic.Clients.El /// /// /// + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloneAsync(Elastic.Clients.Elasticsearch.Name target, CancellationToken cancellationToken = default) @@ -1663,6 +2381,11 @@ public virtual Task CloneAsync(Elastic.Clients.El /// /// /// + /// The index must be marked as read-only and have a cluster health status of green. + /// + /// + /// + /// /// The target index must not exist. /// /// @@ -1677,6 +2400,35 @@ public virtual Task CloneAsync(Elastic.Clients.El /// /// /// + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloneAsync(Elastic.Clients.Elasticsearch.Name target, Action> configureRequest, CancellationToken cancellationToken = default) @@ -1729,6 +2481,11 @@ public virtual Task CloneAsync(Elastic.Clients.El /// /// /// + /// The index must be marked as read-only and have a cluster health status of green. + /// + /// + /// + /// /// The target index must not exist. /// /// @@ -1743,6 +2500,35 @@ public virtual Task CloneAsync(Elastic.Clients.El /// /// /// + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloneAsync(CloneIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) @@ -1793,6 +2579,11 @@ public virtual Task CloneAsync(CloneIndexRequestDescriptor d /// /// /// + /// The index must be marked as read-only and have a cluster health status of green. + /// + /// + /// + /// /// The target index must not exist. /// /// @@ -1807,6 +2598,35 @@ public virtual Task CloneAsync(CloneIndexRequestDescriptor d /// /// /// + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloneAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Name target, CancellationToken cancellationToken = default) @@ -1858,6 +2678,11 @@ public virtual Task CloneAsync(Elastic.Clients.Elasticsearch /// /// /// + /// The index must be marked as read-only and have a cluster health status of green. + /// + /// + /// + /// /// The target index must not exist. /// /// @@ -1872,6 +2697,35 @@ public virtual Task CloneAsync(Elastic.Clients.Elasticsearch /// /// /// + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloneAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Name target, Action configureRequest, CancellationToken cancellationToken = default) @@ -2506,7 +3360,41 @@ public virtual Task CloseAsync(Elastic.Clients.Elasticsearch /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -2520,7 +3408,41 @@ public virtual CreateIndexResponse Create(CreateIndexRequest request) /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -2533,25 +3455,93 @@ public virtual Task CreateAsync(CreateIndexRequest request, /// /// /// 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: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateIndexResponse Create(CreateIndexRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, CreateIndexResponse, CreateIndexRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Create an index. - /// Creates a new index. + /// Settings for the index. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + /// + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CreateIndexResponse Create(CreateIndexRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, CreateIndexResponse, CreateIndexRequestParameters>(descriptor); + } + + /// + /// + /// Create an 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CreateIndexResponse Create(Elastic.Clients.Elasticsearch.IndexName index) { var descriptor = new CreateIndexRequestDescriptor(index); @@ -2562,7 +3552,41 @@ public virtual CreateIndexResponse Create(Elastic.Clients.Elasticsear /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -2578,7 +3602,41 @@ public virtual CreateIndexResponse Create(Elastic.Clients.Elasticsear /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -2593,7 +3651,41 @@ public virtual CreateIndexResponse Create() /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -2609,7 +3701,41 @@ public virtual CreateIndexResponse Create(Action /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -2623,7 +3749,41 @@ public virtual CreateIndexResponse Create(CreateIndexRequestDescriptor descripto /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -2638,7 +3798,41 @@ public virtual CreateIndexResponse Create(Elastic.Clients.Elasticsearch.IndexNam /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -2654,7 +3848,41 @@ public virtual CreateIndexResponse Create(Elastic.Clients.Elasticsearch.IndexNam /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -2667,7 +3895,41 @@ public virtual Task CreateAsync(CreateIndexReque /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -2681,7 +3943,41 @@ public virtual Task CreateAsync(Elastic.Clients. /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -2696,7 +3992,41 @@ public virtual Task CreateAsync(Elastic.Clients. /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -2710,12 +4040,46 @@ public virtual Task CreateAsync(CancellationToke /// /// /// 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: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { + /// + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateAsync(Action> configureRequest, CancellationToken cancellationToken = default) + { var descriptor = new CreateIndexRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); @@ -2725,7 +4089,41 @@ public virtual Task CreateAsync(Action /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -2738,7 +4136,41 @@ public virtual Task CreateAsync(CreateIndexRequestDescripto /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -2752,7 +4184,41 @@ public virtual Task CreateAsync(Elastic.Clients.Elasticsear /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -3063,9 +4529,15 @@ public virtual Task DataStreamsStatsAsync(Action /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteIndexResponse Delete(DeleteIndexRequest request) @@ -3077,9 +4549,15 @@ public virtual DeleteIndexResponse Delete(DeleteIndexRequest request) /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(DeleteIndexRequest request, CancellationToken cancellationToken = default) { @@ -3090,9 +4568,15 @@ public virtual Task DeleteAsync(DeleteIndexRequest request, /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteIndexResponse Delete(DeleteIndexRequestDescriptor descriptor) @@ -3104,9 +4588,15 @@ public virtual DeleteIndexResponse Delete(DeleteIndexRequestDescripto /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteIndexResponse Delete(Elastic.Clients.Elasticsearch.Indices indices) @@ -3119,9 +4609,15 @@ public virtual DeleteIndexResponse Delete(Elastic.Clients.Elasticsear /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteIndexResponse Delete(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest) @@ -3135,9 +4631,15 @@ public virtual DeleteIndexResponse Delete(Elastic.Clients.Elasticsear /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteIndexResponse Delete() @@ -3150,9 +4652,15 @@ public virtual DeleteIndexResponse Delete() /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteIndexResponse Delete(Action> configureRequest) @@ -3166,9 +4674,15 @@ public virtual DeleteIndexResponse Delete(Action /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteIndexResponse Delete(DeleteIndexRequestDescriptor descriptor) @@ -3180,9 +4694,15 @@ public virtual DeleteIndexResponse Delete(DeleteIndexRequestDescriptor descripto /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteIndexResponse Delete(Elastic.Clients.Elasticsearch.Indices indices) @@ -3195,9 +4715,15 @@ public virtual DeleteIndexResponse Delete(Elastic.Clients.Elasticsearch.Indices /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteIndexResponse Delete(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest) @@ -3211,9 +4737,15 @@ public virtual DeleteIndexResponse Delete(Elastic.Clients.Elasticsearch.Indices /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(DeleteIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3224,9 +4756,15 @@ public virtual Task DeleteAsync(DeleteIndexReque /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) { @@ -3238,9 +4776,15 @@ public virtual Task DeleteAsync(Elastic.Clients. /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -3253,9 +4797,15 @@ public virtual Task DeleteAsync(Elastic.Clients. /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(CancellationToken cancellationToken = default) { @@ -3267,9 +4817,15 @@ public virtual Task DeleteAsync(CancellationToke /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -3282,9 +4838,15 @@ public virtual Task DeleteAsync(Action /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(DeleteIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3295,9 +4857,15 @@ public virtual Task DeleteAsync(DeleteIndexRequestDescripto /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) { @@ -3309,9 +4877,15 @@ public virtual Task DeleteAsync(Elastic.Clients.Elasticsear /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -3326,7 +4900,7 @@ public virtual Task DeleteAsync(Elastic.Clients.Elasticsear /// Delete an alias. /// Removes a data stream or index from an alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteAliasResponse DeleteAlias(DeleteAliasRequest request) @@ -3340,7 +4914,7 @@ public virtual DeleteAliasResponse DeleteAlias(DeleteAliasRequest request) /// Delete an alias. /// Removes a data stream or index from an alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAliasAsync(DeleteAliasRequest request, CancellationToken cancellationToken = default) { @@ -3353,7 +4927,7 @@ public virtual Task DeleteAliasAsync(DeleteAliasRequest req /// Delete an alias. /// Removes a data stream or index from an alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteAliasResponse DeleteAlias(DeleteAliasRequestDescriptor descriptor) @@ -3367,7 +4941,7 @@ public virtual DeleteAliasResponse DeleteAlias(DeleteAliasRequestDesc /// Delete an alias. /// Removes a data stream or index from an alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteAliasResponse DeleteAlias(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Names name) @@ -3382,7 +4956,7 @@ public virtual DeleteAliasResponse DeleteAlias(Elastic.Clients.Elasti /// Delete an alias. /// Removes a data stream or index from an alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteAliasResponse DeleteAlias(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Names name, Action> configureRequest) @@ -3398,7 +4972,7 @@ public virtual DeleteAliasResponse DeleteAlias(Elastic.Clients.Elasti /// Delete an alias. /// Removes a data stream or index from an alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteAliasResponse DeleteAlias(Elastic.Clients.Elasticsearch.Names name) @@ -3413,7 +4987,7 @@ public virtual DeleteAliasResponse DeleteAlias(Elastic.Clients.Elasti /// Delete an alias. /// Removes a data stream or index from an alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteAliasResponse DeleteAlias(Elastic.Clients.Elasticsearch.Names name, Action> configureRequest) @@ -3429,7 +5003,7 @@ public virtual DeleteAliasResponse DeleteAlias(Elastic.Clients.Elasti /// Delete an alias. /// Removes a data stream or index from an alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteAliasResponse DeleteAlias(DeleteAliasRequestDescriptor descriptor) @@ -3443,7 +5017,7 @@ public virtual DeleteAliasResponse DeleteAlias(DeleteAliasRequestDescriptor desc /// Delete an alias. /// Removes a data stream or index from an alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteAliasResponse DeleteAlias(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Names name) @@ -3458,7 +5032,7 @@ public virtual DeleteAliasResponse DeleteAlias(Elastic.Clients.Elasticsearch.Ind /// Delete an alias. /// Removes a data stream or index from an alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteAliasResponse DeleteAlias(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Names name, Action configureRequest) @@ -3474,7 +5048,7 @@ public virtual DeleteAliasResponse DeleteAlias(Elastic.Clients.Elasticsearch.Ind /// Delete an alias. /// Removes a data stream or index from an alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAliasAsync(DeleteAliasRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3487,7 +5061,7 @@ public virtual Task DeleteAliasAsync(DeleteAlias /// Delete an alias. /// Removes a data stream or index from an alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAliasAsync(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Names name, CancellationToken cancellationToken = default) { @@ -3501,7 +5075,7 @@ public virtual Task DeleteAliasAsync(Elastic.Cli /// Delete an alias. /// Removes a data stream or index from an alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAliasAsync(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Names name, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -3516,7 +5090,7 @@ public virtual Task DeleteAliasAsync(Elastic.Cli /// Delete an alias. /// Removes a data stream or index from an alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAliasAsync(Elastic.Clients.Elasticsearch.Names name, CancellationToken cancellationToken = default) { @@ -3530,7 +5104,7 @@ public virtual Task DeleteAliasAsync(Elastic.Cli /// Delete an alias. /// Removes a data stream or index from an alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAliasAsync(Elastic.Clients.Elasticsearch.Names name, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -3545,7 +5119,7 @@ public virtual Task DeleteAliasAsync(Elastic.Cli /// Delete an alias. /// Removes a data stream or index from an alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAliasAsync(DeleteAliasRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3558,7 +5132,7 @@ public virtual Task DeleteAliasAsync(DeleteAliasRequestDesc /// Delete an alias. /// Removes a data stream or index from an alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAliasAsync(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Names name, CancellationToken cancellationToken = default) { @@ -3572,7 +5146,7 @@ public virtual Task DeleteAliasAsync(Elastic.Clients.Elasti /// Delete an alias. /// Removes a data stream or index from an alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAliasAsync(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Names name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -3817,7 +5391,7 @@ public virtual Task DeleteDataStreamAsync(Elastic.Clie /// names are specified then there is no wildcard support and the provided names should match completely with /// existing templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(DeleteIndexTemplateRequest request) @@ -3833,7 +5407,7 @@ public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(DeleteIndexTempla /// names are specified then there is no wildcard support and the provided names should match completely with /// existing templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteIndexTemplateAsync(DeleteIndexTemplateRequest request, CancellationToken cancellationToken = default) { @@ -3848,7 +5422,7 @@ public virtual Task DeleteIndexTemplateAsync(Delete /// names are specified then there is no wildcard support and the provided names should match completely with /// existing templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(DeleteIndexTemplateRequestDescriptor descriptor) @@ -3864,7 +5438,7 @@ public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(DeleteIndexTempla /// names are specified then there is no wildcard support and the provided names should match completely with /// existing templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(Elastic.Clients.Elasticsearch.Names name) @@ -3881,7 +5455,7 @@ public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(Elastic.Clients.E /// names are specified then there is no wildcard support and the provided names should match completely with /// existing templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(Elastic.Clients.Elasticsearch.Names name, Action configureRequest) @@ -3899,7 +5473,7 @@ public virtual DeleteIndexTemplateResponse DeleteIndexTemplate(Elastic.Clients.E /// names are specified then there is no wildcard support and the provided names should match completely with /// existing templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteIndexTemplateAsync(DeleteIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3914,7 +5488,7 @@ public virtual Task DeleteIndexTemplateAsync(Delete /// names are specified then there is no wildcard support and the provided names should match completely with /// existing templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteIndexTemplateAsync(Elastic.Clients.Elasticsearch.Names name, CancellationToken cancellationToken = default) { @@ -3930,7 +5504,7 @@ public virtual Task DeleteIndexTemplateAsync(Elasti /// names are specified then there is no wildcard support and the provided names should match completely with /// existing templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteIndexTemplateAsync(Elastic.Clients.Elasticsearch.Names name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -3942,9 +5516,9 @@ public virtual Task DeleteIndexTemplateAsync(Elasti /// /// - /// Deletes a legacy index template. + /// Delete a legacy index template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteTemplateResponse DeleteTemplate(DeleteTemplateRequest request) @@ -3955,9 +5529,9 @@ public virtual DeleteTemplateResponse DeleteTemplate(DeleteTemplateRequest reque /// /// - /// Deletes a legacy index template. + /// Delete a legacy index template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteTemplateAsync(DeleteTemplateRequest request, CancellationToken cancellationToken = default) { @@ -3967,9 +5541,9 @@ public virtual Task DeleteTemplateAsync(DeleteTemplateRe /// /// - /// Deletes a legacy index template. + /// Delete a legacy index template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteTemplateResponse DeleteTemplate(DeleteTemplateRequestDescriptor descriptor) @@ -3980,9 +5554,9 @@ public virtual DeleteTemplateResponse DeleteTemplate(DeleteTemplateRequestDescri /// /// - /// Deletes a legacy index template. + /// Delete a legacy index template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteTemplateResponse DeleteTemplate(Elastic.Clients.Elasticsearch.Name name) @@ -3994,9 +5568,9 @@ public virtual DeleteTemplateResponse DeleteTemplate(Elastic.Clients.Elasticsear /// /// - /// Deletes a legacy index template. + /// Delete a legacy index template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteTemplateResponse DeleteTemplate(Elastic.Clients.Elasticsearch.Name name, Action configureRequest) @@ -4009,9 +5583,9 @@ public virtual DeleteTemplateResponse DeleteTemplate(Elastic.Clients.Elasticsear /// /// - /// Deletes a legacy index template. + /// Delete a legacy index template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteTemplateAsync(DeleteTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -4021,9 +5595,9 @@ public virtual Task DeleteTemplateAsync(DeleteTemplateRe /// /// - /// Deletes a legacy index template. + /// Delete a legacy index template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteTemplateAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) { @@ -4034,9 +5608,9 @@ public virtual Task DeleteTemplateAsync(Elastic.Clients. /// /// - /// Deletes a legacy index template. + /// Delete a legacy index template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteTemplateAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -4053,6 +5627,11 @@ public virtual Task DeleteTemplateAsync(Elastic.Clients. /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -4069,6 +5648,11 @@ public virtual DiskUsageResponse DiskUsage(DiskUsageRequest request) /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DiskUsageAsync(DiskUsageRequest request, CancellationToken cancellationToken = default) @@ -4084,6 +5668,11 @@ public virtual Task DiskUsageAsync(DiskUsageRequest request, /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -4100,6 +5689,11 @@ public virtual DiskUsageResponse DiskUsage(DiskUsageRequestDescriptor /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -4117,6 +5711,11 @@ public virtual DiskUsageResponse DiskUsage(Elastic.Clients.Elasticsea /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -4135,6 +5734,11 @@ public virtual DiskUsageResponse DiskUsage(Elastic.Clients.Elasticsea /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -4152,6 +5756,11 @@ public virtual DiskUsageResponse DiskUsage() /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -4170,6 +5779,11 @@ public virtual DiskUsageResponse DiskUsage(Action + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -4186,6 +5800,11 @@ public virtual DiskUsageResponse DiskUsage(DiskUsageRequestDescriptor descriptor /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -4203,6 +5822,11 @@ public virtual DiskUsageResponse DiskUsage(Elastic.Clients.Elasticsearch.Indices /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -4221,6 +5845,11 @@ public virtual DiskUsageResponse DiskUsage(Elastic.Clients.Elasticsearch.Indices /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DiskUsageAsync(DiskUsageRequestDescriptor descriptor, CancellationToken cancellationToken = default) @@ -4236,6 +5865,11 @@ public virtual Task DiskUsageAsync(DiskUsageReques /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DiskUsageAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) @@ -4252,6 +5886,11 @@ public virtual Task DiskUsageAsync(Elastic.Clients /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DiskUsageAsync(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) @@ -4269,6 +5908,11 @@ public virtual Task DiskUsageAsync(Elastic.Clients /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DiskUsageAsync(CancellationToken cancellationToken = default) @@ -4285,6 +5929,11 @@ public virtual Task DiskUsageAsync(CancellationTok /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DiskUsageAsync(Action> configureRequest, CancellationToken cancellationToken = default) @@ -4302,6 +5951,11 @@ public virtual Task DiskUsageAsync(Action + /// + /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DiskUsageAsync(DiskUsageRequestDescriptor descriptor, CancellationToken cancellationToken = default) @@ -4317,6 +5971,11 @@ public virtual Task DiskUsageAsync(DiskUsageRequestDescriptor /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DiskUsageAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) @@ -4333,6 +5992,11 @@ public virtual Task DiskUsageAsync(Elastic.Clients.Elasticsea /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DiskUsageAsync(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) @@ -4645,9 +6309,9 @@ public virtual Task DownsampleAsync(Elastic.Clients.Elastics /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExistsResponse Exists(ExistsRequest request) @@ -4659,9 +6323,9 @@ public virtual ExistsResponse Exists(ExistsRequest request) /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsAsync(ExistsRequest request, CancellationToken cancellationToken = default) { @@ -4672,9 +6336,9 @@ public virtual Task ExistsAsync(ExistsRequest request, Cancellat /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExistsResponse Exists(ExistsRequestDescriptor descriptor) @@ -4686,9 +6350,9 @@ public virtual ExistsResponse Exists(ExistsRequestDescriptor /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExistsResponse Exists(Elastic.Clients.Elasticsearch.Indices indices) @@ -4701,9 +6365,9 @@ public virtual ExistsResponse Exists(Elastic.Clients.Elasticsearch.In /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExistsResponse Exists(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest) @@ -4717,9 +6381,9 @@ public virtual ExistsResponse Exists(Elastic.Clients.Elasticsearch.In /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExistsResponse Exists() @@ -4732,9 +6396,9 @@ public virtual ExistsResponse Exists() /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExistsResponse Exists(Action> configureRequest) @@ -4748,9 +6412,9 @@ public virtual ExistsResponse Exists(Action /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExistsResponse Exists(ExistsRequestDescriptor descriptor) @@ -4762,9 +6426,9 @@ public virtual ExistsResponse Exists(ExistsRequestDescriptor descriptor) /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExistsResponse Exists(Elastic.Clients.Elasticsearch.Indices indices) @@ -4777,9 +6441,9 @@ public virtual ExistsResponse Exists(Elastic.Clients.Elasticsearch.Indices indic /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExistsResponse Exists(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest) @@ -4793,9 +6457,9 @@ public virtual ExistsResponse Exists(Elastic.Clients.Elasticsearch.Indices indic /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsAsync(ExistsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -4806,9 +6470,9 @@ public virtual Task ExistsAsync(ExistsRequestDescript /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) { @@ -4820,9 +6484,9 @@ public virtual Task ExistsAsync(Elastic.Clients.Elast /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -4835,9 +6499,9 @@ public virtual Task ExistsAsync(Elastic.Clients.Elast /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsAsync(CancellationToken cancellationToken = default) { @@ -4849,9 +6513,9 @@ public virtual Task ExistsAsync(CancellationToken can /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -4864,9 +6528,9 @@ public virtual Task ExistsAsync(Action /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsAsync(ExistsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -4877,9 +6541,9 @@ public virtual Task ExistsAsync(ExistsRequestDescriptor descript /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) { @@ -4891,9 +6555,9 @@ public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.In /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -5341,9 +7005,13 @@ public virtual Task ExistsIndexTemplateAsync(Elasti /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExistsTemplateResponse ExistsTemplate(ExistsTemplateRequest request) @@ -5355,9 +7023,13 @@ public virtual ExistsTemplateResponse ExistsTemplate(ExistsTemplateRequest reque /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsTemplateAsync(ExistsTemplateRequest request, CancellationToken cancellationToken = default) { @@ -5368,9 +7040,13 @@ public virtual Task ExistsTemplateAsync(ExistsTemplateRe /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExistsTemplateResponse ExistsTemplate(ExistsTemplateRequestDescriptor descriptor) @@ -5382,9 +7058,13 @@ public virtual ExistsTemplateResponse ExistsTemplate(ExistsTemplateRequestDescri /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExistsTemplateResponse ExistsTemplate(Elastic.Clients.Elasticsearch.Names name) @@ -5397,9 +7077,13 @@ public virtual ExistsTemplateResponse ExistsTemplate(Elastic.Clients.Elasticsear /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExistsTemplateResponse ExistsTemplate(Elastic.Clients.Elasticsearch.Names name, Action configureRequest) @@ -5413,9 +7097,13 @@ public virtual ExistsTemplateResponse ExistsTemplate(Elastic.Clients.Elasticsear /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsTemplateAsync(ExistsTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -5426,9 +7114,13 @@ public virtual Task ExistsTemplateAsync(ExistsTemplateRe /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsTemplateAsync(Elastic.Clients.Elasticsearch.Names name, CancellationToken cancellationToken = default) { @@ -5440,9 +7132,13 @@ public virtual Task ExistsTemplateAsync(Elastic.Clients. /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExistsTemplateAsync(Elastic.Clients.Elasticsearch.Names name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -5720,7 +7416,11 @@ public virtual Task ExplainDataLifecycleAsync(Elas /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual FieldUsageStatsResponse FieldUsageStats(FieldUsageStatsRequest request) @@ -5736,7 +7436,11 @@ public virtual FieldUsageStatsResponse FieldUsageStats(FieldUsageStatsRequest re /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FieldUsageStatsAsync(FieldUsageStatsRequest request, CancellationToken cancellationToken = default) { @@ -5751,7 +7455,11 @@ public virtual Task FieldUsageStatsAsync(FieldUsageStat /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual FieldUsageStatsResponse FieldUsageStats(FieldUsageStatsRequestDescriptor descriptor) @@ -5767,7 +7475,11 @@ public virtual FieldUsageStatsResponse FieldUsageStats(FieldUsageStat /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual FieldUsageStatsResponse FieldUsageStats(Elastic.Clients.Elasticsearch.Indices indices) @@ -5784,7 +7496,11 @@ public virtual FieldUsageStatsResponse FieldUsageStats(Elastic.Client /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual FieldUsageStatsResponse FieldUsageStats(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest) @@ -5802,7 +7518,11 @@ public virtual FieldUsageStatsResponse FieldUsageStats(Elastic.Client /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual FieldUsageStatsResponse FieldUsageStats() @@ -5819,7 +7539,11 @@ public virtual FieldUsageStatsResponse FieldUsageStats() /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual FieldUsageStatsResponse FieldUsageStats(Action> configureRequest) @@ -5837,7 +7561,11 @@ public virtual FieldUsageStatsResponse FieldUsageStats(Action - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual FieldUsageStatsResponse FieldUsageStats(FieldUsageStatsRequestDescriptor descriptor) @@ -5853,7 +7581,11 @@ public virtual FieldUsageStatsResponse FieldUsageStats(FieldUsageStatsRequestDes /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual FieldUsageStatsResponse FieldUsageStats(Elastic.Clients.Elasticsearch.Indices indices) @@ -5870,7 +7602,11 @@ public virtual FieldUsageStatsResponse FieldUsageStats(Elastic.Clients.Elasticse /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual FieldUsageStatsResponse FieldUsageStats(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest) @@ -5888,7 +7624,11 @@ public virtual FieldUsageStatsResponse FieldUsageStats(Elastic.Clients.Elasticse /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FieldUsageStatsAsync(FieldUsageStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -5903,7 +7643,11 @@ public virtual Task FieldUsageStatsAsync(Fie /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FieldUsageStatsAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) { @@ -5919,7 +7663,11 @@ public virtual Task FieldUsageStatsAsync(Ela /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FieldUsageStatsAsync(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -5936,7 +7684,11 @@ public virtual Task FieldUsageStatsAsync(Ela /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FieldUsageStatsAsync(CancellationToken cancellationToken = default) { @@ -5952,7 +7704,11 @@ public virtual Task FieldUsageStatsAsync(Can /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FieldUsageStatsAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -5969,7 +7725,11 @@ public virtual Task FieldUsageStatsAsync(Act /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FieldUsageStatsAsync(FieldUsageStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -5984,7 +7744,11 @@ public virtual Task FieldUsageStatsAsync(FieldUsageStat /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FieldUsageStatsAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) { @@ -6000,7 +7764,11 @@ public virtual Task FieldUsageStatsAsync(Elastic.Client /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FieldUsageStatsAsync(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -6591,39 +8359,79 @@ public virtual Task FlushAsync(Action con /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ForcemergeResponse Forcemerge(ForcemergeRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// /// - /// Force a merge. - /// Perform the force merge operation on the shards of one or more indices. - /// For data streams, the API forces a merge on the shards of the stream's backing indices. + /// Blocks during a force merge /// /// - /// Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents. - /// Merging normally happens automatically, but sometimes it is useful to trigger a merge manually. + /// 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. /// /// - /// WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes). - /// When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a "tombstone". - /// These soft-deleted documents are automatically cleaned up during regular segment merges. - /// But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges. - /// 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. + /// 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 /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ForcemergeAsync(ForcemergeRequest request, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ForcemergeResponse Forcemerge(ForcemergeRequest request) { request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + return DoRequest(request); } /// @@ -6644,13 +8452,78 @@ public virtual Task ForcemergeAsync(ForcemergeRequest reques /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ForcemergeResponse Forcemerge(ForcemergeRequestDescriptor descriptor) + public virtual Task ForcemergeAsync(ForcemergeRequest request, CancellationToken cancellationToken = default) { - descriptor.BeforeRequest(); - return DoRequest, ForcemergeResponse, ForcemergeRequestParameters>(descriptor); + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); } /// @@ -6671,12 +8544,77 @@ public virtual ForcemergeResponse Forcemerge(ForcemergeRequestDescrip /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ForcemergeResponse Forcemerge(Elastic.Clients.Elasticsearch.Indices? indices) + public virtual ForcemergeResponse Forcemerge(ForcemergeRequestDescriptor descriptor) { - var descriptor = new ForcemergeRequestDescriptor(indices); descriptor.BeforeRequest(); return DoRequest, ForcemergeResponse, ForcemergeRequestParameters>(descriptor); } @@ -6699,13 +8637,78 @@ public virtual ForcemergeResponse Forcemerge(Elastic.Clients.Elastics /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ForcemergeResponse Forcemerge(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) + public virtual ForcemergeResponse Forcemerge(Elastic.Clients.Elasticsearch.Indices? indices) { var descriptor = new ForcemergeRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); return DoRequest, ForcemergeResponse, ForcemergeRequestParameters>(descriptor); } @@ -6728,12 +8731,79 @@ public virtual ForcemergeResponse Forcemerge(Elastic.Clients.Elastics /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ForcemergeResponse Forcemerge() + public virtual ForcemergeResponse Forcemerge(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) { - var descriptor = new ForcemergeRequestDescriptor(); + var descriptor = new ForcemergeRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); return DoRequest, ForcemergeResponse, ForcemergeRequestParameters>(descriptor); } @@ -6756,13 +8826,78 @@ public virtual ForcemergeResponse Forcemerge() /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ForcemergeResponse Forcemerge(Action> configureRequest) + public virtual ForcemergeResponse Forcemerge() { var descriptor = new ForcemergeRequestDescriptor(); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); return DoRequest, ForcemergeResponse, ForcemergeRequestParameters>(descriptor); } @@ -6785,9 +8920,170 @@ public virtual ForcemergeResponse Forcemerge(Action - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ForcemergeResponse Forcemerge(Action> configureRequest) + { + var descriptor = new ForcemergeRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, ForcemergeResponse, ForcemergeRequestParameters>(descriptor); + } + + /// + /// + /// Force a merge. + /// Perform the force merge operation on the shards of one or more indices. + /// For data streams, the API forces a merge on the shards of the stream's backing indices. + /// + /// + /// Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents. + /// Merging normally happens automatically, but sometimes it is useful to trigger a merge manually. + /// + /// + /// WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes). + /// When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a "tombstone". + /// These soft-deleted documents are automatically cleaned up during regular segment merges. + /// But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges. + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ForcemergeResponse Forcemerge(ForcemergeRequestDescriptor descriptor) { descriptor.BeforeRequest(); @@ -6812,7 +9108,73 @@ public virtual ForcemergeResponse Forcemerge(ForcemergeRequestDescriptor descrip /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ForcemergeResponse Forcemerge(Elastic.Clients.Elasticsearch.Indices? indices) @@ -6840,7 +9202,73 @@ public virtual ForcemergeResponse Forcemerge(Elastic.Clients.Elasticsearch.Indic /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ForcemergeResponse Forcemerge(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest) @@ -6869,7 +9297,73 @@ public virtual ForcemergeResponse Forcemerge(Elastic.Clients.Elasticsearch.Indic /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ForcemergeResponse Forcemerge() @@ -6897,7 +9391,73 @@ public virtual ForcemergeResponse Forcemerge() /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ForcemergeResponse Forcemerge(Action configureRequest) @@ -6926,7 +9486,73 @@ public virtual ForcemergeResponse Forcemerge(Action /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ForcemergeAsync(ForcemergeRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -6952,7 +9578,73 @@ public virtual Task ForcemergeAsync(ForcemergeReq /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ForcemergeAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { @@ -6979,7 +9671,73 @@ public virtual Task ForcemergeAsync(Elastic.Clien /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ForcemergeAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -7007,7 +9765,73 @@ public virtual Task ForcemergeAsync(Elastic.Clien /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ForcemergeAsync(CancellationToken cancellationToken = default) { @@ -7034,7 +9858,73 @@ public virtual Task ForcemergeAsync(CancellationT /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ForcemergeAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -7051,18 +9941,84 @@ public virtual Task ForcemergeAsync(Action /// - /// Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents. - /// Merging normally happens automatically, but sometimes it is useful to trigger a merge manually. + /// Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents. + /// Merging normally happens automatically, but sometimes it is useful to trigger a merge manually. + /// + /// + /// WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes). + /// When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a "tombstone". + /// These soft-deleted documents are automatically cleaned up during regular segment merges. + /// But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges. + /// 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 /// /// - /// WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes). - /// When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a "tombstone". - /// These soft-deleted documents are automatically cleaned up during regular segment merges. - /// But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges. - /// 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. + /// 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: /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// POST /.ds-my-data-stream-2099.03.07-000001/_forcemerge?max_num_segments=1 + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ForcemergeAsync(ForcemergeRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -7088,7 +10044,73 @@ public virtual Task ForcemergeAsync(ForcemergeRequestDescrip /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ForcemergeAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { @@ -7115,7 +10137,73 @@ public virtual Task ForcemergeAsync(Elastic.Clients.Elastics /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ForcemergeAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -7143,7 +10231,73 @@ public virtual Task ForcemergeAsync(Elastic.Clients.Elastics /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ForcemergeAsync(CancellationToken cancellationToken = default) { @@ -7170,7 +10324,73 @@ public virtual Task ForcemergeAsync(CancellationToken cancel /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ForcemergeAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -7183,10 +10403,10 @@ public virtual Task ForcemergeAsync(Action /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndexResponse Get(GetIndexRequest request) @@ -7198,10 +10418,10 @@ public virtual GetIndexResponse Get(GetIndexRequest request) /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(GetIndexRequest request, CancellationToken cancellationToken = default) { @@ -7212,10 +10432,10 @@ public virtual Task GetAsync(GetIndexRequest request, Cancella /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndexResponse Get(GetIndexRequestDescriptor descriptor) @@ -7227,10 +10447,10 @@ public virtual GetIndexResponse Get(GetIndexRequestDescriptor /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndexResponse Get(Elastic.Clients.Elasticsearch.Indices indices) @@ -7243,10 +10463,10 @@ public virtual GetIndexResponse Get(Elastic.Clients.Elasticsearch.Ind /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndexResponse Get(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest) @@ -7260,10 +10480,10 @@ public virtual GetIndexResponse Get(Elastic.Clients.Elasticsearch.Ind /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndexResponse Get() @@ -7276,10 +10496,10 @@ public virtual GetIndexResponse Get() /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndexResponse Get(Action> configureRequest) @@ -7293,10 +10513,10 @@ public virtual GetIndexResponse Get(Action /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndexResponse Get(GetIndexRequestDescriptor descriptor) @@ -7308,10 +10528,10 @@ public virtual GetIndexResponse Get(GetIndexRequestDescriptor descriptor) /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndexResponse Get(Elastic.Clients.Elasticsearch.Indices indices) @@ -7324,10 +10544,10 @@ public virtual GetIndexResponse Get(Elastic.Clients.Elasticsearch.Indices indice /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndexResponse Get(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest) @@ -7341,10 +10561,10 @@ public virtual GetIndexResponse Get(Elastic.Clients.Elasticsearch.Indices indice /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(GetIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -7355,10 +10575,10 @@ public virtual Task GetAsync(GetIndexRequestDescrip /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) { @@ -7370,10 +10590,10 @@ public virtual Task GetAsync(Elastic.Clients.Elasti /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -7386,10 +10606,10 @@ public virtual Task GetAsync(Elastic.Clients.Elasti /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(CancellationToken cancellationToken = default) { @@ -7401,10 +10621,10 @@ public virtual Task GetAsync(CancellationToken canc /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -7417,10 +10637,10 @@ public virtual Task GetAsync(Action /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(GetIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -7431,10 +10651,10 @@ public virtual Task GetAsync(GetIndexRequestDescriptor descrip /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) { @@ -7446,10 +10666,10 @@ public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Ind /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -7464,7 +10684,7 @@ public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Ind /// Get aliases. /// Retrieves information for one or more data stream or index aliases. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAliasResponse GetAlias(GetAliasRequest request) @@ -7478,7 +10698,7 @@ public virtual GetAliasResponse GetAlias(GetAliasRequest request) /// Get aliases. /// Retrieves information for one or more data stream or index aliases. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAliasAsync(GetAliasRequest request, CancellationToken cancellationToken = default) { @@ -7491,7 +10711,7 @@ public virtual Task GetAliasAsync(GetAliasRequest request, Can /// Get aliases. /// Retrieves information for one or more data stream or index aliases. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAliasResponse GetAlias(GetAliasRequestDescriptor descriptor) @@ -7505,7 +10725,7 @@ public virtual GetAliasResponse GetAlias(GetAliasRequestDescriptor - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAliasResponse GetAlias(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names? name) @@ -7520,7 +10740,7 @@ public virtual GetAliasResponse GetAlias(Elastic.Clients.Elasticsearc /// Get aliases. /// Retrieves information for one or more data stream or index aliases. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAliasResponse GetAlias(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names? name, Action> configureRequest) @@ -7536,7 +10756,7 @@ public virtual GetAliasResponse GetAlias(Elastic.Clients.Elasticsearc /// Get aliases. /// Retrieves information for one or more data stream or index aliases. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAliasResponse GetAlias() @@ -7551,7 +10771,7 @@ public virtual GetAliasResponse GetAlias() /// Get aliases. /// Retrieves information for one or more data stream or index aliases. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAliasResponse GetAlias(Action> configureRequest) @@ -7567,7 +10787,7 @@ public virtual GetAliasResponse GetAlias(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAliasResponse GetAlias(GetAliasRequestDescriptor descriptor) @@ -7581,7 +10801,7 @@ public virtual GetAliasResponse GetAlias(GetAliasRequestDescriptor descriptor) /// Get aliases. /// Retrieves information for one or more data stream or index aliases. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAliasResponse GetAlias(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names? name) @@ -7596,7 +10816,7 @@ public virtual GetAliasResponse GetAlias(Elastic.Clients.Elasticsearch.Indices? /// Get aliases. /// Retrieves information for one or more data stream or index aliases. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAliasResponse GetAlias(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names? name, Action configureRequest) @@ -7612,7 +10832,7 @@ public virtual GetAliasResponse GetAlias(Elastic.Clients.Elasticsearch.Indices? /// Get aliases. /// Retrieves information for one or more data stream or index aliases. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAliasResponse GetAlias() @@ -7627,7 +10847,7 @@ public virtual GetAliasResponse GetAlias() /// Get aliases. /// Retrieves information for one or more data stream or index aliases. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAliasResponse GetAlias(Action configureRequest) @@ -7643,7 +10863,7 @@ public virtual GetAliasResponse GetAlias(Action confi /// Get aliases. /// Retrieves information for one or more data stream or index aliases. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAliasAsync(GetAliasRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -7656,7 +10876,7 @@ public virtual Task GetAliasAsync(GetAliasRequestDe /// Get aliases. /// Retrieves information for one or more data stream or index aliases. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAliasAsync(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names? name, CancellationToken cancellationToken = default) { @@ -7670,7 +10890,7 @@ public virtual Task GetAliasAsync(Elastic.Clients.E /// Get aliases. /// Retrieves information for one or more data stream or index aliases. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAliasAsync(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names? name, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -7685,7 +10905,7 @@ public virtual Task GetAliasAsync(Elastic.Clients.E /// Get aliases. /// Retrieves information for one or more data stream or index aliases. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAliasAsync(CancellationToken cancellationToken = default) { @@ -7699,7 +10919,7 @@ public virtual Task GetAliasAsync(CancellationToken /// Get aliases. /// Retrieves information for one or more data stream or index aliases. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAliasAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -7714,7 +10934,7 @@ public virtual Task GetAliasAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAliasAsync(GetAliasRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -7727,7 +10947,7 @@ public virtual Task GetAliasAsync(GetAliasRequestDescriptor de /// Get aliases. /// Retrieves information for one or more data stream or index aliases. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAliasAsync(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names? name, CancellationToken cancellationToken = default) { @@ -7741,7 +10961,7 @@ public virtual Task GetAliasAsync(Elastic.Clients.Elasticsearc /// Get aliases. /// Retrieves information for one or more data stream or index aliases. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAliasAsync(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names? name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -7756,7 +10976,7 @@ public virtual Task GetAliasAsync(Elastic.Clients.Elasticsearc /// Get aliases. /// Retrieves information for one or more data stream or index aliases. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAliasAsync(CancellationToken cancellationToken = default) { @@ -7770,7 +10990,7 @@ public virtual Task GetAliasAsync(CancellationToken cancellati /// Get aliases. /// Retrieves information for one or more data stream or index aliases. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAliasAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -7894,6 +11114,120 @@ public virtual Task GetDataLifecycleAsync(Elastic.Clie return DoRequestAsync(descriptor, cancellationToken); } + /// + /// + /// Get data stream lifecycle stats. + /// Get statistics about the data streams that are managed by a data stream lifecycle. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetDataLifecycleStatsResponse GetDataLifecycleStats(GetDataLifecycleStatsRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Get data stream lifecycle stats. + /// Get statistics about the data streams that are managed by a data stream lifecycle. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetDataLifecycleStatsAsync(GetDataLifecycleStatsRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Get data stream lifecycle stats. + /// Get statistics about the data streams that are managed by a data stream lifecycle. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetDataLifecycleStatsResponse GetDataLifecycleStats(GetDataLifecycleStatsRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get data stream lifecycle stats. + /// Get statistics about the data streams that are managed by a data stream lifecycle. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetDataLifecycleStatsResponse GetDataLifecycleStats() + { + var descriptor = new GetDataLifecycleStatsRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get data stream lifecycle stats. + /// Get statistics about the data streams that are managed by a data stream lifecycle. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetDataLifecycleStatsResponse GetDataLifecycleStats(Action configureRequest) + { + var descriptor = new GetDataLifecycleStatsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get data stream lifecycle stats. + /// Get statistics about the data streams that are managed by a data stream lifecycle. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetDataLifecycleStatsAsync(GetDataLifecycleStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get data stream lifecycle stats. + /// Get statistics about the data streams that are managed by a data stream lifecycle. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetDataLifecycleStatsAsync(CancellationToken cancellationToken = default) + { + var descriptor = new GetDataLifecycleStatsRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get data stream lifecycle stats. + /// Get statistics about the data streams that are managed by a data stream lifecycle. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetDataLifecycleStatsAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetDataLifecycleStatsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + /// /// /// Get data streams. @@ -8074,7 +11408,10 @@ public virtual Task GetDataStreamAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetFieldMappingResponse GetFieldMapping(GetFieldMappingRequest request) @@ -8089,7 +11426,10 @@ public virtual GetFieldMappingResponse GetFieldMapping(GetFieldMappingRequest re /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetFieldMappingAsync(GetFieldMappingRequest request, CancellationToken cancellationToken = default) { @@ -8103,7 +11443,10 @@ public virtual Task GetFieldMappingAsync(GetFieldMappin /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetFieldMappingResponse GetFieldMapping(GetFieldMappingRequestDescriptor descriptor) @@ -8118,7 +11461,10 @@ public virtual GetFieldMappingResponse GetFieldMapping(GetFieldMappin /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetFieldMappingResponse GetFieldMapping(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Fields fields) @@ -8134,7 +11480,10 @@ public virtual GetFieldMappingResponse GetFieldMapping(Elastic.Client /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetFieldMappingResponse GetFieldMapping(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Fields fields, Action> configureRequest) @@ -8151,7 +11500,10 @@ public virtual GetFieldMappingResponse GetFieldMapping(Elastic.Client /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetFieldMappingResponse GetFieldMapping(Elastic.Clients.Elasticsearch.Fields fields) @@ -8167,7 +11519,10 @@ public virtual GetFieldMappingResponse GetFieldMapping(Elastic.Client /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetFieldMappingResponse GetFieldMapping(Elastic.Clients.Elasticsearch.Fields fields, Action> configureRequest) @@ -8184,7 +11539,10 @@ public virtual GetFieldMappingResponse GetFieldMapping(Elastic.Client /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetFieldMappingResponse GetFieldMapping(GetFieldMappingRequestDescriptor descriptor) @@ -8199,7 +11557,10 @@ public virtual GetFieldMappingResponse GetFieldMapping(GetFieldMappingRequestDes /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetFieldMappingResponse GetFieldMapping(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Fields fields) @@ -8215,7 +11576,10 @@ public virtual GetFieldMappingResponse GetFieldMapping(Elastic.Clients.Elasticse /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetFieldMappingResponse GetFieldMapping(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Fields fields, Action configureRequest) @@ -8232,7 +11596,10 @@ public virtual GetFieldMappingResponse GetFieldMapping(Elastic.Clients.Elasticse /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetFieldMappingResponse GetFieldMapping(Elastic.Clients.Elasticsearch.Fields fields) @@ -8248,7 +11615,10 @@ public virtual GetFieldMappingResponse GetFieldMapping(Elastic.Clients.Elasticse /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetFieldMappingResponse GetFieldMapping(Elastic.Clients.Elasticsearch.Fields fields, Action configureRequest) @@ -8265,7 +11635,10 @@ public virtual GetFieldMappingResponse GetFieldMapping(Elastic.Clients.Elasticse /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetFieldMappingAsync(GetFieldMappingRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -8279,7 +11652,10 @@ public virtual Task GetFieldMappingAsync(Get /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetFieldMappingAsync(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Fields fields, CancellationToken cancellationToken = default) { @@ -8294,7 +11670,10 @@ public virtual Task GetFieldMappingAsync(Ela /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetFieldMappingAsync(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Fields fields, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -8310,7 +11689,10 @@ public virtual Task GetFieldMappingAsync(Ela /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetFieldMappingAsync(Elastic.Clients.Elasticsearch.Fields fields, CancellationToken cancellationToken = default) { @@ -8325,7 +11707,10 @@ public virtual Task GetFieldMappingAsync(Ela /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetFieldMappingAsync(Elastic.Clients.Elasticsearch.Fields fields, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -8341,7 +11726,10 @@ public virtual Task GetFieldMappingAsync(Ela /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetFieldMappingAsync(GetFieldMappingRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -8355,7 +11743,10 @@ public virtual Task GetFieldMappingAsync(GetFieldMappin /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetFieldMappingAsync(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Fields fields, CancellationToken cancellationToken = default) { @@ -8370,7 +11761,10 @@ public virtual Task GetFieldMappingAsync(Elastic.Client /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetFieldMappingAsync(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Fields fields, Action configureRequest, CancellationToken cancellationToken = default) { @@ -8386,7 +11780,10 @@ public virtual Task GetFieldMappingAsync(Elastic.Client /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetFieldMappingAsync(Elastic.Clients.Elasticsearch.Fields fields, CancellationToken cancellationToken = default) { @@ -8401,7 +11798,10 @@ public virtual Task GetFieldMappingAsync(Elastic.Client /// Retrieves mapping definitions for one or more fields. /// For data streams, the API retrieves field mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetFieldMappingAsync(Elastic.Clients.Elasticsearch.Fields fields, Action configureRequest, CancellationToken cancellationToken = default) { @@ -8414,9 +11814,9 @@ public virtual Task GetFieldMappingAsync(Elastic.Client /// /// /// Get index templates. - /// Returns information about one or more index templates. + /// Get information about one or more index templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndexTemplateResponse GetIndexTemplate(GetIndexTemplateRequest request) @@ -8428,9 +11828,9 @@ public virtual GetIndexTemplateResponse GetIndexTemplate(GetIndexTemplateRequest /// /// /// Get index templates. - /// Returns information about one or more index templates. + /// Get information about one or more index templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetIndexTemplateAsync(GetIndexTemplateRequest request, CancellationToken cancellationToken = default) { @@ -8441,9 +11841,9 @@ public virtual Task GetIndexTemplateAsync(GetIndexTemp /// /// /// Get index templates. - /// Returns information about one or more index templates. + /// Get information about one or more index templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndexTemplateResponse GetIndexTemplate(GetIndexTemplateRequestDescriptor descriptor) @@ -8455,9 +11855,9 @@ public virtual GetIndexTemplateResponse GetIndexTemplate(GetIndexTemplateRequest /// /// /// Get index templates. - /// Returns information about one or more index templates. + /// Get information about one or more index templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndexTemplateResponse GetIndexTemplate(Elastic.Clients.Elasticsearch.Name? name) @@ -8470,9 +11870,9 @@ public virtual GetIndexTemplateResponse GetIndexTemplate(Elastic.Clients.Elastic /// /// /// Get index templates. - /// Returns information about one or more index templates. + /// Get information about one or more index templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndexTemplateResponse GetIndexTemplate(Elastic.Clients.Elasticsearch.Name? name, Action configureRequest) @@ -8486,9 +11886,9 @@ public virtual GetIndexTemplateResponse GetIndexTemplate(Elastic.Clients.Elastic /// /// /// Get index templates. - /// Returns information about one or more index templates. + /// Get information about one or more index templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndexTemplateResponse GetIndexTemplate() @@ -8501,9 +11901,9 @@ public virtual GetIndexTemplateResponse GetIndexTemplate() /// /// /// Get index templates. - /// Returns information about one or more index templates. + /// Get information about one or more index templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndexTemplateResponse GetIndexTemplate(Action configureRequest) @@ -8517,9 +11917,9 @@ public virtual GetIndexTemplateResponse GetIndexTemplate(Action /// /// Get index templates. - /// Returns information about one or more index templates. + /// Get information about one or more index templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetIndexTemplateAsync(GetIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -8530,9 +11930,9 @@ public virtual Task GetIndexTemplateAsync(GetIndexTemp /// /// /// Get index templates. - /// Returns information about one or more index templates. + /// Get information about one or more index templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetIndexTemplateAsync(Elastic.Clients.Elasticsearch.Name? name, CancellationToken cancellationToken = default) { @@ -8544,9 +11944,9 @@ public virtual Task GetIndexTemplateAsync(Elastic.Clie /// /// /// Get index templates. - /// Returns information about one or more index templates. + /// Get information about one or more index templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetIndexTemplateAsync(Elastic.Clients.Elasticsearch.Name? name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -8559,9 +11959,9 @@ public virtual Task GetIndexTemplateAsync(Elastic.Clie /// /// /// Get index templates. - /// Returns information about one or more index templates. + /// Get information about one or more index templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetIndexTemplateAsync(CancellationToken cancellationToken = default) { @@ -8573,9 +11973,9 @@ public virtual Task GetIndexTemplateAsync(Cancellation /// /// /// Get index templates. - /// Returns information about one or more index templates. + /// Get information about one or more index templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetIndexTemplateAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -8588,10 +11988,9 @@ public virtual Task GetIndexTemplateAsync(Action /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetMappingResponse GetMapping(GetMappingRequest request) @@ -8603,10 +12002,9 @@ public virtual GetMappingResponse GetMapping(GetMappingRequest request) /// /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetMappingAsync(GetMappingRequest request, CancellationToken cancellationToken = default) { @@ -8617,10 +12015,9 @@ public virtual Task GetMappingAsync(GetMappingRequest reques /// /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetMappingResponse GetMapping(GetMappingRequestDescriptor descriptor) @@ -8632,10 +12029,9 @@ public virtual GetMappingResponse GetMapping(GetMappingRequestDescrip /// /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetMappingResponse GetMapping(Elastic.Clients.Elasticsearch.Indices? indices) @@ -8648,10 +12044,9 @@ public virtual GetMappingResponse GetMapping(Elastic.Clients.Elastics /// /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetMappingResponse GetMapping(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) @@ -8665,10 +12060,9 @@ public virtual GetMappingResponse GetMapping(Elastic.Clients.Elastics /// /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetMappingResponse GetMapping() @@ -8681,10 +12075,9 @@ public virtual GetMappingResponse GetMapping() /// /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetMappingResponse GetMapping(Action> configureRequest) @@ -8698,10 +12091,9 @@ public virtual GetMappingResponse GetMapping(Action /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetMappingResponse GetMapping(GetMappingRequestDescriptor descriptor) @@ -8713,10 +12105,9 @@ public virtual GetMappingResponse GetMapping(GetMappingRequestDescriptor descrip /// /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetMappingResponse GetMapping(Elastic.Clients.Elasticsearch.Indices? indices) @@ -8729,10 +12120,9 @@ public virtual GetMappingResponse GetMapping(Elastic.Clients.Elasticsearch.Indic /// /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetMappingResponse GetMapping(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest) @@ -8746,10 +12136,9 @@ public virtual GetMappingResponse GetMapping(Elastic.Clients.Elasticsearch.Indic /// /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetMappingResponse GetMapping() @@ -8762,10 +12151,9 @@ public virtual GetMappingResponse GetMapping() /// /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetMappingResponse GetMapping(Action configureRequest) @@ -8779,10 +12167,9 @@ public virtual GetMappingResponse GetMapping(Action /// /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetMappingAsync(GetMappingRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -8793,10 +12180,9 @@ public virtual Task GetMappingAsync(GetMappingReq /// /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetMappingAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { @@ -8808,10 +12194,9 @@ public virtual Task GetMappingAsync(Elastic.Clien /// /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetMappingAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -8824,10 +12209,9 @@ public virtual Task GetMappingAsync(Elastic.Clien /// /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetMappingAsync(CancellationToken cancellationToken = default) { @@ -8839,10 +12223,9 @@ public virtual Task GetMappingAsync(CancellationT /// /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetMappingAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -8855,10 +12238,9 @@ public virtual Task GetMappingAsync(Action /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetMappingAsync(GetMappingRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -8869,10 +12251,9 @@ public virtual Task GetMappingAsync(GetMappingRequestDescrip /// /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetMappingAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { @@ -8884,10 +12265,9 @@ public virtual Task GetMappingAsync(Elastic.Clients.Elastics /// /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetMappingAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -8900,10 +12280,9 @@ public virtual Task GetMappingAsync(Elastic.Clients.Elastics /// /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetMappingAsync(CancellationToken cancellationToken = default) { @@ -8915,10 +12294,9 @@ public virtual Task GetMappingAsync(CancellationToken cancel /// /// /// Get mapping definitions. - /// Retrieves mapping definitions for one or more indices. /// For data streams, the API retrieves mappings for the stream’s backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetMappingAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -8931,10 +12309,10 @@ public virtual Task GetMappingAsync(Action /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndicesSettingsResponse GetSettings(GetIndicesSettingsRequest request) @@ -8946,10 +12324,10 @@ public virtual GetIndicesSettingsResponse GetSettings(GetIndicesSettingsRequest /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSettingsAsync(GetIndicesSettingsRequest request, CancellationToken cancellationToken = default) { @@ -8960,10 +12338,10 @@ public virtual Task GetSettingsAsync(GetIndicesSetti /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndicesSettingsResponse GetSettings(GetIndicesSettingsRequestDescriptor descriptor) @@ -8975,10 +12353,10 @@ public virtual GetIndicesSettingsResponse GetSettings(GetIndicesSetti /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndicesSettingsResponse GetSettings(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names? name) @@ -8991,10 +12369,10 @@ public virtual GetIndicesSettingsResponse GetSettings(Elastic.Clients /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndicesSettingsResponse GetSettings(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names? name, Action> configureRequest) @@ -9008,10 +12386,10 @@ public virtual GetIndicesSettingsResponse GetSettings(Elastic.Clients /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndicesSettingsResponse GetSettings() @@ -9024,10 +12402,10 @@ public virtual GetIndicesSettingsResponse GetSettings() /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndicesSettingsResponse GetSettings(Action> configureRequest) @@ -9041,10 +12419,10 @@ public virtual GetIndicesSettingsResponse GetSettings(Action /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndicesSettingsResponse GetSettings(GetIndicesSettingsRequestDescriptor descriptor) @@ -9056,10 +12434,10 @@ public virtual GetIndicesSettingsResponse GetSettings(GetIndicesSettingsRequestD /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndicesSettingsResponse GetSettings(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names? name) @@ -9072,10 +12450,10 @@ public virtual GetIndicesSettingsResponse GetSettings(Elastic.Clients.Elasticsea /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndicesSettingsResponse GetSettings(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names? name, Action configureRequest) @@ -9089,10 +12467,10 @@ public virtual GetIndicesSettingsResponse GetSettings(Elastic.Clients.Elasticsea /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndicesSettingsResponse GetSettings() @@ -9105,10 +12483,10 @@ public virtual GetIndicesSettingsResponse GetSettings() /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetIndicesSettingsResponse GetSettings(Action configureRequest) @@ -9122,10 +12500,10 @@ public virtual GetIndicesSettingsResponse GetSettings(Action /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSettingsAsync(GetIndicesSettingsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -9136,10 +12514,10 @@ public virtual Task GetSettingsAsync(GetI /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSettingsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names? name, CancellationToken cancellationToken = default) { @@ -9151,10 +12529,10 @@ public virtual Task GetSettingsAsync(Elas /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSettingsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names? name, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -9167,10 +12545,10 @@ public virtual Task GetSettingsAsync(Elas /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSettingsAsync(CancellationToken cancellationToken = default) { @@ -9182,10 +12560,10 @@ public virtual Task GetSettingsAsync(Canc /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSettingsAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -9198,10 +12576,10 @@ public virtual Task GetSettingsAsync(Acti /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSettingsAsync(GetIndicesSettingsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -9212,10 +12590,10 @@ public virtual Task GetSettingsAsync(GetIndicesSetti /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSettingsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names? name, CancellationToken cancellationToken = default) { @@ -9227,10 +12605,10 @@ public virtual Task GetSettingsAsync(Elastic.Clients /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSettingsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names? name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -9243,10 +12621,10 @@ public virtual Task GetSettingsAsync(Elastic.Clients /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSettingsAsync(CancellationToken cancellationToken = default) { @@ -9258,10 +12636,10 @@ public virtual Task GetSettingsAsync(CancellationTok /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSettingsAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -9274,9 +12652,12 @@ public virtual Task GetSettingsAsync(Action /// /// Get index templates. - /// Retrieves information about one or more index templates. + /// Get information about one or more index templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetTemplateResponse GetTemplate(GetTemplateRequest request) @@ -9288,9 +12669,12 @@ public virtual GetTemplateResponse GetTemplate(GetTemplateRequest request) /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetTemplateAsync(GetTemplateRequest request, CancellationToken cancellationToken = default) { @@ -9301,9 +12685,12 @@ public virtual Task GetTemplateAsync(GetTemplateRequest req /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetTemplateResponse GetTemplate(GetTemplateRequestDescriptor descriptor) @@ -9315,9 +12702,12 @@ public virtual GetTemplateResponse GetTemplate(GetTemplateRequestDescriptor desc /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetTemplateResponse GetTemplate(Elastic.Clients.Elasticsearch.Names? name) @@ -9330,9 +12720,12 @@ public virtual GetTemplateResponse GetTemplate(Elastic.Clients.Elasticsearch.Nam /// /// /// Get index templates. - /// Retrieves information about one or more index templates. + /// Get information about one or more index templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetTemplateResponse GetTemplate(Elastic.Clients.Elasticsearch.Names? name, Action configureRequest) @@ -9346,9 +12739,12 @@ public virtual GetTemplateResponse GetTemplate(Elastic.Clients.Elasticsearch.Nam /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetTemplateResponse GetTemplate() @@ -9361,9 +12757,12 @@ public virtual GetTemplateResponse GetTemplate() /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetTemplateResponse GetTemplate(Action configureRequest) @@ -9377,9 +12776,12 @@ public virtual GetTemplateResponse GetTemplate(Action /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetTemplateAsync(GetTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -9390,9 +12792,12 @@ public virtual Task GetTemplateAsync(GetTemplateRequestDesc /// /// /// Get index templates. - /// Retrieves information about one or more index templates. + /// Get information about one or more index templates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetTemplateAsync(Elastic.Clients.Elasticsearch.Names? name, CancellationToken cancellationToken = default) { @@ -9404,9 +12809,12 @@ public virtual Task GetTemplateAsync(Elastic.Clients.Elasti /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetTemplateAsync(Elastic.Clients.Elasticsearch.Names? name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -9419,9 +12827,12 @@ public virtual Task GetTemplateAsync(Elastic.Clients.Elasti /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetTemplateAsync(CancellationToken cancellationToken = default) { @@ -9433,9 +12844,12 @@ public virtual Task GetTemplateAsync(CancellationToken canc /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetTemplateAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -9747,10 +13161,37 @@ public virtual Task ModifyDataStreamAsync(Action /// - /// Opens a closed index. + /// Open a closed index. /// For data streams, the API opens any closed backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual OpenIndexResponse Open(OpenIndexRequest request) @@ -9761,10 +13202,37 @@ public virtual OpenIndexResponse Open(OpenIndexRequest request) /// /// - /// Opens a closed index. + /// Open a closed index. /// For data streams, the API opens any closed backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenAsync(OpenIndexRequest request, CancellationToken cancellationToken = default) { @@ -9774,10 +13242,37 @@ public virtual Task OpenAsync(OpenIndexRequest request, Cance /// /// - /// Opens a closed index. + /// Open a closed index. /// For data streams, the API opens any closed backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual OpenIndexResponse Open(OpenIndexRequestDescriptor descriptor) @@ -9788,10 +13283,37 @@ public virtual OpenIndexResponse Open(OpenIndexRequestDescriptor /// - /// Opens a closed index. + /// Open a closed index. /// For data streams, the API opens any closed backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual OpenIndexResponse Open(Elastic.Clients.Elasticsearch.Indices indices) @@ -9803,10 +13325,37 @@ public virtual OpenIndexResponse Open(Elastic.Clients.Elasticsearch.I /// /// - /// Opens a closed index. + /// Open a closed index. /// For data streams, the API opens any closed backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual OpenIndexResponse Open(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest) @@ -9819,10 +13368,37 @@ public virtual OpenIndexResponse Open(Elastic.Clients.Elasticsearch.I /// /// - /// Opens a closed index. + /// Open a closed index. /// For data streams, the API opens any closed backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual OpenIndexResponse Open() @@ -9834,10 +13410,37 @@ public virtual OpenIndexResponse Open() /// /// - /// Opens a closed index. + /// Open a closed index. /// For data streams, the API opens any closed backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual OpenIndexResponse Open(Action> configureRequest) @@ -9850,24 +13453,78 @@ public virtual OpenIndexResponse Open(Action /// - /// Opens a closed index. - /// For data streams, the API opens any closed backing indices. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual OpenIndexResponse Open(OpenIndexRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual OpenIndexResponse Open(OpenIndexRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Opens a closed index. - /// For data streams, the API opens any closed backing indices. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual OpenIndexResponse Open(Elastic.Clients.Elasticsearch.Indices indices) @@ -9879,10 +13536,37 @@ public virtual OpenIndexResponse Open(Elastic.Clients.Elasticsearch.Indices indi /// /// - /// Opens a closed index. + /// Open a closed index. /// For data streams, the API opens any closed backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual OpenIndexResponse Open(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest) @@ -9895,10 +13579,37 @@ public virtual OpenIndexResponse Open(Elastic.Clients.Elasticsearch.Indices indi /// /// - /// Opens a closed index. + /// Open a closed index. /// For data streams, the API opens any closed backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenAsync(OpenIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -9908,10 +13619,37 @@ public virtual Task OpenAsync(OpenIndexRequestDesc /// /// - /// Opens a closed index. + /// Open a closed index. /// For data streams, the API opens any closed backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) { @@ -9922,10 +13660,37 @@ public virtual Task OpenAsync(Elastic.Clients.Elas /// /// - /// Opens a closed index. + /// Open a closed index. /// For data streams, the API opens any closed backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenAsync(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -9937,10 +13702,37 @@ public virtual Task OpenAsync(Elastic.Clients.Elas /// /// - /// Opens a closed index. + /// Open a closed index. /// For data streams, the API opens any closed backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenAsync(CancellationToken cancellationToken = default) { @@ -9951,10 +13743,37 @@ public virtual Task OpenAsync(CancellationToken ca /// /// - /// Opens a closed index. + /// Open a closed index. /// For data streams, the API opens any closed backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -9966,10 +13785,37 @@ public virtual Task OpenAsync(Action /// - /// Opens a closed index. + /// Open a closed index. /// For data streams, the API opens any closed backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenAsync(OpenIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -9979,10 +13825,37 @@ public virtual Task OpenAsync(OpenIndexRequestDescriptor desc /// /// - /// Opens a closed index. + /// Open a closed index. /// For data streams, the API opens any closed backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) { @@ -9993,10 +13866,37 @@ public virtual Task OpenAsync(Elastic.Clients.Elasticsearch.I /// /// - /// Opens a closed index. + /// Open a closed index. /// For data streams, the API opens any closed backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task OpenAsync(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -10518,9 +14418,9 @@ public virtual PutDataLifecycleResponse PutDataLifecycle(PutDataLifecycleRequest /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutDataLifecycleResponse PutDataLifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle lifecycle, Elastic.Clients.Elasticsearch.DataStreamNames name) + public virtual PutDataLifecycleResponse PutDataLifecycle(Elastic.Clients.Elasticsearch.DataStreamNames name) { - var descriptor = new PutDataLifecycleRequestDescriptor(lifecycle, name); + var descriptor = new PutDataLifecycleRequestDescriptor(name); descriptor.BeforeRequest(); return DoRequest(descriptor); } @@ -10533,9 +14433,9 @@ public virtual PutDataLifecycleResponse PutDataLifecycle(Elastic.Clients.Elastic /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutDataLifecycleResponse PutDataLifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle lifecycle, Elastic.Clients.Elasticsearch.DataStreamNames name, Action configureRequest) + public virtual PutDataLifecycleResponse PutDataLifecycle(Elastic.Clients.Elasticsearch.DataStreamNames name, Action configureRequest) { - var descriptor = new PutDataLifecycleRequestDescriptor(lifecycle, name); + var descriptor = new PutDataLifecycleRequestDescriptor(name); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); return DoRequest(descriptor); @@ -10561,9 +14461,9 @@ public virtual Task PutDataLifecycleAsync(PutDataLifec /// /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutDataLifecycleAsync(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle lifecycle, Elastic.Clients.Elasticsearch.DataStreamNames name, CancellationToken cancellationToken = default) + public virtual Task PutDataLifecycleAsync(Elastic.Clients.Elasticsearch.DataStreamNames name, CancellationToken cancellationToken = default) { - var descriptor = new PutDataLifecycleRequestDescriptor(lifecycle, name); + var descriptor = new PutDataLifecycleRequestDescriptor(name); descriptor.BeforeRequest(); return DoRequestAsync(descriptor, cancellationToken); } @@ -10575,9 +14475,9 @@ public virtual Task PutDataLifecycleAsync(Elastic.Clie /// /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutDataLifecycleAsync(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle lifecycle, Elastic.Clients.Elasticsearch.DataStreamNames name, Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task PutDataLifecycleAsync(Elastic.Clients.Elasticsearch.DataStreamNames name, Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new PutDataLifecycleRequestDescriptor(lifecycle, name); + var descriptor = new PutDataLifecycleRequestDescriptor(name); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); return DoRequestAsync(descriptor, cancellationToken); @@ -10588,6 +14488,39 @@ public virtual Task PutDataLifecycleAsync(Elastic.Clie /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -10602,6 +14535,39 @@ public virtual PutIndexTemplateResponse PutIndexTemplate(PutIndexTemplateRequest /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutIndexTemplateAsync(PutIndexTemplateRequest request, CancellationToken cancellationToken = default) @@ -10615,6 +14581,39 @@ public virtual Task PutIndexTemplateAsync(PutIndexTemp /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -10629,6 +14628,39 @@ public virtual PutIndexTemplateResponse PutIndexTemplate(PutIndexTemp /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -10641,8 +14673,41 @@ public virtual PutIndexTemplateResponse PutIndexTemplate(Elastic.Clie /// /// - /// Create or update an index template. - /// Index templates define settings, mappings, and aliases that can be applied automatically to new indices. + /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -10660,6 +14725,39 @@ public virtual PutIndexTemplateResponse PutIndexTemplate(Elastic.Clie /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -10674,6 +14772,39 @@ public virtual PutIndexTemplateResponse PutIndexTemplate(PutIndexTemplateRequest /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -10689,6 +14820,39 @@ public virtual PutIndexTemplateResponse PutIndexTemplate(Elastic.Clients.Elastic /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -10705,6 +14869,39 @@ public virtual PutIndexTemplateResponse PutIndexTemplate(Elastic.Clients.Elastic /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutIndexTemplateAsync(PutIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) @@ -10718,6 +14915,39 @@ public virtual Task PutIndexTemplateAsync(P /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutIndexTemplateAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) @@ -10732,6 +14962,39 @@ public virtual Task PutIndexTemplateAsync(E /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutIndexTemplateAsync(Elastic.Clients.Elasticsearch.Name name, Action> configureRequest, CancellationToken cancellationToken = default) @@ -10747,6 +15010,39 @@ public virtual Task PutIndexTemplateAsync(E /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutIndexTemplateAsync(PutIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) @@ -10760,6 +15056,39 @@ public virtual Task PutIndexTemplateAsync(PutIndexTemp /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutIndexTemplateAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) @@ -10774,6 +15103,39 @@ public virtual Task PutIndexTemplateAsync(Elastic.Clie /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutIndexTemplateAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) @@ -10787,11 +15149,45 @@ public virtual Task PutIndexTemplateAsync(Elastic.Clie /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutMappingResponse PutMapping(PutMappingRequest request) @@ -10803,11 +15199,45 @@ public virtual PutMappingResponse PutMapping(PutMappingRequest request) /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutMappingAsync(PutMappingRequest request, CancellationToken cancellationToken = default) { @@ -10818,11 +15248,45 @@ public virtual Task PutMappingAsync(PutMappingRequest reques /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutMappingResponse PutMapping(PutMappingRequestDescriptor descriptor) @@ -10834,11 +15298,45 @@ public virtual PutMappingResponse PutMapping(PutMappingRequestDescrip /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutMappingResponse PutMapping(Elastic.Clients.Elasticsearch.Indices indices) @@ -10851,11 +15349,45 @@ public virtual PutMappingResponse PutMapping(Elastic.Clients.Elastics /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutMappingResponse PutMapping(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest) @@ -10869,11 +15401,45 @@ public virtual PutMappingResponse PutMapping(Elastic.Clients.Elastics /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutMappingResponse PutMapping() @@ -10885,12 +15451,46 @@ public virtual PutMappingResponse PutMapping() /// /// - /// 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. - /// For data streams, these changes are applied to all backing indices by default. + /// Update field mappings. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutMappingResponse PutMapping(Action> configureRequest) @@ -10904,11 +15504,45 @@ public virtual PutMappingResponse PutMapping(Action /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutMappingResponse PutMapping(PutMappingRequestDescriptor descriptor) @@ -10920,11 +15554,45 @@ public virtual PutMappingResponse PutMapping(PutMappingRequestDescriptor descrip /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutMappingResponse PutMapping(Elastic.Clients.Elasticsearch.Indices indices) @@ -10937,11 +15605,45 @@ public virtual PutMappingResponse PutMapping(Elastic.Clients.Elasticsearch.Indic /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutMappingResponse PutMapping(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest) @@ -10955,11 +15657,45 @@ public virtual PutMappingResponse PutMapping(Elastic.Clients.Elasticsearch.Indic /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutMappingAsync(PutMappingRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -10970,11 +15706,45 @@ public virtual Task PutMappingAsync(PutMappingReq /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutMappingAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) { @@ -10986,11 +15756,45 @@ public virtual Task PutMappingAsync(Elastic.Clien /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutMappingAsync(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -11003,11 +15807,45 @@ public virtual Task PutMappingAsync(Elastic.Clien /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutMappingAsync(CancellationToken cancellationToken = default) { @@ -11019,11 +15857,45 @@ public virtual Task PutMappingAsync(CancellationT /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutMappingAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -11036,11 +15908,45 @@ public virtual Task PutMappingAsync(Action /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutMappingAsync(PutMappingRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -11051,11 +15957,45 @@ public virtual Task PutMappingAsync(PutMappingRequestDescrip /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutMappingAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) { @@ -11067,11 +16007,45 @@ public virtual Task PutMappingAsync(Elastic.Clients.Elastics /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutMappingAsync(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -11084,10 +16058,25 @@ public virtual Task PutMappingAsync(Elastic.Clients.Elastics /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutIndicesSettingsResponse PutSettings(PutIndicesSettingsRequest request) @@ -11099,10 +16088,25 @@ public virtual PutIndicesSettingsResponse PutSettings(PutIndicesSettingsRequest /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSettingsAsync(PutIndicesSettingsRequest request, CancellationToken cancellationToken = default) { @@ -11113,10 +16117,25 @@ public virtual Task PutSettingsAsync(PutIndicesSetti /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutIndicesSettingsResponse PutSettings(PutIndicesSettingsRequestDescriptor descriptor) @@ -11128,10 +16147,25 @@ public virtual PutIndicesSettingsResponse PutSettings(PutIndicesSetti /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutIndicesSettingsResponse PutSettings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings settings, Elastic.Clients.Elasticsearch.Indices? indices) @@ -11144,10 +16178,25 @@ public virtual PutIndicesSettingsResponse PutSettings(Elastic.Clients /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutIndicesSettingsResponse PutSettings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings settings, Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) @@ -11161,10 +16210,25 @@ public virtual PutIndicesSettingsResponse PutSettings(Elastic.Clients /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutIndicesSettingsResponse PutSettings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings settings) @@ -11177,10 +16241,25 @@ public virtual PutIndicesSettingsResponse PutSettings(Elastic.Clients /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutIndicesSettingsResponse PutSettings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings settings, Action> configureRequest) @@ -11194,10 +16273,25 @@ public virtual PutIndicesSettingsResponse PutSettings(Elastic.Clients /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutIndicesSettingsResponse PutSettings(PutIndicesSettingsRequestDescriptor descriptor) @@ -11209,10 +16303,25 @@ public virtual PutIndicesSettingsResponse PutSettings(PutIndicesSettingsRequestD /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutIndicesSettingsResponse PutSettings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings settings, Elastic.Clients.Elasticsearch.Indices? indices) @@ -11225,10 +16334,25 @@ public virtual PutIndicesSettingsResponse PutSettings(Elastic.Clients.Elasticsea /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutIndicesSettingsResponse PutSettings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings settings, Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest) @@ -11242,10 +16366,25 @@ public virtual PutIndicesSettingsResponse PutSettings(Elastic.Clients.Elasticsea /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutIndicesSettingsResponse PutSettings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings settings) @@ -11258,10 +16397,25 @@ public virtual PutIndicesSettingsResponse PutSettings(Elastic.Clients.Elasticsea /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutIndicesSettingsResponse PutSettings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings settings, Action configureRequest) @@ -11275,10 +16429,25 @@ public virtual PutIndicesSettingsResponse PutSettings(Elastic.Clients.Elasticsea /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSettingsAsync(PutIndicesSettingsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -11289,10 +16458,25 @@ public virtual Task PutSettingsAsync(PutI /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSettingsAsync(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings settings, Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { @@ -11304,10 +16488,25 @@ public virtual Task PutSettingsAsync(Elas /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSettingsAsync(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings settings, Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -11320,10 +16519,25 @@ public virtual Task PutSettingsAsync(Elas /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSettingsAsync(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings settings, CancellationToken cancellationToken = default) { @@ -11335,10 +16549,25 @@ public virtual Task PutSettingsAsync(Elas /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSettingsAsync(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings settings, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -11351,10 +16580,25 @@ public virtual Task PutSettingsAsync(Elas /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSettingsAsync(PutIndicesSettingsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -11365,10 +16609,25 @@ public virtual Task PutSettingsAsync(PutIndicesSetti /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSettingsAsync(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings settings, Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { @@ -11380,10 +16639,25 @@ public virtual Task PutSettingsAsync(Elastic.Clients /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSettingsAsync(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings settings, Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -11396,10 +16670,25 @@ public virtual Task PutSettingsAsync(Elastic.Clients /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSettingsAsync(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings settings, CancellationToken cancellationToken = default) { @@ -11411,10 +16700,25 @@ public virtual Task PutSettingsAsync(Elastic.Clients /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSettingsAsync(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings settings, Action configureRequest, CancellationToken cancellationToken = default) { @@ -11442,7 +16746,19 @@ public virtual Task PutSettingsAsync(Elastic.Clients /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutTemplateResponse PutTemplate(PutTemplateRequest request) @@ -11469,7 +16785,19 @@ public virtual PutTemplateResponse PutTemplate(PutTemplateRequest request) /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutTemplateAsync(PutTemplateRequest request, CancellationToken cancellationToken = default) { @@ -11495,7 +16823,19 @@ public virtual Task PutTemplateAsync(PutTemplateRequest req /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutTemplateResponse PutTemplate(PutTemplateRequestDescriptor descriptor) @@ -11522,7 +16862,19 @@ public virtual PutTemplateResponse PutTemplate(PutTemplateRequestDesc /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutTemplateResponse PutTemplate(Elastic.Clients.Elasticsearch.Name name) @@ -11550,7 +16902,19 @@ public virtual PutTemplateResponse PutTemplate(Elastic.Clients.Elasti /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutTemplateResponse PutTemplate(Elastic.Clients.Elasticsearch.Name name, Action> configureRequest) @@ -11579,7 +16943,19 @@ public virtual PutTemplateResponse PutTemplate(Elastic.Clients.Elasti /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutTemplateResponse PutTemplate(PutTemplateRequestDescriptor descriptor) @@ -11606,7 +16982,19 @@ public virtual PutTemplateResponse PutTemplate(PutTemplateRequestDescriptor desc /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutTemplateResponse PutTemplate(Elastic.Clients.Elasticsearch.Name name) @@ -11634,7 +17022,19 @@ public virtual PutTemplateResponse PutTemplate(Elastic.Clients.Elasticsearch.Nam /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutTemplateResponse PutTemplate(Elastic.Clients.Elasticsearch.Name name, Action configureRequest) @@ -11663,7 +17063,19 @@ public virtual PutTemplateResponse PutTemplate(Elastic.Clients.Elasticsearch.Nam /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutTemplateAsync(PutTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -11689,7 +17101,19 @@ public virtual Task PutTemplateAsync(PutTemplate /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutTemplateAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) { @@ -11716,7 +17140,19 @@ public virtual Task PutTemplateAsync(Elastic.Cli /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutTemplateAsync(Elastic.Clients.Elasticsearch.Name name, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -11744,7 +17180,19 @@ public virtual Task PutTemplateAsync(Elastic.Cli /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutTemplateAsync(PutTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -11770,7 +17218,19 @@ public virtual Task PutTemplateAsync(PutTemplateRequestDesc /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutTemplateAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) { @@ -11797,7 +17257,19 @@ public virtual Task PutTemplateAsync(Elastic.Clients.Elasti /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutTemplateAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -11814,6 +17286,9 @@ public virtual Task PutTemplateAsync(Elastic.Clients.Elasti /// 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. /// @@ -11860,7 +17335,7 @@ public virtual Task PutTemplateAsync(Elastic.Clients.Elasti /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RecoveryResponse Recovery(RecoveryRequest request) @@ -11876,6 +17351,9 @@ public virtual RecoveryResponse Recovery(RecoveryRequest request) /// 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. /// @@ -11922,7 +17400,7 @@ public virtual RecoveryResponse Recovery(RecoveryRequest request) /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RecoveryAsync(RecoveryRequest request, CancellationToken cancellationToken = default) { @@ -11937,6 +17415,9 @@ public virtual Task RecoveryAsync(RecoveryRequest request, Can /// 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. /// @@ -11983,7 +17464,7 @@ public virtual Task RecoveryAsync(RecoveryRequest request, Can /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RecoveryResponse Recovery(RecoveryRequestDescriptor descriptor) @@ -11999,6 +17480,9 @@ public virtual RecoveryResponse Recovery(RecoveryRequestDescriptor /// + /// 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. /// @@ -12045,7 +17529,7 @@ public virtual RecoveryResponse Recovery(RecoveryRequestDescriptor - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RecoveryResponse Recovery(Elastic.Clients.Elasticsearch.Indices? indices) @@ -12062,6 +17546,9 @@ public virtual RecoveryResponse Recovery(Elastic.Clients.Elasticsearc /// 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. /// @@ -12108,7 +17595,7 @@ public virtual RecoveryResponse Recovery(Elastic.Clients.Elasticsearc /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RecoveryResponse Recovery(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) @@ -12126,6 +17613,9 @@ public virtual RecoveryResponse Recovery(Elastic.Clients.Elasticsearc /// 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. /// @@ -12172,7 +17662,7 @@ public virtual RecoveryResponse Recovery(Elastic.Clients.Elasticsearc /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RecoveryResponse Recovery() @@ -12189,6 +17679,9 @@ public virtual RecoveryResponse Recovery() /// 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. /// @@ -12235,7 +17728,7 @@ public virtual RecoveryResponse Recovery() /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RecoveryResponse Recovery(Action> configureRequest) @@ -12253,6 +17746,9 @@ public virtual RecoveryResponse Recovery(Action /// + /// 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. /// @@ -12299,7 +17795,7 @@ public virtual RecoveryResponse Recovery(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RecoveryResponse Recovery(RecoveryRequestDescriptor descriptor) @@ -12315,6 +17811,9 @@ public virtual RecoveryResponse Recovery(RecoveryRequestDescriptor descriptor) /// 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. /// @@ -12361,7 +17860,7 @@ public virtual RecoveryResponse Recovery(RecoveryRequestDescriptor descriptor) /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RecoveryResponse Recovery(Elastic.Clients.Elasticsearch.Indices? indices) @@ -12378,6 +17877,9 @@ public virtual RecoveryResponse Recovery(Elastic.Clients.Elasticsearch.Indices? /// 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. /// @@ -12424,7 +17926,7 @@ public virtual RecoveryResponse Recovery(Elastic.Clients.Elasticsearch.Indices? /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RecoveryResponse Recovery(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest) @@ -12442,6 +17944,9 @@ public virtual RecoveryResponse Recovery(Elastic.Clients.Elasticsearch.Indices? /// 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. /// @@ -12488,7 +17993,7 @@ public virtual RecoveryResponse Recovery(Elastic.Clients.Elasticsearch.Indices? /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RecoveryResponse Recovery() @@ -12505,6 +18010,9 @@ public virtual RecoveryResponse Recovery() /// 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. /// @@ -12551,7 +18059,7 @@ public virtual RecoveryResponse Recovery() /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RecoveryResponse Recovery(Action configureRequest) @@ -12569,6 +18077,9 @@ public virtual RecoveryResponse Recovery(Action confi /// 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. /// @@ -12615,7 +18126,7 @@ public virtual RecoveryResponse Recovery(Action confi /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RecoveryAsync(RecoveryRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -12630,6 +18141,9 @@ public virtual Task RecoveryAsync(RecoveryRequestDe /// 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. /// @@ -12676,7 +18190,7 @@ public virtual Task RecoveryAsync(RecoveryRequestDe /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RecoveryAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { @@ -12692,6 +18206,9 @@ public virtual Task RecoveryAsync(Elastic.Clients.E /// 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. /// @@ -12738,7 +18255,7 @@ public virtual Task RecoveryAsync(Elastic.Clients.E /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RecoveryAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -12755,6 +18272,9 @@ public virtual Task RecoveryAsync(Elastic.Clients.E /// 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. /// @@ -12801,7 +18321,7 @@ public virtual Task RecoveryAsync(Elastic.Clients.E /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RecoveryAsync(CancellationToken cancellationToken = default) { @@ -12817,6 +18337,9 @@ public virtual Task RecoveryAsync(CancellationToken /// 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. /// @@ -12863,7 +18386,7 @@ public virtual Task RecoveryAsync(CancellationToken /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RecoveryAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -12880,6 +18403,9 @@ public virtual Task RecoveryAsync(Action /// + /// 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. /// @@ -12926,7 +18452,7 @@ public virtual Task RecoveryAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RecoveryAsync(RecoveryRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -12941,6 +18467,9 @@ public virtual Task RecoveryAsync(RecoveryRequestDescriptor de /// 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. /// @@ -12987,7 +18516,7 @@ public virtual Task RecoveryAsync(RecoveryRequestDescriptor de /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RecoveryAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { @@ -13003,6 +18532,9 @@ public virtual Task RecoveryAsync(Elastic.Clients.Elasticsearc /// 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. /// @@ -13049,7 +18581,7 @@ public virtual Task RecoveryAsync(Elastic.Clients.Elasticsearc /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RecoveryAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -13066,6 +18598,9 @@ public virtual Task RecoveryAsync(Elastic.Clients.Elasticsearc /// 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. /// @@ -13112,7 +18647,7 @@ public virtual Task RecoveryAsync(Elastic.Clients.Elasticsearc /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RecoveryAsync(CancellationToken cancellationToken = default) { @@ -13128,6 +18663,9 @@ public virtual Task RecoveryAsync(CancellationToken cancellati /// 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. /// @@ -13174,7 +18712,7 @@ public virtual Task RecoveryAsync(CancellationToken cancellati /// It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. /// This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RecoveryAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -13190,7 +18728,22 @@ public virtual Task RecoveryAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RefreshResponse Refresh(RefreshRequest request) @@ -13205,7 +18758,22 @@ public virtual RefreshResponse Refresh(RefreshRequest request) /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RefreshAsync(RefreshRequest request, CancellationToken cancellationToken = default) { @@ -13219,7 +18787,22 @@ public virtual Task RefreshAsync(RefreshRequest request, Cancel /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RefreshResponse Refresh(RefreshRequestDescriptor descriptor) @@ -13234,7 +18817,22 @@ public virtual RefreshResponse Refresh(RefreshRequestDescriptor - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RefreshResponse Refresh(Elastic.Clients.Elasticsearch.Indices? indices) @@ -13250,7 +18848,22 @@ public virtual RefreshResponse Refresh(Elastic.Clients.Elasticsearch. /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RefreshResponse Refresh(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) @@ -13267,7 +18880,22 @@ public virtual RefreshResponse Refresh(Elastic.Clients.Elasticsearch. /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RefreshResponse Refresh() @@ -13283,7 +18911,22 @@ public virtual RefreshResponse Refresh() /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RefreshResponse Refresh(Action> configureRequest) @@ -13300,7 +18943,22 @@ public virtual RefreshResponse Refresh(Action - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RefreshResponse Refresh(RefreshRequestDescriptor descriptor) @@ -13315,7 +18973,22 @@ public virtual RefreshResponse Refresh(RefreshRequestDescriptor descriptor) /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RefreshResponse Refresh(Elastic.Clients.Elasticsearch.Indices? indices) @@ -13331,7 +19004,22 @@ public virtual RefreshResponse Refresh(Elastic.Clients.Elasticsearch.Indices? in /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RefreshResponse Refresh(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest) @@ -13348,7 +19036,22 @@ public virtual RefreshResponse Refresh(Elastic.Clients.Elasticsearch.Indices? in /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RefreshResponse Refresh() @@ -13364,7 +19067,22 @@ public virtual RefreshResponse Refresh() /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RefreshResponse Refresh(Action configureRequest) @@ -13381,7 +19099,22 @@ public virtual RefreshResponse Refresh(Action configur /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RefreshAsync(RefreshRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -13395,7 +19128,22 @@ public virtual Task RefreshAsync(RefreshRequestDescr /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RefreshAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { @@ -13410,7 +19158,22 @@ public virtual Task RefreshAsync(Elastic.Clients.Ela /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RefreshAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -13426,7 +19189,22 @@ public virtual Task RefreshAsync(Elastic.Clients.Ela /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RefreshAsync(CancellationToken cancellationToken = default) { @@ -13441,7 +19219,22 @@ public virtual Task RefreshAsync(CancellationToken c /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RefreshAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -13457,7 +19250,22 @@ public virtual Task RefreshAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RefreshAsync(RefreshRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -13471,7 +19279,22 @@ public virtual Task RefreshAsync(RefreshRequestDescriptor descr /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RefreshAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { @@ -13486,7 +19309,22 @@ public virtual Task RefreshAsync(Elastic.Clients.Elasticsearch. /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RefreshAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -13502,7 +19340,22 @@ public virtual Task RefreshAsync(Elastic.Clients.Elasticsearch. /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RefreshAsync(CancellationToken cancellationToken = default) { @@ -13517,7 +19370,22 @@ public virtual Task RefreshAsync(CancellationToken cancellation /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RefreshAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -13547,7 +19415,7 @@ public virtual Task RefreshAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ReloadSearchAnalyzersResponse ReloadSearchAnalyzers(ReloadSearchAnalyzersRequest request) @@ -13576,7 +19444,7 @@ public virtual ReloadSearchAnalyzersResponse ReloadSearchAnalyzers(ReloadSearchA /// Because reloading affects every node with an index shard, it is important to update the synonym file on every data node in the cluster--including nodes that don't contain a shard replica--before using this API. /// This ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ReloadSearchAnalyzersAsync(ReloadSearchAnalyzersRequest request, CancellationToken cancellationToken = default) { @@ -13604,7 +19472,7 @@ public virtual Task ReloadSearchAnalyzersAsync(Re /// Because reloading affects every node with an index shard, it is important to update the synonym file on every data node in the cluster--including nodes that don't contain a shard replica--before using this API. /// This ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ReloadSearchAnalyzersResponse ReloadSearchAnalyzers(ReloadSearchAnalyzersRequestDescriptor descriptor) @@ -13633,7 +19501,7 @@ public virtual ReloadSearchAnalyzersResponse ReloadSearchAnalyzers(Re /// Because reloading affects every node with an index shard, it is important to update the synonym file on every data node in the cluster--including nodes that don't contain a shard replica--before using this API. /// This ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ReloadSearchAnalyzersResponse ReloadSearchAnalyzers(Elastic.Clients.Elasticsearch.Indices indices) @@ -13663,7 +19531,7 @@ public virtual ReloadSearchAnalyzersResponse ReloadSearchAnalyzers(El /// Because reloading affects every node with an index shard, it is important to update the synonym file on every data node in the cluster--including nodes that don't contain a shard replica--before using this API. /// This ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ReloadSearchAnalyzersResponse ReloadSearchAnalyzers(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest) @@ -13694,7 +19562,7 @@ public virtual ReloadSearchAnalyzersResponse ReloadSearchAnalyzers(El /// Because reloading affects every node with an index shard, it is important to update the synonym file on every data node in the cluster--including nodes that don't contain a shard replica--before using this API. /// This ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ReloadSearchAnalyzersResponse ReloadSearchAnalyzers() @@ -13724,7 +19592,7 @@ public virtual ReloadSearchAnalyzersResponse ReloadSearchAnalyzers() /// Because reloading affects every node with an index shard, it is important to update the synonym file on every data node in the cluster--including nodes that don't contain a shard replica--before using this API. /// This ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ReloadSearchAnalyzersResponse ReloadSearchAnalyzers(Action> configureRequest) @@ -13755,7 +19623,7 @@ public virtual ReloadSearchAnalyzersResponse ReloadSearchAnalyzers(Ac /// Because reloading affects every node with an index shard, it is important to update the synonym file on every data node in the cluster--including nodes that don't contain a shard replica--before using this API. /// This ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ReloadSearchAnalyzersResponse ReloadSearchAnalyzers(ReloadSearchAnalyzersRequestDescriptor descriptor) @@ -13784,7 +19652,7 @@ public virtual ReloadSearchAnalyzersResponse ReloadSearchAnalyzers(ReloadSearchA /// Because reloading affects every node with an index shard, it is important to update the synonym file on every data node in the cluster--including nodes that don't contain a shard replica--before using this API. /// This ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ReloadSearchAnalyzersResponse ReloadSearchAnalyzers(Elastic.Clients.Elasticsearch.Indices indices) @@ -13814,7 +19682,7 @@ public virtual ReloadSearchAnalyzersResponse ReloadSearchAnalyzers(Elastic.Clien /// Because reloading affects every node with an index shard, it is important to update the synonym file on every data node in the cluster--including nodes that don't contain a shard replica--before using this API. /// This ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ReloadSearchAnalyzersResponse ReloadSearchAnalyzers(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest) @@ -13845,7 +19713,7 @@ public virtual ReloadSearchAnalyzersResponse ReloadSearchAnalyzers(Elastic.Clien /// Because reloading affects every node with an index shard, it is important to update the synonym file on every data node in the cluster--including nodes that don't contain a shard replica--before using this API. /// This ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ReloadSearchAnalyzersAsync(ReloadSearchAnalyzersRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -13873,7 +19741,7 @@ public virtual Task ReloadSearchAnalyzersAsync - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ReloadSearchAnalyzersAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) { @@ -13902,7 +19770,7 @@ public virtual Task ReloadSearchAnalyzersAsync - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ReloadSearchAnalyzersAsync(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -13932,7 +19800,7 @@ public virtual Task ReloadSearchAnalyzersAsync - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ReloadSearchAnalyzersAsync(CancellationToken cancellationToken = default) { @@ -13961,7 +19829,7 @@ public virtual Task ReloadSearchAnalyzersAsync - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ReloadSearchAnalyzersAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -13991,7 +19859,7 @@ public virtual Task ReloadSearchAnalyzersAsync - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ReloadSearchAnalyzersAsync(ReloadSearchAnalyzersRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -14019,7 +19887,7 @@ public virtual Task ReloadSearchAnalyzersAsync(Re /// Because reloading affects every node with an index shard, it is important to update the synonym file on every data node in the cluster--including nodes that don't contain a shard replica--before using this API. /// This ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ReloadSearchAnalyzersAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) { @@ -14048,7 +19916,7 @@ public virtual Task ReloadSearchAnalyzersAsync(El /// Because reloading affects every node with an index shard, it is important to update the synonym file on every data node in the cluster--including nodes that don't contain a shard replica--before using this API. /// This ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ReloadSearchAnalyzersAsync(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -14087,27 +19955,226 @@ public virtual Task ReloadSearchAnalyzersAsync(El /// /// /// - /// Whether there are any indices, aliases, or data streams on that cluster that match the index expression. + /// Whether there are any indices, aliases, or data streams on that cluster that match the index expression. + /// + /// + /// + /// + /// Whether the search is likely to have errors returned when you do the cross-cluster search (including any authorization errors if you do not have permission to query the index). + /// + /// + /// + /// + /// Cluster version information, including the Elasticsearch server version. + /// + /// + /// + /// + /// 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. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ResolveClusterResponse ResolveCluster(ResolveClusterRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Resolve the cluster. + /// Resolve the specified index expressions to return information about each cluster, including the local cluster, if included. + /// Multiple patterns and remote clusters are supported. + /// + /// + /// This endpoint is useful before doing a cross-cluster search in order to determine which remote clusters should be included in a search. + /// + /// + /// You use the same index expression with this endpoint as you would for cross-cluster search. + /// Index and cluster exclusions are also supported with this endpoint. + /// + /// + /// For each cluster in the index expression, information is returned about: + /// + /// + /// + /// + /// Whether the querying ("local") cluster is currently connected to each remote cluster in the index expression scope. + /// + /// + /// + /// + /// Whether each remote cluster is configured with skip_unavailable as true or false. + /// + /// + /// + /// + /// Whether there are any indices, aliases, or data streams on that cluster that match the index expression. + /// + /// + /// + /// + /// Whether the search is likely to have errors returned when you do the cross-cluster search (including any authorization errors if you do not have permission to query the index). + /// + /// + /// + /// + /// Cluster version information, including the Elasticsearch server version. + /// + /// + /// + /// + /// 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. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ResolveClusterAsync(ResolveClusterRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Resolve the cluster. + /// Resolve the specified index expressions to return information about each cluster, including the local cluster, if included. + /// Multiple patterns and remote clusters are supported. + /// + /// + /// This endpoint is useful before doing a cross-cluster search in order to determine which remote clusters should be included in a search. + /// + /// + /// You use the same index expression with this endpoint as you would for cross-cluster search. + /// Index and cluster exclusions are also supported with this endpoint. + /// + /// + /// For each cluster in the index expression, information is returned about: + /// + /// + /// + /// + /// Whether the querying ("local") cluster is currently connected to each remote cluster in the index expression scope. + /// + /// + /// + /// + /// Whether each remote cluster is configured with skip_unavailable as true or false. + /// + /// + /// + /// + /// Whether there are any indices, aliases, or data streams on that cluster that match the index expression. + /// + /// + /// + /// + /// Whether the search is likely to have errors returned when you do the cross-cluster search (including any authorization errors if you do not have permission to query the index). + /// + /// + /// + /// + /// Cluster version information, including the Elasticsearch server version. + /// + /// + /// + /// + /// 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. /// /// /// /// - /// Whether the search is likely to have errors returned when you do the cross-cluster search (including any authorization errors if you do not have permission to query the index). + /// 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.) /// /// /// /// - /// Cluster version information, including the Elasticsearch server version. + /// A remote cluster is an older version that does not support the feature you want to use in your search. /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ResolveClusterResponse ResolveCluster(ResolveClusterRequest request) + public virtual ResolveClusterResponse ResolveCluster(ResolveClusterRequestDescriptor descriptor) { - request.BeforeRequest(); - return DoRequest(request); + descriptor.BeforeRequest(); + return DoRequest(descriptor); } /// @@ -14153,62 +20220,44 @@ public virtual ResolveClusterResponse ResolveCluster(ResolveClusterRequest reque /// /// /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ResolveClusterAsync(ResolveClusterRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// - /// - /// Resolve the cluster. - /// Resolve the specified index expressions to return information about each cluster, including the local cluster, if included. - /// Multiple patterns and remote clusters are supported. - /// /// - /// This endpoint is useful before doing a cross-cluster search in order to determine which remote clusters should be included in a search. + /// 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-*. /// /// - /// You use the same index expression with this endpoint as you would for cross-cluster search. - /// Index and cluster exclusions are also supported with this endpoint. + /// Advantages of using this endpoint before a cross-cluster search /// /// - /// For each cluster in the index expression, information is returned about: + /// You may want to exclude a cluster or index from a search when: /// /// /// /// - /// Whether the querying ("local") cluster is currently connected to each remote cluster in the index expression scope. - /// - /// - /// - /// - /// Whether each remote cluster is configured with skip_unavailable as true or false. + /// 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. /// /// /// /// - /// Whether there are any indices, aliases, or data streams on that cluster that match the index expression. + /// 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. /// /// /// /// - /// Whether the search is likely to have errors returned when you do the cross-cluster search (including any authorization errors if you do not have permission to query the index). + /// 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.) /// /// /// /// - /// Cluster version information, including the Elasticsearch server version. + /// A remote cluster is an older version that does not support the feature you want to use in your search. /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ResolveClusterResponse ResolveCluster(ResolveClusterRequestDescriptor descriptor) + public virtual ResolveClusterResponse ResolveCluster(Elastic.Clients.Elasticsearch.Names name) { + var descriptor = new ResolveClusterRequestDescriptor(name); descriptor.BeforeRequest(); return DoRequest(descriptor); } @@ -14256,60 +20305,39 @@ public virtual ResolveClusterResponse ResolveCluster(ResolveClusterRequestDescri /// /// /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ResolveClusterResponse ResolveCluster(Elastic.Clients.Elasticsearch.Names name) - { - var descriptor = new ResolveClusterRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Resolve the cluster. - /// Resolve the specified index expressions to return information about each cluster, including the local cluster, if included. - /// Multiple patterns and remote clusters are supported. - /// - /// - /// This endpoint is useful before doing a cross-cluster search in order to determine which remote clusters should be included in a search. + /// 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-*. /// /// - /// You use the same index expression with this endpoint as you would for cross-cluster search. - /// Index and cluster exclusions are also supported with this endpoint. + /// Advantages of using this endpoint before a cross-cluster search /// /// - /// For each cluster in the index expression, information is returned about: + /// You may want to exclude a cluster or index from a search when: /// /// /// /// - /// Whether the querying ("local") cluster is currently connected to each remote cluster in the index expression scope. - /// - /// - /// - /// - /// Whether each remote cluster is configured with skip_unavailable as true or false. + /// 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. /// /// /// /// - /// Whether there are any indices, aliases, or data streams on that cluster that match the index expression. + /// 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. /// /// /// /// - /// Whether the search is likely to have errors returned when you do the cross-cluster search (including any authorization errors if you do not have permission to query the index). + /// 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.) /// /// /// /// - /// Cluster version information, including the Elasticsearch server version. + /// A remote cluster is an older version that does not support the feature you want to use in your search. /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ResolveClusterResponse ResolveCluster(Elastic.Clients.Elasticsearch.Names name, Action configureRequest) @@ -14363,7 +20391,39 @@ public virtual ResolveClusterResponse ResolveCluster(Elastic.Clients.Elasticsear /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ResolveClusterAsync(ResolveClusterRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -14414,7 +20474,39 @@ public virtual Task ResolveClusterAsync(ResolveClusterRe /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ResolveClusterAsync(Elastic.Clients.Elasticsearch.Names name, CancellationToken cancellationToken = default) { @@ -14466,7 +20558,39 @@ public virtual Task ResolveClusterAsync(Elastic.Clients. /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ResolveClusterAsync(Elastic.Clients.Elasticsearch.Names name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -14482,7 +20606,7 @@ public virtual Task ResolveClusterAsync(Elastic.Clients. /// Resolve the names and/or index patterns for indices, aliases, and data streams. /// Multiple patterns and remote clusters are supported. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ResolveIndexResponse ResolveIndex(ResolveIndexRequest request) @@ -14497,7 +20621,7 @@ public virtual ResolveIndexResponse ResolveIndex(ResolveIndexRequest request) /// Resolve the names and/or index patterns for indices, aliases, and data streams. /// Multiple patterns and remote clusters are supported. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ResolveIndexAsync(ResolveIndexRequest request, CancellationToken cancellationToken = default) { @@ -14511,7 +20635,7 @@ public virtual Task ResolveIndexAsync(ResolveIndexRequest /// Resolve the names and/or index patterns for indices, aliases, and data streams. /// Multiple patterns and remote clusters are supported. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ResolveIndexResponse ResolveIndex(ResolveIndexRequestDescriptor descriptor) @@ -14526,7 +20650,7 @@ public virtual ResolveIndexResponse ResolveIndex(ResolveIndexRequestDescriptor d /// Resolve the names and/or index patterns for indices, aliases, and data streams. /// Multiple patterns and remote clusters are supported. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ResolveIndexResponse ResolveIndex(Elastic.Clients.Elasticsearch.Names name) @@ -14542,7 +20666,7 @@ public virtual ResolveIndexResponse ResolveIndex(Elastic.Clients.Elasticsearch.N /// Resolve the names and/or index patterns for indices, aliases, and data streams. /// Multiple patterns and remote clusters are supported. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ResolveIndexResponse ResolveIndex(Elastic.Clients.Elasticsearch.Names name, Action configureRequest) @@ -14559,7 +20683,7 @@ public virtual ResolveIndexResponse ResolveIndex(Elastic.Clients.Elasticsearch.N /// Resolve the names and/or index patterns for indices, aliases, and data streams. /// Multiple patterns and remote clusters are supported. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ResolveIndexAsync(ResolveIndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -14573,7 +20697,7 @@ public virtual Task ResolveIndexAsync(ResolveIndexRequestD /// Resolve the names and/or index patterns for indices, aliases, and data streams. /// Multiple patterns and remote clusters are supported. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ResolveIndexAsync(Elastic.Clients.Elasticsearch.Names name, CancellationToken cancellationToken = default) { @@ -14588,7 +20712,7 @@ public virtual Task ResolveIndexAsync(Elastic.Clients.Elas /// Resolve the names and/or index patterns for indices, aliases, and data streams. /// Multiple patterns and remote clusters are supported. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ResolveIndexAsync(Elastic.Clients.Elasticsearch.Names name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -14601,7 +20725,55 @@ public virtual Task ResolveIndexAsync(Elastic.Clients.Elas /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -14614,35 +20786,179 @@ public virtual RolloverResponse Rollover(RolloverRequest request) /// /// - /// Roll over to a new index. - /// Creates a new index for a data stream or index alias. + /// Roll over to a new index. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task RolloverAsync(RolloverRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Roll over to a new index. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual RolloverResponse Rollover(RolloverRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, RolloverResponse, RolloverRequestParameters>(descriptor); + } + + /// + /// + /// Roll over to a new index. + /// 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 /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RolloverAsync(RolloverRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// /// - /// Roll over to a new index. - /// Creates a new index for a data stream or index 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RolloverResponse Rollover(RolloverRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, RolloverResponse, RolloverRequestParameters>(descriptor); - } - - /// /// - /// Roll over to a new index. - /// Creates a new index for a data stream or index alias. + /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -14657,7 +20973,55 @@ public virtual RolloverResponse Rollover(Elastic.Clients.Elasticsearc /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -14673,7 +21037,55 @@ public virtual RolloverResponse Rollover(Elastic.Clients.Elasticsearc /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -14688,7 +21100,55 @@ public virtual RolloverResponse Rollover(Elastic.Clients.Elasticsearc /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -14704,7 +21164,55 @@ public virtual RolloverResponse Rollover(Elastic.Clients.Elasticsearc /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -14718,7 +21226,55 @@ public virtual RolloverResponse Rollover(RolloverRequestDescriptor descriptor) /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -14733,7 +21289,55 @@ public virtual RolloverResponse Rollover(Elastic.Clients.Elasticsearch.IndexAlia /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -14749,7 +21353,55 @@ public virtual RolloverResponse Rollover(Elastic.Clients.Elasticsearch.IndexAlia /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -14764,7 +21416,55 @@ public virtual RolloverResponse Rollover(Elastic.Clients.Elasticsearch.IndexAlia /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -14780,7 +21480,55 @@ public virtual RolloverResponse Rollover(Elastic.Clients.Elasticsearch.IndexAlia /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -14792,8 +21540,56 @@ public virtual Task RolloverAsync(RolloverRequestDe /// /// - /// Roll over to a new index. - /// Creates a new index for a data stream or index alias. + /// Roll over to a new index. + /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -14807,7 +21603,55 @@ public virtual Task RolloverAsync(Elastic.Clients.E /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -14822,7 +21666,55 @@ public virtual Task RolloverAsync(Elastic.Clients.E /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -14836,7 +21728,55 @@ public virtual Task RolloverAsync(Elastic.Clients.E /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -14851,7 +21791,55 @@ public virtual Task RolloverAsync(Elastic.Clients.E /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -14864,7 +21852,55 @@ public virtual Task RolloverAsync(RolloverRequestDescriptor de /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -14878,7 +21914,55 @@ public virtual Task RolloverAsync(Elastic.Clients.Elasticsearc /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -14893,7 +21977,55 @@ public virtual Task RolloverAsync(Elastic.Clients.Elasticsearc /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -14907,7 +22039,55 @@ public virtual Task RolloverAsync(Elastic.Clients.Elasticsearc /// /// /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -14925,7 +22105,7 @@ public virtual Task RolloverAsync(Elastic.Clients.Elasticsearc /// Get low-level information about the Lucene segments in index shards. /// For data streams, the API returns information about the stream's backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SegmentsResponse Segments(SegmentsRequest request) @@ -14940,7 +22120,7 @@ public virtual SegmentsResponse Segments(SegmentsRequest request) /// Get low-level information about the Lucene segments in index shards. /// For data streams, the API returns information about the stream's backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SegmentsAsync(SegmentsRequest request, CancellationToken cancellationToken = default) { @@ -14954,7 +22134,7 @@ public virtual Task SegmentsAsync(SegmentsRequest request, Can /// Get low-level information about the Lucene segments in index shards. /// For data streams, the API returns information about the stream's backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SegmentsResponse Segments(SegmentsRequestDescriptor descriptor) @@ -14969,7 +22149,7 @@ public virtual SegmentsResponse Segments(SegmentsRequestDescriptor - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SegmentsResponse Segments(Elastic.Clients.Elasticsearch.Indices? indices) @@ -14985,7 +22165,7 @@ public virtual SegmentsResponse Segments(Elastic.Clients.Elasticsearc /// Get low-level information about the Lucene segments in index shards. /// For data streams, the API returns information about the stream's backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SegmentsResponse Segments(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) @@ -15002,7 +22182,7 @@ public virtual SegmentsResponse Segments(Elastic.Clients.Elasticsearc /// Get low-level information about the Lucene segments in index shards. /// For data streams, the API returns information about the stream's backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SegmentsResponse Segments() @@ -15018,7 +22198,7 @@ public virtual SegmentsResponse Segments() /// Get low-level information about the Lucene segments in index shards. /// For data streams, the API returns information about the stream's backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SegmentsResponse Segments(Action> configureRequest) @@ -15035,7 +22215,7 @@ public virtual SegmentsResponse Segments(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SegmentsResponse Segments(SegmentsRequestDescriptor descriptor) @@ -15050,7 +22230,7 @@ public virtual SegmentsResponse Segments(SegmentsRequestDescriptor descriptor) /// Get low-level information about the Lucene segments in index shards. /// For data streams, the API returns information about the stream's backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SegmentsResponse Segments(Elastic.Clients.Elasticsearch.Indices? indices) @@ -15066,7 +22246,7 @@ public virtual SegmentsResponse Segments(Elastic.Clients.Elasticsearch.Indices? /// Get low-level information about the Lucene segments in index shards. /// For data streams, the API returns information about the stream's backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SegmentsResponse Segments(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest) @@ -15083,7 +22263,7 @@ public virtual SegmentsResponse Segments(Elastic.Clients.Elasticsearch.Indices? /// Get low-level information about the Lucene segments in index shards. /// For data streams, the API returns information about the stream's backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SegmentsResponse Segments() @@ -15099,7 +22279,7 @@ public virtual SegmentsResponse Segments() /// Get low-level information about the Lucene segments in index shards. /// For data streams, the API returns information about the stream's backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SegmentsResponse Segments(Action configureRequest) @@ -15116,7 +22296,7 @@ public virtual SegmentsResponse Segments(Action confi /// Get low-level information about the Lucene segments in index shards. /// For data streams, the API returns information about the stream's backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SegmentsAsync(SegmentsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -15130,7 +22310,7 @@ public virtual Task SegmentsAsync(SegmentsRequestDe /// Get low-level information about the Lucene segments in index shards. /// For data streams, the API returns information about the stream's backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SegmentsAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { @@ -15145,7 +22325,7 @@ public virtual Task SegmentsAsync(Elastic.Clients.E /// Get low-level information about the Lucene segments in index shards. /// For data streams, the API returns information about the stream's backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SegmentsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -15161,7 +22341,7 @@ public virtual Task SegmentsAsync(Elastic.Clients.E /// Get low-level information about the Lucene segments in index shards. /// For data streams, the API returns information about the stream's backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SegmentsAsync(CancellationToken cancellationToken = default) { @@ -15176,7 +22356,7 @@ public virtual Task SegmentsAsync(CancellationToken /// Get low-level information about the Lucene segments in index shards. /// For data streams, the API returns information about the stream's backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SegmentsAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -15192,7 +22372,7 @@ public virtual Task SegmentsAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SegmentsAsync(SegmentsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -15206,7 +22386,7 @@ public virtual Task SegmentsAsync(SegmentsRequestDescriptor de /// Get low-level information about the Lucene segments in index shards. /// For data streams, the API returns information about the stream's backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SegmentsAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { @@ -15221,7 +22401,7 @@ public virtual Task SegmentsAsync(Elastic.Clients.Elasticsearc /// Get low-level information about the Lucene segments in index shards. /// For data streams, the API returns information about the stream's backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SegmentsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -15237,7 +22417,7 @@ public virtual Task SegmentsAsync(Elastic.Clients.Elasticsearc /// Get low-level information about the Lucene segments in index shards. /// For data streams, the API returns information about the stream's backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SegmentsAsync(CancellationToken cancellationToken = default) { @@ -15252,7 +22432,7 @@ public virtual Task SegmentsAsync(CancellationToken cancellati /// Get low-level information about the Lucene segments in index shards. /// For data streams, the API returns information about the stream's backing indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SegmentsAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -15296,7 +22476,7 @@ public virtual Task SegmentsAsync(Action /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ShardStoresResponse ShardStores(ShardStoresRequest request) @@ -15339,7 +22519,7 @@ public virtual ShardStoresResponse ShardStores(ShardStoresRequest request) /// /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ShardStoresAsync(ShardStoresRequest request, CancellationToken cancellationToken = default) { @@ -15381,7 +22561,7 @@ public virtual Task ShardStoresAsync(ShardStoresRequest req /// /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ShardStoresResponse ShardStores(ShardStoresRequestDescriptor descriptor) @@ -15424,7 +22604,7 @@ public virtual ShardStoresResponse ShardStores(ShardStoresRequestDesc /// /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ShardStoresResponse ShardStores(Elastic.Clients.Elasticsearch.Indices? indices) @@ -15468,7 +22648,7 @@ public virtual ShardStoresResponse ShardStores(Elastic.Clients.Elasti /// /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ShardStoresResponse ShardStores(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) @@ -15513,7 +22693,7 @@ public virtual ShardStoresResponse ShardStores(Elastic.Clients.Elasti /// /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ShardStoresResponse ShardStores() @@ -15557,7 +22737,7 @@ public virtual ShardStoresResponse ShardStores() /// /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ShardStoresResponse ShardStores(Action> configureRequest) @@ -15602,7 +22782,7 @@ public virtual ShardStoresResponse ShardStores(Action /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ShardStoresResponse ShardStores(ShardStoresRequestDescriptor descriptor) @@ -15645,7 +22825,7 @@ public virtual ShardStoresResponse ShardStores(ShardStoresRequestDescriptor desc /// /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ShardStoresResponse ShardStores(Elastic.Clients.Elasticsearch.Indices? indices) @@ -15689,7 +22869,7 @@ public virtual ShardStoresResponse ShardStores(Elastic.Clients.Elasticsearch.Ind /// /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ShardStoresResponse ShardStores(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest) @@ -15734,7 +22914,7 @@ public virtual ShardStoresResponse ShardStores(Elastic.Clients.Elasticsearch.Ind /// /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ShardStoresResponse ShardStores() @@ -15778,7 +22958,7 @@ public virtual ShardStoresResponse ShardStores() /// /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ShardStoresResponse ShardStores(Action configureRequest) @@ -15823,7 +23003,7 @@ public virtual ShardStoresResponse ShardStores(Action /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ShardStoresAsync(ShardStoresRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -15865,7 +23045,7 @@ public virtual Task ShardStoresAsync(ShardStores /// /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ShardStoresAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { @@ -15908,7 +23088,7 @@ public virtual Task ShardStoresAsync(Elastic.Cli /// /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ShardStoresAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -15952,7 +23132,7 @@ public virtual Task ShardStoresAsync(Elastic.Cli /// /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ShardStoresAsync(CancellationToken cancellationToken = default) { @@ -15995,7 +23175,7 @@ public virtual Task ShardStoresAsync(Cancellatio /// /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ShardStoresAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -16039,7 +23219,7 @@ public virtual Task ShardStoresAsync(Action /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ShardStoresAsync(ShardStoresRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -16081,7 +23261,7 @@ public virtual Task ShardStoresAsync(ShardStoresRequestDesc /// /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ShardStoresAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { @@ -16124,7 +23304,7 @@ public virtual Task ShardStoresAsync(Elastic.Clients.Elasti /// /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ShardStoresAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -16168,7 +23348,7 @@ public virtual Task ShardStoresAsync(Elastic.Clients.Elasti /// /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ShardStoresAsync(CancellationToken cancellationToken = default) { @@ -16211,7 +23391,7 @@ public virtual Task ShardStoresAsync(CancellationToken canc /// /// By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ShardStoresAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -17587,9 +24767,9 @@ public virtual Task ShrinkAsync(Elastic.Clients.Elasticsear /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(SimulateIndexTemplateRequest request) @@ -17601,9 +24781,9 @@ public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(SimulateIndex /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateIndexTemplateAsync(SimulateIndexTemplateRequest request, CancellationToken cancellationToken = default) { @@ -17614,9 +24794,9 @@ public virtual Task SimulateIndexTemplateAsync(Si /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(SimulateIndexTemplateRequestDescriptor descriptor) @@ -17628,9 +24808,9 @@ public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(SimulateIndex /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(Elastic.Clients.Elasticsearch.Name name) @@ -17643,9 +24823,9 @@ public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(Elastic.Clien /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(Elastic.Clients.Elasticsearch.Name name, Action configureRequest) @@ -17659,9 +24839,9 @@ public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(Elastic.Clien /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateIndexTemplateAsync(SimulateIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -17672,9 +24852,9 @@ public virtual Task SimulateIndexTemplateAsync(Si /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateIndexTemplateAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) { @@ -17686,9 +24866,9 @@ public virtual Task SimulateIndexTemplateAsync(El /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateIndexTemplateAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -17701,9 +24881,9 @@ public virtual Task SimulateIndexTemplateAsync(El /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SimulateTemplateResponse SimulateTemplate(SimulateTemplateRequest request) @@ -17715,9 +24895,9 @@ public virtual SimulateTemplateResponse SimulateTemplate(SimulateTemplateRequest /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateTemplateAsync(SimulateTemplateRequest request, CancellationToken cancellationToken = default) { @@ -17728,9 +24908,9 @@ public virtual Task SimulateTemplateAsync(SimulateTemp /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SimulateTemplateResponse SimulateTemplate(SimulateTemplateRequestDescriptor descriptor) @@ -17742,9 +24922,9 @@ public virtual SimulateTemplateResponse SimulateTemplate(SimulateTemp /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SimulateTemplateResponse SimulateTemplate(Elastic.Clients.Elasticsearch.Name? name) @@ -17757,9 +24937,9 @@ public virtual SimulateTemplateResponse SimulateTemplate(Elastic.Clie /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SimulateTemplateResponse SimulateTemplate(Elastic.Clients.Elasticsearch.Name? name, Action> configureRequest) @@ -17773,9 +24953,9 @@ public virtual SimulateTemplateResponse SimulateTemplate(Elastic.Clie /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SimulateTemplateResponse SimulateTemplate() @@ -17788,9 +24968,9 @@ public virtual SimulateTemplateResponse SimulateTemplate() /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SimulateTemplateResponse SimulateTemplate(Action> configureRequest) @@ -17804,9 +24984,9 @@ public virtual SimulateTemplateResponse SimulateTemplate(Action /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SimulateTemplateResponse SimulateTemplate(SimulateTemplateRequestDescriptor descriptor) @@ -17818,9 +24998,9 @@ public virtual SimulateTemplateResponse SimulateTemplate(SimulateTemplateRequest /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SimulateTemplateResponse SimulateTemplate(Elastic.Clients.Elasticsearch.Name? name) @@ -17833,9 +25013,9 @@ public virtual SimulateTemplateResponse SimulateTemplate(Elastic.Clients.Elastic /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SimulateTemplateResponse SimulateTemplate(Elastic.Clients.Elasticsearch.Name? name, Action configureRequest) @@ -17849,9 +25029,9 @@ public virtual SimulateTemplateResponse SimulateTemplate(Elastic.Clients.Elastic /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SimulateTemplateResponse SimulateTemplate() @@ -17864,9 +25044,9 @@ public virtual SimulateTemplateResponse SimulateTemplate() /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SimulateTemplateResponse SimulateTemplate(Action configureRequest) @@ -17880,9 +25060,9 @@ public virtual SimulateTemplateResponse SimulateTemplate(Action /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateTemplateAsync(SimulateTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -17893,9 +25073,9 @@ public virtual Task SimulateTemplateAsync(S /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateTemplateAsync(Elastic.Clients.Elasticsearch.Name? name, CancellationToken cancellationToken = default) { @@ -17907,9 +25087,9 @@ public virtual Task SimulateTemplateAsync(E /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateTemplateAsync(Elastic.Clients.Elasticsearch.Name? name, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -17922,9 +25102,9 @@ public virtual Task SimulateTemplateAsync(E /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateTemplateAsync(CancellationToken cancellationToken = default) { @@ -17936,9 +25116,9 @@ public virtual Task SimulateTemplateAsync(C /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateTemplateAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -17951,9 +25131,9 @@ public virtual Task SimulateTemplateAsync(A /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateTemplateAsync(SimulateTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -17964,9 +25144,9 @@ public virtual Task SimulateTemplateAsync(SimulateTemp /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateTemplateAsync(Elastic.Clients.Elasticsearch.Name? name, CancellationToken cancellationToken = default) { @@ -17978,9 +25158,9 @@ public virtual Task SimulateTemplateAsync(Elastic.Clie /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateTemplateAsync(Elastic.Clients.Elasticsearch.Name? name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -17993,9 +25173,9 @@ public virtual Task SimulateTemplateAsync(Elastic.Clie /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateTemplateAsync(CancellationToken cancellationToken = default) { @@ -18007,9 +25187,9 @@ public virtual Task SimulateTemplateAsync(Cancellation /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task SimulateTemplateAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -18042,6 +25222,16 @@ public virtual Task SimulateTemplateAsync(Action /// /// + /// 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. @@ -18128,6 +25318,16 @@ public virtual SplitIndexResponse Split(SplitIndexRequest request) /// /// /// + /// 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. @@ -18213,6 +25413,16 @@ public virtual Task SplitAsync(SplitIndexRequest request, Ca /// /// /// + /// 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. @@ -18299,6 +25509,16 @@ public virtual SplitIndexResponse Split(SplitIndexRequestDescriptor /// /// + /// 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. @@ -18386,6 +25606,16 @@ public virtual SplitIndexResponse Split(Elastic.Clients.Elasticsearch /// /// /// + /// 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. @@ -18474,6 +25704,16 @@ public virtual SplitIndexResponse Split(Elastic.Clients.Elasticsearch /// /// /// + /// 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. @@ -18560,6 +25800,16 @@ public virtual SplitIndexResponse Split(SplitIndexRequestDescriptor descriptor) /// /// /// + /// 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. @@ -18647,6 +25897,16 @@ public virtual SplitIndexResponse Split(Elastic.Clients.Elasticsearch.IndexName /// /// /// + /// 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. @@ -18735,6 +25995,16 @@ public virtual SplitIndexResponse Split(Elastic.Clients.Elasticsearch.IndexName /// /// /// + /// 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. @@ -18820,6 +26090,16 @@ public virtual Task SplitAsync(SplitIndexRequestD /// /// /// + /// 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. @@ -18906,6 +26186,16 @@ public virtual Task SplitAsync(Elastic.Clients.El /// /// /// + /// 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. @@ -18993,6 +26283,16 @@ public virtual Task SplitAsync(Elastic.Clients.El /// /// /// + /// 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. @@ -19078,6 +26378,16 @@ public virtual Task SplitAsync(SplitIndexRequestDescriptor d /// /// /// + /// 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. @@ -19164,6 +26474,16 @@ public virtual Task SplitAsync(Elastic.Clients.Elasticsearch /// /// /// + /// 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. @@ -19245,7 +26565,7 @@ public virtual Task SplitAsync(Elastic.Clients.Elasticsearch /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual IndicesStatsResponse Stats(IndicesStatsRequest request) @@ -19271,7 +26591,7 @@ public virtual IndicesStatsResponse Stats(IndicesStatsRequest request) /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(IndicesStatsRequest request, CancellationToken cancellationToken = default) { @@ -19296,7 +26616,7 @@ public virtual Task StatsAsync(IndicesStatsRequest request /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual IndicesStatsResponse Stats(IndicesStatsRequestDescriptor descriptor) @@ -19322,7 +26642,7 @@ public virtual IndicesStatsResponse Stats(IndicesStatsRequestDescript /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual IndicesStatsResponse Stats(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Metrics? metric) @@ -19349,7 +26669,7 @@ public virtual IndicesStatsResponse Stats(Elastic.Clients.Elasticsear /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual IndicesStatsResponse Stats(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Metrics? metric, Action> configureRequest) @@ -19377,7 +26697,7 @@ public virtual IndicesStatsResponse Stats(Elastic.Clients.Elasticsear /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual IndicesStatsResponse Stats() @@ -19404,7 +26724,7 @@ public virtual IndicesStatsResponse Stats() /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual IndicesStatsResponse Stats(Action> configureRequest) @@ -19432,7 +26752,7 @@ public virtual IndicesStatsResponse Stats(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual IndicesStatsResponse Stats(IndicesStatsRequestDescriptor descriptor) @@ -19458,7 +26778,7 @@ public virtual IndicesStatsResponse Stats(IndicesStatsRequestDescriptor descript /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual IndicesStatsResponse Stats(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Metrics? metric) @@ -19485,7 +26805,7 @@ public virtual IndicesStatsResponse Stats(Elastic.Clients.Elasticsearch.Indices? /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual IndicesStatsResponse Stats(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Metrics? metric, Action configureRequest) @@ -19513,7 +26833,7 @@ public virtual IndicesStatsResponse Stats(Elastic.Clients.Elasticsearch.Indices? /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual IndicesStatsResponse Stats() @@ -19540,7 +26860,7 @@ public virtual IndicesStatsResponse Stats() /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual IndicesStatsResponse Stats(Action configureRequest) @@ -19568,7 +26888,7 @@ public virtual IndicesStatsResponse Stats(Action /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(IndicesStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -19593,7 +26913,7 @@ public virtual Task StatsAsync(IndicesStatsRequ /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Metrics? metric, CancellationToken cancellationToken = default) { @@ -19619,7 +26939,7 @@ public virtual Task StatsAsync(Elastic.Clients. /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Metrics? metric, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -19646,7 +26966,7 @@ public virtual Task StatsAsync(Elastic.Clients. /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(CancellationToken cancellationToken = default) { @@ -19672,7 +26992,7 @@ public virtual Task StatsAsync(CancellationToke /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -19699,7 +27019,7 @@ public virtual Task StatsAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(IndicesStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -19724,7 +27044,7 @@ public virtual Task StatsAsync(IndicesStatsRequestDescript /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Metrics? metric, CancellationToken cancellationToken = default) { @@ -19750,7 +27070,7 @@ public virtual Task StatsAsync(Elastic.Clients.Elasticsear /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Metrics? metric, Action configureRequest, CancellationToken cancellationToken = default) { @@ -19777,7 +27097,7 @@ public virtual Task StatsAsync(Elastic.Clients.Elasticsear /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(CancellationToken cancellationToken = default) { @@ -19803,7 +27123,7 @@ public virtual Task StatsAsync(CancellationToken cancellat /// NOTE: When moving to another node, the shard-level statistics for a shard are cleared. /// Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(Action configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Inference.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Inference.g.cs index 42d1bec24e3..0da706e74f5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Inference.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Inference.g.cs @@ -806,4 +806,520 @@ public virtual Task PutAsync(Elastic.Clients.Elasticsearch descriptor.BeforeRequest(); return DoRequestAsync(descriptor, cancellationToken); } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual StreamInferenceResponse StreamInference(StreamInferenceRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task StreamInferenceAsync(StreamInferenceRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual StreamInferenceResponse StreamInference(StreamInferenceRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual StreamInferenceResponse StreamInference(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Id inferenceId) + { + var descriptor = new StreamInferenceRequestDescriptor(taskType, inferenceId); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual StreamInferenceResponse StreamInference(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Id inferenceId, Action configureRequest) + { + var descriptor = new StreamInferenceRequestDescriptor(taskType, inferenceId); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual StreamInferenceResponse StreamInference(Elastic.Clients.Elasticsearch.Id inferenceId) + { + var descriptor = new StreamInferenceRequestDescriptor(inferenceId); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual StreamInferenceResponse StreamInference(Elastic.Clients.Elasticsearch.Id inferenceId, Action configureRequest) + { + var descriptor = new StreamInferenceRequestDescriptor(inferenceId); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task StreamInferenceAsync(StreamInferenceRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task StreamInferenceAsync(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Id inferenceId, CancellationToken cancellationToken = default) + { + var descriptor = new StreamInferenceRequestDescriptor(taskType, inferenceId); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task StreamInferenceAsync(Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Id inferenceId, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new StreamInferenceRequestDescriptor(taskType, inferenceId); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task StreamInferenceAsync(Elastic.Clients.Elasticsearch.Id inferenceId, CancellationToken cancellationToken = default) + { + var descriptor = new StreamInferenceRequestDescriptor(inferenceId); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task StreamInferenceAsync(Elastic.Clients.Elasticsearch.Id inferenceId, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new StreamInferenceRequestDescriptor(inferenceId); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual UpdateInferenceResponse Update(UpdateInferenceRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task UpdateAsync(UpdateInferenceRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual UpdateInferenceResponse Update(UpdateInferenceRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual UpdateInferenceResponse Update(Elastic.Clients.Elasticsearch.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Id inferenceId) + { + var descriptor = new UpdateInferenceRequestDescriptor(inferenceConfig, taskType, inferenceId); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual UpdateInferenceResponse Update(Elastic.Clients.Elasticsearch.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Id inferenceId, Action configureRequest) + { + var descriptor = new UpdateInferenceRequestDescriptor(inferenceConfig, taskType, inferenceId); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual UpdateInferenceResponse Update(Elastic.Clients.Elasticsearch.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Id inferenceId) + { + var descriptor = new UpdateInferenceRequestDescriptor(inferenceConfig, inferenceId); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual UpdateInferenceResponse Update(Elastic.Clients.Elasticsearch.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Id inferenceId, Action configureRequest) + { + var descriptor = new UpdateInferenceRequestDescriptor(inferenceConfig, inferenceId); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task UpdateAsync(UpdateInferenceRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task UpdateAsync(Elastic.Clients.Elasticsearch.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Id inferenceId, CancellationToken cancellationToken = default) + { + var descriptor = new UpdateInferenceRequestDescriptor(inferenceConfig, taskType, inferenceId); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task UpdateAsync(Elastic.Clients.Elasticsearch.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Id inferenceId, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new UpdateInferenceRequestDescriptor(inferenceConfig, taskType, inferenceId); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task UpdateAsync(Elastic.Clients.Elasticsearch.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Id inferenceId, CancellationToken cancellationToken = default) + { + var descriptor = new UpdateInferenceRequestDescriptor(inferenceConfig, inferenceId); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task UpdateAsync(Elastic.Clients.Elasticsearch.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Id inferenceId, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new UpdateInferenceRequestDescriptor(inferenceConfig, inferenceId); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.License.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.License.g.cs index af43b48f478..2de10d980ed 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.License.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.License.g.cs @@ -911,7 +911,7 @@ public virtual Task PostStartBasicAsync(Action /// To check the status of your trial, use the get trial status API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PostStartTrialResponse PostStartTrial(PostStartTrialRequest request) @@ -932,7 +932,7 @@ public virtual PostStartTrialResponse PostStartTrial(PostStartTrialRequest reque /// /// To check the status of your trial, use the get trial status API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PostStartTrialAsync(PostStartTrialRequest request, CancellationToken cancellationToken = default) { @@ -952,7 +952,7 @@ public virtual Task PostStartTrialAsync(PostStartTrialRe /// /// To check the status of your trial, use the get trial status API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PostStartTrialResponse PostStartTrial(PostStartTrialRequestDescriptor descriptor) @@ -973,7 +973,7 @@ public virtual PostStartTrialResponse PostStartTrial(PostStartTrialRequestDescri /// /// To check the status of your trial, use the get trial status API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PostStartTrialResponse PostStartTrial() @@ -995,7 +995,7 @@ public virtual PostStartTrialResponse PostStartTrial() /// /// To check the status of your trial, use the get trial status API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PostStartTrialResponse PostStartTrial(Action configureRequest) @@ -1018,7 +1018,7 @@ public virtual PostStartTrialResponse PostStartTrial(Action /// To check the status of your trial, use the get trial status API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PostStartTrialAsync(PostStartTrialRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1038,7 +1038,7 @@ public virtual Task PostStartTrialAsync(PostStartTrialRe /// /// To check the status of your trial, use the get trial status API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PostStartTrialAsync(CancellationToken cancellationToken = default) { @@ -1059,7 +1059,7 @@ public virtual Task PostStartTrialAsync(CancellationToke /// /// To check the status of your trial, use the get trial status API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PostStartTrialAsync(Action configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Ml.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Ml.g.cs index abdd42fa477..9dc7d86eab9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Ml.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Ml.g.cs @@ -8825,7 +8825,9 @@ public virtual Task PutCalendarJobAsync(Elastic.Clients. /// 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. @@ -8847,7 +8849,9 @@ public virtual PutDatafeedResponse PutDatafeed(PutDatafeedRequest request) /// 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. @@ -8868,7 +8872,9 @@ public virtual Task PutDatafeedAsync(PutDatafeedRequest req /// 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. @@ -8890,7 +8896,9 @@ public virtual PutDatafeedResponse PutDatafeed(PutDatafeedRequestDesc /// 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. @@ -8913,7 +8921,9 @@ public virtual PutDatafeedResponse PutDatafeed(Elastic.Clients.Elasti /// 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. @@ -8937,7 +8947,9 @@ public virtual PutDatafeedResponse PutDatafeed(Elastic.Clients.Elasti /// 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. @@ -8959,7 +8971,9 @@ public virtual PutDatafeedResponse PutDatafeed(PutDatafeedRequestDescriptor desc /// 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. @@ -8982,7 +8996,9 @@ public virtual PutDatafeedResponse PutDatafeed(Elastic.Clients.Elasticsearch.Id /// 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. @@ -9006,7 +9022,9 @@ public virtual PutDatafeedResponse PutDatafeed(Elastic.Clients.Elasticsearch.Id /// 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. @@ -9027,7 +9045,9 @@ public virtual Task PutDatafeedAsync(PutDatafeed /// 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. @@ -9049,7 +9069,9 @@ public virtual Task PutDatafeedAsync(Elastic.Cli /// 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. @@ -9072,7 +9094,9 @@ public virtual Task PutDatafeedAsync(Elastic.Cli /// 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. @@ -9093,7 +9117,9 @@ public virtual Task PutDatafeedAsync(PutDatafeedRequestDesc /// 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. @@ -9115,7 +9141,9 @@ public virtual Task PutDatafeedAsync(Elastic.Clients.Elasti /// 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. @@ -9137,6 +9165,13 @@ public virtual Task PutDatafeedAsync(Elastic.Clients.Elasti /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -9152,6 +9187,13 @@ public virtual PutDataFrameAnalyticsResponse PutDataFrameAnalytics(PutDataFrameA /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -9166,6 +9208,13 @@ public virtual Task PutDataFrameAnalyticsAsync(Pu /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -9181,6 +9230,13 @@ public virtual PutDataFrameAnalyticsResponse PutDataFrameAnalytics(Pu /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -9197,6 +9253,13 @@ public virtual PutDataFrameAnalyticsResponse PutDataFrameAnalytics(El /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -9214,6 +9277,13 @@ public virtual PutDataFrameAnalyticsResponse PutDataFrameAnalytics(El /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -9229,6 +9299,13 @@ public virtual PutDataFrameAnalyticsResponse PutDataFrameAnalytics(PutDataFrameA /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -9245,6 +9322,13 @@ public virtual PutDataFrameAnalyticsResponse PutDataFrameAnalytics(Elastic.Clien /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -9262,6 +9346,13 @@ public virtual PutDataFrameAnalyticsResponse PutDataFrameAnalytics(Elastic.Clien /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -9276,6 +9367,13 @@ public virtual Task PutDataFrameAnalyticsAsync{"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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -9291,6 +9389,13 @@ public virtual Task PutDataFrameAnalyticsAsync{"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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -9307,6 +9412,13 @@ public virtual Task PutDataFrameAnalyticsAsync{"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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -9321,6 +9433,13 @@ public virtual Task PutDataFrameAnalyticsAsync(Pu /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -9336,6 +9455,13 @@ public virtual Task PutDataFrameAnalyticsAsync(El /// 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. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -9473,6 +9599,7 @@ public virtual Task PutFilterAsync(Elastic.Clients.Elasticsea /// /// 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}}. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -9487,6 +9614,7 @@ public virtual PutJobResponse PutJob(PutJobRequest request) /// /// 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}}. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -9500,6 +9628,7 @@ public virtual Task PutJobAsync(PutJobRequest request, Cancellat /// /// 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}}. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -9514,6 +9643,7 @@ public virtual PutJobResponse PutJob(PutJobRequestDescriptor /// 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}}. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -9528,6 +9658,7 @@ public virtual PutJobResponse PutJob(PutJobRequestDescriptor descriptor) /// /// 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}}. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -9541,6 +9672,7 @@ public virtual Task PutJobAsync(PutJobRequestDescript /// /// 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}}. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -12992,7 +13124,7 @@ public virtual Task UpgradeJobSnapshotAsync(Elastic. /// /// - /// Validates an anomaly detection job. + /// Validate an anomaly detection job. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -13005,7 +13137,7 @@ public virtual ValidateResponse Validate(ValidateRequest request) /// /// - /// Validates an anomaly detection job. + /// Validate an anomaly detection job. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -13017,7 +13149,7 @@ public virtual Task ValidateAsync(ValidateRequest request, Can /// /// - /// Validates an anomaly detection job. + /// Validate an anomaly detection job. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -13030,7 +13162,7 @@ public virtual ValidateResponse Validate(ValidateRequestDescriptor /// - /// Validates an anomaly detection job. + /// Validate an anomaly detection job. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -13044,7 +13176,7 @@ public virtual ValidateResponse Validate() /// /// - /// Validates an anomaly detection job. + /// Validate an anomaly detection job. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -13059,7 +13191,7 @@ public virtual ValidateResponse Validate(Action /// - /// Validates an anomaly detection job. + /// Validate an anomaly detection job. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -13072,7 +13204,7 @@ public virtual ValidateResponse Validate(ValidateRequestDescriptor descriptor) /// /// - /// Validates an anomaly detection job. + /// Validate an anomaly detection job. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -13086,7 +13218,7 @@ public virtual ValidateResponse Validate() /// /// - /// Validates an anomaly detection job. + /// Validate an anomaly detection job. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -13101,7 +13233,7 @@ public virtual ValidateResponse Validate(Action confi /// /// - /// Validates an anomaly detection job. + /// Validate an anomaly detection job. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -13113,7 +13245,7 @@ public virtual Task ValidateAsync(ValidateRequestDe /// /// - /// Validates an anomaly detection job. + /// Validate an anomaly detection job. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -13126,7 +13258,7 @@ public virtual Task ValidateAsync(CancellationToken /// /// - /// Validates an anomaly detection job. + /// Validate an anomaly detection job. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -13140,7 +13272,7 @@ public virtual Task ValidateAsync(Action /// - /// Validates an anomaly detection job. + /// Validate an anomaly detection job. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -13152,7 +13284,7 @@ public virtual Task ValidateAsync(ValidateRequestDescriptor de /// /// - /// Validates an anomaly detection job. + /// Validate an anomaly detection job. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -13165,7 +13297,7 @@ public virtual Task ValidateAsync(CancellationToken cancellati /// /// - /// Validates an anomaly detection job. + /// Validate an anomaly detection job. /// /// Learn more about this API in the Elasticsearch documentation. /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Nodes.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Nodes.g.cs index 72850e0b230..5a814aaae77 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Nodes.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Nodes.g.cs @@ -44,7 +44,7 @@ internal NodesNamespacedClient(ElasticsearchClient client) : base(client) /// Clear the archived repositories metering. /// Clear the archived repositories metering information in the cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ClearRepositoriesMeteringArchiveResponse ClearRepositoriesMeteringArchive(ClearRepositoriesMeteringArchiveRequest request) @@ -58,7 +58,7 @@ public virtual ClearRepositoriesMeteringArchiveResponse ClearRepositoriesMeterin /// Clear the archived repositories metering. /// Clear the archived repositories metering information in the cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearRepositoriesMeteringArchiveAsync(ClearRepositoriesMeteringArchiveRequest request, CancellationToken cancellationToken = default) { @@ -71,7 +71,7 @@ public virtual Task ClearRepositoriesM /// Clear the archived repositories metering. /// Clear the archived repositories metering information in the cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ClearRepositoriesMeteringArchiveResponse ClearRepositoriesMeteringArchive(ClearRepositoriesMeteringArchiveRequestDescriptor descriptor) @@ -85,7 +85,7 @@ public virtual ClearRepositoriesMeteringArchiveResponse ClearRepositoriesMeterin /// Clear the archived repositories metering. /// Clear the archived repositories metering information in the cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ClearRepositoriesMeteringArchiveResponse ClearRepositoriesMeteringArchive(Elastic.Clients.Elasticsearch.NodeIds nodeId, long maxArchiveVersion) @@ -100,7 +100,7 @@ public virtual ClearRepositoriesMeteringArchiveResponse ClearRepositoriesMeterin /// Clear the archived repositories metering. /// Clear the archived repositories metering information in the cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ClearRepositoriesMeteringArchiveResponse ClearRepositoriesMeteringArchive(Elastic.Clients.Elasticsearch.NodeIds nodeId, long maxArchiveVersion, Action configureRequest) @@ -116,7 +116,7 @@ public virtual ClearRepositoriesMeteringArchiveResponse ClearRepositoriesMeterin /// Clear the archived repositories metering. /// Clear the archived repositories metering information in the cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearRepositoriesMeteringArchiveAsync(ClearRepositoriesMeteringArchiveRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -129,7 +129,7 @@ public virtual Task ClearRepositoriesM /// Clear the archived repositories metering. /// Clear the archived repositories metering information in the cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearRepositoriesMeteringArchiveAsync(Elastic.Clients.Elasticsearch.NodeIds nodeId, long maxArchiveVersion, CancellationToken cancellationToken = default) { @@ -143,7 +143,7 @@ public virtual Task ClearRepositoriesM /// Clear the archived repositories metering. /// Clear the archived repositories metering information in the cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearRepositoriesMeteringArchiveAsync(Elastic.Clients.Elasticsearch.NodeIds nodeId, long maxArchiveVersion, Action configureRequest, CancellationToken cancellationToken = default) { @@ -160,7 +160,7 @@ public virtual Task ClearRepositoriesM /// This API exposes monotonically non-decreasing counters and it is expected that clients would durably store the information needed to compute aggregations over a period of time. /// Additionally, the information exposed by this API is volatile, meaning that it will not be present after node restarts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRepositoriesMeteringInfoResponse GetRepositoriesMeteringInfo(GetRepositoriesMeteringInfoRequest request) @@ -176,7 +176,7 @@ public virtual GetRepositoriesMeteringInfoResponse GetRepositoriesMeteringInfo(G /// This API exposes monotonically non-decreasing counters and it is expected that clients would durably store the information needed to compute aggregations over a period of time. /// Additionally, the information exposed by this API is volatile, meaning that it will not be present after node restarts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRepositoriesMeteringInfoAsync(GetRepositoriesMeteringInfoRequest request, CancellationToken cancellationToken = default) { @@ -191,7 +191,7 @@ public virtual Task GetRepositoriesMetering /// This API exposes monotonically non-decreasing counters and it is expected that clients would durably store the information needed to compute aggregations over a period of time. /// Additionally, the information exposed by this API is volatile, meaning that it will not be present after node restarts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRepositoriesMeteringInfoResponse GetRepositoriesMeteringInfo(GetRepositoriesMeteringInfoRequestDescriptor descriptor) @@ -207,7 +207,7 @@ public virtual GetRepositoriesMeteringInfoResponse GetRepositoriesMeteringInfo(G /// This API exposes monotonically non-decreasing counters and it is expected that clients would durably store the information needed to compute aggregations over a period of time. /// Additionally, the information exposed by this API is volatile, meaning that it will not be present after node restarts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRepositoriesMeteringInfoResponse GetRepositoriesMeteringInfo(Elastic.Clients.Elasticsearch.NodeIds nodeId) @@ -224,7 +224,7 @@ public virtual GetRepositoriesMeteringInfoResponse GetRepositoriesMeteringInfo(E /// This API exposes monotonically non-decreasing counters and it is expected that clients would durably store the information needed to compute aggregations over a period of time. /// Additionally, the information exposed by this API is volatile, meaning that it will not be present after node restarts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRepositoriesMeteringInfoResponse GetRepositoriesMeteringInfo(Elastic.Clients.Elasticsearch.NodeIds nodeId, Action configureRequest) @@ -242,7 +242,7 @@ public virtual GetRepositoriesMeteringInfoResponse GetRepositoriesMeteringInfo(E /// This API exposes monotonically non-decreasing counters and it is expected that clients would durably store the information needed to compute aggregations over a period of time. /// Additionally, the information exposed by this API is volatile, meaning that it will not be present after node restarts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRepositoriesMeteringInfoAsync(GetRepositoriesMeteringInfoRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -257,7 +257,7 @@ public virtual Task GetRepositoriesMetering /// This API exposes monotonically non-decreasing counters and it is expected that clients would durably store the information needed to compute aggregations over a period of time. /// Additionally, the information exposed by this API is volatile, meaning that it will not be present after node restarts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRepositoriesMeteringInfoAsync(Elastic.Clients.Elasticsearch.NodeIds nodeId, CancellationToken cancellationToken = default) { @@ -273,7 +273,7 @@ public virtual Task GetRepositoriesMetering /// This API exposes monotonically non-decreasing counters and it is expected that clients would durably store the information needed to compute aggregations over a period of time. /// Additionally, the information exposed by this API is volatile, meaning that it will not be present after node restarts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRepositoriesMeteringInfoAsync(Elastic.Clients.Elasticsearch.NodeIds nodeId, Action configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.QueryRules.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.QueryRules.g.cs index ea4ba5f77b9..d53f20e8501 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.QueryRules.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.QueryRules.g.cs @@ -43,8 +43,9 @@ internal QueryRulesNamespacedClient(ElasticsearchClient client) : base(client) /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteRuleResponse DeleteRule(DeleteRuleRequest request) @@ -57,8 +58,9 @@ public virtual DeleteRuleResponse DeleteRule(DeleteRuleRequest request) /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteRuleAsync(DeleteRuleRequest request, CancellationToken cancellationToken = default) { @@ -70,8 +72,9 @@ public virtual Task DeleteRuleAsync(DeleteRuleRequest reques /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteRuleResponse DeleteRule(DeleteRuleRequestDescriptor descriptor) @@ -84,8 +87,9 @@ public virtual DeleteRuleResponse DeleteRule(DeleteRuleRequestDescriptor descrip /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteRuleResponse DeleteRule(Elastic.Clients.Elasticsearch.Id rulesetId, Elastic.Clients.Elasticsearch.Id ruleId) @@ -99,8 +103,9 @@ public virtual DeleteRuleResponse DeleteRule(Elastic.Clients.Elasticsearch.Id ru /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteRuleResponse DeleteRule(Elastic.Clients.Elasticsearch.Id rulesetId, Elastic.Clients.Elasticsearch.Id ruleId, Action configureRequest) @@ -115,8 +120,9 @@ public virtual DeleteRuleResponse DeleteRule(Elastic.Clients.Elasticsearch.Id ru /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteRuleAsync(DeleteRuleRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -128,8 +134,9 @@ public virtual Task DeleteRuleAsync(DeleteRuleRequestDescrip /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteRuleAsync(Elastic.Clients.Elasticsearch.Id rulesetId, Elastic.Clients.Elasticsearch.Id ruleId, CancellationToken cancellationToken = default) { @@ -142,8 +149,9 @@ public virtual Task DeleteRuleAsync(Elastic.Clients.Elastics /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteRuleAsync(Elastic.Clients.Elasticsearch.Id rulesetId, Elastic.Clients.Elasticsearch.Id ruleId, Action configureRequest, CancellationToken cancellationToken = default) { @@ -156,8 +164,10 @@ public virtual Task DeleteRuleAsync(Elastic.Clients.Elastics /// /// /// Delete a query ruleset. + /// Remove a query ruleset and its associated data. + /// This is a destructive action that is not recoverable. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteRulesetResponse DeleteRuleset(DeleteRulesetRequest request) @@ -169,8 +179,10 @@ public virtual DeleteRulesetResponse DeleteRuleset(DeleteRulesetRequest request) /// /// /// Delete a query ruleset. + /// Remove a query ruleset and its associated data. + /// This is a destructive action that is not recoverable. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteRulesetAsync(DeleteRulesetRequest request, CancellationToken cancellationToken = default) { @@ -181,8 +193,10 @@ public virtual Task DeleteRulesetAsync(DeleteRulesetReque /// /// /// Delete a query ruleset. + /// Remove a query ruleset and its associated data. + /// This is a destructive action that is not recoverable. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteRulesetResponse DeleteRuleset(DeleteRulesetRequestDescriptor descriptor) @@ -194,8 +208,10 @@ public virtual DeleteRulesetResponse DeleteRuleset(DeleteRulesetRequestDescripto /// /// /// Delete a query ruleset. + /// Remove a query ruleset and its associated data. + /// This is a destructive action that is not recoverable. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteRulesetResponse DeleteRuleset(Elastic.Clients.Elasticsearch.Id rulesetId) @@ -208,8 +224,10 @@ public virtual DeleteRulesetResponse DeleteRuleset(Elastic.Clients.Elasticsearch /// /// /// Delete a query ruleset. + /// Remove a query ruleset and its associated data. + /// This is a destructive action that is not recoverable. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteRulesetResponse DeleteRuleset(Elastic.Clients.Elasticsearch.Id rulesetId, Action configureRequest) @@ -223,8 +241,10 @@ public virtual DeleteRulesetResponse DeleteRuleset(Elastic.Clients.Elasticsearch /// /// /// Delete a query ruleset. + /// Remove a query ruleset and its associated data. + /// This is a destructive action that is not recoverable. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteRulesetAsync(DeleteRulesetRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -235,8 +255,10 @@ public virtual Task DeleteRulesetAsync(DeleteRulesetReque /// /// /// Delete a query ruleset. + /// Remove a query ruleset and its associated data. + /// This is a destructive action that is not recoverable. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteRulesetAsync(Elastic.Clients.Elasticsearch.Id rulesetId, CancellationToken cancellationToken = default) { @@ -248,8 +270,10 @@ public virtual Task DeleteRulesetAsync(Elastic.Clients.El /// /// /// Delete a query ruleset. + /// Remove a query ruleset and its associated data. + /// This is a destructive action that is not recoverable. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteRulesetAsync(Elastic.Clients.Elasticsearch.Id rulesetId, Action configureRequest, CancellationToken cancellationToken = default) { @@ -264,7 +288,7 @@ public virtual Task DeleteRulesetAsync(Elastic.Clients.El /// Get a query rule. /// Get details about a query rule within a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRuleResponse GetRule(GetRuleRequest request) @@ -278,7 +302,7 @@ public virtual GetRuleResponse GetRule(GetRuleRequest request) /// Get a query rule. /// Get details about a query rule within a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRuleAsync(GetRuleRequest request, CancellationToken cancellationToken = default) { @@ -291,7 +315,7 @@ public virtual Task GetRuleAsync(GetRuleRequest request, Cancel /// Get a query rule. /// Get details about a query rule within a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRuleResponse GetRule(GetRuleRequestDescriptor descriptor) @@ -305,7 +329,7 @@ public virtual GetRuleResponse GetRule(GetRuleRequestDescriptor descriptor) /// Get a query rule. /// Get details about a query rule within a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRuleResponse GetRule(Elastic.Clients.Elasticsearch.Id rulesetId, Elastic.Clients.Elasticsearch.Id ruleId) @@ -320,7 +344,7 @@ public virtual GetRuleResponse GetRule(Elastic.Clients.Elasticsearch.Id rulesetI /// Get a query rule. /// Get details about a query rule within a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRuleResponse GetRule(Elastic.Clients.Elasticsearch.Id rulesetId, Elastic.Clients.Elasticsearch.Id ruleId, Action configureRequest) @@ -336,7 +360,7 @@ public virtual GetRuleResponse GetRule(Elastic.Clients.Elasticsearch.Id rulesetI /// Get a query rule. /// Get details about a query rule within a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRuleAsync(GetRuleRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -349,7 +373,7 @@ public virtual Task GetRuleAsync(GetRuleRequestDescriptor descr /// Get a query rule. /// Get details about a query rule within a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRuleAsync(Elastic.Clients.Elasticsearch.Id rulesetId, Elastic.Clients.Elasticsearch.Id ruleId, CancellationToken cancellationToken = default) { @@ -363,7 +387,7 @@ public virtual Task GetRuleAsync(Elastic.Clients.Elasticsearch. /// Get a query rule. /// Get details about a query rule within a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRuleAsync(Elastic.Clients.Elasticsearch.Id rulesetId, Elastic.Clients.Elasticsearch.Id ruleId, Action configureRequest, CancellationToken cancellationToken = default) { @@ -378,7 +402,7 @@ public virtual Task GetRuleAsync(Elastic.Clients.Elasticsearch. /// Get a query ruleset. /// Get details about a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRulesetResponse GetRuleset(GetRulesetRequest request) @@ -392,7 +416,7 @@ public virtual GetRulesetResponse GetRuleset(GetRulesetRequest request) /// Get a query ruleset. /// Get details about a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRulesetAsync(GetRulesetRequest request, CancellationToken cancellationToken = default) { @@ -405,7 +429,7 @@ public virtual Task GetRulesetAsync(GetRulesetRequest reques /// Get a query ruleset. /// Get details about a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRulesetResponse GetRuleset(GetRulesetRequestDescriptor descriptor) @@ -419,7 +443,7 @@ public virtual GetRulesetResponse GetRuleset(GetRulesetRequestDescriptor descrip /// Get a query ruleset. /// Get details about a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRulesetResponse GetRuleset(Elastic.Clients.Elasticsearch.Id rulesetId) @@ -434,7 +458,7 @@ public virtual GetRulesetResponse GetRuleset(Elastic.Clients.Elasticsearch.Id ru /// Get a query ruleset. /// Get details about a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRulesetResponse GetRuleset(Elastic.Clients.Elasticsearch.Id rulesetId, Action configureRequest) @@ -450,7 +474,7 @@ public virtual GetRulesetResponse GetRuleset(Elastic.Clients.Elasticsearch.Id ru /// Get a query ruleset. /// Get details about a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRulesetAsync(GetRulesetRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -463,7 +487,7 @@ public virtual Task GetRulesetAsync(GetRulesetRequestDescrip /// Get a query ruleset. /// Get details about a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRulesetAsync(Elastic.Clients.Elasticsearch.Id rulesetId, CancellationToken cancellationToken = default) { @@ -477,7 +501,7 @@ public virtual Task GetRulesetAsync(Elastic.Clients.Elastics /// Get a query ruleset. /// Get details about a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRulesetAsync(Elastic.Clients.Elasticsearch.Id rulesetId, Action configureRequest, CancellationToken cancellationToken = default) { @@ -492,7 +516,7 @@ public virtual Task GetRulesetAsync(Elastic.Clients.Elastics /// Get all query rulesets. /// Get summarized information about the query rulesets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ListRulesetsResponse ListRulesets(ListRulesetsRequest request) @@ -506,7 +530,7 @@ public virtual ListRulesetsResponse ListRulesets(ListRulesetsRequest request) /// Get all query rulesets. /// Get summarized information about the query rulesets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ListRulesetsAsync(ListRulesetsRequest request, CancellationToken cancellationToken = default) { @@ -519,7 +543,7 @@ public virtual Task ListRulesetsAsync(ListRulesetsRequest /// Get all query rulesets. /// Get summarized information about the query rulesets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ListRulesetsResponse ListRulesets(ListRulesetsRequestDescriptor descriptor) @@ -533,7 +557,7 @@ public virtual ListRulesetsResponse ListRulesets(ListRulesetsRequestDescriptor d /// Get all query rulesets. /// Get summarized information about the query rulesets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ListRulesetsResponse ListRulesets() @@ -548,7 +572,7 @@ public virtual ListRulesetsResponse ListRulesets() /// Get all query rulesets. /// Get summarized information about the query rulesets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ListRulesetsResponse ListRulesets(Action configureRequest) @@ -564,7 +588,7 @@ public virtual ListRulesetsResponse ListRulesets(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ListRulesetsAsync(ListRulesetsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -577,7 +601,7 @@ public virtual Task ListRulesetsAsync(ListRulesetsRequestD /// Get all query rulesets. /// Get summarized information about the query rulesets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ListRulesetsAsync(CancellationToken cancellationToken = default) { @@ -591,7 +615,7 @@ public virtual Task ListRulesetsAsync(CancellationToken ca /// Get all query rulesets. /// Get summarized information about the query rulesets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ListRulesetsAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -606,7 +630,13 @@ public virtual Task ListRulesetsAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutRuleResponse PutRule(PutRuleRequest request) @@ -620,7 +650,13 @@ public virtual PutRuleResponse PutRule(PutRuleRequest request) /// Create or update a query rule. /// Create or update a query rule within a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutRuleAsync(PutRuleRequest request, CancellationToken cancellationToken = default) { @@ -633,7 +669,13 @@ public virtual Task PutRuleAsync(PutRuleRequest request, Cancel /// Create or update a query rule. /// Create or update a query rule within a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutRuleResponse PutRule(PutRuleRequestDescriptor descriptor) @@ -647,7 +689,13 @@ public virtual PutRuleResponse PutRule(PutRuleRequestDescriptor descriptor) /// Create or update a query rule. /// Create or update a query rule within a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutRuleResponse PutRule(Elastic.Clients.Elasticsearch.Id rulesetId, Elastic.Clients.Elasticsearch.Id ruleId) @@ -662,7 +710,13 @@ public virtual PutRuleResponse PutRule(Elastic.Clients.Elasticsearch.Id rulesetI /// Create or update a query rule. /// Create or update a query rule within a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutRuleResponse PutRule(Elastic.Clients.Elasticsearch.Id rulesetId, Elastic.Clients.Elasticsearch.Id ruleId, Action configureRequest) @@ -678,7 +732,13 @@ public virtual PutRuleResponse PutRule(Elastic.Clients.Elasticsearch.Id rulesetI /// Create or update a query rule. /// Create or update a query rule within a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutRuleAsync(PutRuleRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -691,7 +751,13 @@ public virtual Task PutRuleAsync(PutRuleRequestDescriptor descr /// Create or update a query rule. /// Create or update a query rule within a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutRuleAsync(Elastic.Clients.Elasticsearch.Id rulesetId, Elastic.Clients.Elasticsearch.Id ruleId, CancellationToken cancellationToken = default) { @@ -705,7 +771,13 @@ public virtual Task PutRuleAsync(Elastic.Clients.Elasticsearch. /// Create or update a query rule. /// Create or update a query rule within a query ruleset. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutRuleAsync(Elastic.Clients.Elasticsearch.Id rulesetId, Elastic.Clients.Elasticsearch.Id ruleId, Action configureRequest, CancellationToken cancellationToken = default) { @@ -718,8 +790,16 @@ public virtual Task PutRuleAsync(Elastic.Clients.Elasticsearch. /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutRulesetResponse PutRuleset(PutRulesetRequest request) @@ -731,8 +811,16 @@ public virtual PutRulesetResponse PutRuleset(PutRulesetRequest request) /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutRulesetAsync(PutRulesetRequest request, CancellationToken cancellationToken = default) { @@ -743,8 +831,16 @@ public virtual Task PutRulesetAsync(PutRulesetRequest reques /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutRulesetResponse PutRuleset(PutRulesetRequestDescriptor descriptor) @@ -756,8 +852,16 @@ public virtual PutRulesetResponse PutRuleset(PutRulesetRequestDescriptor descrip /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutRulesetResponse PutRuleset(Elastic.Clients.Elasticsearch.Id rulesetId) @@ -770,8 +874,16 @@ public virtual PutRulesetResponse PutRuleset(Elastic.Clients.Elasticsearch.Id ru /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutRulesetResponse PutRuleset(Elastic.Clients.Elasticsearch.Id rulesetId, Action configureRequest) @@ -785,8 +897,16 @@ public virtual PutRulesetResponse PutRuleset(Elastic.Clients.Elasticsearch.Id ru /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutRulesetAsync(PutRulesetRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -797,8 +917,16 @@ public virtual Task PutRulesetAsync(PutRulesetRequestDescrip /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutRulesetAsync(Elastic.Clients.Elasticsearch.Id rulesetId, CancellationToken cancellationToken = default) { @@ -810,8 +938,16 @@ public virtual Task PutRulesetAsync(Elastic.Clients.Elastics /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutRulesetAsync(Elastic.Clients.Elasticsearch.Id rulesetId, Action configureRequest, CancellationToken cancellationToken = default) { @@ -826,7 +962,7 @@ public virtual Task PutRulesetAsync(Elastic.Clients.Elastics /// Test a query ruleset. /// Evaluate match criteria against a query ruleset to identify the rules that would match that criteria. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual TestResponse Test(TestRequest request) @@ -840,7 +976,7 @@ public virtual TestResponse Test(TestRequest request) /// Test a query ruleset. /// Evaluate match criteria against a query ruleset to identify the rules that would match that criteria. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task TestAsync(TestRequest request, CancellationToken cancellationToken = default) { @@ -853,7 +989,7 @@ public virtual Task TestAsync(TestRequest request, CancellationTok /// Test a query ruleset. /// Evaluate match criteria against a query ruleset to identify the rules that would match that criteria. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual TestResponse Test(TestRequestDescriptor descriptor) @@ -867,7 +1003,7 @@ public virtual TestResponse Test(TestRequestDescriptor descriptor) /// Test a query ruleset. /// Evaluate match criteria against a query ruleset to identify the rules that would match that criteria. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual TestResponse Test(Elastic.Clients.Elasticsearch.Id rulesetId) @@ -882,7 +1018,7 @@ public virtual TestResponse Test(Elastic.Clients.Elasticsearch.Id rulesetId) /// Test a query ruleset. /// Evaluate match criteria against a query ruleset to identify the rules that would match that criteria. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual TestResponse Test(Elastic.Clients.Elasticsearch.Id rulesetId, Action configureRequest) @@ -898,7 +1034,7 @@ public virtual TestResponse Test(Elastic.Clients.Elasticsearch.Id rulesetId, Act /// Test a query ruleset. /// Evaluate match criteria against a query ruleset to identify the rules that would match that criteria. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task TestAsync(TestRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -911,7 +1047,7 @@ public virtual Task TestAsync(TestRequestDescriptor descriptor, Ca /// Test a query ruleset. /// Evaluate match criteria against a query ruleset to identify the rules that would match that criteria. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task TestAsync(Elastic.Clients.Elasticsearch.Id rulesetId, CancellationToken cancellationToken = default) { @@ -925,7 +1061,7 @@ public virtual Task TestAsync(Elastic.Clients.Elasticsearch.Id rul /// Test a query ruleset. /// Evaluate match criteria against a query ruleset to identify the rules that would match that criteria. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task TestAsync(Elastic.Clients.Elasticsearch.Id rulesetId, Action configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Rollup.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Rollup.g.cs index c697cc783bd..2a967dba092 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Rollup.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Rollup.g.cs @@ -67,7 +67,7 @@ internal RollupNamespacedClient(ElasticsearchClient client) : base(client) /// } /// } /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteJobResponse DeleteJob(DeleteJobRequest request) @@ -104,7 +104,7 @@ public virtual DeleteJobResponse DeleteJob(DeleteJobRequest request) /// } /// } /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteJobAsync(DeleteJobRequest request, CancellationToken cancellationToken = default) { @@ -140,7 +140,7 @@ public virtual Task DeleteJobAsync(DeleteJobRequest request, /// } /// } /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteJobResponse DeleteJob(DeleteJobRequestDescriptor descriptor) @@ -177,7 +177,7 @@ public virtual DeleteJobResponse DeleteJob(DeleteJobRequestDescriptor /// } /// } /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteJobResponse DeleteJob(Elastic.Clients.Elasticsearch.Id id) @@ -215,7 +215,7 @@ public virtual DeleteJobResponse DeleteJob(Elastic.Clients.Elasticsea /// } /// } /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteJobResponse DeleteJob(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) @@ -254,7 +254,7 @@ public virtual DeleteJobResponse DeleteJob(Elastic.Clients.Elasticsea /// } /// } /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteJobResponse DeleteJob(DeleteJobRequestDescriptor descriptor) @@ -291,7 +291,7 @@ public virtual DeleteJobResponse DeleteJob(DeleteJobRequestDescriptor descriptor /// } /// } /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteJobResponse DeleteJob(Elastic.Clients.Elasticsearch.Id id) @@ -329,7 +329,7 @@ public virtual DeleteJobResponse DeleteJob(Elastic.Clients.Elasticsearch.Id id) /// } /// } /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteJobResponse DeleteJob(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) @@ -368,7 +368,7 @@ public virtual DeleteJobResponse DeleteJob(Elastic.Clients.Elasticsearch.Id id, /// } /// } /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteJobAsync(DeleteJobRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -404,7 +404,7 @@ public virtual Task DeleteJobAsync(DeleteJobReques /// } /// } /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteJobAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -441,7 +441,7 @@ public virtual Task DeleteJobAsync(Elastic.Clients /// } /// } /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteJobAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -479,7 +479,7 @@ public virtual Task DeleteJobAsync(Elastic.Clients /// } /// } /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteJobAsync(DeleteJobRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -515,7 +515,7 @@ public virtual Task DeleteJobAsync(DeleteJobRequestDescriptor /// } /// } /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteJobAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -552,7 +552,7 @@ public virtual Task DeleteJobAsync(Elastic.Clients.Elasticsea /// } /// } /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteJobAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -572,7 +572,7 @@ public virtual Task DeleteJobAsync(Elastic.Clients.Elasticsea /// If a job was created, ran for a while, then was deleted, the API does not return any details about it. /// For details about a historical rollup job, the rollup capabilities API may be more useful. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetJobsResponse GetJobs(GetJobsRequest request) @@ -591,7 +591,7 @@ public virtual GetJobsResponse GetJobs(GetJobsRequest request) /// If a job was created, ran for a while, then was deleted, the API does not return any details about it. /// For details about a historical rollup job, the rollup capabilities API may be more useful. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetJobsAsync(GetJobsRequest request, CancellationToken cancellationToken = default) { @@ -609,7 +609,7 @@ public virtual Task GetJobsAsync(GetJobsRequest request, Cancel /// If a job was created, ran for a while, then was deleted, the API does not return any details about it. /// For details about a historical rollup job, the rollup capabilities API may be more useful. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetJobsResponse GetJobs(GetJobsRequestDescriptor descriptor) @@ -628,7 +628,7 @@ public virtual GetJobsResponse GetJobs(GetJobsRequestDescriptor - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetJobsResponse GetJobs(Elastic.Clients.Elasticsearch.Id? id) @@ -648,7 +648,7 @@ public virtual GetJobsResponse GetJobs(Elastic.Clients.Elasticsearch. /// If a job was created, ran for a while, then was deleted, the API does not return any details about it. /// For details about a historical rollup job, the rollup capabilities API may be more useful. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetJobsResponse GetJobs(Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest) @@ -669,7 +669,7 @@ public virtual GetJobsResponse GetJobs(Elastic.Clients.Elasticsearch. /// If a job was created, ran for a while, then was deleted, the API does not return any details about it. /// For details about a historical rollup job, the rollup capabilities API may be more useful. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetJobsResponse GetJobs() @@ -689,7 +689,7 @@ public virtual GetJobsResponse GetJobs() /// If a job was created, ran for a while, then was deleted, the API does not return any details about it. /// For details about a historical rollup job, the rollup capabilities API may be more useful. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetJobsResponse GetJobs(Action> configureRequest) @@ -710,7 +710,7 @@ public virtual GetJobsResponse GetJobs(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetJobsResponse GetJobs(GetJobsRequestDescriptor descriptor) @@ -729,7 +729,7 @@ public virtual GetJobsResponse GetJobs(GetJobsRequestDescriptor descriptor) /// If a job was created, ran for a while, then was deleted, the API does not return any details about it. /// For details about a historical rollup job, the rollup capabilities API may be more useful. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetJobsResponse GetJobs(Elastic.Clients.Elasticsearch.Id? id) @@ -749,7 +749,7 @@ public virtual GetJobsResponse GetJobs(Elastic.Clients.Elasticsearch.Id? id) /// If a job was created, ran for a while, then was deleted, the API does not return any details about it. /// For details about a historical rollup job, the rollup capabilities API may be more useful. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetJobsResponse GetJobs(Elastic.Clients.Elasticsearch.Id? id, Action configureRequest) @@ -770,7 +770,7 @@ public virtual GetJobsResponse GetJobs(Elastic.Clients.Elasticsearch.Id? id, Act /// If a job was created, ran for a while, then was deleted, the API does not return any details about it. /// For details about a historical rollup job, the rollup capabilities API may be more useful. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetJobsResponse GetJobs() @@ -790,7 +790,7 @@ public virtual GetJobsResponse GetJobs() /// If a job was created, ran for a while, then was deleted, the API does not return any details about it. /// For details about a historical rollup job, the rollup capabilities API may be more useful. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetJobsResponse GetJobs(Action configureRequest) @@ -811,7 +811,7 @@ public virtual GetJobsResponse GetJobs(Action configur /// If a job was created, ran for a while, then was deleted, the API does not return any details about it. /// For details about a historical rollup job, the rollup capabilities API may be more useful. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetJobsAsync(GetJobsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -829,7 +829,7 @@ public virtual Task GetJobsAsync(GetJobsRequestDescr /// If a job was created, ran for a while, then was deleted, the API does not return any details about it. /// For details about a historical rollup job, the rollup capabilities API may be more useful. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetJobsAsync(Elastic.Clients.Elasticsearch.Id? id, CancellationToken cancellationToken = default) { @@ -848,7 +848,7 @@ public virtual Task GetJobsAsync(Elastic.Clients.Ela /// If a job was created, ran for a while, then was deleted, the API does not return any details about it. /// For details about a historical rollup job, the rollup capabilities API may be more useful. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetJobsAsync(Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -868,7 +868,7 @@ public virtual Task GetJobsAsync(Elastic.Clients.Ela /// If a job was created, ran for a while, then was deleted, the API does not return any details about it. /// For details about a historical rollup job, the rollup capabilities API may be more useful. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetJobsAsync(CancellationToken cancellationToken = default) { @@ -887,7 +887,7 @@ public virtual Task GetJobsAsync(CancellationToken c /// If a job was created, ran for a while, then was deleted, the API does not return any details about it. /// For details about a historical rollup job, the rollup capabilities API may be more useful. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetJobsAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -907,7 +907,7 @@ public virtual Task GetJobsAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetJobsAsync(GetJobsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -925,7 +925,7 @@ public virtual Task GetJobsAsync(GetJobsRequestDescriptor descr /// If a job was created, ran for a while, then was deleted, the API does not return any details about it. /// For details about a historical rollup job, the rollup capabilities API may be more useful. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetJobsAsync(Elastic.Clients.Elasticsearch.Id? id, CancellationToken cancellationToken = default) { @@ -944,7 +944,7 @@ public virtual Task GetJobsAsync(Elastic.Clients.Elasticsearch. /// If a job was created, ran for a while, then was deleted, the API does not return any details about it. /// For details about a historical rollup job, the rollup capabilities API may be more useful. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetJobsAsync(Elastic.Clients.Elasticsearch.Id? id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -964,7 +964,7 @@ public virtual Task GetJobsAsync(Elastic.Clients.Elasticsearch. /// If a job was created, ran for a while, then was deleted, the API does not return any details about it. /// For details about a historical rollup job, the rollup capabilities API may be more useful. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetJobsAsync(CancellationToken cancellationToken = default) { @@ -983,7 +983,7 @@ public virtual Task GetJobsAsync(CancellationToken cancellation /// If a job was created, ran for a while, then was deleted, the API does not return any details about it. /// For details about a historical rollup job, the rollup capabilities API may be more useful. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetJobsAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -1015,7 +1015,7 @@ public virtual Task GetJobsAsync(Action /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRollupCapsResponse GetRollupCaps(GetRollupCapsRequest request) @@ -1046,7 +1046,7 @@ public virtual GetRollupCapsResponse GetRollupCaps(GetRollupCapsRequest request) /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRollupCapsAsync(GetRollupCapsRequest request, CancellationToken cancellationToken = default) { @@ -1076,7 +1076,7 @@ public virtual Task GetRollupCapsAsync(GetRollupCapsReque /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRollupCapsResponse GetRollupCaps(GetRollupCapsRequestDescriptor descriptor) @@ -1107,7 +1107,7 @@ public virtual GetRollupCapsResponse GetRollupCaps(GetRollupCapsReque /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRollupCapsResponse GetRollupCaps(Elastic.Clients.Elasticsearch.Id? id) @@ -1139,7 +1139,7 @@ public virtual GetRollupCapsResponse GetRollupCaps(Elastic.Clients.El /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRollupCapsResponse GetRollupCaps(Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest) @@ -1172,7 +1172,7 @@ public virtual GetRollupCapsResponse GetRollupCaps(Elastic.Clients.El /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRollupCapsResponse GetRollupCaps() @@ -1204,7 +1204,7 @@ public virtual GetRollupCapsResponse GetRollupCaps() /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRollupCapsResponse GetRollupCaps(Action> configureRequest) @@ -1237,7 +1237,7 @@ public virtual GetRollupCapsResponse GetRollupCaps(Action /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRollupCapsResponse GetRollupCaps(GetRollupCapsRequestDescriptor descriptor) @@ -1268,7 +1268,7 @@ public virtual GetRollupCapsResponse GetRollupCaps(GetRollupCapsRequestDescripto /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRollupCapsResponse GetRollupCaps(Elastic.Clients.Elasticsearch.Id? id) @@ -1300,7 +1300,7 @@ public virtual GetRollupCapsResponse GetRollupCaps(Elastic.Clients.Elasticsearch /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRollupCapsResponse GetRollupCaps(Elastic.Clients.Elasticsearch.Id? id, Action configureRequest) @@ -1333,7 +1333,7 @@ public virtual GetRollupCapsResponse GetRollupCaps(Elastic.Clients.Elasticsearch /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRollupCapsResponse GetRollupCaps() @@ -1365,7 +1365,7 @@ public virtual GetRollupCapsResponse GetRollupCaps() /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRollupCapsResponse GetRollupCaps(Action configureRequest) @@ -1398,7 +1398,7 @@ public virtual GetRollupCapsResponse GetRollupCaps(Action /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRollupCapsAsync(GetRollupCapsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1428,7 +1428,7 @@ public virtual Task GetRollupCapsAsync(GetRoll /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRollupCapsAsync(Elastic.Clients.Elasticsearch.Id? id, CancellationToken cancellationToken = default) { @@ -1459,7 +1459,7 @@ public virtual Task GetRollupCapsAsync(Elastic /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRollupCapsAsync(Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -1491,7 +1491,7 @@ public virtual Task GetRollupCapsAsync(Elastic /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRollupCapsAsync(CancellationToken cancellationToken = default) { @@ -1522,7 +1522,7 @@ public virtual Task GetRollupCapsAsync(Cancell /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRollupCapsAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -1554,7 +1554,7 @@ public virtual Task GetRollupCapsAsync(Action< /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRollupCapsAsync(GetRollupCapsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1584,7 +1584,7 @@ public virtual Task GetRollupCapsAsync(GetRollupCapsReque /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRollupCapsAsync(Elastic.Clients.Elasticsearch.Id? id, CancellationToken cancellationToken = default) { @@ -1615,7 +1615,7 @@ public virtual Task GetRollupCapsAsync(Elastic.Clients.El /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRollupCapsAsync(Elastic.Clients.Elasticsearch.Id? id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -1647,7 +1647,7 @@ public virtual Task GetRollupCapsAsync(Elastic.Clients.El /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRollupCapsAsync(CancellationToken cancellationToken = default) { @@ -1678,7 +1678,7 @@ public virtual Task GetRollupCapsAsync(CancellationToken /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRollupCapsAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -1706,7 +1706,7 @@ public virtual Task GetRollupCapsAsync(Action /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRollupIndexCapsResponse GetRollupIndexCaps(GetRollupIndexCapsRequest request) @@ -1733,7 +1733,7 @@ public virtual GetRollupIndexCapsResponse GetRollupIndexCaps(GetRollupIndexCapsR /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRollupIndexCapsAsync(GetRollupIndexCapsRequest request, CancellationToken cancellationToken = default) { @@ -1759,7 +1759,7 @@ public virtual Task GetRollupIndexCapsAsync(GetRollu /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRollupIndexCapsResponse GetRollupIndexCaps(GetRollupIndexCapsRequestDescriptor descriptor) @@ -1786,7 +1786,7 @@ public virtual GetRollupIndexCapsResponse GetRollupIndexCaps(GetRollu /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRollupIndexCapsResponse GetRollupIndexCaps(Elastic.Clients.Elasticsearch.Ids index) @@ -1814,7 +1814,7 @@ public virtual GetRollupIndexCapsResponse GetRollupIndexCaps(Elastic. /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRollupIndexCapsResponse GetRollupIndexCaps(Elastic.Clients.Elasticsearch.Ids index, Action> configureRequest) @@ -1843,7 +1843,7 @@ public virtual GetRollupIndexCapsResponse GetRollupIndexCaps(Elastic. /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRollupIndexCapsResponse GetRollupIndexCaps(GetRollupIndexCapsRequestDescriptor descriptor) @@ -1870,7 +1870,7 @@ public virtual GetRollupIndexCapsResponse GetRollupIndexCaps(GetRollupIndexCapsR /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRollupIndexCapsResponse GetRollupIndexCaps(Elastic.Clients.Elasticsearch.Ids index) @@ -1898,7 +1898,7 @@ public virtual GetRollupIndexCapsResponse GetRollupIndexCaps(Elastic.Clients.Ela /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRollupIndexCapsResponse GetRollupIndexCaps(Elastic.Clients.Elasticsearch.Ids index, Action configureRequest) @@ -1927,7 +1927,7 @@ public virtual GetRollupIndexCapsResponse GetRollupIndexCaps(Elastic.Clients.Ela /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRollupIndexCapsAsync(GetRollupIndexCapsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1953,7 +1953,7 @@ public virtual Task GetRollupIndexCapsAsync /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRollupIndexCapsAsync(Elastic.Clients.Elasticsearch.Ids index, CancellationToken cancellationToken = default) { @@ -1980,7 +1980,7 @@ public virtual Task GetRollupIndexCapsAsync /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRollupIndexCapsAsync(Elastic.Clients.Elasticsearch.Ids index, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -2008,7 +2008,7 @@ public virtual Task GetRollupIndexCapsAsync /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRollupIndexCapsAsync(GetRollupIndexCapsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2034,7 +2034,7 @@ public virtual Task GetRollupIndexCapsAsync(GetRollu /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRollupIndexCapsAsync(Elastic.Clients.Elasticsearch.Ids index, CancellationToken cancellationToken = default) { @@ -2061,7 +2061,7 @@ public virtual Task GetRollupIndexCapsAsync(Elastic. /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRollupIndexCapsAsync(Elastic.Clients.Elasticsearch.Ids index, Action configureRequest, CancellationToken cancellationToken = default) { @@ -2087,7 +2087,7 @@ public virtual Task GetRollupIndexCapsAsync(Elastic. /// /// Jobs are created in a STOPPED state. You can start them with the start rollup jobs API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutJobResponse PutJob(PutJobRequest request) @@ -2112,7 +2112,7 @@ public virtual PutJobResponse PutJob(PutJobRequest request) /// /// Jobs are created in a STOPPED state. You can start them with the start rollup jobs API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutJobAsync(PutJobRequest request, CancellationToken cancellationToken = default) { @@ -2136,7 +2136,7 @@ public virtual Task PutJobAsync(PutJobRequest request, Cancellat /// /// Jobs are created in a STOPPED state. You can start them with the start rollup jobs API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutJobResponse PutJob(PutJobRequestDescriptor descriptor) @@ -2161,7 +2161,7 @@ public virtual PutJobResponse PutJob(PutJobRequestDescriptor /// Jobs are created in a STOPPED state. You can start them with the start rollup jobs API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutJobResponse PutJob(Elastic.Clients.Elasticsearch.Id id) @@ -2187,7 +2187,7 @@ public virtual PutJobResponse PutJob(Elastic.Clients.Elasticsearch.Id /// /// Jobs are created in a STOPPED state. You can start them with the start rollup jobs API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutJobResponse PutJob(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) @@ -2214,7 +2214,7 @@ public virtual PutJobResponse PutJob(Elastic.Clients.Elasticsearch.Id /// /// Jobs are created in a STOPPED state. You can start them with the start rollup jobs API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutJobResponse PutJob(PutJobRequestDescriptor descriptor) @@ -2239,7 +2239,7 @@ public virtual PutJobResponse PutJob(PutJobRequestDescriptor descriptor) /// /// Jobs are created in a STOPPED state. You can start them with the start rollup jobs API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutJobResponse PutJob(Elastic.Clients.Elasticsearch.Id id) @@ -2265,7 +2265,7 @@ public virtual PutJobResponse PutJob(Elastic.Clients.Elasticsearch.Id id) /// /// Jobs are created in a STOPPED state. You can start them with the start rollup jobs API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutJobResponse PutJob(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) @@ -2292,7 +2292,7 @@ public virtual PutJobResponse PutJob(Elastic.Clients.Elasticsearch.Id id, Action /// /// Jobs are created in a STOPPED state. You can start them with the start rollup jobs API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutJobAsync(PutJobRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2316,7 +2316,7 @@ public virtual Task PutJobAsync(PutJobRequestDescript /// /// Jobs are created in a STOPPED state. You can start them with the start rollup jobs API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutJobAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -2341,7 +2341,7 @@ public virtual Task PutJobAsync(Elastic.Clients.Elast /// /// Jobs are created in a STOPPED state. You can start them with the start rollup jobs API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutJobAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -2367,7 +2367,7 @@ public virtual Task PutJobAsync(Elastic.Clients.Elast /// /// Jobs are created in a STOPPED state. You can start them with the start rollup jobs API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutJobAsync(PutJobRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2391,7 +2391,7 @@ public virtual Task PutJobAsync(PutJobRequestDescriptor descript /// /// Jobs are created in a STOPPED state. You can start them with the start rollup jobs API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutJobAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -2416,7 +2416,7 @@ public virtual Task PutJobAsync(Elastic.Clients.Elasticsearch.Id /// /// Jobs are created in a STOPPED state. You can start them with the start rollup jobs API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutJobAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -2432,7 +2432,54 @@ public virtual Task PutJobAsync(Elastic.Clients.Elasticsearch.Id /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RollupSearchResponse RollupSearch(RollupSearchRequest request) @@ -2447,7 +2494,54 @@ public virtual RollupSearchResponse RollupSearch(RollupSea /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> RollupSearchAsync(RollupSearchRequest request, CancellationToken cancellationToken = default) { @@ -2461,7 +2555,54 @@ public virtual Task> RollupSearchAsync - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RollupSearchResponse RollupSearch(RollupSearchRequestDescriptor descriptor) @@ -2476,7 +2617,54 @@ public virtual RollupSearchResponse RollupSearch(RollupSea /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RollupSearchResponse RollupSearch(Elastic.Clients.Elasticsearch.Indices indices) @@ -2492,7 +2680,54 @@ public virtual RollupSearchResponse RollupSearch(Elastic.C /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RollupSearchResponse RollupSearch(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest) @@ -2509,7 +2744,54 @@ public virtual RollupSearchResponse RollupSearch(Elastic.C /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RollupSearchResponse RollupSearch() @@ -2525,7 +2807,54 @@ public virtual RollupSearchResponse RollupSearch() /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RollupSearchResponse RollupSearch(Action> configureRequest) @@ -2542,7 +2871,54 @@ public virtual RollupSearchResponse RollupSearch(Action - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> RollupSearchAsync(RollupSearchRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2556,7 +2932,54 @@ public virtual Task> RollupSearchAsync - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> RollupSearchAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) { @@ -2571,7 +2994,54 @@ public virtual Task> RollupSearchAsync - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> RollupSearchAsync(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -2587,7 +3057,54 @@ public virtual Task> RollupSearchAsync - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> RollupSearchAsync(CancellationToken cancellationToken = default) { @@ -2602,7 +3119,54 @@ public virtual Task> RollupSearchAsync - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task> RollupSearchAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -2618,7 +3182,7 @@ public virtual Task> RollupSearchAsync - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StartJobResponse StartJob(StartJobRequest request) @@ -2633,7 +3197,7 @@ public virtual StartJobResponse StartJob(StartJobRequest request) /// If you try to start a job that does not exist, an exception occurs. /// If you try to start a job that is already started, nothing happens. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StartJobAsync(StartJobRequest request, CancellationToken cancellationToken = default) { @@ -2647,7 +3211,7 @@ public virtual Task StartJobAsync(StartJobRequest request, Can /// If you try to start a job that does not exist, an exception occurs. /// If you try to start a job that is already started, nothing happens. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StartJobResponse StartJob(StartJobRequestDescriptor descriptor) @@ -2662,7 +3226,7 @@ public virtual StartJobResponse StartJob(StartJobRequestDescriptor - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StartJobResponse StartJob(Elastic.Clients.Elasticsearch.Id id) @@ -2678,7 +3242,7 @@ public virtual StartJobResponse StartJob(Elastic.Clients.Elasticsearc /// If you try to start a job that does not exist, an exception occurs. /// If you try to start a job that is already started, nothing happens. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StartJobResponse StartJob(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) @@ -2695,7 +3259,7 @@ public virtual StartJobResponse StartJob(Elastic.Clients.Elasticsearc /// If you try to start a job that does not exist, an exception occurs. /// If you try to start a job that is already started, nothing happens. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StartJobResponse StartJob(StartJobRequestDescriptor descriptor) @@ -2710,7 +3274,7 @@ public virtual StartJobResponse StartJob(StartJobRequestDescriptor descriptor) /// If you try to start a job that does not exist, an exception occurs. /// If you try to start a job that is already started, nothing happens. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StartJobResponse StartJob(Elastic.Clients.Elasticsearch.Id id) @@ -2726,7 +3290,7 @@ public virtual StartJobResponse StartJob(Elastic.Clients.Elasticsearch.Id id) /// If you try to start a job that does not exist, an exception occurs. /// If you try to start a job that is already started, nothing happens. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StartJobResponse StartJob(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) @@ -2743,7 +3307,7 @@ public virtual StartJobResponse StartJob(Elastic.Clients.Elasticsearch.Id id, Ac /// If you try to start a job that does not exist, an exception occurs. /// If you try to start a job that is already started, nothing happens. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StartJobAsync(StartJobRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2757,7 +3321,7 @@ public virtual Task StartJobAsync(StartJobRequestDe /// If you try to start a job that does not exist, an exception occurs. /// If you try to start a job that is already started, nothing happens. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StartJobAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -2772,7 +3336,7 @@ public virtual Task StartJobAsync(Elastic.Clients.E /// If you try to start a job that does not exist, an exception occurs. /// If you try to start a job that is already started, nothing happens. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StartJobAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -2788,7 +3352,7 @@ public virtual Task StartJobAsync(Elastic.Clients.E /// If you try to start a job that does not exist, an exception occurs. /// If you try to start a job that is already started, nothing happens. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StartJobAsync(StartJobRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2802,7 +3366,7 @@ public virtual Task StartJobAsync(StartJobRequestDescriptor de /// If you try to start a job that does not exist, an exception occurs. /// If you try to start a job that is already started, nothing happens. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StartJobAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -2817,7 +3381,7 @@ public virtual Task StartJobAsync(Elastic.Clients.Elasticsearc /// If you try to start a job that does not exist, an exception occurs. /// If you try to start a job that is already started, nothing happens. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StartJobAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -2833,7 +3397,18 @@ public virtual Task StartJobAsync(Elastic.Clients.Elasticsearc /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StopJobResponse StopJob(StopJobRequest request) @@ -2848,7 +3423,18 @@ public virtual StopJobResponse StopJob(StopJobRequest request) /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StopJobAsync(StopJobRequest request, CancellationToken cancellationToken = default) { @@ -2862,7 +3448,18 @@ public virtual Task StopJobAsync(StopJobRequest request, Cancel /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StopJobResponse StopJob(StopJobRequestDescriptor descriptor) @@ -2877,7 +3474,18 @@ public virtual StopJobResponse StopJob(StopJobRequestDescriptor - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StopJobResponse StopJob(Elastic.Clients.Elasticsearch.Id id) @@ -2893,7 +3501,18 @@ public virtual StopJobResponse StopJob(Elastic.Clients.Elasticsearch. /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StopJobResponse StopJob(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) @@ -2910,7 +3529,18 @@ public virtual StopJobResponse StopJob(Elastic.Clients.Elasticsearch. /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StopJobResponse StopJob(StopJobRequestDescriptor descriptor) @@ -2925,7 +3555,18 @@ public virtual StopJobResponse StopJob(StopJobRequestDescriptor descriptor) /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StopJobResponse StopJob(Elastic.Clients.Elasticsearch.Id id) @@ -2941,7 +3582,18 @@ public virtual StopJobResponse StopJob(Elastic.Clients.Elasticsearch.Id id) /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StopJobResponse StopJob(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) @@ -2958,7 +3610,18 @@ public virtual StopJobResponse StopJob(Elastic.Clients.Elasticsearch.Id id, Acti /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StopJobAsync(StopJobRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2972,7 +3635,18 @@ public virtual Task StopJobAsync(StopJobRequestDescr /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StopJobAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -2987,7 +3661,18 @@ public virtual Task StopJobAsync(Elastic.Clients.Ela /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StopJobAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -3003,7 +3688,18 @@ public virtual Task StopJobAsync(Elastic.Clients.Ela /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StopJobAsync(StopJobRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3017,7 +3713,18 @@ public virtual Task StopJobAsync(StopJobRequestDescriptor descr /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StopJobAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -3032,7 +3739,18 @@ public virtual Task StopJobAsync(Elastic.Clients.Elasticsearch. /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StopJobAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.SearchApplication.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.SearchApplication.g.cs index 856c7d76569..12a5aac252b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.SearchApplication.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.SearchApplication.g.cs @@ -537,7 +537,8 @@ public virtual Task GetBehavioralAnalyticsAsync( /// /// - /// Returns the existing search applications. + /// Get search applications. + /// Get information about search applications. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -550,7 +551,8 @@ public virtual ListResponse List(ListRequest request) /// /// - /// Returns the existing search applications. + /// Get search applications. + /// Get information about search applications. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -562,7 +564,8 @@ public virtual Task ListAsync(ListRequest request, CancellationTok /// /// - /// Returns the existing search applications. + /// Get search applications. + /// Get information about search applications. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -575,7 +578,8 @@ public virtual ListResponse List(ListRequestDescriptor descriptor) /// /// - /// Returns the existing search applications. + /// Get search applications. + /// Get information about search applications. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -589,7 +593,8 @@ public virtual ListResponse List() /// /// - /// Returns the existing search applications. + /// Get search applications. + /// Get information about search applications. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -604,7 +609,8 @@ public virtual ListResponse List(Action configureRequest) /// /// - /// Returns the existing search applications. + /// Get search applications. + /// Get information about search applications. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -616,7 +622,8 @@ public virtual Task ListAsync(ListRequestDescriptor descriptor, Ca /// /// - /// Returns the existing search applications. + /// Get search applications. + /// Get information about search applications. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -629,7 +636,8 @@ public virtual Task ListAsync(CancellationToken cancellationToken /// /// - /// Returns the existing search applications. + /// Get search applications. + /// Get information about search applications. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -641,6 +649,112 @@ public virtual Task ListAsync(Action config return DoRequestAsync(descriptor, cancellationToken); } + /// + /// + /// Create a behavioral analytics collection event. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PostBehavioralAnalyticsEventResponse PostBehavioralAnalyticsEvent(PostBehavioralAnalyticsEventRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Create a behavioral analytics collection event. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PostBehavioralAnalyticsEventAsync(PostBehavioralAnalyticsEventRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Create a behavioral analytics collection event. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PostBehavioralAnalyticsEventResponse PostBehavioralAnalyticsEvent(PostBehavioralAnalyticsEventRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Create a behavioral analytics collection event. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PostBehavioralAnalyticsEventResponse PostBehavioralAnalyticsEvent(Elastic.Clients.Elasticsearch.Name collectionName, Elastic.Clients.Elasticsearch.SearchApplication.EventType eventType) + { + var descriptor = new PostBehavioralAnalyticsEventRequestDescriptor(collectionName, eventType); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Create a behavioral analytics collection event. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PostBehavioralAnalyticsEventResponse PostBehavioralAnalyticsEvent(Elastic.Clients.Elasticsearch.Name collectionName, Elastic.Clients.Elasticsearch.SearchApplication.EventType eventType, Action configureRequest) + { + var descriptor = new PostBehavioralAnalyticsEventRequestDescriptor(collectionName, eventType); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Create a behavioral analytics collection event. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PostBehavioralAnalyticsEventAsync(PostBehavioralAnalyticsEventRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create a behavioral analytics collection event. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PostBehavioralAnalyticsEventAsync(Elastic.Clients.Elasticsearch.Name collectionName, Elastic.Clients.Elasticsearch.SearchApplication.EventType eventType, CancellationToken cancellationToken = default) + { + var descriptor = new PostBehavioralAnalyticsEventRequestDescriptor(collectionName, eventType); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create a behavioral analytics collection event. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PostBehavioralAnalyticsEventAsync(Elastic.Clients.Elasticsearch.Name collectionName, Elastic.Clients.Elasticsearch.SearchApplication.EventType eventType, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new PostBehavioralAnalyticsEventRequestDescriptor(collectionName, eventType); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + /// /// /// Create or update a search application. @@ -686,7 +800,7 @@ public virtual PutSearchApplicationResponse Put(PutSearchApplicationRequestDescr /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutSearchApplicationResponse Put(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationParameters searchApplication, Elastic.Clients.Elasticsearch.Name name) + public virtual PutSearchApplicationResponse Put(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplication searchApplication, Elastic.Clients.Elasticsearch.Name name) { var descriptor = new PutSearchApplicationRequestDescriptor(searchApplication, name); descriptor.BeforeRequest(); @@ -700,7 +814,7 @@ public virtual PutSearchApplicationResponse Put(Elastic.Clients.Elasticsearch.Se /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutSearchApplicationResponse Put(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationParameters searchApplication, Elastic.Clients.Elasticsearch.Name name, Action configureRequest) + public virtual PutSearchApplicationResponse Put(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplication searchApplication, Elastic.Clients.Elasticsearch.Name name, Action configureRequest) { var descriptor = new PutSearchApplicationRequestDescriptor(searchApplication, name); configureRequest?.Invoke(descriptor); @@ -726,7 +840,7 @@ public virtual Task PutAsync(PutSearchApplicationR /// /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutAsync(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationParameters searchApplication, Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) + public virtual Task PutAsync(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplication searchApplication, Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) { var descriptor = new PutSearchApplicationRequestDescriptor(searchApplication, name); descriptor.BeforeRequest(); @@ -739,7 +853,7 @@ public virtual Task PutAsync(Elastic.Clients.Elast /// /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutAsync(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationParameters searchApplication, Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task PutAsync(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplication searchApplication, Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) { var descriptor = new PutSearchApplicationRequestDescriptor(searchApplication, name); configureRequest?.Invoke(descriptor); @@ -853,6 +967,160 @@ public virtual Task PutBehavioralAnalyticsAsync( return DoRequestAsync(descriptor, cancellationToken); } + /// + /// + /// Render a search application query. + /// Generate an Elasticsearch query using the specified query parameters and the search template associated with the search application or a default template if none is specified. + /// If a parameter used in the search template is not specified in params, the parameter's default value will be used. + /// The API returns the specific Elasticsearch query that would be generated and run by calling the search application search API. + /// + /// + /// You must have read privileges on the backing alias of the search application. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual RenderQueryResponse RenderQuery(RenderQueryRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Render a search application query. + /// Generate an Elasticsearch query using the specified query parameters and the search template associated with the search application or a default template if none is specified. + /// If a parameter used in the search template is not specified in params, the parameter's default value will be used. + /// The API returns the specific Elasticsearch query that would be generated and run by calling the search application search API. + /// + /// + /// You must have read privileges on the backing alias of the search application. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task RenderQueryAsync(RenderQueryRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Render a search application query. + /// Generate an Elasticsearch query using the specified query parameters and the search template associated with the search application or a default template if none is specified. + /// If a parameter used in the search template is not specified in params, the parameter's default value will be used. + /// The API returns the specific Elasticsearch query that would be generated and run by calling the search application search API. + /// + /// + /// You must have read privileges on the backing alias of the search application. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual RenderQueryResponse RenderQuery(RenderQueryRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Render a search application query. + /// Generate an Elasticsearch query using the specified query parameters and the search template associated with the search application or a default template if none is specified. + /// If a parameter used in the search template is not specified in params, the parameter's default value will be used. + /// The API returns the specific Elasticsearch query that would be generated and run by calling the search application search API. + /// + /// + /// You must have read privileges on the backing alias of the search application. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual RenderQueryResponse RenderQuery(Elastic.Clients.Elasticsearch.Name name) + { + var descriptor = new RenderQueryRequestDescriptor(name); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Render a search application query. + /// Generate an Elasticsearch query using the specified query parameters and the search template associated with the search application or a default template if none is specified. + /// If a parameter used in the search template is not specified in params, the parameter's default value will be used. + /// The API returns the specific Elasticsearch query that would be generated and run by calling the search application search API. + /// + /// + /// You must have read privileges on the backing alias of the search application. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual RenderQueryResponse RenderQuery(Elastic.Clients.Elasticsearch.Name name, Action configureRequest) + { + var descriptor = new RenderQueryRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Render a search application query. + /// Generate an Elasticsearch query using the specified query parameters and the search template associated with the search application or a default template if none is specified. + /// If a parameter used in the search template is not specified in params, the parameter's default value will be used. + /// The API returns the specific Elasticsearch query that would be generated and run by calling the search application search API. + /// + /// + /// You must have read privileges on the backing alias of the search application. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task RenderQueryAsync(RenderQueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Render a search application query. + /// Generate an Elasticsearch query using the specified query parameters and the search template associated with the search application or a default template if none is specified. + /// If a parameter used in the search template is not specified in params, the parameter's default value will be used. + /// The API returns the specific Elasticsearch query that would be generated and run by calling the search application search API. + /// + /// + /// You must have read privileges on the backing alias of the search application. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task RenderQueryAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) + { + var descriptor = new RenderQueryRequestDescriptor(name); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Render a search application query. + /// Generate an Elasticsearch query using the specified query parameters and the search template associated with the search application or a default template if none is specified. + /// If a parameter used in the search template is not specified in params, the parameter's default value will be used. + /// The API returns the specific Elasticsearch query that would be generated and run by calling the search application search API. + /// + /// + /// You must have read privileges on the backing alias of the search application. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task RenderQueryAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new RenderQueryRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + /// /// /// Run a search application search. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.SearchableSnapshots.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.SearchableSnapshots.g.cs index a95a69b5f0d..e94cd8a7a21 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.SearchableSnapshots.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.SearchableSnapshots.g.cs @@ -44,7 +44,7 @@ internal SearchableSnapshotsNamespacedClient(ElasticsearchClient client) : base( /// Get cache statistics. /// Get statistics about the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CacheStatsResponse CacheStats(CacheStatsRequest request) @@ -58,7 +58,7 @@ public virtual CacheStatsResponse CacheStats(CacheStatsRequest request) /// Get cache statistics. /// Get statistics about the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CacheStatsAsync(CacheStatsRequest request, CancellationToken cancellationToken = default) { @@ -71,7 +71,7 @@ public virtual Task CacheStatsAsync(CacheStatsRequest reques /// Get cache statistics. /// Get statistics about the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CacheStatsResponse CacheStats(CacheStatsRequestDescriptor descriptor) @@ -85,7 +85,7 @@ public virtual CacheStatsResponse CacheStats(CacheStatsRequestDescriptor descrip /// Get cache statistics. /// Get statistics about the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CacheStatsResponse CacheStats(Elastic.Clients.Elasticsearch.NodeIds? nodeId) @@ -100,7 +100,7 @@ public virtual CacheStatsResponse CacheStats(Elastic.Clients.Elasticsearch.NodeI /// Get cache statistics. /// Get statistics about the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CacheStatsResponse CacheStats(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Action configureRequest) @@ -116,7 +116,7 @@ public virtual CacheStatsResponse CacheStats(Elastic.Clients.Elasticsearch.NodeI /// Get cache statistics. /// Get statistics about the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CacheStatsResponse CacheStats() @@ -131,7 +131,7 @@ public virtual CacheStatsResponse CacheStats() /// Get cache statistics. /// Get statistics about the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CacheStatsResponse CacheStats(Action configureRequest) @@ -147,7 +147,7 @@ public virtual CacheStatsResponse CacheStats(Action /// Get cache statistics. /// Get statistics about the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CacheStatsAsync(CacheStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -160,7 +160,7 @@ public virtual Task CacheStatsAsync(CacheStatsRequestDescrip /// Get cache statistics. /// Get statistics about the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CacheStatsAsync(Elastic.Clients.Elasticsearch.NodeIds? nodeId, CancellationToken cancellationToken = default) { @@ -174,7 +174,7 @@ public virtual Task CacheStatsAsync(Elastic.Clients.Elastics /// Get cache statistics. /// Get statistics about the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CacheStatsAsync(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Action configureRequest, CancellationToken cancellationToken = default) { @@ -189,7 +189,7 @@ public virtual Task CacheStatsAsync(Elastic.Clients.Elastics /// Get cache statistics. /// Get statistics about the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CacheStatsAsync(CancellationToken cancellationToken = default) { @@ -203,7 +203,7 @@ public virtual Task CacheStatsAsync(CancellationToken cancel /// Get cache statistics. /// Get statistics about the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CacheStatsAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -218,7 +218,7 @@ public virtual Task CacheStatsAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ClearCacheResponse ClearCache(ClearCacheRequest request) @@ -232,7 +232,7 @@ public virtual ClearCacheResponse ClearCache(ClearCacheRequest request) /// Clear the cache. /// Clear indices and data streams from the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(ClearCacheRequest request, CancellationToken cancellationToken = default) { @@ -245,7 +245,7 @@ public virtual Task ClearCacheAsync(ClearCacheRequest reques /// Clear the cache. /// Clear indices and data streams from the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ClearCacheResponse ClearCache(ClearCacheRequestDescriptor descriptor) @@ -259,7 +259,7 @@ public virtual ClearCacheResponse ClearCache(ClearCacheRequestDescrip /// Clear the cache. /// Clear indices and data streams from the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ClearCacheResponse ClearCache(Elastic.Clients.Elasticsearch.Indices? indices) @@ -274,7 +274,7 @@ public virtual ClearCacheResponse ClearCache(Elastic.Clients.Elastics /// Clear the cache. /// Clear indices and data streams from the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ClearCacheResponse ClearCache(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) @@ -290,7 +290,7 @@ public virtual ClearCacheResponse ClearCache(Elastic.Clients.Elastics /// Clear the cache. /// Clear indices and data streams from the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ClearCacheResponse ClearCache() @@ -305,7 +305,7 @@ public virtual ClearCacheResponse ClearCache() /// Clear the cache. /// Clear indices and data streams from the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ClearCacheResponse ClearCache(Action> configureRequest) @@ -321,7 +321,7 @@ public virtual ClearCacheResponse ClearCache(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ClearCacheResponse ClearCache(ClearCacheRequestDescriptor descriptor) @@ -335,7 +335,7 @@ public virtual ClearCacheResponse ClearCache(ClearCacheRequestDescriptor descrip /// Clear the cache. /// Clear indices and data streams from the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ClearCacheResponse ClearCache(Elastic.Clients.Elasticsearch.Indices? indices) @@ -350,7 +350,7 @@ public virtual ClearCacheResponse ClearCache(Elastic.Clients.Elasticsearch.Indic /// Clear the cache. /// Clear indices and data streams from the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ClearCacheResponse ClearCache(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest) @@ -366,7 +366,7 @@ public virtual ClearCacheResponse ClearCache(Elastic.Clients.Elasticsearch.Indic /// Clear the cache. /// Clear indices and data streams from the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ClearCacheResponse ClearCache() @@ -381,7 +381,7 @@ public virtual ClearCacheResponse ClearCache() /// Clear the cache. /// Clear indices and data streams from the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ClearCacheResponse ClearCache(Action configureRequest) @@ -397,7 +397,7 @@ public virtual ClearCacheResponse ClearCache(Action /// Clear the cache. /// Clear indices and data streams from the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(ClearCacheRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -410,7 +410,7 @@ public virtual Task ClearCacheAsync(ClearCacheReq /// Clear the cache. /// Clear indices and data streams from the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { @@ -424,7 +424,7 @@ public virtual Task ClearCacheAsync(Elastic.Clien /// Clear the cache. /// Clear indices and data streams from the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -439,7 +439,7 @@ public virtual Task ClearCacheAsync(Elastic.Clien /// Clear the cache. /// Clear indices and data streams from the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(CancellationToken cancellationToken = default) { @@ -453,7 +453,7 @@ public virtual Task ClearCacheAsync(CancellationT /// Clear the cache. /// Clear indices and data streams from the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -468,7 +468,7 @@ public virtual Task ClearCacheAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(ClearCacheRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -481,7 +481,7 @@ public virtual Task ClearCacheAsync(ClearCacheRequestDescrip /// Clear the cache. /// Clear indices and data streams from the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { @@ -495,7 +495,7 @@ public virtual Task ClearCacheAsync(Elastic.Clients.Elastics /// Clear the cache. /// Clear indices and data streams from the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -510,7 +510,7 @@ public virtual Task ClearCacheAsync(Elastic.Clients.Elastics /// Clear the cache. /// Clear indices and data streams from the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(CancellationToken cancellationToken = default) { @@ -524,7 +524,7 @@ public virtual Task ClearCacheAsync(CancellationToken cancel /// Clear the cache. /// Clear indices and data streams from the shared cache for partially mounted indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCacheAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -541,7 +541,7 @@ public virtual Task ClearCacheAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual MountResponse Mount(MountRequest request) @@ -557,7 +557,7 @@ public virtual MountResponse Mount(MountRequest request) /// Do not use this API for snapshots managed by index lifecycle management (ILM). /// Manually mounting ILM-managed snapshots can interfere with ILM processes. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task MountAsync(MountRequest request, CancellationToken cancellationToken = default) { @@ -572,7 +572,7 @@ public virtual Task MountAsync(MountRequest request, Cancellation /// Do not use this API for snapshots managed by index lifecycle management (ILM). /// Manually mounting ILM-managed snapshots can interfere with ILM processes. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual MountResponse Mount(MountRequestDescriptor descriptor) @@ -588,7 +588,7 @@ public virtual MountResponse Mount(MountRequestDescriptor descriptor) /// Do not use this API for snapshots managed by index lifecycle management (ILM). /// Manually mounting ILM-managed snapshots can interfere with ILM processes. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual MountResponse Mount(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot) @@ -605,7 +605,7 @@ public virtual MountResponse Mount(Elastic.Clients.Elasticsearch.Name repository /// Do not use this API for snapshots managed by index lifecycle management (ILM). /// Manually mounting ILM-managed snapshots can interfere with ILM processes. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual MountResponse Mount(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, Action configureRequest) @@ -623,7 +623,7 @@ public virtual MountResponse Mount(Elastic.Clients.Elasticsearch.Name repository /// Do not use this API for snapshots managed by index lifecycle management (ILM). /// Manually mounting ILM-managed snapshots can interfere with ILM processes. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task MountAsync(MountRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -638,7 +638,7 @@ public virtual Task MountAsync(MountRequestDescriptor descriptor, /// Do not use this API for snapshots managed by index lifecycle management (ILM). /// Manually mounting ILM-managed snapshots can interfere with ILM processes. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task MountAsync(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, CancellationToken cancellationToken = default) { @@ -654,7 +654,7 @@ public virtual Task MountAsync(Elastic.Clients.Elasticsearch.Name /// Do not use this API for snapshots managed by index lifecycle management (ILM). /// Manually mounting ILM-managed snapshots can interfere with ILM processes. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task MountAsync(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, Action configureRequest, CancellationToken cancellationToken = default) { @@ -668,7 +668,7 @@ public virtual Task MountAsync(Elastic.Clients.Elasticsearch.Name /// /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SearchableSnapshotsStatsResponse Stats(SearchableSnapshotsStatsRequest request) @@ -681,7 +681,7 @@ public virtual SearchableSnapshotsStatsResponse Stats(SearchableSnapshotsStatsRe /// /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(SearchableSnapshotsStatsRequest request, CancellationToken cancellationToken = default) { @@ -693,7 +693,7 @@ public virtual Task StatsAsync(SearchableSnaps /// /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SearchableSnapshotsStatsResponse Stats(SearchableSnapshotsStatsRequestDescriptor descriptor) @@ -706,7 +706,7 @@ public virtual SearchableSnapshotsStatsResponse Stats(SearchableSnaps /// /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SearchableSnapshotsStatsResponse Stats(Elastic.Clients.Elasticsearch.Indices? indices) @@ -720,7 +720,7 @@ public virtual SearchableSnapshotsStatsResponse Stats(Elastic.Clients /// /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SearchableSnapshotsStatsResponse Stats(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) @@ -735,7 +735,7 @@ public virtual SearchableSnapshotsStatsResponse Stats(Elastic.Clients /// /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SearchableSnapshotsStatsResponse Stats() @@ -749,7 +749,7 @@ public virtual SearchableSnapshotsStatsResponse Stats() /// /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SearchableSnapshotsStatsResponse Stats(Action> configureRequest) @@ -764,7 +764,7 @@ public virtual SearchableSnapshotsStatsResponse Stats(Action /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SearchableSnapshotsStatsResponse Stats(SearchableSnapshotsStatsRequestDescriptor descriptor) @@ -777,7 +777,7 @@ public virtual SearchableSnapshotsStatsResponse Stats(SearchableSnapshotsStatsRe /// /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SearchableSnapshotsStatsResponse Stats(Elastic.Clients.Elasticsearch.Indices? indices) @@ -791,7 +791,7 @@ public virtual SearchableSnapshotsStatsResponse Stats(Elastic.Clients.Elasticsea /// /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SearchableSnapshotsStatsResponse Stats(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest) @@ -806,7 +806,7 @@ public virtual SearchableSnapshotsStatsResponse Stats(Elastic.Clients.Elasticsea /// /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SearchableSnapshotsStatsResponse Stats() @@ -820,7 +820,7 @@ public virtual SearchableSnapshotsStatsResponse Stats() /// /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SearchableSnapshotsStatsResponse Stats(Action configureRequest) @@ -835,7 +835,7 @@ public virtual SearchableSnapshotsStatsResponse Stats(Action /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(SearchableSnapshotsStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -847,7 +847,7 @@ public virtual Task StatsAsync(Sear /// /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { @@ -860,7 +860,7 @@ public virtual Task StatsAsync(Elas /// /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -874,7 +874,7 @@ public virtual Task StatsAsync(Elas /// /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(CancellationToken cancellationToken = default) { @@ -887,7 +887,7 @@ public virtual Task StatsAsync(Canc /// /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -901,7 +901,7 @@ public virtual Task StatsAsync(Acti /// /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(SearchableSnapshotsStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -913,7 +913,7 @@ public virtual Task StatsAsync(SearchableSnaps /// /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { @@ -926,7 +926,7 @@ public virtual Task StatsAsync(Elastic.Clients /// /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -940,7 +940,7 @@ public virtual Task StatsAsync(Elastic.Clients /// /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(CancellationToken cancellationToken = default) { @@ -953,7 +953,7 @@ public virtual Task StatsAsync(CancellationTok /// /// Get searchable snapshot statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatsAsync(Action configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Security.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Security.g.cs index 65290355da1..5c8a9861956 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Security.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Security.g.cs @@ -46,7 +46,21 @@ internal SecurityNamespacedClient(ElasticsearchClient client) : base(client) /// /// Create or update a user profile on behalf of another user. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// The calling application must have either an access_token or a combination of username and password for the user that the profile document is intended for. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// This API creates or updates a profile document for end users with information that is extracted from the user's authentication object including username, full_name, roles, and the authentication realm. + /// For example, in the JWT access_token case, the profile user's username is extracted from the JWT token claim pointed to by the claims.principal setting of the JWT realm that authenticated the token. + /// + /// + /// When updating a profile document, the API enables the document if it was disabled. + /// Any updates do not change existing content for either the labels or data fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ActivateUserProfileResponse ActivateUserProfile(ActivateUserProfileRequest request) @@ -62,7 +76,21 @@ public virtual ActivateUserProfileResponse ActivateUserProfile(ActivateUserProfi /// /// Create or update a user profile on behalf of another user. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// The calling application must have either an access_token or a combination of username and password for the user that the profile document is intended for. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// This API creates or updates a profile document for end users with information that is extracted from the user's authentication object including username, full_name, roles, and the authentication realm. + /// For example, in the JWT access_token case, the profile user's username is extracted from the JWT token claim pointed to by the claims.principal setting of the JWT realm that authenticated the token. + /// + /// + /// When updating a profile document, the API enables the document if it was disabled. + /// Any updates do not change existing content for either the labels or data fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ActivateUserProfileAsync(ActivateUserProfileRequest request, CancellationToken cancellationToken = default) { @@ -77,7 +105,21 @@ public virtual Task ActivateUserProfileAsync(Activa /// /// Create or update a user profile on behalf of another user. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// The calling application must have either an access_token or a combination of username and password for the user that the profile document is intended for. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// This API creates or updates a profile document for end users with information that is extracted from the user's authentication object including username, full_name, roles, and the authentication realm. + /// For example, in the JWT access_token case, the profile user's username is extracted from the JWT token claim pointed to by the claims.principal setting of the JWT realm that authenticated the token. + /// + /// + /// When updating a profile document, the API enables the document if it was disabled. + /// Any updates do not change existing content for either the labels or data fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ActivateUserProfileResponse ActivateUserProfile(ActivateUserProfileRequestDescriptor descriptor) @@ -93,7 +135,21 @@ public virtual ActivateUserProfileResponse ActivateUserProfile(ActivateUserProfi /// /// Create or update a user profile on behalf of another user. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// The calling application must have either an access_token or a combination of username and password for the user that the profile document is intended for. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// This API creates or updates a profile document for end users with information that is extracted from the user's authentication object including username, full_name, roles, and the authentication realm. + /// For example, in the JWT access_token case, the profile user's username is extracted from the JWT token claim pointed to by the claims.principal setting of the JWT realm that authenticated the token. + /// + /// + /// When updating a profile document, the API enables the document if it was disabled. + /// Any updates do not change existing content for either the labels or data fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ActivateUserProfileResponse ActivateUserProfile() @@ -110,7 +166,21 @@ public virtual ActivateUserProfileResponse ActivateUserProfile() /// /// Create or update a user profile on behalf of another user. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// The calling application must have either an access_token or a combination of username and password for the user that the profile document is intended for. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// This API creates or updates a profile document for end users with information that is extracted from the user's authentication object including username, full_name, roles, and the authentication realm. + /// For example, in the JWT access_token case, the profile user's username is extracted from the JWT token claim pointed to by the claims.principal setting of the JWT realm that authenticated the token. + /// + /// + /// When updating a profile document, the API enables the document if it was disabled. + /// Any updates do not change existing content for either the labels or data fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ActivateUserProfileResponse ActivateUserProfile(Action configureRequest) @@ -128,7 +198,21 @@ public virtual ActivateUserProfileResponse ActivateUserProfile(Action /// Create or update a user profile on behalf of another user. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// The calling application must have either an access_token or a combination of username and password for the user that the profile document is intended for. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// This API creates or updates a profile document for end users with information that is extracted from the user's authentication object including username, full_name, roles, and the authentication realm. + /// For example, in the JWT access_token case, the profile user's username is extracted from the JWT token claim pointed to by the claims.principal setting of the JWT realm that authenticated the token. + /// + /// + /// When updating a profile document, the API enables the document if it was disabled. + /// Any updates do not change existing content for either the labels or data fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ActivateUserProfileAsync(ActivateUserProfileRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -143,7 +227,21 @@ public virtual Task ActivateUserProfileAsync(Activa /// /// Create or update a user profile on behalf of another user. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// The calling application must have either an access_token or a combination of username and password for the user that the profile document is intended for. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// This API creates or updates a profile document for end users with information that is extracted from the user's authentication object including username, full_name, roles, and the authentication realm. + /// For example, in the JWT access_token case, the profile user's username is extracted from the JWT token claim pointed to by the claims.principal setting of the JWT realm that authenticated the token. + /// + /// + /// When updating a profile document, the API enables the document if it was disabled. + /// Any updates do not change existing content for either the labels or data fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ActivateUserProfileAsync(CancellationToken cancellationToken = default) { @@ -159,7 +257,21 @@ public virtual Task ActivateUserProfileAsync(Cancel /// /// Create or update a user profile on behalf of another user. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// The calling application must have either an access_token or a combination of username and password for the user that the profile document is intended for. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// This API creates or updates a profile document for end users with information that is extracted from the user's authentication object including username, full_name, roles, and the authentication realm. + /// For example, in the JWT access_token case, the profile user's username is extracted from the JWT token claim pointed to by the claims.principal setting of the JWT realm that authenticated the token. + /// + /// + /// When updating a profile document, the API enables the document if it was disabled. + /// Any updates do not change existing content for either the labels or data fields. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ActivateUserProfileAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -179,7 +291,7 @@ public virtual Task ActivateUserProfileAsync(Action /// A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user. /// If the user cannot be authenticated, this API returns a 401 status code. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual AuthenticateResponse Authenticate(AuthenticateRequest request) @@ -198,7 +310,7 @@ public virtual AuthenticateResponse Authenticate(AuthenticateRequest request) /// A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user. /// If the user cannot be authenticated, this API returns a 401 status code. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task AuthenticateAsync(AuthenticateRequest request, CancellationToken cancellationToken = default) { @@ -216,7 +328,7 @@ public virtual Task AuthenticateAsync(AuthenticateRequest /// A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user. /// If the user cannot be authenticated, this API returns a 401 status code. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual AuthenticateResponse Authenticate(AuthenticateRequestDescriptor descriptor) @@ -235,7 +347,7 @@ public virtual AuthenticateResponse Authenticate(AuthenticateRequestDescriptor d /// A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user. /// If the user cannot be authenticated, this API returns a 401 status code. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual AuthenticateResponse Authenticate() @@ -255,7 +367,7 @@ public virtual AuthenticateResponse Authenticate() /// A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user. /// If the user cannot be authenticated, this API returns a 401 status code. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual AuthenticateResponse Authenticate(Action configureRequest) @@ -276,7 +388,7 @@ public virtual AuthenticateResponse Authenticate(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task AuthenticateAsync(AuthenticateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -294,7 +406,7 @@ public virtual Task AuthenticateAsync(AuthenticateRequestD /// A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user. /// If the user cannot be authenticated, this API returns a 401 status code. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task AuthenticateAsync(CancellationToken cancellationToken = default) { @@ -313,7 +425,7 @@ public virtual Task AuthenticateAsync(CancellationToken ca /// A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user. /// If the user cannot be authenticated, this API returns a 401 status code. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task AuthenticateAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -706,1355 +818,1882 @@ public virtual Task BulkPutRoleAsync(Action /// - /// Change passwords. + /// Bulk update API keys. + /// Update the attributes for multiple API keys. /// /// - /// Change the passwords of users in the native realm and built-in users. + /// IMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required. + /// + /// + /// This API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates. + /// + /// + /// It is not possible to update expired or invalidated API keys. + /// + /// + /// This API supports updates to API key access scope, metadata and expiration. + /// The access scope of each API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified. + /// + /// + /// A successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ChangePasswordResponse ChangePassword(ChangePasswordRequest request) + public virtual BulkUpdateApiKeysResponse BulkUpdateApiKeys(BulkUpdateApiKeysRequest request) { request.BeforeRequest(); - return DoRequest(request); + return DoRequest(request); } /// /// - /// Change passwords. + /// Bulk update API keys. + /// Update the attributes for multiple API keys. /// /// - /// Change the passwords of users in the native realm and built-in users. + /// IMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates. + /// + /// + /// It is not possible to update expired or invalidated API keys. + /// + /// + /// This API supports updates to API key access scope, metadata and expiration. + /// The access scope of each API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified. + /// + /// + /// A successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ChangePasswordAsync(ChangePasswordRequest request, CancellationToken cancellationToken = default) + public virtual Task BulkUpdateApiKeysAsync(BulkUpdateApiKeysRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Change passwords. + /// Bulk update API keys. + /// Update the attributes for multiple API keys. /// /// - /// Change the passwords of users in the native realm and built-in users. + /// IMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required. + /// + /// + /// This API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// It is not possible to update expired or invalidated API keys. + /// + /// + /// This API supports updates to API key access scope, metadata and expiration. + /// The access scope of each API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified. + /// + /// + /// A successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ChangePasswordResponse ChangePassword(ChangePasswordRequestDescriptor descriptor) + public virtual BulkUpdateApiKeysResponse BulkUpdateApiKeys(BulkUpdateApiKeysRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest, BulkUpdateApiKeysResponse, BulkUpdateApiKeysRequestParameters>(descriptor); } /// /// - /// Change passwords. + /// Bulk update API keys. + /// Update the attributes for multiple API keys. /// /// - /// Change the passwords of users in the native realm and built-in users. + /// IMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required. + /// + /// + /// This API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates. + /// + /// + /// It is not possible to update expired or invalidated API keys. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API supports updates to API key access scope, metadata and expiration. + /// The access scope of each API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified. + /// + /// + /// A successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ChangePasswordResponse ChangePassword(Elastic.Clients.Elasticsearch.Username? username) + public virtual BulkUpdateApiKeysResponse BulkUpdateApiKeys() { - var descriptor = new ChangePasswordRequestDescriptor(username); + var descriptor = new BulkUpdateApiKeysRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest, BulkUpdateApiKeysResponse, BulkUpdateApiKeysRequestParameters>(descriptor); } /// /// - /// Change passwords. + /// Bulk update API keys. + /// Update the attributes for multiple API keys. /// /// - /// Change the passwords of users in the native realm and built-in users. + /// IMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required. + /// + /// + /// This API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates. + /// + /// + /// It is not possible to update expired or invalidated API keys. + /// + /// + /// This API supports updates to API key access scope, metadata and expiration. + /// The access scope of each API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified. + /// + /// + /// A successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ChangePasswordResponse ChangePassword(Elastic.Clients.Elasticsearch.Username? username, Action configureRequest) + public virtual BulkUpdateApiKeysResponse BulkUpdateApiKeys(Action> configureRequest) { - var descriptor = new ChangePasswordRequestDescriptor(username); + var descriptor = new BulkUpdateApiKeysRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest, BulkUpdateApiKeysResponse, BulkUpdateApiKeysRequestParameters>(descriptor); } /// /// - /// Change passwords. + /// Bulk update API keys. + /// Update the attributes for multiple API keys. /// /// - /// Change the passwords of users in the native realm and built-in users. + /// IMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required. + /// + /// + /// This API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates. + /// + /// + /// It is not possible to update expired or invalidated API keys. + /// + /// + /// This API supports updates to API key access scope, metadata and expiration. + /// The access scope of each API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified. + /// + /// + /// A successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ChangePasswordResponse ChangePassword() + public virtual BulkUpdateApiKeysResponse BulkUpdateApiKeys(BulkUpdateApiKeysRequestDescriptor descriptor) { - var descriptor = new ChangePasswordRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Change passwords. + /// Bulk update API keys. + /// Update the attributes for multiple API keys. /// /// - /// Change the passwords of users in the native realm and built-in users. + /// IMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required. + /// + /// + /// This API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates. + /// + /// + /// It is not possible to update expired or invalidated API keys. + /// + /// + /// This API supports updates to API key access scope, metadata and expiration. + /// The access scope of each API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified. + /// + /// + /// A successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ChangePasswordResponse ChangePassword(Action configureRequest) + public virtual BulkUpdateApiKeysResponse BulkUpdateApiKeys() { - var descriptor = new ChangePasswordRequestDescriptor(); - configureRequest?.Invoke(descriptor); + var descriptor = new BulkUpdateApiKeysRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Change passwords. + /// Bulk update API keys. + /// Update the attributes for multiple API keys. /// /// - /// Change the passwords of users in the native realm and built-in users. + /// IMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ChangePasswordAsync(ChangePasswordRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Change passwords. + /// This API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates. /// /// - /// Change the passwords of users in the native realm and built-in users. + /// It is not possible to update expired or invalidated API keys. + /// + /// + /// This API supports updates to API key access scope, metadata and expiration. + /// The access scope of each API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified. + /// + /// + /// A successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ChangePasswordAsync(Elastic.Clients.Elasticsearch.Username? username, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual BulkUpdateApiKeysResponse BulkUpdateApiKeys(Action configureRequest) { - var descriptor = new ChangePasswordRequestDescriptor(username); + var descriptor = new BulkUpdateApiKeysRequestDescriptor(); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequest(descriptor); } /// /// - /// Change passwords. + /// Bulk update API keys. + /// Update the attributes for multiple API keys. /// /// - /// Change the passwords of users in the native realm and built-in users. + /// IMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates. + /// + /// + /// It is not possible to update expired or invalidated API keys. + /// + /// + /// This API supports updates to API key access scope, metadata and expiration. + /// The access scope of each API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified. + /// + /// + /// A successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ChangePasswordAsync(Elastic.Clients.Elasticsearch.Username? username, Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task BulkUpdateApiKeysAsync(BulkUpdateApiKeysRequestDescriptor descriptor, CancellationToken cancellationToken = default) { - var descriptor = new ChangePasswordRequestDescriptor(username); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync, BulkUpdateApiKeysResponse, BulkUpdateApiKeysRequestParameters>(descriptor, cancellationToken); } /// /// - /// Change passwords. + /// Bulk update API keys. + /// Update the attributes for multiple API keys. /// /// - /// Change the passwords of users in the native realm and built-in users. + /// IMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates. + /// + /// + /// It is not possible to update expired or invalidated API keys. + /// + /// + /// This API supports updates to API key access scope, metadata and expiration. + /// The access scope of each API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified. + /// + /// + /// A successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ChangePasswordAsync(CancellationToken cancellationToken = default) + public virtual Task BulkUpdateApiKeysAsync(CancellationToken cancellationToken = default) { - var descriptor = new ChangePasswordRequestDescriptor(); + var descriptor = new BulkUpdateApiKeysRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync, BulkUpdateApiKeysResponse, BulkUpdateApiKeysRequestParameters>(descriptor, cancellationToken); } /// /// - /// Change passwords. + /// Bulk update API keys. + /// Update the attributes for multiple API keys. /// /// - /// Change the passwords of users in the native realm and built-in users. + /// IMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required. + /// + /// + /// This API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates. + /// + /// + /// It is not possible to update expired or invalidated API keys. + /// + /// + /// This API supports updates to API key access scope, metadata and expiration. + /// The access scope of each API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified. + /// + /// + /// A successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ChangePasswordAsync(Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task BulkUpdateApiKeysAsync(Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new ChangePasswordRequestDescriptor(); + var descriptor = new BulkUpdateApiKeysRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync, BulkUpdateApiKeysResponse, BulkUpdateApiKeysRequestParameters>(descriptor, cancellationToken); } /// /// - /// Clear the API key cache. + /// Bulk update API keys. + /// Update the attributes for multiple API keys. /// /// - /// Evict a subset of all entries from the API key cache. - /// The cache is also automatically cleared on state changes of the security index. + /// IMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearApiKeyCacheResponse ClearApiKeyCache(ClearApiKeyCacheRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// /// - /// Clear the API key cache. + /// This API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates. /// /// - /// Evict a subset of all entries from the API key cache. - /// The cache is also automatically cleared on state changes of the security index. + /// It is not possible to update expired or invalidated API keys. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearApiKeyCacheAsync(ClearApiKeyCacheRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// /// - /// Clear the API key cache. + /// This API supports updates to API key access scope, metadata and expiration. + /// The access scope of each API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. /// /// - /// Evict a subset of all entries from the API key cache. - /// The cache is also automatically cleared on state changes of the security index. + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified. + /// + /// + /// A successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearApiKeyCacheResponse ClearApiKeyCache(ClearApiKeyCacheRequestDescriptor descriptor) + public virtual Task BulkUpdateApiKeysAsync(BulkUpdateApiKeysRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Clear the API key cache. + /// Bulk update API keys. + /// Update the attributes for multiple API keys. /// /// - /// Evict a subset of all entries from the API key cache. - /// The cache is also automatically cleared on state changes of the security index. + /// IMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearApiKeyCacheResponse ClearApiKeyCache(Elastic.Clients.Elasticsearch.Ids ids) + /// + /// This API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates. + /// + /// + /// It is not possible to update expired or invalidated API keys. + /// + /// + /// This API supports updates to API key access scope, metadata and expiration. + /// The access scope of each API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified. + /// + /// + /// A successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task BulkUpdateApiKeysAsync(CancellationToken cancellationToken = default) { - var descriptor = new ClearApiKeyCacheRequestDescriptor(ids); + var descriptor = new BulkUpdateApiKeysRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Clear the API key cache. + /// Bulk update API keys. + /// Update the attributes for multiple API keys. /// /// - /// Evict a subset of all entries from the API key cache. - /// The cache is also automatically cleared on state changes of the security index. + /// IMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required. + /// + /// + /// This API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates. + /// + /// + /// It is not possible to update expired or invalidated API keys. + /// + /// + /// This API supports updates to API key access scope, metadata and expiration. + /// The access scope of each API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified. + /// + /// + /// A successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearApiKeyCacheResponse ClearApiKeyCache(Elastic.Clients.Elasticsearch.Ids ids, Action configureRequest) + public virtual Task BulkUpdateApiKeysAsync(Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new ClearApiKeyCacheRequestDescriptor(ids); + var descriptor = new BulkUpdateApiKeysRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Clear the API key cache. + /// Change passwords. /// /// - /// Evict a subset of all entries from the API key cache. - /// The cache is also automatically cleared on state changes of the security index. + /// Change the passwords of users in the native realm and built-in users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ClearApiKeyCacheAsync(ClearApiKeyCacheRequestDescriptor descriptor, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ChangePasswordResponse ChangePassword(ChangePasswordRequest request) { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + request.BeforeRequest(); + return DoRequest(request); } /// /// - /// Clear the API key cache. + /// Change passwords. /// /// - /// Evict a subset of all entries from the API key cache. - /// The cache is also automatically cleared on state changes of the security index. + /// Change the passwords of users in the native realm and built-in users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ClearApiKeyCacheAsync(Elastic.Clients.Elasticsearch.Ids ids, CancellationToken cancellationToken = default) + public virtual Task ChangePasswordAsync(ChangePasswordRequest request, CancellationToken cancellationToken = default) { - var descriptor = new ClearApiKeyCacheRequestDescriptor(ids); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Clear the API key cache. + /// Change passwords. /// /// - /// Evict a subset of all entries from the API key cache. - /// The cache is also automatically cleared on state changes of the security index. + /// Change the passwords of users in the native realm and built-in users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ClearApiKeyCacheAsync(Elastic.Clients.Elasticsearch.Ids ids, Action configureRequest, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ChangePasswordResponse ChangePassword(ChangePasswordRequestDescriptor descriptor) { - var descriptor = new ClearApiKeyCacheRequestDescriptor(ids); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequest(descriptor); } /// /// - /// Clear the privileges cache. + /// Change passwords. /// /// - /// Evict privileges from the native application privilege cache. - /// The cache is also automatically cleared for applications that have their privileges updated. + /// Change the passwords of users in the native realm and built-in users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearCachedPrivilegesResponse ClearCachedPrivileges(ClearCachedPrivilegesRequest request) + public virtual ChangePasswordResponse ChangePassword(Elastic.Clients.Elasticsearch.Username? username) { - request.BeforeRequest(); - return DoRequest(request); + var descriptor = new ChangePasswordRequestDescriptor(username); + descriptor.BeforeRequest(); + return DoRequest(descriptor); } /// /// - /// Clear the privileges cache. + /// Change passwords. /// /// - /// Evict privileges from the native application privilege cache. - /// The cache is also automatically cleared for applications that have their privileges updated. + /// Change the passwords of users in the native realm and built-in users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ClearCachedPrivilegesAsync(ClearCachedPrivilegesRequest request, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ChangePasswordResponse ChangePassword(Elastic.Clients.Elasticsearch.Username? username, Action configureRequest) { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + var descriptor = new ChangePasswordRequestDescriptor(username); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); } /// /// - /// Clear the privileges cache. + /// Change passwords. /// /// - /// Evict privileges from the native application privilege cache. - /// The cache is also automatically cleared for applications that have their privileges updated. + /// Change the passwords of users in the native realm and built-in users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearCachedPrivilegesResponse ClearCachedPrivileges(ClearCachedPrivilegesRequestDescriptor descriptor) + public virtual ChangePasswordResponse ChangePassword() { + var descriptor = new ChangePasswordRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Clear the privileges cache. + /// Change passwords. /// /// - /// Evict privileges from the native application privilege cache. - /// The cache is also automatically cleared for applications that have their privileges updated. + /// Change the passwords of users in the native realm and built-in users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearCachedPrivilegesResponse ClearCachedPrivileges(Elastic.Clients.Elasticsearch.Name application) + public virtual ChangePasswordResponse ChangePassword(Action configureRequest) { - var descriptor = new ClearCachedPrivilegesRequestDescriptor(application); + var descriptor = new ChangePasswordRequestDescriptor(); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Clear the privileges cache. + /// Change passwords. /// /// - /// Evict privileges from the native application privilege cache. - /// The cache is also automatically cleared for applications that have their privileges updated. + /// Change the passwords of users in the native realm and built-in users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearCachedPrivilegesResponse ClearCachedPrivileges(Elastic.Clients.Elasticsearch.Name application, Action configureRequest) + public virtual Task ChangePasswordAsync(ChangePasswordRequestDescriptor descriptor, CancellationToken cancellationToken = default) { - var descriptor = new ClearCachedPrivilegesRequestDescriptor(application); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Clear the privileges cache. + /// Change passwords. /// /// - /// Evict privileges from the native application privilege cache. - /// The cache is also automatically cleared for applications that have their privileges updated. + /// Change the passwords of users in the native realm and built-in users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ClearCachedPrivilegesAsync(ClearCachedPrivilegesRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task ChangePasswordAsync(Elastic.Clients.Elasticsearch.Username? username, CancellationToken cancellationToken = default) { + var descriptor = new ChangePasswordRequestDescriptor(username); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Clear the privileges cache. + /// Change passwords. /// /// - /// Evict privileges from the native application privilege cache. - /// The cache is also automatically cleared for applications that have their privileges updated. + /// Change the passwords of users in the native realm and built-in users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ClearCachedPrivilegesAsync(Elastic.Clients.Elasticsearch.Name application, CancellationToken cancellationToken = default) + public virtual Task ChangePasswordAsync(Elastic.Clients.Elasticsearch.Username? username, Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new ClearCachedPrivilegesRequestDescriptor(application); + var descriptor = new ChangePasswordRequestDescriptor(username); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Clear the privileges cache. + /// Change passwords. /// /// - /// Evict privileges from the native application privilege cache. - /// The cache is also automatically cleared for applications that have their privileges updated. + /// Change the passwords of users in the native realm and built-in users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ClearCachedPrivilegesAsync(Elastic.Clients.Elasticsearch.Name application, Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task ChangePasswordAsync(CancellationToken cancellationToken = default) { - var descriptor = new ClearCachedPrivilegesRequestDescriptor(application); + var descriptor = new ChangePasswordRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Change passwords. + /// + /// + /// Change the passwords of users in the native realm and built-in users. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ChangePasswordAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ChangePasswordRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Clear the user cache. + /// Clear the API key cache. /// /// - /// Evict users from the user cache. You can completely clear the cache or evict specific users. + /// Evict a subset of all entries from the API key cache. + /// The cache is also automatically cleared on state changes of the security index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearCachedRealmsResponse ClearCachedRealms(ClearCachedRealmsRequest request) + public virtual ClearApiKeyCacheResponse ClearApiKeyCache(ClearApiKeyCacheRequest request) { request.BeforeRequest(); - return DoRequest(request); + return DoRequest(request); } /// /// - /// Clear the user cache. + /// Clear the API key cache. /// /// - /// Evict users from the user cache. You can completely clear the cache or evict specific users. + /// Evict a subset of all entries from the API key cache. + /// The cache is also automatically cleared on state changes of the security index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ClearCachedRealmsAsync(ClearCachedRealmsRequest request, CancellationToken cancellationToken = default) + public virtual Task ClearApiKeyCacheAsync(ClearApiKeyCacheRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Clear the user cache. + /// Clear the API key cache. /// /// - /// Evict users from the user cache. You can completely clear the cache or evict specific users. + /// Evict a subset of all entries from the API key cache. + /// The cache is also automatically cleared on state changes of the security index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearCachedRealmsResponse ClearCachedRealms(ClearCachedRealmsRequestDescriptor descriptor) + public virtual ClearApiKeyCacheResponse ClearApiKeyCache(ClearApiKeyCacheRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Clear the user cache. + /// Clear the API key cache. /// /// - /// Evict users from the user cache. You can completely clear the cache or evict specific users. + /// Evict a subset of all entries from the API key cache. + /// The cache is also automatically cleared on state changes of the security index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearCachedRealmsResponse ClearCachedRealms(Elastic.Clients.Elasticsearch.Names realms) + public virtual ClearApiKeyCacheResponse ClearApiKeyCache(Elastic.Clients.Elasticsearch.Ids ids) { - var descriptor = new ClearCachedRealmsRequestDescriptor(realms); + var descriptor = new ClearApiKeyCacheRequestDescriptor(ids); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Clear the user cache. + /// Clear the API key cache. /// /// - /// Evict users from the user cache. You can completely clear the cache or evict specific users. + /// Evict a subset of all entries from the API key cache. + /// The cache is also automatically cleared on state changes of the security index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearCachedRealmsResponse ClearCachedRealms(Elastic.Clients.Elasticsearch.Names realms, Action configureRequest) + public virtual ClearApiKeyCacheResponse ClearApiKeyCache(Elastic.Clients.Elasticsearch.Ids ids, Action configureRequest) { - var descriptor = new ClearCachedRealmsRequestDescriptor(realms); + var descriptor = new ClearApiKeyCacheRequestDescriptor(ids); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Clear the user cache. + /// Clear the API key cache. /// /// - /// Evict users from the user cache. You can completely clear the cache or evict specific users. + /// Evict a subset of all entries from the API key cache. + /// The cache is also automatically cleared on state changes of the security index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ClearCachedRealmsAsync(ClearCachedRealmsRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task ClearApiKeyCacheAsync(ClearApiKeyCacheRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Clear the user cache. + /// Clear the API key cache. /// /// - /// Evict users from the user cache. You can completely clear the cache or evict specific users. + /// Evict a subset of all entries from the API key cache. + /// The cache is also automatically cleared on state changes of the security index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ClearCachedRealmsAsync(Elastic.Clients.Elasticsearch.Names realms, CancellationToken cancellationToken = default) + public virtual Task ClearApiKeyCacheAsync(Elastic.Clients.Elasticsearch.Ids ids, CancellationToken cancellationToken = default) { - var descriptor = new ClearCachedRealmsRequestDescriptor(realms); + var descriptor = new ClearApiKeyCacheRequestDescriptor(ids); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Clear the user cache. + /// Clear the API key cache. /// /// - /// Evict users from the user cache. You can completely clear the cache or evict specific users. + /// Evict a subset of all entries from the API key cache. + /// The cache is also automatically cleared on state changes of the security index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ClearCachedRealmsAsync(Elastic.Clients.Elasticsearch.Names realms, Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task ClearApiKeyCacheAsync(Elastic.Clients.Elasticsearch.Ids ids, Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new ClearCachedRealmsRequestDescriptor(realms); + var descriptor = new ClearApiKeyCacheRequestDescriptor(ids); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Clear the roles cache. + /// Clear the privileges cache. /// /// - /// Evict roles from the native role cache. + /// Evict privileges from the native application privilege cache. + /// The cache is also automatically cleared for applications that have their privileges updated. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearCachedRolesResponse ClearCachedRoles(ClearCachedRolesRequest request) + public virtual ClearCachedPrivilegesResponse ClearCachedPrivileges(ClearCachedPrivilegesRequest request) { request.BeforeRequest(); - return DoRequest(request); + return DoRequest(request); } /// /// - /// Clear the roles cache. + /// Clear the privileges cache. /// /// - /// Evict roles from the native role cache. + /// Evict privileges from the native application privilege cache. + /// The cache is also automatically cleared for applications that have their privileges updated. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ClearCachedRolesAsync(ClearCachedRolesRequest request, CancellationToken cancellationToken = default) + public virtual Task ClearCachedPrivilegesAsync(ClearCachedPrivilegesRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Clear the roles cache. + /// Clear the privileges cache. /// /// - /// Evict roles from the native role cache. + /// Evict privileges from the native application privilege cache. + /// The cache is also automatically cleared for applications that have their privileges updated. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearCachedRolesResponse ClearCachedRoles(ClearCachedRolesRequestDescriptor descriptor) + public virtual ClearCachedPrivilegesResponse ClearCachedPrivileges(ClearCachedPrivilegesRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Clear the roles cache. + /// Clear the privileges cache. /// /// - /// Evict roles from the native role cache. + /// Evict privileges from the native application privilege cache. + /// The cache is also automatically cleared for applications that have their privileges updated. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearCachedRolesResponse ClearCachedRoles(Elastic.Clients.Elasticsearch.Names name) + public virtual ClearCachedPrivilegesResponse ClearCachedPrivileges(Elastic.Clients.Elasticsearch.Name application) { - var descriptor = new ClearCachedRolesRequestDescriptor(name); + var descriptor = new ClearCachedPrivilegesRequestDescriptor(application); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Clear the roles cache. + /// Clear the privileges cache. /// /// - /// Evict roles from the native role cache. + /// Evict privileges from the native application privilege cache. + /// The cache is also automatically cleared for applications that have their privileges updated. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearCachedRolesResponse ClearCachedRoles(Elastic.Clients.Elasticsearch.Names name, Action configureRequest) + public virtual ClearCachedPrivilegesResponse ClearCachedPrivileges(Elastic.Clients.Elasticsearch.Name application, Action configureRequest) { - var descriptor = new ClearCachedRolesRequestDescriptor(name); + var descriptor = new ClearCachedPrivilegesRequestDescriptor(application); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Clear the roles cache. + /// Clear the privileges cache. /// /// - /// Evict roles from the native role cache. + /// Evict privileges from the native application privilege cache. + /// The cache is also automatically cleared for applications that have their privileges updated. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ClearCachedRolesAsync(ClearCachedRolesRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task ClearCachedPrivilegesAsync(ClearCachedPrivilegesRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Clear the roles cache. + /// Clear the privileges cache. /// /// - /// Evict roles from the native role cache. + /// Evict privileges from the native application privilege cache. + /// The cache is also automatically cleared for applications that have their privileges updated. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ClearCachedRolesAsync(Elastic.Clients.Elasticsearch.Names name, CancellationToken cancellationToken = default) + public virtual Task ClearCachedPrivilegesAsync(Elastic.Clients.Elasticsearch.Name application, CancellationToken cancellationToken = default) { - var descriptor = new ClearCachedRolesRequestDescriptor(name); + var descriptor = new ClearCachedPrivilegesRequestDescriptor(application); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Clear the roles cache. + /// Clear the privileges cache. /// /// - /// Evict roles from the native role cache. + /// Evict privileges from the native application privilege cache. + /// The cache is also automatically cleared for applications that have their privileges updated. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ClearCachedRolesAsync(Elastic.Clients.Elasticsearch.Names name, Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task ClearCachedPrivilegesAsync(Elastic.Clients.Elasticsearch.Name application, Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new ClearCachedRolesRequestDescriptor(name); + var descriptor = new ClearCachedPrivilegesRequestDescriptor(application); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Clear service account token caches. + /// Clear the user cache. /// /// - /// Evict a subset of all entries from the service account token caches. + /// Evict users from the user cache. + /// You can completely clear the cache or evict specific users. + /// + /// + /// User credentials are cached in memory on each node to avoid connecting to a remote authentication service or hitting the disk for every incoming request. + /// There are realm settings that you can use to configure the user cache. + /// For more information, refer to the documentation about controlling the user cache. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearCachedServiceTokensResponse ClearCachedServiceTokens(ClearCachedServiceTokensRequest request) + public virtual ClearCachedRealmsResponse ClearCachedRealms(ClearCachedRealmsRequest request) { request.BeforeRequest(); - return DoRequest(request); + return DoRequest(request); } /// /// - /// Clear service account token caches. + /// Clear the user cache. /// /// - /// Evict a subset of all entries from the service account token caches. + /// Evict users from the user cache. + /// You can completely clear the cache or evict specific users. + /// + /// + /// User credentials are cached in memory on each node to avoid connecting to a remote authentication service or hitting the disk for every incoming request. + /// There are realm settings that you can use to configure the user cache. + /// For more information, refer to the documentation about controlling the user cache. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ClearCachedServiceTokensAsync(ClearCachedServiceTokensRequest request, CancellationToken cancellationToken = default) + public virtual Task ClearCachedRealmsAsync(ClearCachedRealmsRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Clear service account token caches. + /// Clear the user cache. /// /// - /// Evict a subset of all entries from the service account token caches. + /// Evict users from the user cache. + /// You can completely clear the cache or evict specific users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// User credentials are cached in memory on each node to avoid connecting to a remote authentication service or hitting the disk for every incoming request. + /// There are realm settings that you can use to configure the user cache. + /// For more information, refer to the documentation about controlling the user cache. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearCachedServiceTokensResponse ClearCachedServiceTokens(ClearCachedServiceTokensRequestDescriptor descriptor) + public virtual ClearCachedRealmsResponse ClearCachedRealms(ClearCachedRealmsRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Clear service account token caches. + /// Clear the user cache. /// /// - /// Evict a subset of all entries from the service account token caches. + /// Evict users from the user cache. + /// You can completely clear the cache or evict specific users. + /// + /// + /// User credentials are cached in memory on each node to avoid connecting to a remote authentication service or hitting the disk for every incoming request. + /// There are realm settings that you can use to configure the user cache. + /// For more information, refer to the documentation about controlling the user cache. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearCachedServiceTokensResponse ClearCachedServiceTokens(string ns, string service, Elastic.Clients.Elasticsearch.Names name) + public virtual ClearCachedRealmsResponse ClearCachedRealms(Elastic.Clients.Elasticsearch.Names realms) { - var descriptor = new ClearCachedServiceTokensRequestDescriptor(ns, service, name); + var descriptor = new ClearCachedRealmsRequestDescriptor(realms); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Clear service account token caches. + /// Clear the user cache. /// /// - /// Evict a subset of all entries from the service account token caches. + /// Evict users from the user cache. + /// You can completely clear the cache or evict specific users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// User credentials are cached in memory on each node to avoid connecting to a remote authentication service or hitting the disk for every incoming request. + /// There are realm settings that you can use to configure the user cache. + /// For more information, refer to the documentation about controlling the user cache. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearCachedServiceTokensResponse ClearCachedServiceTokens(string ns, string service, Elastic.Clients.Elasticsearch.Names name, Action configureRequest) + public virtual ClearCachedRealmsResponse ClearCachedRealms(Elastic.Clients.Elasticsearch.Names realms, Action configureRequest) { - var descriptor = new ClearCachedServiceTokensRequestDescriptor(ns, service, name); + var descriptor = new ClearCachedRealmsRequestDescriptor(realms); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Clear service account token caches. + /// Clear the user cache. /// /// - /// Evict a subset of all entries from the service account token caches. + /// Evict users from the user cache. + /// You can completely clear the cache or evict specific users. + /// + /// + /// User credentials are cached in memory on each node to avoid connecting to a remote authentication service or hitting the disk for every incoming request. + /// There are realm settings that you can use to configure the user cache. + /// For more information, refer to the documentation about controlling the user cache. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ClearCachedServiceTokensAsync(ClearCachedServiceTokensRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task ClearCachedRealmsAsync(ClearCachedRealmsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Clear service account token caches. + /// Clear the user cache. /// /// - /// Evict a subset of all entries from the service account token caches. + /// Evict users from the user cache. + /// You can completely clear the cache or evict specific users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// User credentials are cached in memory on each node to avoid connecting to a remote authentication service or hitting the disk for every incoming request. + /// There are realm settings that you can use to configure the user cache. + /// For more information, refer to the documentation about controlling the user cache. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ClearCachedServiceTokensAsync(string ns, string service, Elastic.Clients.Elasticsearch.Names name, CancellationToken cancellationToken = default) + public virtual Task ClearCachedRealmsAsync(Elastic.Clients.Elasticsearch.Names realms, CancellationToken cancellationToken = default) { - var descriptor = new ClearCachedServiceTokensRequestDescriptor(ns, service, name); + var descriptor = new ClearCachedRealmsRequestDescriptor(realms); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Clear service account token caches. + /// Clear the user cache. /// /// - /// Evict a subset of all entries from the service account token caches. + /// Evict users from the user cache. + /// You can completely clear the cache or evict specific users. + /// + /// + /// User credentials are cached in memory on each node to avoid connecting to a remote authentication service or hitting the disk for every incoming request. + /// There are realm settings that you can use to configure the user cache. + /// For more information, refer to the documentation about controlling the user cache. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ClearCachedServiceTokensAsync(string ns, string service, Elastic.Clients.Elasticsearch.Names name, Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task ClearCachedRealmsAsync(Elastic.Clients.Elasticsearch.Names realms, Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new ClearCachedServiceTokensRequestDescriptor(ns, service, name); + var descriptor = new ClearCachedRealmsRequestDescriptor(realms); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Create an API key. + /// Clear the roles cache. /// /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// Evict roles from the native role cache. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateApiKeyResponse CreateApiKey(CreateApiKeyRequest request) + public virtual ClearCachedRolesResponse ClearCachedRoles(ClearCachedRolesRequest request) { request.BeforeRequest(); - return DoRequest(request); + return DoRequest(request); } /// /// - /// Create an API key. + /// Clear the roles cache. /// /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// Evict roles from the native role cache. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateApiKeyAsync(CreateApiKeyRequest request, CancellationToken cancellationToken = default) + public virtual Task ClearCachedRolesAsync(ClearCachedRolesRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Create an API key. + /// Clear the roles cache. /// /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// Evict roles from the native role cache. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateApiKeyResponse CreateApiKey(CreateApiKeyRequestDescriptor descriptor) + public virtual ClearCachedRolesResponse ClearCachedRoles(ClearCachedRolesRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequest, CreateApiKeyResponse, CreateApiKeyRequestParameters>(descriptor); + return DoRequest(descriptor); } /// /// - /// Create an API key. + /// Clear the roles cache. /// /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// Evict roles from the native role cache. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateApiKeyResponse CreateApiKey() + public virtual ClearCachedRolesResponse ClearCachedRoles(Elastic.Clients.Elasticsearch.Names name) { - var descriptor = new CreateApiKeyRequestDescriptor(); + var descriptor = new ClearCachedRolesRequestDescriptor(name); descriptor.BeforeRequest(); - return DoRequest, CreateApiKeyResponse, CreateApiKeyRequestParameters>(descriptor); + return DoRequest(descriptor); } /// /// - /// Create an API key. + /// Clear the roles cache. /// /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// Evict roles from the native role cache. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateApiKeyResponse CreateApiKey(Action> configureRequest) + public virtual ClearCachedRolesResponse ClearCachedRoles(Elastic.Clients.Elasticsearch.Names name, Action configureRequest) { - var descriptor = new CreateApiKeyRequestDescriptor(); + var descriptor = new ClearCachedRolesRequestDescriptor(name); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, CreateApiKeyResponse, CreateApiKeyRequestParameters>(descriptor); + return DoRequest(descriptor); } /// /// - /// Create an API key. + /// Clear the roles cache. /// /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// Evict roles from the native role cache. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateApiKeyResponse CreateApiKey(CreateApiKeyRequestDescriptor descriptor) + public virtual Task ClearCachedRolesAsync(ClearCachedRolesRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Create an API key. + /// Clear the roles cache. /// /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// Evict roles from the native role cache. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateApiKeyResponse CreateApiKey() + public virtual Task ClearCachedRolesAsync(Elastic.Clients.Elasticsearch.Names name, CancellationToken cancellationToken = default) { - var descriptor = new CreateApiKeyRequestDescriptor(); + var descriptor = new ClearCachedRolesRequestDescriptor(name); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Create an API key. + /// Clear the roles cache. /// /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// Evict roles from the native role cache. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateApiKeyResponse CreateApiKey(Action configureRequest) + public virtual Task ClearCachedRolesAsync(Elastic.Clients.Elasticsearch.Names name, Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new CreateApiKeyRequestDescriptor(); + var descriptor = new ClearCachedRolesRequestDescriptor(name); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Create an API key. + /// Clear service account token caches. /// /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// Evict a subset of all entries from the service account token caches. + /// Two separate caches exist for service account tokens: one cache for tokens backed by the service_tokens file, and another for tokens backed by the .security index. + /// This API clears matching entries from both caches. + /// + /// + /// The cache for service account tokens backed by the .security index is cleared automatically on state changes of the security index. + /// The cache for tokens backed by the service_tokens file is cleared automatically on file changes. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateApiKeyAsync(CreateApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ClearCachedServiceTokensResponse ClearCachedServiceTokens(ClearCachedServiceTokensRequest request) { - descriptor.BeforeRequest(); - return DoRequestAsync, CreateApiKeyResponse, CreateApiKeyRequestParameters>(descriptor, cancellationToken); + request.BeforeRequest(); + return DoRequest(request); } /// /// - /// Create an API key. + /// Clear service account token caches. /// /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// Evict a subset of all entries from the service account token caches. + /// Two separate caches exist for service account tokens: one cache for tokens backed by the service_tokens file, and another for tokens backed by the .security index. + /// This API clears matching entries from both caches. + /// + /// + /// The cache for service account tokens backed by the .security index is cleared automatically on state changes of the security index. + /// The cache for tokens backed by the service_tokens file is cleared automatically on file changes. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateApiKeyAsync(CancellationToken cancellationToken = default) + public virtual Task ClearCachedServiceTokensAsync(ClearCachedServiceTokensRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Clear service account token caches. + /// + /// + /// Evict a subset of all entries from the service account token caches. + /// Two separate caches exist for service account tokens: one cache for tokens backed by the service_tokens file, and another for tokens backed by the .security index. + /// This API clears matching entries from both caches. + /// + /// + /// The cache for service account tokens backed by the .security index is cleared automatically on state changes of the security index. + /// The cache for tokens backed by the service_tokens file is cleared automatically on file changes. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ClearCachedServiceTokensResponse ClearCachedServiceTokens(ClearCachedServiceTokensRequestDescriptor descriptor) { - var descriptor = new CreateApiKeyRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync, CreateApiKeyResponse, CreateApiKeyRequestParameters>(descriptor, cancellationToken); + return DoRequest(descriptor); } /// /// - /// Create an API key. + /// Clear service account token caches. /// /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// Evict a subset of all entries from the service account token caches. + /// Two separate caches exist for service account tokens: one cache for tokens backed by the service_tokens file, and another for tokens backed by the .security index. + /// This API clears matching entries from both caches. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// The cache for service account tokens backed by the .security index is cleared automatically on state changes of the security index. + /// The cache for tokens backed by the service_tokens file is cleared automatically on file changes. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateApiKeyAsync(Action> configureRequest, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ClearCachedServiceTokensResponse ClearCachedServiceTokens(string ns, string service, Elastic.Clients.Elasticsearch.Names name) { - var descriptor = new CreateApiKeyRequestDescriptor(); - configureRequest?.Invoke(descriptor); + var descriptor = new ClearCachedServiceTokensRequestDescriptor(ns, service, name); descriptor.BeforeRequest(); - return DoRequestAsync, CreateApiKeyResponse, CreateApiKeyRequestParameters>(descriptor, cancellationToken); + return DoRequest(descriptor); } /// /// - /// Create an API key. + /// Clear service account token caches. /// /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// Evict a subset of all entries from the service account token caches. + /// Two separate caches exist for service account tokens: one cache for tokens backed by the service_tokens file, and another for tokens backed by the .security index. + /// This API clears matching entries from both caches. + /// + /// + /// The cache for service account tokens backed by the .security index is cleared automatically on state changes of the security index. + /// The cache for tokens backed by the service_tokens file is cleared automatically on file changes. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateApiKeyAsync(CreateApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ClearCachedServiceTokensResponse ClearCachedServiceTokens(string ns, string service, Elastic.Clients.Elasticsearch.Names name, Action configureRequest) { + var descriptor = new ClearCachedServiceTokensRequestDescriptor(ns, service, name); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequest(descriptor); } /// /// - /// Create an API key. + /// Clear service account token caches. /// /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// Evict a subset of all entries from the service account token caches. + /// Two separate caches exist for service account tokens: one cache for tokens backed by the service_tokens file, and another for tokens backed by the .security index. + /// This API clears matching entries from both caches. + /// + /// + /// The cache for service account tokens backed by the .security index is cleared automatically on state changes of the security index. + /// The cache for tokens backed by the service_tokens file is cleared automatically on file changes. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateApiKeyAsync(CancellationToken cancellationToken = default) + public virtual Task ClearCachedServiceTokensAsync(ClearCachedServiceTokensRequestDescriptor descriptor, CancellationToken cancellationToken = default) { - var descriptor = new CreateApiKeyRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Create an API key. + /// Clear service account token caches. /// /// - /// Create an API key for access without requiring basic authentication. - /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. - /// If applicable, it also returns expiration information for the API key in milliseconds. - /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// Evict a subset of all entries from the service account token caches. + /// Two separate caches exist for service account tokens: one cache for tokens backed by the service_tokens file, and another for tokens backed by the .security index. + /// This API clears matching entries from both caches. + /// + /// + /// The cache for service account tokens backed by the .security index is cleared automatically on state changes of the security index. + /// The cache for tokens backed by the service_tokens file is cleared automatically on file changes. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateApiKeyAsync(Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task ClearCachedServiceTokensAsync(string ns, string service, Elastic.Clients.Elasticsearch.Names name, CancellationToken cancellationToken = default) { - var descriptor = new CreateApiKeyRequestDescriptor(); - configureRequest?.Invoke(descriptor); + var descriptor = new ClearCachedServiceTokensRequestDescriptor(ns, service, name); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Create a cross-cluster API key. + /// Clear service account token caches. /// /// - /// Create an API key of the cross_cluster type for the API key based remote cluster access. - /// A cross_cluster API key cannot be used to authenticate through the REST interface. + /// Evict a subset of all entries from the service account token caches. + /// Two separate caches exist for service account tokens: one cache for tokens backed by the service_tokens file, and another for tokens backed by the .security index. + /// This API clears matching entries from both caches. /// /// - /// IMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error. + /// The cache for service account tokens backed by the .security index is cleared automatically on state changes of the security index. + /// The cache for tokens backed by the service_tokens file is cleared automatically on file changes. /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ClearCachedServiceTokensAsync(string ns, string service, Elastic.Clients.Elasticsearch.Names name, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ClearCachedServiceTokensRequestDescriptor(ns, service, name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// /// - /// Cross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// Create an API key. /// /// - /// NOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API key’s effective permission is exactly as specified with the access property. + /// Create an API key for access without requiring basic authentication. /// /// - /// A successful request returns a JSON structure that contains the API key, its unique ID, and its name. If applicable, it also returns expiration information for the API key in milliseconds. + /// IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges. + /// If you specify privileges, the API returns an error. /// /// - /// By default, API keys never expire. You can specify expiration information when you create the API keys. + /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. + /// If applicable, it also returns expiration information for the API key in milliseconds. /// /// - /// Cross-cluster API keys can only be updated with the update cross-cluster API key API. - /// Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. + /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// + /// + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// To configure or turn off the API key service, refer to API key service setting documentation. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateCrossClusterApiKeyResponse CreateCrossClusterApiKey(CreateCrossClusterApiKeyRequest request) + public virtual CreateApiKeyResponse CreateApiKey(CreateApiKeyRequest request) { request.BeforeRequest(); - return DoRequest(request); + return DoRequest(request); } /// /// - /// Create a cross-cluster API key. - /// - /// - /// Create an API key of the cross_cluster type for the API key based remote cluster access. - /// A cross_cluster API key cannot be used to authenticate through the REST interface. - /// - /// - /// IMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error. + /// Create an API key. /// /// - /// Cross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// Create an API key for access without requiring basic authentication. /// /// - /// NOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API key’s effective permission is exactly as specified with the access property. + /// IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges. + /// If you specify privileges, the API returns an error. /// /// - /// A successful request returns a JSON structure that contains the API key, its unique ID, and its name. If applicable, it also returns expiration information for the API key in milliseconds. + /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. + /// If applicable, it also returns expiration information for the API key in milliseconds. /// /// - /// By default, API keys never expire. You can specify expiration information when you create the API keys. + /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. /// /// - /// Cross-cluster API keys can only be updated with the update cross-cluster API key API. - /// Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// To configure or turn off the API key service, refer to API key service setting documentation. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateCrossClusterApiKeyAsync(CreateCrossClusterApiKeyRequest request, CancellationToken cancellationToken = default) + public virtual Task CreateApiKeyAsync(CreateApiKeyRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Create a cross-cluster API key. - /// - /// - /// Create an API key of the cross_cluster type for the API key based remote cluster access. - /// A cross_cluster API key cannot be used to authenticate through the REST interface. - /// - /// - /// IMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error. + /// Create an API key. /// /// - /// Cross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// Create an API key for access without requiring basic authentication. /// /// - /// NOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API key’s effective permission is exactly as specified with the access property. + /// IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges. + /// If you specify privileges, the API returns an error. /// /// - /// A successful request returns a JSON structure that contains the API key, its unique ID, and its name. If applicable, it also returns expiration information for the API key in milliseconds. + /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. + /// If applicable, it also returns expiration information for the API key in milliseconds. /// /// - /// By default, API keys never expire. You can specify expiration information when you create the API keys. + /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. /// /// - /// Cross-cluster API keys can only be updated with the update cross-cluster API key API. - /// Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// To configure or turn off the API key service, refer to API key service setting documentation. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateCrossClusterApiKeyResponse CreateCrossClusterApiKey(CreateCrossClusterApiKeyRequestDescriptor descriptor) + public virtual CreateApiKeyResponse CreateApiKey(CreateApiKeyRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequest, CreateCrossClusterApiKeyResponse, CreateCrossClusterApiKeyRequestParameters>(descriptor); + return DoRequest, CreateApiKeyResponse, CreateApiKeyRequestParameters>(descriptor); } /// /// - /// Create a cross-cluster API key. - /// - /// - /// Create an API key of the cross_cluster type for the API key based remote cluster access. - /// A cross_cluster API key cannot be used to authenticate through the REST interface. - /// - /// - /// IMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error. + /// Create an API key. /// /// - /// Cross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// Create an API key for access without requiring basic authentication. /// /// - /// NOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API key’s effective permission is exactly as specified with the access property. + /// IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges. + /// If you specify privileges, the API returns an error. /// /// - /// A successful request returns a JSON structure that contains the API key, its unique ID, and its name. If applicable, it also returns expiration information for the API key in milliseconds. + /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. + /// If applicable, it also returns expiration information for the API key in milliseconds. /// /// - /// By default, API keys never expire. You can specify expiration information when you create the API keys. + /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. /// /// - /// Cross-cluster API keys can only be updated with the update cross-cluster API key API. - /// Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// To configure or turn off the API key service, refer to API key service setting documentation. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateCrossClusterApiKeyResponse CreateCrossClusterApiKey() + public virtual CreateApiKeyResponse CreateApiKey() { - var descriptor = new CreateCrossClusterApiKeyRequestDescriptor(); + var descriptor = new CreateApiKeyRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest, CreateCrossClusterApiKeyResponse, CreateCrossClusterApiKeyRequestParameters>(descriptor); + return DoRequest, CreateApiKeyResponse, CreateApiKeyRequestParameters>(descriptor); } /// /// - /// Create a cross-cluster API key. - /// - /// - /// Create an API key of the cross_cluster type for the API key based remote cluster access. - /// A cross_cluster API key cannot be used to authenticate through the REST interface. - /// - /// - /// IMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error. + /// Create an API key. /// /// - /// Cross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// Create an API key for access without requiring basic authentication. /// /// - /// NOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API key’s effective permission is exactly as specified with the access property. + /// IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges. + /// If you specify privileges, the API returns an error. /// /// - /// A successful request returns a JSON structure that contains the API key, its unique ID, and its name. If applicable, it also returns expiration information for the API key in milliseconds. + /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. + /// If applicable, it also returns expiration information for the API key in milliseconds. /// /// - /// By default, API keys never expire. You can specify expiration information when you create the API keys. + /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. /// /// - /// Cross-cluster API keys can only be updated with the update cross-cluster API key API. - /// Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// To configure or turn off the API key service, refer to API key service setting documentation. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateCrossClusterApiKeyResponse CreateCrossClusterApiKey(Action> configureRequest) + public virtual CreateApiKeyResponse CreateApiKey(Action> configureRequest) { - var descriptor = new CreateCrossClusterApiKeyRequestDescriptor(); + var descriptor = new CreateApiKeyRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, CreateCrossClusterApiKeyResponse, CreateCrossClusterApiKeyRequestParameters>(descriptor); + return DoRequest, CreateApiKeyResponse, CreateApiKeyRequestParameters>(descriptor); } /// /// - /// Create a cross-cluster API key. - /// - /// - /// Create an API key of the cross_cluster type for the API key based remote cluster access. - /// A cross_cluster API key cannot be used to authenticate through the REST interface. - /// - /// - /// IMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error. + /// Create an API key. /// /// - /// Cross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// Create an API key for access without requiring basic authentication. /// /// - /// NOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API key’s effective permission is exactly as specified with the access property. + /// IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges. + /// If you specify privileges, the API returns an error. /// /// - /// A successful request returns a JSON structure that contains the API key, its unique ID, and its name. If applicable, it also returns expiration information for the API key in milliseconds. + /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. + /// If applicable, it also returns expiration information for the API key in milliseconds. /// /// - /// By default, API keys never expire. You can specify expiration information when you create the API keys. + /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. /// /// - /// Cross-cluster API keys can only be updated with the update cross-cluster API key API. - /// Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// To configure or turn off the API key service, refer to API key service setting documentation. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateCrossClusterApiKeyResponse CreateCrossClusterApiKey(CreateCrossClusterApiKeyRequestDescriptor descriptor) + public virtual CreateApiKeyResponse CreateApiKey(CreateApiKeyRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); + } + + /// + /// + /// Create an API key. + /// + /// + /// Create an API key for access without requiring basic authentication. + /// + /// + /// IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges. + /// If you specify privileges, the API returns an error. + /// + /// + /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. + /// If applicable, it also returns expiration information for the API key in milliseconds. + /// + /// + /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// + /// + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// To configure or turn off the API key service, refer to API key service setting documentation. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CreateApiKeyResponse CreateApiKey() + { + var descriptor = new CreateApiKeyRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Create an API key. + /// + /// + /// Create an API key for access without requiring basic authentication. + /// + /// + /// IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges. + /// If you specify privileges, the API returns an error. + /// + /// + /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. + /// If applicable, it also returns expiration information for the API key in milliseconds. + /// + /// + /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// + /// + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// To configure or turn off the API key service, refer to API key service setting documentation. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CreateApiKeyResponse CreateApiKey(Action configureRequest) + { + var descriptor = new CreateApiKeyRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Create an API key. + /// + /// + /// Create an API key for access without requiring basic authentication. + /// + /// + /// IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges. + /// If you specify privileges, the API returns an error. + /// + /// + /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. + /// If applicable, it also returns expiration information for the API key in milliseconds. + /// + /// + /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// + /// + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// To configure or turn off the API key service, refer to API key service setting documentation. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateApiKeyAsync(CreateApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, CreateApiKeyResponse, CreateApiKeyRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Create an API key. + /// + /// + /// Create an API key for access without requiring basic authentication. + /// + /// + /// IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges. + /// If you specify privileges, the API returns an error. + /// + /// + /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. + /// If applicable, it also returns expiration information for the API key in milliseconds. + /// + /// + /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// + /// + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// To configure or turn off the API key service, refer to API key service setting documentation. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateApiKeyAsync(CancellationToken cancellationToken = default) + { + var descriptor = new CreateApiKeyRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync, CreateApiKeyResponse, CreateApiKeyRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Create an API key. + /// + /// + /// Create an API key for access without requiring basic authentication. + /// + /// + /// IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges. + /// If you specify privileges, the API returns an error. + /// + /// + /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. + /// If applicable, it also returns expiration information for the API key in milliseconds. + /// + /// + /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// + /// + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// To configure or turn off the API key service, refer to API key service setting documentation. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateApiKeyAsync(Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new CreateApiKeyRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, CreateApiKeyResponse, CreateApiKeyRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Create an API key. + /// + /// + /// Create an API key for access without requiring basic authentication. + /// + /// + /// IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges. + /// If you specify privileges, the API returns an error. + /// + /// + /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. + /// If applicable, it also returns expiration information for the API key in milliseconds. + /// + /// + /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// + /// + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// To configure or turn off the API key service, refer to API key service setting documentation. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateApiKeyAsync(CreateApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create an API key. + /// + /// + /// Create an API key for access without requiring basic authentication. + /// + /// + /// IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges. + /// If you specify privileges, the API returns an error. + /// + /// + /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. + /// If applicable, it also returns expiration information for the API key in milliseconds. + /// + /// + /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// + /// + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// To configure or turn off the API key service, refer to API key service setting documentation. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateApiKeyAsync(CancellationToken cancellationToken = default) + { + var descriptor = new CreateApiKeyRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create an API key. + /// + /// + /// Create an API key for access without requiring basic authentication. + /// + /// + /// IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges. + /// If you specify privileges, the API returns an error. + /// + /// + /// A successful request returns a JSON structure that contains the API key, its unique id, and its name. + /// If applicable, it also returns expiration information for the API key in milliseconds. + /// + /// + /// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + /// + /// + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// To configure or turn off the API key service, refer to API key service setting documentation. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateApiKeyAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new CreateApiKeyRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); } /// @@ -2084,14 +2723,13 @@ public virtual CreateCrossClusterApiKeyResponse CreateCrossClusterApiKey(CreateC /// Cross-cluster API keys can only be updated with the update cross-cluster API key API. /// Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateCrossClusterApiKeyResponse CreateCrossClusterApiKey() + public virtual CreateCrossClusterApiKeyResponse CreateCrossClusterApiKey(CreateCrossClusterApiKeyRequest request) { - var descriptor = new CreateCrossClusterApiKeyRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest(descriptor); + request.BeforeRequest(); + return DoRequest(request); } /// @@ -2121,15 +2759,12 @@ public virtual CreateCrossClusterApiKeyResponse CreateCrossClusterApiKey() /// Cross-cluster API keys can only be updated with the update cross-cluster API key API. /// Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateCrossClusterApiKeyResponse CreateCrossClusterApiKey(Action configureRequest) + public virtual Task CreateCrossClusterApiKeyAsync(CreateCrossClusterApiKeyRequest request, CancellationToken cancellationToken = default) { - var descriptor = new CreateCrossClusterApiKeyRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); } /// @@ -2159,12 +2794,13 @@ public virtual CreateCrossClusterApiKeyResponse CreateCrossClusterApiKey(Action< /// Cross-cluster API keys can only be updated with the update cross-cluster API key API. /// Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateCrossClusterApiKeyAsync(CreateCrossClusterApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CreateCrossClusterApiKeyResponse CreateCrossClusterApiKey(CreateCrossClusterApiKeyRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequestAsync, CreateCrossClusterApiKeyResponse, CreateCrossClusterApiKeyRequestParameters>(descriptor, cancellationToken); + return DoRequest, CreateCrossClusterApiKeyResponse, CreateCrossClusterApiKeyRequestParameters>(descriptor); } /// @@ -2194,13 +2830,14 @@ public virtual Task CreateCrossClusterApiKeyAs /// Cross-cluster API keys can only be updated with the update cross-cluster API key API. /// Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateCrossClusterApiKeyAsync(CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CreateCrossClusterApiKeyResponse CreateCrossClusterApiKey() { var descriptor = new CreateCrossClusterApiKeyRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync, CreateCrossClusterApiKeyResponse, CreateCrossClusterApiKeyRequestParameters>(descriptor, cancellationToken); + return DoRequest, CreateCrossClusterApiKeyResponse, CreateCrossClusterApiKeyRequestParameters>(descriptor); } /// @@ -2230,14 +2867,15 @@ public virtual Task CreateCrossClusterApiKeyAs /// Cross-cluster API keys can only be updated with the update cross-cluster API key API. /// Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateCrossClusterApiKeyAsync(Action> configureRequest, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CreateCrossClusterApiKeyResponse CreateCrossClusterApiKey(Action> configureRequest) { var descriptor = new CreateCrossClusterApiKeyRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, CreateCrossClusterApiKeyResponse, CreateCrossClusterApiKeyRequestParameters>(descriptor, cancellationToken); + return DoRequest, CreateCrossClusterApiKeyResponse, CreateCrossClusterApiKeyRequestParameters>(descriptor); } /// @@ -2267,12 +2905,13 @@ public virtual Task CreateCrossClusterApiKeyAs /// Cross-cluster API keys can only be updated with the update cross-cluster API key API. /// Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateCrossClusterApiKeyAsync(CreateCrossClusterApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CreateCrossClusterApiKeyResponse CreateCrossClusterApiKey(CreateCrossClusterApiKeyRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequest(descriptor); } /// @@ -2302,13 +2941,14 @@ public virtual Task CreateCrossClusterApiKeyAs /// Cross-cluster API keys can only be updated with the update cross-cluster API key API. /// Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateCrossClusterApiKeyAsync(CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CreateCrossClusterApiKeyResponse CreateCrossClusterApiKey() { var descriptor = new CreateCrossClusterApiKeyRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequest(descriptor); } /// @@ -2338,14 +2978,231 @@ public virtual Task CreateCrossClusterApiKeyAs /// Cross-cluster API keys can only be updated with the update cross-cluster API key API. /// Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateCrossClusterApiKeyAsync(Action configureRequest, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CreateCrossClusterApiKeyResponse CreateCrossClusterApiKey(Action configureRequest) { var descriptor = new CreateCrossClusterApiKeyRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequest(descriptor); + } + + /// + /// + /// Create a cross-cluster API key. + /// + /// + /// Create an API key of the cross_cluster type for the API key based remote cluster access. + /// A cross_cluster API key cannot be used to authenticate through the REST interface. + /// + /// + /// IMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error. + /// + /// + /// Cross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// + /// + /// NOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API key’s effective permission is exactly as specified with the access property. + /// + /// + /// A successful request returns a JSON structure that contains the API key, its unique ID, and its name. If applicable, it also returns expiration information for the API key in milliseconds. + /// + /// + /// By default, API keys never expire. You can specify expiration information when you create the API keys. + /// + /// + /// Cross-cluster API keys can only be updated with the update cross-cluster API key API. + /// Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateCrossClusterApiKeyAsync(CreateCrossClusterApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, CreateCrossClusterApiKeyResponse, CreateCrossClusterApiKeyRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Create a cross-cluster API key. + /// + /// + /// Create an API key of the cross_cluster type for the API key based remote cluster access. + /// A cross_cluster API key cannot be used to authenticate through the REST interface. + /// + /// + /// IMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error. + /// + /// + /// Cross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// + /// + /// NOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API key’s effective permission is exactly as specified with the access property. + /// + /// + /// A successful request returns a JSON structure that contains the API key, its unique ID, and its name. If applicable, it also returns expiration information for the API key in milliseconds. + /// + /// + /// By default, API keys never expire. You can specify expiration information when you create the API keys. + /// + /// + /// Cross-cluster API keys can only be updated with the update cross-cluster API key API. + /// Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateCrossClusterApiKeyAsync(CancellationToken cancellationToken = default) + { + var descriptor = new CreateCrossClusterApiKeyRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync, CreateCrossClusterApiKeyResponse, CreateCrossClusterApiKeyRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Create a cross-cluster API key. + /// + /// + /// Create an API key of the cross_cluster type for the API key based remote cluster access. + /// A cross_cluster API key cannot be used to authenticate through the REST interface. + /// + /// + /// IMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error. + /// + /// + /// Cross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// + /// + /// NOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API key’s effective permission is exactly as specified with the access property. + /// + /// + /// A successful request returns a JSON structure that contains the API key, its unique ID, and its name. If applicable, it also returns expiration information for the API key in milliseconds. + /// + /// + /// By default, API keys never expire. You can specify expiration information when you create the API keys. + /// + /// + /// Cross-cluster API keys can only be updated with the update cross-cluster API key API. + /// Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateCrossClusterApiKeyAsync(Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new CreateCrossClusterApiKeyRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, CreateCrossClusterApiKeyResponse, CreateCrossClusterApiKeyRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Create a cross-cluster API key. + /// + /// + /// Create an API key of the cross_cluster type for the API key based remote cluster access. + /// A cross_cluster API key cannot be used to authenticate through the REST interface. + /// + /// + /// IMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error. + /// + /// + /// Cross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// + /// + /// NOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API key’s effective permission is exactly as specified with the access property. + /// + /// + /// A successful request returns a JSON structure that contains the API key, its unique ID, and its name. If applicable, it also returns expiration information for the API key in milliseconds. + /// + /// + /// By default, API keys never expire. You can specify expiration information when you create the API keys. + /// + /// + /// Cross-cluster API keys can only be updated with the update cross-cluster API key API. + /// Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateCrossClusterApiKeyAsync(CreateCrossClusterApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create a cross-cluster API key. + /// + /// + /// Create an API key of the cross_cluster type for the API key based remote cluster access. + /// A cross_cluster API key cannot be used to authenticate through the REST interface. + /// + /// + /// IMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error. + /// + /// + /// Cross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// + /// + /// NOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API key’s effective permission is exactly as specified with the access property. + /// + /// + /// A successful request returns a JSON structure that contains the API key, its unique ID, and its name. If applicable, it also returns expiration information for the API key in milliseconds. + /// + /// + /// By default, API keys never expire. You can specify expiration information when you create the API keys. + /// + /// + /// Cross-cluster API keys can only be updated with the update cross-cluster API key API. + /// Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateCrossClusterApiKeyAsync(CancellationToken cancellationToken = default) + { + var descriptor = new CreateCrossClusterApiKeyRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create a cross-cluster API key. + /// + /// + /// Create an API key of the cross_cluster type for the API key based remote cluster access. + /// A cross_cluster API key cannot be used to authenticate through the REST interface. + /// + /// + /// IMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error. + /// + /// + /// Cross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled. + /// + /// + /// NOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API key’s effective permission is exactly as specified with the access property. + /// + /// + /// A successful request returns a JSON structure that contains the API key, its unique ID, and its name. If applicable, it also returns expiration information for the API key in milliseconds. + /// + /// + /// By default, API keys never expire. You can specify expiration information when you create the API keys. + /// + /// + /// Cross-cluster API keys can only be updated with the update cross-cluster API key API. + /// Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateCrossClusterApiKeyAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new CreateCrossClusterApiKeyRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); } /// @@ -2355,7 +3212,11 @@ public virtual Task CreateCrossClusterApiKeyAs /// /// Create a service accounts token for access without requiring basic authentication. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Service account tokens never expire. + /// You must actively delete them if they are no longer needed. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CreateServiceTokenResponse CreateServiceToken(CreateServiceTokenRequest request) @@ -2371,7 +3232,11 @@ public virtual CreateServiceTokenResponse CreateServiceToken(CreateServiceTokenR /// /// Create a service accounts token for access without requiring basic authentication. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Service account tokens never expire. + /// You must actively delete them if they are no longer needed. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateServiceTokenAsync(CreateServiceTokenRequest request, CancellationToken cancellationToken = default) { @@ -2386,7 +3251,11 @@ public virtual Task CreateServiceTokenAsync(CreateSe /// /// Create a service accounts token for access without requiring basic authentication. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Service account tokens never expire. + /// You must actively delete them if they are no longer needed. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CreateServiceTokenResponse CreateServiceToken(CreateServiceTokenRequestDescriptor descriptor) @@ -2402,7 +3271,11 @@ public virtual CreateServiceTokenResponse CreateServiceToken(CreateServiceTokenR /// /// Create a service accounts token for access without requiring basic authentication. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Service account tokens never expire. + /// You must actively delete them if they are no longer needed. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CreateServiceTokenResponse CreateServiceToken(string ns, string service, Elastic.Clients.Elasticsearch.Name? name) @@ -2419,7 +3292,11 @@ public virtual CreateServiceTokenResponse CreateServiceToken(string ns, string s /// /// Create a service accounts token for access without requiring basic authentication. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Service account tokens never expire. + /// You must actively delete them if they are no longer needed. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CreateServiceTokenResponse CreateServiceToken(string ns, string service, Elastic.Clients.Elasticsearch.Name? name, Action configureRequest) @@ -2437,7 +3314,11 @@ public virtual CreateServiceTokenResponse CreateServiceToken(string ns, string s /// /// Create a service accounts token for access without requiring basic authentication. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Service account tokens never expire. + /// You must actively delete them if they are no longer needed. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CreateServiceTokenResponse CreateServiceToken(string ns, string service) @@ -2454,7 +3335,11 @@ public virtual CreateServiceTokenResponse CreateServiceToken(string ns, string s /// /// Create a service accounts token for access without requiring basic authentication. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Service account tokens never expire. + /// You must actively delete them if they are no longer needed. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CreateServiceTokenResponse CreateServiceToken(string ns, string service, Action configureRequest) @@ -2472,7 +3357,11 @@ public virtual CreateServiceTokenResponse CreateServiceToken(string ns, string s /// /// Create a service accounts token for access without requiring basic authentication. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Service account tokens never expire. + /// You must actively delete them if they are no longer needed. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateServiceTokenAsync(CreateServiceTokenRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2487,7 +3376,11 @@ public virtual Task CreateServiceTokenAsync(CreateSe /// /// Create a service accounts token for access without requiring basic authentication. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Service account tokens never expire. + /// You must actively delete them if they are no longer needed. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateServiceTokenAsync(string ns, string service, Elastic.Clients.Elasticsearch.Name? name, CancellationToken cancellationToken = default) { @@ -2503,7 +3396,11 @@ public virtual Task CreateServiceTokenAsync(string n /// /// Create a service accounts token for access without requiring basic authentication. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Service account tokens never expire. + /// You must actively delete them if they are no longer needed. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateServiceTokenAsync(string ns, string service, Elastic.Clients.Elasticsearch.Name? name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -2520,7 +3417,11 @@ public virtual Task CreateServiceTokenAsync(string n /// /// Create a service accounts token for access without requiring basic authentication. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Service account tokens never expire. + /// You must actively delete them if they are no longer needed. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateServiceTokenAsync(string ns, string service, CancellationToken cancellationToken = default) { @@ -2536,7 +3437,11 @@ public virtual Task CreateServiceTokenAsync(string n /// /// Create a service accounts token for access without requiring basic authentication. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Service account tokens never expire. + /// You must actively delete them if they are no longer needed. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateServiceTokenAsync(string ns, string service, Action configureRequest, CancellationToken cancellationToken = default) { @@ -2548,36 +3453,291 @@ public virtual Task CreateServiceTokenAsync(string n /// /// - /// Delete application privileges. + /// Delegate PKI authentication. + /// + /// + /// This API implements the exchange of an X509Certificate chain for an Elasticsearch access token. + /// The certificate chain is validated, according to RFC 5280, by sequentially considering the trust configuration of every installed PKI realm that has delegation.enabled set to true. + /// A successfully trusted client certificate is also subject to the validation of the subject distinguished name according to thw username_pattern of the respective realm. + /// + /// + /// This API is called by smart and trusted proxies, such as Kibana, which terminate the user's TLS session but still want to authenticate the user by using a PKI realm—-​as if the user connected directly to Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// IMPORTANT: The association between the subject public key in the target certificate and the corresponding private key is not validated. + /// This is part of the TLS authentication process and it is delegated to the proxy that calls this API. + /// The proxy is trusted to have performed the TLS authentication and this API translates that authentication into an Elasticsearch access token. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeletePrivilegesResponse DeletePrivileges(DeletePrivilegesRequest request) + public virtual DelegatePkiResponse DelegatePki(DelegatePkiRequest request) { request.BeforeRequest(); - return DoRequest(request); + return DoRequest(request); } /// /// - /// Delete application privileges. + /// Delegate PKI authentication. + /// + /// + /// This API implements the exchange of an X509Certificate chain for an Elasticsearch access token. + /// The certificate chain is validated, according to RFC 5280, by sequentially considering the trust configuration of every installed PKI realm that has delegation.enabled set to true. + /// A successfully trusted client certificate is also subject to the validation of the subject distinguished name according to thw username_pattern of the respective realm. + /// + /// + /// This API is called by smart and trusted proxies, such as Kibana, which terminate the user's TLS session but still want to authenticate the user by using a PKI realm—-​as if the user connected directly to Elasticsearch. + /// + /// + /// IMPORTANT: The association between the subject public key in the target certificate and the corresponding private key is not validated. + /// This is part of the TLS authentication process and it is delegated to the proxy that calls this API. + /// The proxy is trusted to have performed the TLS authentication and this API translates that authentication into an Elasticsearch access token. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task DeletePrivilegesAsync(DeletePrivilegesRequest request, CancellationToken cancellationToken = default) + public virtual Task DelegatePkiAsync(DelegatePkiRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Delete application privileges. + /// Delegate PKI authentication. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + /// + /// This API implements the exchange of an X509Certificate chain for an Elasticsearch access token. + /// The certificate chain is validated, according to RFC 5280, by sequentially considering the trust configuration of every installed PKI realm that has delegation.enabled set to true. + /// A successfully trusted client certificate is also subject to the validation of the subject distinguished name according to thw username_pattern of the respective realm. + /// + /// + /// This API is called by smart and trusted proxies, such as Kibana, which terminate the user's TLS session but still want to authenticate the user by using a PKI realm—-​as if the user connected directly to Elasticsearch. + /// + /// + /// IMPORTANT: The association between the subject public key in the target certificate and the corresponding private key is not validated. + /// This is part of the TLS authentication process and it is delegated to the proxy that calls this API. + /// The proxy is trusted to have performed the TLS authentication and this API translates that authentication into an Elasticsearch access token. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DelegatePkiResponse DelegatePki(DelegatePkiRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Delegate PKI authentication. + /// + /// + /// This API implements the exchange of an X509Certificate chain for an Elasticsearch access token. + /// The certificate chain is validated, according to RFC 5280, by sequentially considering the trust configuration of every installed PKI realm that has delegation.enabled set to true. + /// A successfully trusted client certificate is also subject to the validation of the subject distinguished name according to thw username_pattern of the respective realm. + /// + /// + /// This API is called by smart and trusted proxies, such as Kibana, which terminate the user's TLS session but still want to authenticate the user by using a PKI realm—-​as if the user connected directly to Elasticsearch. + /// + /// + /// IMPORTANT: The association between the subject public key in the target certificate and the corresponding private key is not validated. + /// This is part of the TLS authentication process and it is delegated to the proxy that calls this API. + /// The proxy is trusted to have performed the TLS authentication and this API translates that authentication into an Elasticsearch access token. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DelegatePkiResponse DelegatePki() + { + var descriptor = new DelegatePkiRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Delegate PKI authentication. + /// + /// + /// This API implements the exchange of an X509Certificate chain for an Elasticsearch access token. + /// The certificate chain is validated, according to RFC 5280, by sequentially considering the trust configuration of every installed PKI realm that has delegation.enabled set to true. + /// A successfully trusted client certificate is also subject to the validation of the subject distinguished name according to thw username_pattern of the respective realm. + /// + /// + /// This API is called by smart and trusted proxies, such as Kibana, which terminate the user's TLS session but still want to authenticate the user by using a PKI realm—-​as if the user connected directly to Elasticsearch. + /// + /// + /// IMPORTANT: The association between the subject public key in the target certificate and the corresponding private key is not validated. + /// This is part of the TLS authentication process and it is delegated to the proxy that calls this API. + /// The proxy is trusted to have performed the TLS authentication and this API translates that authentication into an Elasticsearch access token. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DelegatePkiResponse DelegatePki(Action configureRequest) + { + var descriptor = new DelegatePkiRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Delegate PKI authentication. + /// + /// + /// This API implements the exchange of an X509Certificate chain for an Elasticsearch access token. + /// The certificate chain is validated, according to RFC 5280, by sequentially considering the trust configuration of every installed PKI realm that has delegation.enabled set to true. + /// A successfully trusted client certificate is also subject to the validation of the subject distinguished name according to thw username_pattern of the respective realm. + /// + /// + /// This API is called by smart and trusted proxies, such as Kibana, which terminate the user's TLS session but still want to authenticate the user by using a PKI realm—-​as if the user connected directly to Elasticsearch. + /// + /// + /// IMPORTANT: The association between the subject public key in the target certificate and the corresponding private key is not validated. + /// This is part of the TLS authentication process and it is delegated to the proxy that calls this API. + /// The proxy is trusted to have performed the TLS authentication and this API translates that authentication into an Elasticsearch access token. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DelegatePkiAsync(DelegatePkiRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Delegate PKI authentication. + /// + /// + /// This API implements the exchange of an X509Certificate chain for an Elasticsearch access token. + /// The certificate chain is validated, according to RFC 5280, by sequentially considering the trust configuration of every installed PKI realm that has delegation.enabled set to true. + /// A successfully trusted client certificate is also subject to the validation of the subject distinguished name according to thw username_pattern of the respective realm. + /// + /// + /// This API is called by smart and trusted proxies, such as Kibana, which terminate the user's TLS session but still want to authenticate the user by using a PKI realm—-​as if the user connected directly to Elasticsearch. + /// + /// + /// IMPORTANT: The association between the subject public key in the target certificate and the corresponding private key is not validated. + /// This is part of the TLS authentication process and it is delegated to the proxy that calls this API. + /// The proxy is trusted to have performed the TLS authentication and this API translates that authentication into an Elasticsearch access token. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DelegatePkiAsync(CancellationToken cancellationToken = default) + { + var descriptor = new DelegatePkiRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Delegate PKI authentication. + /// + /// + /// This API implements the exchange of an X509Certificate chain for an Elasticsearch access token. + /// The certificate chain is validated, according to RFC 5280, by sequentially considering the trust configuration of every installed PKI realm that has delegation.enabled set to true. + /// A successfully trusted client certificate is also subject to the validation of the subject distinguished name according to thw username_pattern of the respective realm. + /// + /// + /// This API is called by smart and trusted proxies, such as Kibana, which terminate the user's TLS session but still want to authenticate the user by using a PKI realm—-​as if the user connected directly to Elasticsearch. + /// + /// + /// IMPORTANT: The association between the subject public key in the target certificate and the corresponding private key is not validated. + /// This is part of the TLS authentication process and it is delegated to the proxy that calls this API. + /// The proxy is trusted to have performed the TLS authentication and this API translates that authentication into an Elasticsearch access token. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DelegatePkiAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new DelegatePkiRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Delete application privileges. + /// + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_security cluster privilege (or a greater privilege such as all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeletePrivilegesResponse DeletePrivileges(DeletePrivilegesRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Delete application privileges. + /// + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_security cluster privilege (or a greater privilege such as all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeletePrivilegesAsync(DeletePrivilegesRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Delete application privileges. + /// + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_security cluster privilege (or a greater privilege such as all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeletePrivilegesResponse DeletePrivileges(DeletePrivilegesRequestDescriptor descriptor) { descriptor.BeforeRequest(); @@ -2588,7 +3748,22 @@ public virtual DeletePrivilegesResponse DeletePrivileges(DeletePrivilegesRequest /// /// Delete application privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_security cluster privilege (or a greater privilege such as all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeletePrivilegesResponse DeletePrivileges(Elastic.Clients.Elasticsearch.Name application, Elastic.Clients.Elasticsearch.Names name) @@ -2602,7 +3777,22 @@ public virtual DeletePrivilegesResponse DeletePrivileges(Elastic.Clients.Elastic /// /// Delete application privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_security cluster privilege (or a greater privilege such as all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeletePrivilegesResponse DeletePrivileges(Elastic.Clients.Elasticsearch.Name application, Elastic.Clients.Elasticsearch.Names name, Action configureRequest) @@ -2617,7 +3807,22 @@ public virtual DeletePrivilegesResponse DeletePrivileges(Elastic.Clients.Elastic /// /// Delete application privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_security cluster privilege (or a greater privilege such as all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeletePrivilegesAsync(DeletePrivilegesRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2629,7 +3834,22 @@ public virtual Task DeletePrivilegesAsync(DeletePrivil /// /// Delete application privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_security cluster privilege (or a greater privilege such as all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeletePrivilegesAsync(Elastic.Clients.Elasticsearch.Name application, Elastic.Clients.Elasticsearch.Names name, CancellationToken cancellationToken = default) { @@ -2642,7 +3862,22 @@ public virtual Task DeletePrivilegesAsync(Elastic.Clie /// /// Delete application privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_security cluster privilege (or a greater privilege such as all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeletePrivilegesAsync(Elastic.Clients.Elasticsearch.Name application, Elastic.Clients.Elasticsearch.Names name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -2658,8 +3893,10 @@ public virtual Task DeletePrivilegesAsync(Elastic.Clie /// /// /// Delete roles in the native realm. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The delete roles API cannot remove roles that are defined in roles files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteRoleResponse DeleteRole(DeleteRoleRequest request) @@ -2674,8 +3911,10 @@ public virtual DeleteRoleResponse DeleteRole(DeleteRoleRequest request) /// /// /// Delete roles in the native realm. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The delete roles API cannot remove roles that are defined in roles files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteRoleAsync(DeleteRoleRequest request, CancellationToken cancellationToken = default) { @@ -2689,8 +3928,10 @@ public virtual Task DeleteRoleAsync(DeleteRoleRequest reques /// /// /// Delete roles in the native realm. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The delete roles API cannot remove roles that are defined in roles files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteRoleResponse DeleteRole(DeleteRoleRequestDescriptor descriptor) @@ -2705,8 +3946,10 @@ public virtual DeleteRoleResponse DeleteRole(DeleteRoleRequestDescriptor descrip /// /// /// Delete roles in the native realm. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The delete roles API cannot remove roles that are defined in roles files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteRoleResponse DeleteRole(Elastic.Clients.Elasticsearch.Name name) @@ -2722,8 +3965,10 @@ public virtual DeleteRoleResponse DeleteRole(Elastic.Clients.Elasticsearch.Name /// /// /// Delete roles in the native realm. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The delete roles API cannot remove roles that are defined in roles files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteRoleResponse DeleteRole(Elastic.Clients.Elasticsearch.Name name, Action configureRequest) @@ -2740,8 +3985,10 @@ public virtual DeleteRoleResponse DeleteRole(Elastic.Clients.Elasticsearch.Name /// /// /// Delete roles in the native realm. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The delete roles API cannot remove roles that are defined in roles files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteRoleAsync(DeleteRoleRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2755,8 +4002,10 @@ public virtual Task DeleteRoleAsync(DeleteRoleRequestDescrip /// /// /// Delete roles in the native realm. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The delete roles API cannot remove roles that are defined in roles files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteRoleAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) { @@ -2771,8 +4020,10 @@ public virtual Task DeleteRoleAsync(Elastic.Clients.Elastics /// /// /// Delete roles in the native realm. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The delete roles API cannot remove roles that are defined in roles files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteRoleAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -2786,7 +4037,12 @@ public virtual Task DeleteRoleAsync(Elastic.Clients.Elastics /// /// Delete role mappings. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Role mappings define which roles are assigned to each user. + /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. + /// The delete role mappings API cannot remove role mappings that are defined in role mapping files. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteRoleMappingResponse DeleteRoleMapping(DeleteRoleMappingRequest request) @@ -2799,7 +4055,12 @@ public virtual DeleteRoleMappingResponse DeleteRoleMapping(DeleteRoleMappingRequ /// /// Delete role mappings. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Role mappings define which roles are assigned to each user. + /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. + /// The delete role mappings API cannot remove role mappings that are defined in role mapping files. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteRoleMappingAsync(DeleteRoleMappingRequest request, CancellationToken cancellationToken = default) { @@ -2811,7 +4072,12 @@ public virtual Task DeleteRoleMappingAsync(DeleteRole /// /// Delete role mappings. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Role mappings define which roles are assigned to each user. + /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. + /// The delete role mappings API cannot remove role mappings that are defined in role mapping files. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteRoleMappingResponse DeleteRoleMapping(DeleteRoleMappingRequestDescriptor descriptor) @@ -2824,7 +4090,12 @@ public virtual DeleteRoleMappingResponse DeleteRoleMapping(DeleteRoleMappingRequ /// /// Delete role mappings. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Role mappings define which roles are assigned to each user. + /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. + /// The delete role mappings API cannot remove role mappings that are defined in role mapping files. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteRoleMappingResponse DeleteRoleMapping(Elastic.Clients.Elasticsearch.Name name) @@ -2838,7 +4109,12 @@ public virtual DeleteRoleMappingResponse DeleteRoleMapping(Elastic.Clients.Elast /// /// Delete role mappings. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Role mappings define which roles are assigned to each user. + /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. + /// The delete role mappings API cannot remove role mappings that are defined in role mapping files. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteRoleMappingResponse DeleteRoleMapping(Elastic.Clients.Elasticsearch.Name name, Action configureRequest) @@ -2853,7 +4129,12 @@ public virtual DeleteRoleMappingResponse DeleteRoleMapping(Elastic.Clients.Elast /// /// Delete role mappings. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Role mappings define which roles are assigned to each user. + /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. + /// The delete role mappings API cannot remove role mappings that are defined in role mapping files. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteRoleMappingAsync(DeleteRoleMappingRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2865,7 +4146,12 @@ public virtual Task DeleteRoleMappingAsync(DeleteRole /// /// Delete role mappings. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Role mappings define which roles are assigned to each user. + /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. + /// The delete role mappings API cannot remove role mappings that are defined in role mapping files. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteRoleMappingAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) { @@ -2878,7 +4164,12 @@ public virtual Task DeleteRoleMappingAsync(Elastic.Cl /// /// Delete role mappings. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Role mappings define which roles are assigned to each user. + /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. + /// The delete role mappings API cannot remove role mappings that are defined in role mapping files. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteRoleMappingAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -2895,7 +4186,7 @@ public virtual Task DeleteRoleMappingAsync(Elastic.Cl /// /// Delete service account tokens for a service in a specified namespace. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteServiceTokenResponse DeleteServiceToken(DeleteServiceTokenRequest request) @@ -2911,7 +4202,7 @@ public virtual DeleteServiceTokenResponse DeleteServiceToken(DeleteServiceTokenR /// /// Delete service account tokens for a service in a specified namespace. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteServiceTokenAsync(DeleteServiceTokenRequest request, CancellationToken cancellationToken = default) { @@ -2926,7 +4217,7 @@ public virtual Task DeleteServiceTokenAsync(DeleteSe /// /// Delete service account tokens for a service in a specified namespace. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteServiceTokenResponse DeleteServiceToken(DeleteServiceTokenRequestDescriptor descriptor) @@ -2942,7 +4233,7 @@ public virtual DeleteServiceTokenResponse DeleteServiceToken(DeleteServiceTokenR /// /// Delete service account tokens for a service in a specified namespace. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteServiceTokenResponse DeleteServiceToken(string ns, string service, Elastic.Clients.Elasticsearch.Name name) @@ -2959,7 +4250,7 @@ public virtual DeleteServiceTokenResponse DeleteServiceToken(string ns, string s /// /// Delete service account tokens for a service in a specified namespace. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteServiceTokenResponse DeleteServiceToken(string ns, string service, Elastic.Clients.Elasticsearch.Name name, Action configureRequest) @@ -2977,7 +4268,7 @@ public virtual DeleteServiceTokenResponse DeleteServiceToken(string ns, string s /// /// Delete service account tokens for a service in a specified namespace. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteServiceTokenAsync(DeleteServiceTokenRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2992,7 +4283,7 @@ public virtual Task DeleteServiceTokenAsync(DeleteSe /// /// Delete service account tokens for a service in a specified namespace. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteServiceTokenAsync(string ns, string service, Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) { @@ -3008,7 +4299,7 @@ public virtual Task DeleteServiceTokenAsync(string n /// /// Delete service account tokens for a service in a specified namespace. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteServiceTokenAsync(string ns, string service, Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -3025,7 +4316,7 @@ public virtual Task DeleteServiceTokenAsync(string n /// /// Delete users from the native realm. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteUserResponse DeleteUser(DeleteUserRequest request) @@ -3041,7 +4332,7 @@ public virtual DeleteUserResponse DeleteUser(DeleteUserRequest request) /// /// Delete users from the native realm. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteUserAsync(DeleteUserRequest request, CancellationToken cancellationToken = default) { @@ -3056,7 +4347,7 @@ public virtual Task DeleteUserAsync(DeleteUserRequest reques /// /// Delete users from the native realm. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteUserResponse DeleteUser(DeleteUserRequestDescriptor descriptor) @@ -3072,7 +4363,7 @@ public virtual DeleteUserResponse DeleteUser(DeleteUserRequestDescriptor descrip /// /// Delete users from the native realm. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteUserResponse DeleteUser(Elastic.Clients.Elasticsearch.Username username) @@ -3089,7 +4380,7 @@ public virtual DeleteUserResponse DeleteUser(Elastic.Clients.Elasticsearch.Usern /// /// Delete users from the native realm. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteUserResponse DeleteUser(Elastic.Clients.Elasticsearch.Username username, Action configureRequest) @@ -3107,7 +4398,7 @@ public virtual DeleteUserResponse DeleteUser(Elastic.Clients.Elasticsearch.Usern /// /// Delete users from the native realm. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteUserAsync(DeleteUserRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3122,7 +4413,7 @@ public virtual Task DeleteUserAsync(DeleteUserRequestDescrip /// /// Delete users from the native realm. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteUserAsync(Elastic.Clients.Elasticsearch.Username username, CancellationToken cancellationToken = default) { @@ -3138,7 +4429,7 @@ public virtual Task DeleteUserAsync(Elastic.Clients.Elastics /// /// Delete users from the native realm. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteUserAsync(Elastic.Clients.Elasticsearch.Username username, Action configureRequest, CancellationToken cancellationToken = default) { @@ -3154,8 +4445,10 @@ public virtual Task DeleteUserAsync(Elastic.Clients.Elastics /// /// /// Disable users in the native realm. + /// By default, when you create users, they are enabled. + /// You can use this API to revoke a user's access to Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DisableUserResponse DisableUser(DisableUserRequest request) @@ -3170,8 +4463,10 @@ public virtual DisableUserResponse DisableUser(DisableUserRequest request) /// /// /// Disable users in the native realm. + /// By default, when you create users, they are enabled. + /// You can use this API to revoke a user's access to Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DisableUserAsync(DisableUserRequest request, CancellationToken cancellationToken = default) { @@ -3185,8 +4480,10 @@ public virtual Task DisableUserAsync(DisableUserRequest req /// /// /// Disable users in the native realm. + /// By default, when you create users, they are enabled. + /// You can use this API to revoke a user's access to Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DisableUserResponse DisableUser(DisableUserRequestDescriptor descriptor) @@ -3201,8 +4498,10 @@ public virtual DisableUserResponse DisableUser(DisableUserRequestDescriptor desc /// /// /// Disable users in the native realm. + /// By default, when you create users, they are enabled. + /// You can use this API to revoke a user's access to Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DisableUserResponse DisableUser(Elastic.Clients.Elasticsearch.Username username) @@ -3218,8 +4517,10 @@ public virtual DisableUserResponse DisableUser(Elastic.Clients.Elasticsearch.Use /// /// /// Disable users in the native realm. + /// By default, when you create users, they are enabled. + /// You can use this API to revoke a user's access to Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DisableUserResponse DisableUser(Elastic.Clients.Elasticsearch.Username username, Action configureRequest) @@ -3236,8 +4537,10 @@ public virtual DisableUserResponse DisableUser(Elastic.Clients.Elasticsearch.Use /// /// /// Disable users in the native realm. + /// By default, when you create users, they are enabled. + /// You can use this API to revoke a user's access to Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DisableUserAsync(DisableUserRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3251,8 +4554,10 @@ public virtual Task DisableUserAsync(DisableUserRequestDesc /// /// /// Disable users in the native realm. + /// By default, when you create users, they are enabled. + /// You can use this API to revoke a user's access to Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DisableUserAsync(Elastic.Clients.Elasticsearch.Username username, CancellationToken cancellationToken = default) { @@ -3267,8 +4572,10 @@ public virtual Task DisableUserAsync(Elastic.Clients.Elasti /// /// /// Disable users in the native realm. + /// By default, when you create users, they are enabled. + /// You can use this API to revoke a user's access to Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DisableUserAsync(Elastic.Clients.Elasticsearch.Username username, Action configureRequest, CancellationToken cancellationToken = default) { @@ -3285,7 +4592,16 @@ public virtual Task DisableUserAsync(Elastic.Clients.Elasti /// /// Disable user profiles so that they are not visible in user profile searches. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// When you activate a user profile, its automatically enabled and visible in user profile searches. You can use the disable user profile API to disable a user profile so it’s not visible in these searches. + /// To re-enable a disabled user profile, use the enable user profile API . + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DisableUserProfileResponse DisableUserProfile(DisableUserProfileRequest request) @@ -3301,8 +4617,17 @@ public virtual DisableUserProfileResponse DisableUserProfile(DisableUserProfileR /// /// Disable user profiles so that they are not visible in user profile searches. /// - /// Learn more about this API in the Elasticsearch documentation. - /// + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// When you activate a user profile, its automatically enabled and visible in user profile searches. You can use the disable user profile API to disable a user profile so it’s not visible in these searches. + /// To re-enable a disabled user profile, use the enable user profile API . + /// + /// Learn more about this API in the Elasticsearch documentation. + /// public virtual Task DisableUserProfileAsync(DisableUserProfileRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); @@ -3316,7 +4641,16 @@ public virtual Task DisableUserProfileAsync(DisableU /// /// Disable user profiles so that they are not visible in user profile searches. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// When you activate a user profile, its automatically enabled and visible in user profile searches. You can use the disable user profile API to disable a user profile so it’s not visible in these searches. + /// To re-enable a disabled user profile, use the enable user profile API . + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DisableUserProfileResponse DisableUserProfile(DisableUserProfileRequestDescriptor descriptor) @@ -3332,7 +4666,16 @@ public virtual DisableUserProfileResponse DisableUserProfile(DisableUserProfileR /// /// Disable user profiles so that they are not visible in user profile searches. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// When you activate a user profile, its automatically enabled and visible in user profile searches. You can use the disable user profile API to disable a user profile so it’s not visible in these searches. + /// To re-enable a disabled user profile, use the enable user profile API . + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DisableUserProfileResponse DisableUserProfile(string uid) @@ -3349,7 +4692,16 @@ public virtual DisableUserProfileResponse DisableUserProfile(string uid) /// /// Disable user profiles so that they are not visible in user profile searches. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// When you activate a user profile, its automatically enabled and visible in user profile searches. You can use the disable user profile API to disable a user profile so it’s not visible in these searches. + /// To re-enable a disabled user profile, use the enable user profile API . + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DisableUserProfileResponse DisableUserProfile(string uid, Action configureRequest) @@ -3367,7 +4719,16 @@ public virtual DisableUserProfileResponse DisableUserProfile(string uid, Action< /// /// Disable user profiles so that they are not visible in user profile searches. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// When you activate a user profile, its automatically enabled and visible in user profile searches. You can use the disable user profile API to disable a user profile so it’s not visible in these searches. + /// To re-enable a disabled user profile, use the enable user profile API . + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DisableUserProfileAsync(DisableUserProfileRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3382,7 +4743,16 @@ public virtual Task DisableUserProfileAsync(DisableU /// /// Disable user profiles so that they are not visible in user profile searches. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// When you activate a user profile, its automatically enabled and visible in user profile searches. You can use the disable user profile API to disable a user profile so it’s not visible in these searches. + /// To re-enable a disabled user profile, use the enable user profile API . + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DisableUserProfileAsync(string uid, CancellationToken cancellationToken = default) { @@ -3398,7 +4768,16 @@ public virtual Task DisableUserProfileAsync(string u /// /// Disable user profiles so that they are not visible in user profile searches. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// When you activate a user profile, its automatically enabled and visible in user profile searches. You can use the disable user profile API to disable a user profile so it’s not visible in these searches. + /// To re-enable a disabled user profile, use the enable user profile API . + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DisableUserProfileAsync(string uid, Action configureRequest, CancellationToken cancellationToken = default) { @@ -3414,8 +4793,9 @@ public virtual Task DisableUserProfileAsync(string u /// /// /// Enable users in the native realm. + /// By default, when you create users, they are enabled. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual EnableUserResponse EnableUser(EnableUserRequest request) @@ -3430,8 +4810,9 @@ public virtual EnableUserResponse EnableUser(EnableUserRequest request) /// /// /// Enable users in the native realm. + /// By default, when you create users, they are enabled. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task EnableUserAsync(EnableUserRequest request, CancellationToken cancellationToken = default) { @@ -3445,8 +4826,9 @@ public virtual Task EnableUserAsync(EnableUserRequest reques /// /// /// Enable users in the native realm. + /// By default, when you create users, they are enabled. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual EnableUserResponse EnableUser(EnableUserRequestDescriptor descriptor) @@ -3461,8 +4843,9 @@ public virtual EnableUserResponse EnableUser(EnableUserRequestDescriptor descrip /// /// /// Enable users in the native realm. + /// By default, when you create users, they are enabled. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual EnableUserResponse EnableUser(Elastic.Clients.Elasticsearch.Username username) @@ -3478,8 +4861,9 @@ public virtual EnableUserResponse EnableUser(Elastic.Clients.Elasticsearch.Usern /// /// /// Enable users in the native realm. + /// By default, when you create users, they are enabled. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual EnableUserResponse EnableUser(Elastic.Clients.Elasticsearch.Username username, Action configureRequest) @@ -3496,8 +4880,9 @@ public virtual EnableUserResponse EnableUser(Elastic.Clients.Elasticsearch.Usern /// /// /// Enable users in the native realm. + /// By default, when you create users, they are enabled. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task EnableUserAsync(EnableUserRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3511,8 +4896,9 @@ public virtual Task EnableUserAsync(EnableUserRequestDescrip /// /// /// Enable users in the native realm. + /// By default, when you create users, they are enabled. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task EnableUserAsync(Elastic.Clients.Elasticsearch.Username username, CancellationToken cancellationToken = default) { @@ -3527,8 +4913,9 @@ public virtual Task EnableUserAsync(Elastic.Clients.Elastics /// /// /// Enable users in the native realm. + /// By default, when you create users, they are enabled. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task EnableUserAsync(Elastic.Clients.Elasticsearch.Username username, Action configureRequest, CancellationToken cancellationToken = default) { @@ -3545,7 +4932,16 @@ public virtual Task EnableUserAsync(Elastic.Clients.Elastics /// /// Enable user profiles to make them visible in user profile searches. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// When you activate a user profile, it's automatically enabled and visible in user profile searches. + /// If you later disable the user profile, you can use the enable user profile API to make the profile visible in these searches again. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual EnableUserProfileResponse EnableUserProfile(EnableUserProfileRequest request) @@ -3561,7 +4957,16 @@ public virtual EnableUserProfileResponse EnableUserProfile(EnableUserProfileRequ /// /// Enable user profiles to make them visible in user profile searches. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// When you activate a user profile, it's automatically enabled and visible in user profile searches. + /// If you later disable the user profile, you can use the enable user profile API to make the profile visible in these searches again. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task EnableUserProfileAsync(EnableUserProfileRequest request, CancellationToken cancellationToken = default) { @@ -3576,7 +4981,16 @@ public virtual Task EnableUserProfileAsync(EnableUser /// /// Enable user profiles to make them visible in user profile searches. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// When you activate a user profile, it's automatically enabled and visible in user profile searches. + /// If you later disable the user profile, you can use the enable user profile API to make the profile visible in these searches again. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual EnableUserProfileResponse EnableUserProfile(EnableUserProfileRequestDescriptor descriptor) @@ -3592,7 +5006,16 @@ public virtual EnableUserProfileResponse EnableUserProfile(EnableUserProfileRequ /// /// Enable user profiles to make them visible in user profile searches. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// When you activate a user profile, it's automatically enabled and visible in user profile searches. + /// If you later disable the user profile, you can use the enable user profile API to make the profile visible in these searches again. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual EnableUserProfileResponse EnableUserProfile(string uid) @@ -3609,7 +5032,16 @@ public virtual EnableUserProfileResponse EnableUserProfile(string uid) /// /// Enable user profiles to make them visible in user profile searches. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// When you activate a user profile, it's automatically enabled and visible in user profile searches. + /// If you later disable the user profile, you can use the enable user profile API to make the profile visible in these searches again. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual EnableUserProfileResponse EnableUserProfile(string uid, Action configureRequest) @@ -3627,7 +5059,16 @@ public virtual EnableUserProfileResponse EnableUserProfile(string uid, Action /// Enable user profiles to make them visible in user profile searches. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// When you activate a user profile, it's automatically enabled and visible in user profile searches. + /// If you later disable the user profile, you can use the enable user profile API to make the profile visible in these searches again. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task EnableUserProfileAsync(EnableUserProfileRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3642,7 +5083,16 @@ public virtual Task EnableUserProfileAsync(EnableUser /// /// Enable user profiles to make them visible in user profile searches. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// When you activate a user profile, it's automatically enabled and visible in user profile searches. + /// If you later disable the user profile, you can use the enable user profile API to make the profile visible in these searches again. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task EnableUserProfileAsync(string uid, CancellationToken cancellationToken = default) { @@ -3658,7 +5108,16 @@ public virtual Task EnableUserProfileAsync(string uid /// /// Enable user profiles to make them visible in user profile searches. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// When you activate a user profile, it's automatically enabled and visible in user profile searches. + /// If you later disable the user profile, you can use the enable user profile API to make the profile visible in these searches again. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task EnableUserProfileAsync(string uid, Action configureRequest, CancellationToken cancellationToken = default) { @@ -3675,7 +5134,11 @@ public virtual Task EnableUserProfileAsync(string uid /// /// Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: This API is currently intended for internal use only by Kibana. + /// Kibana uses this API internally to configure itself for communications with an Elasticsearch cluster that already has security features enabled. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual EnrollKibanaResponse EnrollKibana(EnrollKibanaRequest request) @@ -3691,7 +5154,11 @@ public virtual EnrollKibanaResponse EnrollKibana(EnrollKibanaRequest request) /// /// Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: This API is currently intended for internal use only by Kibana. + /// Kibana uses this API internally to configure itself for communications with an Elasticsearch cluster that already has security features enabled. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task EnrollKibanaAsync(EnrollKibanaRequest request, CancellationToken cancellationToken = default) { @@ -3706,7 +5173,11 @@ public virtual Task EnrollKibanaAsync(EnrollKibanaRequest /// /// Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: This API is currently intended for internal use only by Kibana. + /// Kibana uses this API internally to configure itself for communications with an Elasticsearch cluster that already has security features enabled. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual EnrollKibanaResponse EnrollKibana(EnrollKibanaRequestDescriptor descriptor) @@ -3722,7 +5193,11 @@ public virtual EnrollKibanaResponse EnrollKibana(EnrollKibanaRequestDescriptor d /// /// Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: This API is currently intended for internal use only by Kibana. + /// Kibana uses this API internally to configure itself for communications with an Elasticsearch cluster that already has security features enabled. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual EnrollKibanaResponse EnrollKibana() @@ -3739,7 +5214,11 @@ public virtual EnrollKibanaResponse EnrollKibana() /// /// Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: This API is currently intended for internal use only by Kibana. + /// Kibana uses this API internally to configure itself for communications with an Elasticsearch cluster that already has security features enabled. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual EnrollKibanaResponse EnrollKibana(Action configureRequest) @@ -3757,7 +5236,11 @@ public virtual EnrollKibanaResponse EnrollKibana(Action /// Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: This API is currently intended for internal use only by Kibana. + /// Kibana uses this API internally to configure itself for communications with an Elasticsearch cluster that already has security features enabled. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task EnrollKibanaAsync(EnrollKibanaRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3772,7 +5255,11 @@ public virtual Task EnrollKibanaAsync(EnrollKibanaRequestD /// /// Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: This API is currently intended for internal use only by Kibana. + /// Kibana uses this API internally to configure itself for communications with an Elasticsearch cluster that already has security features enabled. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task EnrollKibanaAsync(CancellationToken cancellationToken = default) { @@ -3788,7 +5275,11 @@ public virtual Task EnrollKibanaAsync(CancellationToken ca /// /// Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: This API is currently intended for internal use only by Kibana. + /// Kibana uses this API internally to configure itself for communications with an Elasticsearch cluster that already has security features enabled. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task EnrollKibanaAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -3805,7 +5296,11 @@ public virtual Task EnrollKibanaAsync(Action /// Enroll a new node to allow it to join an existing cluster with security features enabled. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// The response contains all the necessary information for the joining node to bootstrap discovery and security related settings so that it can successfully join the cluster. + /// The response contains key and certificate material that allows the caller to generate valid signed certificates for the HTTP layer of all nodes in the cluster. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual EnrollNodeResponse EnrollNode(EnrollNodeRequest request) @@ -3821,7 +5316,11 @@ public virtual EnrollNodeResponse EnrollNode(EnrollNodeRequest request) /// /// Enroll a new node to allow it to join an existing cluster with security features enabled. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// The response contains all the necessary information for the joining node to bootstrap discovery and security related settings so that it can successfully join the cluster. + /// The response contains key and certificate material that allows the caller to generate valid signed certificates for the HTTP layer of all nodes in the cluster. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task EnrollNodeAsync(EnrollNodeRequest request, CancellationToken cancellationToken = default) { @@ -3836,7 +5335,11 @@ public virtual Task EnrollNodeAsync(EnrollNodeRequest reques /// /// Enroll a new node to allow it to join an existing cluster with security features enabled. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// The response contains all the necessary information for the joining node to bootstrap discovery and security related settings so that it can successfully join the cluster. + /// The response contains key and certificate material that allows the caller to generate valid signed certificates for the HTTP layer of all nodes in the cluster. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual EnrollNodeResponse EnrollNode(EnrollNodeRequestDescriptor descriptor) @@ -3852,7 +5355,11 @@ public virtual EnrollNodeResponse EnrollNode(EnrollNodeRequestDescriptor descrip /// /// Enroll a new node to allow it to join an existing cluster with security features enabled. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// The response contains all the necessary information for the joining node to bootstrap discovery and security related settings so that it can successfully join the cluster. + /// The response contains key and certificate material that allows the caller to generate valid signed certificates for the HTTP layer of all nodes in the cluster. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual EnrollNodeResponse EnrollNode() @@ -3869,7 +5376,11 @@ public virtual EnrollNodeResponse EnrollNode() /// /// Enroll a new node to allow it to join an existing cluster with security features enabled. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// The response contains all the necessary information for the joining node to bootstrap discovery and security related settings so that it can successfully join the cluster. + /// The response contains key and certificate material that allows the caller to generate valid signed certificates for the HTTP layer of all nodes in the cluster. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual EnrollNodeResponse EnrollNode(Action configureRequest) @@ -3887,7 +5398,11 @@ public virtual EnrollNodeResponse EnrollNode(Action /// /// Enroll a new node to allow it to join an existing cluster with security features enabled. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// The response contains all the necessary information for the joining node to bootstrap discovery and security related settings so that it can successfully join the cluster. + /// The response contains key and certificate material that allows the caller to generate valid signed certificates for the HTTP layer of all nodes in the cluster. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task EnrollNodeAsync(EnrollNodeRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -3902,7 +5417,11 @@ public virtual Task EnrollNodeAsync(EnrollNodeRequestDescrip /// /// Enroll a new node to allow it to join an existing cluster with security features enabled. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// The response contains all the necessary information for the joining node to bootstrap discovery and security related settings so that it can successfully join the cluster. + /// The response contains key and certificate material that allows the caller to generate valid signed certificates for the HTTP layer of all nodes in the cluster. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task EnrollNodeAsync(CancellationToken cancellationToken = default) { @@ -3918,7 +5437,11 @@ public virtual Task EnrollNodeAsync(CancellationToken cancel /// /// Enroll a new node to allow it to join an existing cluster with security features enabled. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// The response contains all the necessary information for the joining node to bootstrap discovery and security related settings so that it can successfully join the cluster. + /// The response contains key and certificate material that allows the caller to generate valid signed certificates for the HTTP layer of all nodes in the cluster. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task EnrollNodeAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -3937,7 +5460,7 @@ public virtual Task EnrollNodeAsync(Actionmanage_own_api_key privilege, this API returns only the API keys that you own. /// If you have read_security, manage_api_key or greater privileges (including manage_security), this API returns all API keys regardless of ownership. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetApiKeyResponse GetApiKey(GetApiKeyRequest request) @@ -3955,7 +5478,7 @@ public virtual GetApiKeyResponse GetApiKey(GetApiKeyRequest request) /// NOTE: If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. /// If you have read_security, manage_api_key or greater privileges (including manage_security), this API returns all API keys regardless of ownership. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetApiKeyAsync(GetApiKeyRequest request, CancellationToken cancellationToken = default) { @@ -3972,7 +5495,7 @@ public virtual Task GetApiKeyAsync(GetApiKeyRequest request, /// NOTE: If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. /// If you have read_security, manage_api_key or greater privileges (including manage_security), this API returns all API keys regardless of ownership. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetApiKeyResponse GetApiKey(GetApiKeyRequestDescriptor descriptor) @@ -3990,7 +5513,7 @@ public virtual GetApiKeyResponse GetApiKey(GetApiKeyRequestDescriptor descriptor /// NOTE: If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. /// If you have read_security, manage_api_key or greater privileges (including manage_security), this API returns all API keys regardless of ownership. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetApiKeyResponse GetApiKey() @@ -4009,7 +5532,7 @@ public virtual GetApiKeyResponse GetApiKey() /// NOTE: If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. /// If you have read_security, manage_api_key or greater privileges (including manage_security), this API returns all API keys regardless of ownership. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetApiKeyResponse GetApiKey(Action configureRequest) @@ -4029,7 +5552,7 @@ public virtual GetApiKeyResponse GetApiKey(Action co /// NOTE: If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. /// If you have read_security, manage_api_key or greater privileges (including manage_security), this API returns all API keys regardless of ownership. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetApiKeyAsync(GetApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -4046,7 +5569,7 @@ public virtual Task GetApiKeyAsync(GetApiKeyRequestDescriptor /// NOTE: If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. /// If you have read_security, manage_api_key or greater privileges (including manage_security), this API returns all API keys regardless of ownership. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetApiKeyAsync(CancellationToken cancellationToken = default) { @@ -4064,7 +5587,7 @@ public virtual Task GetApiKeyAsync(CancellationToken cancella /// NOTE: If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. /// If you have read_security, manage_api_key or greater privileges (including manage_security), this API returns all API keys regardless of ownership. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetApiKeyAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -4081,7 +5604,7 @@ public virtual Task GetApiKeyAsync(Action /// Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetBuiltinPrivilegesResponse GetBuiltinPrivileges(GetBuiltinPrivilegesRequest request) @@ -4097,7 +5620,7 @@ public virtual GetBuiltinPrivilegesResponse GetBuiltinPrivileges(GetBuiltinPrivi /// /// Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetBuiltinPrivilegesAsync(GetBuiltinPrivilegesRequest request, CancellationToken cancellationToken = default) { @@ -4112,7 +5635,7 @@ public virtual Task GetBuiltinPrivilegesAsync(GetB /// /// Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetBuiltinPrivilegesResponse GetBuiltinPrivileges(GetBuiltinPrivilegesRequestDescriptor descriptor) @@ -4128,7 +5651,7 @@ public virtual GetBuiltinPrivilegesResponse GetBuiltinPrivileges(GetBuiltinPrivi /// /// Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetBuiltinPrivilegesResponse GetBuiltinPrivileges() @@ -4145,7 +5668,7 @@ public virtual GetBuiltinPrivilegesResponse GetBuiltinPrivileges() /// /// Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetBuiltinPrivilegesResponse GetBuiltinPrivileges(Action configureRequest) @@ -4163,7 +5686,7 @@ public virtual GetBuiltinPrivilegesResponse GetBuiltinPrivileges(Action /// Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetBuiltinPrivilegesAsync(GetBuiltinPrivilegesRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -4178,7 +5701,7 @@ public virtual Task GetBuiltinPrivilegesAsync(GetB /// /// Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetBuiltinPrivilegesAsync(CancellationToken cancellationToken = default) { @@ -4194,7 +5717,7 @@ public virtual Task GetBuiltinPrivilegesAsync(Canc /// /// Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetBuiltinPrivilegesAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -4208,7 +5731,22 @@ public virtual Task GetBuiltinPrivilegesAsync(Acti /// /// Get application privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The read_security cluster privilege (or a greater privilege such as manage_security or all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetPrivilegesResponse GetPrivileges(GetPrivilegesRequest request) @@ -4221,7 +5759,22 @@ public virtual GetPrivilegesResponse GetPrivileges(GetPrivilegesRequest request) /// /// Get application privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The read_security cluster privilege (or a greater privilege such as manage_security or all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetPrivilegesAsync(GetPrivilegesRequest request, CancellationToken cancellationToken = default) { @@ -4233,7 +5786,22 @@ public virtual Task GetPrivilegesAsync(GetPrivilegesReque /// /// Get application privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The read_security cluster privilege (or a greater privilege such as manage_security or all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetPrivilegesResponse GetPrivileges(GetPrivilegesRequestDescriptor descriptor) @@ -4246,7 +5814,22 @@ public virtual GetPrivilegesResponse GetPrivileges(GetPrivilegesRequestDescripto /// /// Get application privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The read_security cluster privilege (or a greater privilege such as manage_security or all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetPrivilegesResponse GetPrivileges(Elastic.Clients.Elasticsearch.Name? application, Elastic.Clients.Elasticsearch.Names? name) @@ -4260,7 +5843,22 @@ public virtual GetPrivilegesResponse GetPrivileges(Elastic.Clients.Elasticsearch /// /// Get application privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The read_security cluster privilege (or a greater privilege such as manage_security or all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetPrivilegesResponse GetPrivileges(Elastic.Clients.Elasticsearch.Name? application, Elastic.Clients.Elasticsearch.Names? name, Action configureRequest) @@ -4275,7 +5873,22 @@ public virtual GetPrivilegesResponse GetPrivileges(Elastic.Clients.Elasticsearch /// /// Get application privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The read_security cluster privilege (or a greater privilege such as manage_security or all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetPrivilegesResponse GetPrivileges() @@ -4289,7 +5902,22 @@ public virtual GetPrivilegesResponse GetPrivileges() /// /// Get application privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The read_security cluster privilege (or a greater privilege such as manage_security or all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetPrivilegesResponse GetPrivileges(Action configureRequest) @@ -4304,7 +5932,22 @@ public virtual GetPrivilegesResponse GetPrivileges(Action /// Get application privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The read_security cluster privilege (or a greater privilege such as manage_security or all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetPrivilegesAsync(GetPrivilegesRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -4316,7 +5959,22 @@ public virtual Task GetPrivilegesAsync(GetPrivilegesReque /// /// Get application privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The read_security cluster privilege (or a greater privilege such as manage_security or all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetPrivilegesAsync(Elastic.Clients.Elasticsearch.Name? application, Elastic.Clients.Elasticsearch.Names? name, CancellationToken cancellationToken = default) { @@ -4329,7 +5987,22 @@ public virtual Task GetPrivilegesAsync(Elastic.Clients.El /// /// Get application privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The read_security cluster privilege (or a greater privilege such as manage_security or all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetPrivilegesAsync(Elastic.Clients.Elasticsearch.Name? application, Elastic.Clients.Elasticsearch.Names? name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -4343,7 +6016,22 @@ public virtual Task GetPrivilegesAsync(Elastic.Clients.El /// /// Get application privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The read_security cluster privilege (or a greater privilege such as manage_security or all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetPrivilegesAsync(CancellationToken cancellationToken = default) { @@ -4356,7 +6044,22 @@ public virtual Task GetPrivilegesAsync(CancellationToken /// /// Get application privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The read_security cluster privilege (or a greater privilege such as manage_security or all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetPrivilegesAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -4372,8 +6075,10 @@ public virtual Task GetPrivilegesAsync(Action /// /// Get roles in the native realm. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The get roles API cannot retrieve roles that are defined in roles files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRoleResponse GetRole(GetRoleRequest request) @@ -4388,8 +6093,10 @@ public virtual GetRoleResponse GetRole(GetRoleRequest request) /// /// /// Get roles in the native realm. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The get roles API cannot retrieve roles that are defined in roles files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRoleAsync(GetRoleRequest request, CancellationToken cancellationToken = default) { @@ -4403,8 +6110,10 @@ public virtual Task GetRoleAsync(GetRoleRequest request, Cancel /// /// /// Get roles in the native realm. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The get roles API cannot retrieve roles that are defined in roles files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRoleResponse GetRole(GetRoleRequestDescriptor descriptor) @@ -4419,8 +6128,10 @@ public virtual GetRoleResponse GetRole(GetRoleRequestDescriptor descriptor) /// /// /// Get roles in the native realm. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The get roles API cannot retrieve roles that are defined in roles files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRoleResponse GetRole(Elastic.Clients.Elasticsearch.Names? name) @@ -4436,8 +6147,10 @@ public virtual GetRoleResponse GetRole(Elastic.Clients.Elasticsearch.Names? name /// /// /// Get roles in the native realm. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The get roles API cannot retrieve roles that are defined in roles files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRoleResponse GetRole(Elastic.Clients.Elasticsearch.Names? name, Action configureRequest) @@ -4454,8 +6167,10 @@ public virtual GetRoleResponse GetRole(Elastic.Clients.Elasticsearch.Names? name /// /// /// Get roles in the native realm. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The get roles API cannot retrieve roles that are defined in roles files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRoleResponse GetRole() @@ -4471,8 +6186,10 @@ public virtual GetRoleResponse GetRole() /// /// /// Get roles in the native realm. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The get roles API cannot retrieve roles that are defined in roles files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRoleResponse GetRole(Action configureRequest) @@ -4489,8 +6206,10 @@ public virtual GetRoleResponse GetRole(Action configur /// /// /// Get roles in the native realm. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The get roles API cannot retrieve roles that are defined in roles files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRoleAsync(GetRoleRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -4504,8 +6223,10 @@ public virtual Task GetRoleAsync(GetRoleRequestDescriptor descr /// /// /// Get roles in the native realm. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The get roles API cannot retrieve roles that are defined in roles files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRoleAsync(Elastic.Clients.Elasticsearch.Names? name, CancellationToken cancellationToken = default) { @@ -4520,8 +6241,10 @@ public virtual Task GetRoleAsync(Elastic.Clients.Elasticsearch. /// /// /// Get roles in the native realm. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The get roles API cannot retrieve roles that are defined in roles files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRoleAsync(Elastic.Clients.Elasticsearch.Names? name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -4537,8 +6260,10 @@ public virtual Task GetRoleAsync(Elastic.Clients.Elasticsearch. /// /// /// Get roles in the native realm. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The get roles API cannot retrieve roles that are defined in roles files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRoleAsync(CancellationToken cancellationToken = default) { @@ -4553,8 +6278,10 @@ public virtual Task GetRoleAsync(CancellationToken cancellation /// /// /// Get roles in the native realm. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The get roles API cannot retrieve roles that are defined in roles files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRoleAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -4573,7 +6300,7 @@ public virtual Task GetRoleAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRoleMappingResponse GetRoleMapping(GetRoleMappingRequest request) @@ -4591,7 +6318,7 @@ public virtual GetRoleMappingResponse GetRoleMapping(GetRoleMappingRequest reque /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. /// The get role mappings API cannot retrieve role mappings that are defined in role mapping files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRoleMappingAsync(GetRoleMappingRequest request, CancellationToken cancellationToken = default) { @@ -4608,7 +6335,7 @@ public virtual Task GetRoleMappingAsync(GetRoleMappingRe /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. /// The get role mappings API cannot retrieve role mappings that are defined in role mapping files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRoleMappingResponse GetRoleMapping(GetRoleMappingRequestDescriptor descriptor) @@ -4626,7 +6353,7 @@ public virtual GetRoleMappingResponse GetRoleMapping(GetRoleMappingRequestDescri /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. /// The get role mappings API cannot retrieve role mappings that are defined in role mapping files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRoleMappingResponse GetRoleMapping(Elastic.Clients.Elasticsearch.Names? name) @@ -4645,7 +6372,7 @@ public virtual GetRoleMappingResponse GetRoleMapping(Elastic.Clients.Elasticsear /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. /// The get role mappings API cannot retrieve role mappings that are defined in role mapping files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRoleMappingResponse GetRoleMapping(Elastic.Clients.Elasticsearch.Names? name, Action configureRequest) @@ -4665,7 +6392,7 @@ public virtual GetRoleMappingResponse GetRoleMapping(Elastic.Clients.Elasticsear /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. /// The get role mappings API cannot retrieve role mappings that are defined in role mapping files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRoleMappingResponse GetRoleMapping() @@ -4684,7 +6411,7 @@ public virtual GetRoleMappingResponse GetRoleMapping() /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. /// The get role mappings API cannot retrieve role mappings that are defined in role mapping files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetRoleMappingResponse GetRoleMapping(Action configureRequest) @@ -4704,7 +6431,7 @@ public virtual GetRoleMappingResponse GetRoleMapping(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRoleMappingAsync(GetRoleMappingRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -4721,7 +6448,7 @@ public virtual Task GetRoleMappingAsync(GetRoleMappingRe /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. /// The get role mappings API cannot retrieve role mappings that are defined in role mapping files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRoleMappingAsync(Elastic.Clients.Elasticsearch.Names? name, CancellationToken cancellationToken = default) { @@ -4739,7 +6466,7 @@ public virtual Task GetRoleMappingAsync(Elastic.Clients. /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. /// The get role mappings API cannot retrieve role mappings that are defined in role mapping files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRoleMappingAsync(Elastic.Clients.Elasticsearch.Names? name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -4758,7 +6485,7 @@ public virtual Task GetRoleMappingAsync(Elastic.Clients. /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. /// The get role mappings API cannot retrieve role mappings that are defined in role mapping files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRoleMappingAsync(CancellationToken cancellationToken = default) { @@ -4776,7 +6503,7 @@ public virtual Task GetRoleMappingAsync(CancellationToke /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. /// The get role mappings API cannot retrieve role mappings that are defined in role mapping files. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetRoleMappingAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -4793,7 +6520,10 @@ public virtual Task GetRoleMappingAsync(Action /// Get a list of service accounts that match the provided path parameters. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Currently, only the elastic/fleet-server service account is available. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetServiceAccountsResponse GetServiceAccounts(GetServiceAccountsRequest request) @@ -4809,7 +6539,10 @@ public virtual GetServiceAccountsResponse GetServiceAccounts(GetServiceAccountsR /// /// Get a list of service accounts that match the provided path parameters. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Currently, only the elastic/fleet-server service account is available. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetServiceAccountsAsync(GetServiceAccountsRequest request, CancellationToken cancellationToken = default) { @@ -4824,7 +6557,10 @@ public virtual Task GetServiceAccountsAsync(GetServi /// /// Get a list of service accounts that match the provided path parameters. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Currently, only the elastic/fleet-server service account is available. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetServiceAccountsResponse GetServiceAccounts(GetServiceAccountsRequestDescriptor descriptor) @@ -4840,8 +6576,11 @@ public virtual GetServiceAccountsResponse GetServiceAccounts(GetServiceAccountsR /// /// Get a list of service accounts that match the provided path parameters. /// - /// Learn more about this API in the Elasticsearch documentation. - /// + /// + /// NOTE: Currently, only the elastic/fleet-server service account is available. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetServiceAccountsResponse GetServiceAccounts(string? ns, string? service) { @@ -4857,7 +6596,10 @@ public virtual GetServiceAccountsResponse GetServiceAccounts(string? ns, string? /// /// Get a list of service accounts that match the provided path parameters. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Currently, only the elastic/fleet-server service account is available. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetServiceAccountsResponse GetServiceAccounts(string? ns, string? service, Action configureRequest) @@ -4875,7 +6617,10 @@ public virtual GetServiceAccountsResponse GetServiceAccounts(string? ns, string? /// /// Get a list of service accounts that match the provided path parameters. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Currently, only the elastic/fleet-server service account is available. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetServiceAccountsResponse GetServiceAccounts() @@ -4892,7 +6637,10 @@ public virtual GetServiceAccountsResponse GetServiceAccounts() /// /// Get a list of service accounts that match the provided path parameters. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Currently, only the elastic/fleet-server service account is available. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetServiceAccountsResponse GetServiceAccounts(Action configureRequest) @@ -4910,7 +6658,10 @@ public virtual GetServiceAccountsResponse GetServiceAccounts(Action /// Get a list of service accounts that match the provided path parameters. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Currently, only the elastic/fleet-server service account is available. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetServiceAccountsAsync(GetServiceAccountsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -4925,7 +6676,10 @@ public virtual Task GetServiceAccountsAsync(GetServi /// /// Get a list of service accounts that match the provided path parameters. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Currently, only the elastic/fleet-server service account is available. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetServiceAccountsAsync(string? ns, string? service, CancellationToken cancellationToken = default) { @@ -4941,7 +6695,10 @@ public virtual Task GetServiceAccountsAsync(string? /// /// Get a list of service accounts that match the provided path parameters. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Currently, only the elastic/fleet-server service account is available. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetServiceAccountsAsync(string? ns, string? service, Action configureRequest, CancellationToken cancellationToken = default) { @@ -4958,7 +6715,10 @@ public virtual Task GetServiceAccountsAsync(string? /// /// Get a list of service accounts that match the provided path parameters. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Currently, only the elastic/fleet-server service account is available. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetServiceAccountsAsync(CancellationToken cancellationToken = default) { @@ -4974,7 +6734,10 @@ public virtual Task GetServiceAccountsAsync(Cancella /// /// Get a list of service accounts that match the provided path parameters. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: Currently, only the elastic/fleet-server service account is available. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetServiceAccountsAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -4988,7 +6751,17 @@ public virtual Task GetServiceAccountsAsync(Action /// Get service account credentials. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have at least the read_security cluster privilege (or a greater privilege such as manage_service_account or manage_security). + /// + /// + /// The response includes service account tokens that were created with the create service account tokens API as well as file-backed tokens from all nodes of the cluster. + /// + /// + /// NOTE: For tokens backed by the service_tokens file, the API collects them from all nodes of the cluster. + /// Tokens with the same name from different nodes are assumed to be the same token and are only counted once towards the total number of service tokens. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetServiceCredentialsResponse GetServiceCredentials(GetServiceCredentialsRequest request) @@ -5001,7 +6774,17 @@ public virtual GetServiceCredentialsResponse GetServiceCredentials(GetServiceCre /// /// Get service account credentials. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have at least the read_security cluster privilege (or a greater privilege such as manage_service_account or manage_security). + /// + /// + /// The response includes service account tokens that were created with the create service account tokens API as well as file-backed tokens from all nodes of the cluster. + /// + /// + /// NOTE: For tokens backed by the service_tokens file, the API collects them from all nodes of the cluster. + /// Tokens with the same name from different nodes are assumed to be the same token and are only counted once towards the total number of service tokens. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetServiceCredentialsAsync(GetServiceCredentialsRequest request, CancellationToken cancellationToken = default) { @@ -5013,7 +6796,17 @@ public virtual Task GetServiceCredentialsAsync(Ge /// /// Get service account credentials. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have at least the read_security cluster privilege (or a greater privilege such as manage_service_account or manage_security). + /// + /// + /// The response includes service account tokens that were created with the create service account tokens API as well as file-backed tokens from all nodes of the cluster. + /// + /// + /// NOTE: For tokens backed by the service_tokens file, the API collects them from all nodes of the cluster. + /// Tokens with the same name from different nodes are assumed to be the same token and are only counted once towards the total number of service tokens. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetServiceCredentialsResponse GetServiceCredentials(GetServiceCredentialsRequestDescriptor descriptor) @@ -5026,7 +6819,17 @@ public virtual GetServiceCredentialsResponse GetServiceCredentials(GetServiceCre /// /// Get service account credentials. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have at least the read_security cluster privilege (or a greater privilege such as manage_service_account or manage_security). + /// + /// + /// The response includes service account tokens that were created with the create service account tokens API as well as file-backed tokens from all nodes of the cluster. + /// + /// + /// NOTE: For tokens backed by the service_tokens file, the API collects them from all nodes of the cluster. + /// Tokens with the same name from different nodes are assumed to be the same token and are only counted once towards the total number of service tokens. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetServiceCredentialsResponse GetServiceCredentials(string ns, Elastic.Clients.Elasticsearch.Name service) @@ -5040,7 +6843,17 @@ public virtual GetServiceCredentialsResponse GetServiceCredentials(string ns, El /// /// Get service account credentials. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have at least the read_security cluster privilege (or a greater privilege such as manage_service_account or manage_security). + /// + /// + /// The response includes service account tokens that were created with the create service account tokens API as well as file-backed tokens from all nodes of the cluster. + /// + /// + /// NOTE: For tokens backed by the service_tokens file, the API collects them from all nodes of the cluster. + /// Tokens with the same name from different nodes are assumed to be the same token and are only counted once towards the total number of service tokens. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetServiceCredentialsResponse GetServiceCredentials(string ns, Elastic.Clients.Elasticsearch.Name service, Action configureRequest) @@ -5055,7 +6868,17 @@ public virtual GetServiceCredentialsResponse GetServiceCredentials(string ns, El /// /// Get service account credentials. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have at least the read_security cluster privilege (or a greater privilege such as manage_service_account or manage_security). + /// + /// + /// The response includes service account tokens that were created with the create service account tokens API as well as file-backed tokens from all nodes of the cluster. + /// + /// + /// NOTE: For tokens backed by the service_tokens file, the API collects them from all nodes of the cluster. + /// Tokens with the same name from different nodes are assumed to be the same token and are only counted once towards the total number of service tokens. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetServiceCredentialsAsync(GetServiceCredentialsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -5067,7 +6890,17 @@ public virtual Task GetServiceCredentialsAsync(Ge /// /// Get service account credentials. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have at least the read_security cluster privilege (or a greater privilege such as manage_service_account or manage_security). + /// + /// + /// The response includes service account tokens that were created with the create service account tokens API as well as file-backed tokens from all nodes of the cluster. + /// + /// + /// NOTE: For tokens backed by the service_tokens file, the API collects them from all nodes of the cluster. + /// Tokens with the same name from different nodes are assumed to be the same token and are only counted once towards the total number of service tokens. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetServiceCredentialsAsync(string ns, Elastic.Clients.Elasticsearch.Name service, CancellationToken cancellationToken = default) { @@ -5080,7 +6913,17 @@ public virtual Task GetServiceCredentialsAsync(st /// /// Get service account credentials. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have at least the read_security cluster privilege (or a greater privilege such as manage_service_account or manage_security). + /// + /// + /// The response includes service account tokens that were created with the create service account tokens API as well as file-backed tokens from all nodes of the cluster. + /// + /// + /// NOTE: For tokens backed by the service_tokens file, the API collects them from all nodes of the cluster. + /// Tokens with the same name from different nodes are assumed to be the same token and are only counted once towards the total number of service tokens. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetServiceCredentialsAsync(string ns, Elastic.Clients.Elasticsearch.Name service, Action configureRequest, CancellationToken cancellationToken = default) { @@ -5092,214 +6935,568 @@ public virtual Task GetServiceCredentialsAsync(st /// /// - /// Get a token. + /// Get security index settings. /// /// - /// Create a bearer token for access without requiring basic authentication. + /// Get the user-configurable settings for the security internal index (.security and associated indices). + /// Only a subset of the index settings — those that are user-configurable—will be shown. + /// This includes: + /// + /// + /// + /// + /// index.auto_expand_replicas + /// + /// + /// + /// + /// index.number_of_replicas /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetTokenResponse GetToken(GetTokenRequest request) + public virtual GetSecuritySettingsResponse GetSettings(GetSecuritySettingsRequest request) { request.BeforeRequest(); - return DoRequest(request); + return DoRequest(request); } /// /// - /// Get a token. + /// Get security index settings. /// /// - /// Create a bearer token for access without requiring basic authentication. + /// Get the user-configurable settings for the security internal index (.security and associated indices). + /// Only a subset of the index settings — those that are user-configurable—will be shown. + /// This includes: + /// + /// + /// + /// + /// index.auto_expand_replicas + /// + /// + /// + /// + /// index.number_of_replicas /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task GetTokenAsync(GetTokenRequest request, CancellationToken cancellationToken = default) + public virtual Task GetSettingsAsync(GetSecuritySettingsRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Get a token. + /// Get security index settings. /// /// - /// Create a bearer token for access without requiring basic authentication. + /// Get the user-configurable settings for the security internal index (.security and associated indices). + /// Only a subset of the index settings — those that are user-configurable—will be shown. + /// This includes: + /// + /// + /// + /// + /// index.auto_expand_replicas + /// + /// + /// + /// + /// index.number_of_replicas /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetTokenResponse GetToken(GetTokenRequestDescriptor descriptor) + public virtual GetSecuritySettingsResponse GetSettings(GetSecuritySettingsRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Get a token. + /// Get security index settings. /// /// - /// Create a bearer token for access without requiring basic authentication. + /// Get the user-configurable settings for the security internal index (.security and associated indices). + /// Only a subset of the index settings — those that are user-configurable—will be shown. + /// This includes: + /// + /// + /// + /// + /// index.auto_expand_replicas + /// + /// + /// + /// + /// index.number_of_replicas /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetTokenResponse GetToken() + public virtual GetSecuritySettingsResponse GetSettings() { - var descriptor = new GetTokenRequestDescriptor(); + var descriptor = new GetSecuritySettingsRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Get a token. + /// Get security index settings. /// /// - /// Create a bearer token for access without requiring basic authentication. + /// Get the user-configurable settings for the security internal index (.security and associated indices). + /// Only a subset of the index settings — those that are user-configurable—will be shown. + /// This includes: + /// + /// + /// + /// + /// index.auto_expand_replicas + /// + /// + /// + /// + /// index.number_of_replicas /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetTokenResponse GetToken(Action configureRequest) + public virtual GetSecuritySettingsResponse GetSettings(Action configureRequest) { - var descriptor = new GetTokenRequestDescriptor(); + var descriptor = new GetSecuritySettingsRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Get a token. + /// Get security index settings. /// /// - /// Create a bearer token for access without requiring basic authentication. + /// Get the user-configurable settings for the security internal index (.security and associated indices). + /// Only a subset of the index settings — those that are user-configurable—will be shown. + /// This includes: + /// + /// + /// + /// + /// index.auto_expand_replicas + /// + /// + /// + /// + /// index.number_of_replicas /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task GetTokenAsync(GetTokenRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task GetSettingsAsync(GetSecuritySettingsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Get a token. + /// Get security index settings. /// /// - /// Create a bearer token for access without requiring basic authentication. + /// Get the user-configurable settings for the security internal index (.security and associated indices). + /// Only a subset of the index settings — those that are user-configurable—will be shown. + /// This includes: + /// + /// + /// + /// + /// index.auto_expand_replicas + /// + /// + /// + /// + /// index.number_of_replicas /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task GetTokenAsync(CancellationToken cancellationToken = default) + public virtual Task GetSettingsAsync(CancellationToken cancellationToken = default) { - var descriptor = new GetTokenRequestDescriptor(); + var descriptor = new GetSecuritySettingsRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Get a token. + /// Get security index settings. /// /// - /// Create a bearer token for access without requiring basic authentication. + /// Get the user-configurable settings for the security internal index (.security and associated indices). + /// Only a subset of the index settings — those that are user-configurable—will be shown. + /// This includes: + /// + /// + /// + /// + /// index.auto_expand_replicas + /// + /// + /// + /// + /// index.number_of_replicas /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task GetTokenAsync(Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task GetSettingsAsync(Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new GetTokenRequestDescriptor(); + var descriptor = new GetSecuritySettingsRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Get users. + /// Get a token. /// /// - /// Get information about users in the native realm and built-in users. + /// Create a bearer token for access without requiring basic authentication. + /// The tokens are created by the Elasticsearch Token Service, which is automatically enabled when you configure TLS on the HTTP interface. + /// Alternatively, you can explicitly enable the xpack.security.authc.token.enabled setting. + /// When you are running in production mode, a bootstrap check prevents you from enabling the token service unless you also enable TLS on the HTTP interface. + /// + /// + /// The get token API takes the same parameters as a typical OAuth 2.0 token API except for the use of a JSON request body. + /// + /// + /// A successful get token API call returns a JSON structure that contains the access token, the amount of time (seconds) that the token expires in, the type, and the scope if available. + /// + /// + /// The tokens returned by the get token API have a finite period of time for which they are valid and after that time period, they can no longer be used. + /// That time period is defined by the xpack.security.authc.token.timeout setting. + /// If you want to invalidate a token immediately, you can do so by using the invalidate token API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetUserResponse GetUser(GetUserRequest request) + public virtual GetTokenResponse GetToken(GetTokenRequest request) { request.BeforeRequest(); - return DoRequest(request); + return DoRequest(request); } /// /// - /// Get users. + /// Get a token. /// /// - /// Get information about users in the native realm and built-in users. + /// Create a bearer token for access without requiring basic authentication. + /// The tokens are created by the Elasticsearch Token Service, which is automatically enabled when you configure TLS on the HTTP interface. + /// Alternatively, you can explicitly enable the xpack.security.authc.token.enabled setting. + /// When you are running in production mode, a bootstrap check prevents you from enabling the token service unless you also enable TLS on the HTTP interface. + /// + /// + /// The get token API takes the same parameters as a typical OAuth 2.0 token API except for the use of a JSON request body. + /// + /// + /// A successful get token API call returns a JSON structure that contains the access token, the amount of time (seconds) that the token expires in, the type, and the scope if available. + /// + /// + /// The tokens returned by the get token API have a finite period of time for which they are valid and after that time period, they can no longer be used. + /// That time period is defined by the xpack.security.authc.token.timeout setting. + /// If you want to invalidate a token immediately, you can do so by using the invalidate token API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task GetUserAsync(GetUserRequest request, CancellationToken cancellationToken = default) + public virtual Task GetTokenAsync(GetTokenRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Get users. + /// Get a token. /// /// - /// Get information about users in the native realm and built-in users. + /// Create a bearer token for access without requiring basic authentication. + /// The tokens are created by the Elasticsearch Token Service, which is automatically enabled when you configure TLS on the HTTP interface. + /// Alternatively, you can explicitly enable the xpack.security.authc.token.enabled setting. + /// When you are running in production mode, a bootstrap check prevents you from enabling the token service unless you also enable TLS on the HTTP interface. + /// + /// + /// The get token API takes the same parameters as a typical OAuth 2.0 token API except for the use of a JSON request body. + /// + /// + /// A successful get token API call returns a JSON structure that contains the access token, the amount of time (seconds) that the token expires in, the type, and the scope if available. + /// + /// + /// The tokens returned by the get token API have a finite period of time for which they are valid and after that time period, they can no longer be used. + /// That time period is defined by the xpack.security.authc.token.timeout setting. + /// If you want to invalidate a token immediately, you can do so by using the invalidate token API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetUserResponse GetUser(GetUserRequestDescriptor descriptor) + public virtual GetTokenResponse GetToken(GetTokenRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Get users. + /// Get a token. /// /// - /// Get information about users in the native realm and built-in users. + /// Create a bearer token for access without requiring basic authentication. + /// The tokens are created by the Elasticsearch Token Service, which is automatically enabled when you configure TLS on the HTTP interface. + /// Alternatively, you can explicitly enable the xpack.security.authc.token.enabled setting. + /// When you are running in production mode, a bootstrap check prevents you from enabling the token service unless you also enable TLS on the HTTP interface. + /// + /// + /// The get token API takes the same parameters as a typical OAuth 2.0 token API except for the use of a JSON request body. + /// + /// + /// A successful get token API call returns a JSON structure that contains the access token, the amount of time (seconds) that the token expires in, the type, and the scope if available. + /// + /// + /// The tokens returned by the get token API have a finite period of time for which they are valid and after that time period, they can no longer be used. + /// That time period is defined by the xpack.security.authc.token.timeout setting. + /// If you want to invalidate a token immediately, you can do so by using the invalidate token API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetUserResponse GetUser(IReadOnlyCollection? username) + public virtual GetTokenResponse GetToken() { - var descriptor = new GetUserRequestDescriptor(username); + var descriptor = new GetTokenRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Get users. + /// Get a token. /// /// - /// Get information about users in the native realm and built-in users. + /// Create a bearer token for access without requiring basic authentication. + /// The tokens are created by the Elasticsearch Token Service, which is automatically enabled when you configure TLS on the HTTP interface. + /// Alternatively, you can explicitly enable the xpack.security.authc.token.enabled setting. + /// When you are running in production mode, a bootstrap check prevents you from enabling the token service unless you also enable TLS on the HTTP interface. + /// + /// + /// The get token API takes the same parameters as a typical OAuth 2.0 token API except for the use of a JSON request body. + /// + /// + /// A successful get token API call returns a JSON structure that contains the access token, the amount of time (seconds) that the token expires in, the type, and the scope if available. + /// + /// + /// The tokens returned by the get token API have a finite period of time for which they are valid and after that time period, they can no longer be used. + /// That time period is defined by the xpack.security.authc.token.timeout setting. + /// If you want to invalidate a token immediately, you can do so by using the invalidate token API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetUserResponse GetUser(IReadOnlyCollection? username, Action configureRequest) + public virtual GetTokenResponse GetToken(Action configureRequest) { - var descriptor = new GetUserRequestDescriptor(username); + var descriptor = new GetTokenRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); + } + + /// + /// + /// Get a token. + /// + /// + /// Create a bearer token for access without requiring basic authentication. + /// The tokens are created by the Elasticsearch Token Service, which is automatically enabled when you configure TLS on the HTTP interface. + /// Alternatively, you can explicitly enable the xpack.security.authc.token.enabled setting. + /// When you are running in production mode, a bootstrap check prevents you from enabling the token service unless you also enable TLS on the HTTP interface. + /// + /// + /// The get token API takes the same parameters as a typical OAuth 2.0 token API except for the use of a JSON request body. + /// + /// + /// A successful get token API call returns a JSON structure that contains the access token, the amount of time (seconds) that the token expires in, the type, and the scope if available. + /// + /// + /// The tokens returned by the get token API have a finite period of time for which they are valid and after that time period, they can no longer be used. + /// That time period is defined by the xpack.security.authc.token.timeout setting. + /// If you want to invalidate a token immediately, you can do so by using the invalidate token API. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetTokenAsync(GetTokenRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get a token. + /// + /// + /// Create a bearer token for access without requiring basic authentication. + /// The tokens are created by the Elasticsearch Token Service, which is automatically enabled when you configure TLS on the HTTP interface. + /// Alternatively, you can explicitly enable the xpack.security.authc.token.enabled setting. + /// When you are running in production mode, a bootstrap check prevents you from enabling the token service unless you also enable TLS on the HTTP interface. + /// + /// + /// The get token API takes the same parameters as a typical OAuth 2.0 token API except for the use of a JSON request body. + /// + /// + /// A successful get token API call returns a JSON structure that contains the access token, the amount of time (seconds) that the token expires in, the type, and the scope if available. + /// + /// + /// The tokens returned by the get token API have a finite period of time for which they are valid and after that time period, they can no longer be used. + /// That time period is defined by the xpack.security.authc.token.timeout setting. + /// If you want to invalidate a token immediately, you can do so by using the invalidate token API. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetTokenAsync(CancellationToken cancellationToken = default) + { + var descriptor = new GetTokenRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get a token. + /// + /// + /// Create a bearer token for access without requiring basic authentication. + /// The tokens are created by the Elasticsearch Token Service, which is automatically enabled when you configure TLS on the HTTP interface. + /// Alternatively, you can explicitly enable the xpack.security.authc.token.enabled setting. + /// When you are running in production mode, a bootstrap check prevents you from enabling the token service unless you also enable TLS on the HTTP interface. + /// + /// + /// The get token API takes the same parameters as a typical OAuth 2.0 token API except for the use of a JSON request body. + /// + /// + /// A successful get token API call returns a JSON structure that contains the access token, the amount of time (seconds) that the token expires in, the type, and the scope if available. + /// + /// + /// The tokens returned by the get token API have a finite period of time for which they are valid and after that time period, they can no longer be used. + /// That time period is defined by the xpack.security.authc.token.timeout setting. + /// If you want to invalidate a token immediately, you can do so by using the invalidate token API. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetTokenAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetTokenRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get users. + /// + /// + /// Get information about users in the native realm and built-in users. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetUserResponse GetUser(GetUserRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Get users. + /// + /// + /// Get information about users in the native realm and built-in users. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetUserAsync(GetUserRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Get users. + /// + /// + /// Get information about users in the native realm and built-in users. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetUserResponse GetUser(GetUserRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get users. + /// + /// + /// Get information about users in the native realm and built-in users. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetUserResponse GetUser(IReadOnlyCollection? username) + { + var descriptor = new GetUserRequestDescriptor(username); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get users. + /// + /// + /// Get information about users in the native realm and built-in users. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetUserResponse GetUser(IReadOnlyCollection? username, Action configureRequest) + { + var descriptor = new GetUserRequestDescriptor(username); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); } /// @@ -5309,7 +7506,7 @@ public virtual GetUserResponse GetUser(IReadOnlyCollection /// Get information about users in the native realm and built-in users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetUserResponse GetUser() @@ -5326,7 +7523,7 @@ public virtual GetUserResponse GetUser() /// /// Get information about users in the native realm and built-in users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetUserResponse GetUser(Action configureRequest) @@ -5344,7 +7541,7 @@ public virtual GetUserResponse GetUser(Action configur /// /// Get information about users in the native realm and built-in users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetUserAsync(GetUserRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -5359,7 +7556,7 @@ public virtual Task GetUserAsync(GetUserRequestDescriptor descr /// /// Get information about users in the native realm and built-in users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetUserAsync(IReadOnlyCollection? username, CancellationToken cancellationToken = default) { @@ -5375,7 +7572,7 @@ public virtual Task GetUserAsync(IReadOnlyCollection /// Get information about users in the native realm and built-in users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetUserAsync(IReadOnlyCollection? username, Action configureRequest, CancellationToken cancellationToken = default) { @@ -5392,7 +7589,7 @@ public virtual Task GetUserAsync(IReadOnlyCollection /// Get information about users in the native realm and built-in users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetUserAsync(CancellationToken cancellationToken = default) { @@ -5408,7 +7605,7 @@ public virtual Task GetUserAsync(CancellationToken cancellation /// /// Get information about users in the native realm and built-in users. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetUserAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -5422,7 +7619,13 @@ public virtual Task GetUserAsync(Action /// Get user privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Get the security privileges for the logged in user. + /// All users can use this API, but only to determine their own privileges. + /// To check the privileges of other users, you must use the run as feature. + /// To check whether a user has a specific list of privileges, use the has privileges API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetUserPrivilegesResponse GetUserPrivileges(GetUserPrivilegesRequest request) @@ -5435,7 +7638,13 @@ public virtual GetUserPrivilegesResponse GetUserPrivileges(GetUserPrivilegesRequ /// /// Get user privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Get the security privileges for the logged in user. + /// All users can use this API, but only to determine their own privileges. + /// To check the privileges of other users, you must use the run as feature. + /// To check whether a user has a specific list of privileges, use the has privileges API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetUserPrivilegesAsync(GetUserPrivilegesRequest request, CancellationToken cancellationToken = default) { @@ -5447,7 +7656,13 @@ public virtual Task GetUserPrivilegesAsync(GetUserPri /// /// Get user privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Get the security privileges for the logged in user. + /// All users can use this API, but only to determine their own privileges. + /// To check the privileges of other users, you must use the run as feature. + /// To check whether a user has a specific list of privileges, use the has privileges API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetUserPrivilegesResponse GetUserPrivileges(GetUserPrivilegesRequestDescriptor descriptor) @@ -5460,7 +7675,13 @@ public virtual GetUserPrivilegesResponse GetUserPrivileges(GetUserPrivilegesRequ /// /// Get user privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Get the security privileges for the logged in user. + /// All users can use this API, but only to determine their own privileges. + /// To check the privileges of other users, you must use the run as feature. + /// To check whether a user has a specific list of privileges, use the has privileges API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetUserPrivilegesResponse GetUserPrivileges() @@ -5474,7 +7695,13 @@ public virtual GetUserPrivilegesResponse GetUserPrivileges() /// /// Get user privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Get the security privileges for the logged in user. + /// All users can use this API, but only to determine their own privileges. + /// To check the privileges of other users, you must use the run as feature. + /// To check whether a user has a specific list of privileges, use the has privileges API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetUserPrivilegesResponse GetUserPrivileges(Action configureRequest) @@ -5489,7 +7716,13 @@ public virtual GetUserPrivilegesResponse GetUserPrivileges(Action /// Get user privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Get the security privileges for the logged in user. + /// All users can use this API, but only to determine their own privileges. + /// To check the privileges of other users, you must use the run as feature. + /// To check whether a user has a specific list of privileges, use the has privileges API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetUserPrivilegesAsync(GetUserPrivilegesRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -5501,7 +7734,13 @@ public virtual Task GetUserPrivilegesAsync(GetUserPri /// /// Get user privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Get the security privileges for the logged in user. + /// All users can use this API, but only to determine their own privileges. + /// To check the privileges of other users, you must use the run as feature. + /// To check whether a user has a specific list of privileges, use the has privileges API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetUserPrivilegesAsync(CancellationToken cancellationToken = default) { @@ -5514,7 +7753,13 @@ public virtual Task GetUserPrivilegesAsync(Cancellati /// /// Get user privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Get the security privileges for the logged in user. + /// All users can use this API, but only to determine their own privileges. + /// To check the privileges of other users, you must use the run as feature. + /// To check whether a user has a specific list of privileges, use the has privileges API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetUserPrivilegesAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -5531,7 +7776,12 @@ public virtual Task GetUserPrivilegesAsync(Action /// Get a user's profile using the unique profile ID. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetUserProfileResponse GetUserProfile(GetUserProfileRequest request) @@ -5547,7 +7797,12 @@ public virtual GetUserProfileResponse GetUserProfile(GetUserProfileRequest reque /// /// Get a user's profile using the unique profile ID. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetUserProfileAsync(GetUserProfileRequest request, CancellationToken cancellationToken = default) { @@ -5562,7 +7817,12 @@ public virtual Task GetUserProfileAsync(GetUserProfileRe /// /// Get a user's profile using the unique profile ID. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetUserProfileResponse GetUserProfile(GetUserProfileRequestDescriptor descriptor) @@ -5578,7 +7838,12 @@ public virtual GetUserProfileResponse GetUserProfile(GetUserProfileRequestDescri /// /// Get a user's profile using the unique profile ID. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetUserProfileResponse GetUserProfile(IReadOnlyCollection uid) @@ -5595,7 +7860,12 @@ public virtual GetUserProfileResponse GetUserProfile(IReadOnlyCollection /// /// Get a user's profile using the unique profile ID. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetUserProfileResponse GetUserProfile(IReadOnlyCollection uid, Action configureRequest) @@ -5613,7 +7883,12 @@ public virtual GetUserProfileResponse GetUserProfile(IReadOnlyCollection /// /// Get a user's profile using the unique profile ID. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetUserProfileAsync(GetUserProfileRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -5628,7 +7903,12 @@ public virtual Task GetUserProfileAsync(GetUserProfileRe /// /// Get a user's profile using the unique profile ID. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetUserProfileAsync(IReadOnlyCollection uid, CancellationToken cancellationToken = default) { @@ -5644,7 +7924,12 @@ public virtual Task GetUserProfileAsync(IReadOnlyCollect /// /// Get a user's profile using the unique profile ID. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetUserProfileAsync(IReadOnlyCollection uid, Action configureRequest, CancellationToken cancellationToken = default) { @@ -5661,13 +7946,34 @@ public virtual Task GetUserProfileAsync(IReadOnlyCollect /// /// Create an API key on behalf of another user. /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. + /// The caller must have authentication credentials for the user on whose behalf the API key will be created. + /// It is not possible to use this API to create an API key without that user's credentials. + /// The supported user authentication credential types are: + /// + /// + /// + /// + /// username and password + /// + /// + /// + /// + /// Elasticsearch access tokens + /// + /// + /// + /// + /// JWTs + /// + /// + /// + /// /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. /// In this case, the API key will be created on behalf of the impersonated user. /// /// /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. /// /// /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. @@ -5676,7 +7982,7 @@ public virtual Task GetUserProfileAsync(IReadOnlyCollect /// /// By default, API keys never expire. You can specify expiration information when you create the API keys. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GrantApiKeyResponse GrantApiKey(GrantApiKeyRequest request) @@ -5692,13 +7998,34 @@ public virtual GrantApiKeyResponse GrantApiKey(GrantApiKeyRequest request) /// /// Create an API key on behalf of another user. /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. + /// The caller must have authentication credentials for the user on whose behalf the API key will be created. + /// It is not possible to use this API to create an API key without that user's credentials. + /// The supported user authentication credential types are: + /// + /// + /// + /// + /// username and password + /// + /// + /// + /// + /// Elasticsearch access tokens + /// + /// + /// + /// + /// JWTs + /// + /// + /// + /// /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. /// In this case, the API key will be created on behalf of the impersonated user. /// /// /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. /// /// /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. @@ -5707,7 +8034,7 @@ public virtual GrantApiKeyResponse GrantApiKey(GrantApiKeyRequest request) /// /// By default, API keys never expire. You can specify expiration information when you create the API keys. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GrantApiKeyAsync(GrantApiKeyRequest request, CancellationToken cancellationToken = default) { @@ -5722,13 +8049,34 @@ public virtual Task GrantApiKeyAsync(GrantApiKeyRequest req /// /// Create an API key on behalf of another user. /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. + /// The caller must have authentication credentials for the user on whose behalf the API key will be created. + /// It is not possible to use this API to create an API key without that user's credentials. + /// The supported user authentication credential types are: + /// + /// + /// + /// + /// username and password + /// + /// + /// + /// + /// Elasticsearch access tokens + /// + /// + /// + /// + /// JWTs + /// + /// + /// + /// /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. /// In this case, the API key will be created on behalf of the impersonated user. /// /// /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. /// /// /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. @@ -5737,7 +8085,7 @@ public virtual Task GrantApiKeyAsync(GrantApiKeyRequest req /// /// By default, API keys never expire. You can specify expiration information when you create the API keys. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GrantApiKeyResponse GrantApiKey(GrantApiKeyRequestDescriptor descriptor) @@ -5753,13 +8101,34 @@ public virtual GrantApiKeyResponse GrantApiKey(GrantApiKeyRequestDesc /// /// Create an API key on behalf of another user. /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. + /// The caller must have authentication credentials for the user on whose behalf the API key will be created. + /// It is not possible to use this API to create an API key without that user's credentials. + /// The supported user authentication credential types are: + /// + /// + /// + /// + /// username and password + /// + /// + /// + /// + /// Elasticsearch access tokens + /// + /// + /// + /// + /// JWTs + /// + /// + /// + /// /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. /// In this case, the API key will be created on behalf of the impersonated user. /// /// /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. /// /// /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. @@ -5768,7 +8137,7 @@ public virtual GrantApiKeyResponse GrantApiKey(GrantApiKeyRequestDesc /// /// By default, API keys never expire. You can specify expiration information when you create the API keys. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GrantApiKeyResponse GrantApiKey() @@ -5785,13 +8154,34 @@ public virtual GrantApiKeyResponse GrantApiKey() /// /// Create an API key on behalf of another user. /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. + /// The caller must have authentication credentials for the user on whose behalf the API key will be created. + /// It is not possible to use this API to create an API key without that user's credentials. + /// The supported user authentication credential types are: + /// + /// + /// + /// + /// username and password + /// + /// + /// + /// + /// Elasticsearch access tokens + /// + /// + /// + /// + /// JWTs + /// + /// + /// + /// /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. /// In this case, the API key will be created on behalf of the impersonated user. /// /// /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. /// /// /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. @@ -5800,7 +8190,7 @@ public virtual GrantApiKeyResponse GrantApiKey() /// /// By default, API keys never expire. You can specify expiration information when you create the API keys. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GrantApiKeyResponse GrantApiKey(Action> configureRequest) @@ -5818,13 +8208,34 @@ public virtual GrantApiKeyResponse GrantApiKey(Action /// Create an API key on behalf of another user. /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. - /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. - /// In this case, the API key will be created on behalf of the impersonated user. + /// The caller must have authentication credentials for the user on whose behalf the API key will be created. + /// It is not possible to use this API to create an API key without that user's credentials. + /// The supported user authentication credential types are: /// - /// + /// + /// + /// + /// username and password + /// + /// + /// + /// + /// Elasticsearch access tokens + /// + /// + /// + /// + /// JWTs + /// + /// + /// + /// + /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. + /// In this case, the API key will be created on behalf of the impersonated user. + /// + /// /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. /// /// /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. @@ -5833,7 +8244,7 @@ public virtual GrantApiKeyResponse GrantApiKey(Action /// By default, API keys never expire. You can specify expiration information when you create the API keys. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GrantApiKeyResponse GrantApiKey(GrantApiKeyRequestDescriptor descriptor) @@ -5849,13 +8260,34 @@ public virtual GrantApiKeyResponse GrantApiKey(GrantApiKeyRequestDescriptor desc /// /// Create an API key on behalf of another user. /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. + /// The caller must have authentication credentials for the user on whose behalf the API key will be created. + /// It is not possible to use this API to create an API key without that user's credentials. + /// The supported user authentication credential types are: + /// + /// + /// + /// + /// username and password + /// + /// + /// + /// + /// Elasticsearch access tokens + /// + /// + /// + /// + /// JWTs + /// + /// + /// + /// /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. /// In this case, the API key will be created on behalf of the impersonated user. /// /// /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. /// /// /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. @@ -5864,7 +8296,7 @@ public virtual GrantApiKeyResponse GrantApiKey(GrantApiKeyRequestDescriptor desc /// /// By default, API keys never expire. You can specify expiration information when you create the API keys. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GrantApiKeyResponse GrantApiKey() @@ -5881,13 +8313,34 @@ public virtual GrantApiKeyResponse GrantApiKey() /// /// Create an API key on behalf of another user. /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. + /// The caller must have authentication credentials for the user on whose behalf the API key will be created. + /// It is not possible to use this API to create an API key without that user's credentials. + /// The supported user authentication credential types are: + /// + /// + /// + /// + /// username and password + /// + /// + /// + /// + /// Elasticsearch access tokens + /// + /// + /// + /// + /// JWTs + /// + /// + /// + /// /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. /// In this case, the API key will be created on behalf of the impersonated user. /// /// /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. /// /// /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. @@ -5896,7 +8349,7 @@ public virtual GrantApiKeyResponse GrantApiKey() /// /// By default, API keys never expire. You can specify expiration information when you create the API keys. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GrantApiKeyResponse GrantApiKey(Action configureRequest) @@ -5914,13 +8367,34 @@ public virtual GrantApiKeyResponse GrantApiKey(Action /// Create an API key on behalf of another user. /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. + /// The caller must have authentication credentials for the user on whose behalf the API key will be created. + /// It is not possible to use this API to create an API key without that user's credentials. + /// The supported user authentication credential types are: + /// + /// + /// + /// + /// username and password + /// + /// + /// + /// + /// Elasticsearch access tokens + /// + /// + /// + /// + /// JWTs + /// + /// + /// + /// /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. /// In this case, the API key will be created on behalf of the impersonated user. /// /// /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. /// /// /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. @@ -5929,7 +8403,7 @@ public virtual GrantApiKeyResponse GrantApiKey(Action /// By default, API keys never expire. You can specify expiration information when you create the API keys. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GrantApiKeyAsync(GrantApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -5944,13 +8418,34 @@ public virtual Task GrantApiKeyAsync(GrantApiKey /// /// Create an API key on behalf of another user. /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. + /// The caller must have authentication credentials for the user on whose behalf the API key will be created. + /// It is not possible to use this API to create an API key without that user's credentials. + /// The supported user authentication credential types are: + /// + /// + /// + /// + /// username and password + /// + /// + /// + /// + /// Elasticsearch access tokens + /// + /// + /// + /// + /// JWTs + /// + /// + /// + /// /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. /// In this case, the API key will be created on behalf of the impersonated user. /// /// /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. /// /// /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. @@ -5959,7 +8454,7 @@ public virtual Task GrantApiKeyAsync(GrantApiKey /// /// By default, API keys never expire. You can specify expiration information when you create the API keys. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GrantApiKeyAsync(CancellationToken cancellationToken = default) { @@ -5975,13 +8470,34 @@ public virtual Task GrantApiKeyAsync(Cancellatio /// /// Create an API key on behalf of another user. /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. + /// The caller must have authentication credentials for the user on whose behalf the API key will be created. + /// It is not possible to use this API to create an API key without that user's credentials. + /// The supported user authentication credential types are: + /// + /// + /// + /// + /// username and password + /// + /// + /// + /// + /// Elasticsearch access tokens + /// + /// + /// + /// + /// JWTs + /// + /// + /// + /// /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. /// In this case, the API key will be created on behalf of the impersonated user. /// /// /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. /// /// /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. @@ -5990,7 +8506,7 @@ public virtual Task GrantApiKeyAsync(Cancellatio /// /// By default, API keys never expire. You can specify expiration information when you create the API keys. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GrantApiKeyAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -6007,13 +8523,34 @@ public virtual Task GrantApiKeyAsync(Action /// Create an API key on behalf of another user. /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. + /// The caller must have authentication credentials for the user on whose behalf the API key will be created. + /// It is not possible to use this API to create an API key without that user's credentials. + /// The supported user authentication credential types are: + /// + /// + /// + /// + /// username and password + /// + /// + /// + /// + /// Elasticsearch access tokens + /// + /// + /// + /// + /// JWTs + /// + /// + /// + /// /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. /// In this case, the API key will be created on behalf of the impersonated user. /// /// /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. /// /// /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. @@ -6022,7 +8559,7 @@ public virtual Task GrantApiKeyAsync(Action /// By default, API keys never expire. You can specify expiration information when you create the API keys. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GrantApiKeyAsync(GrantApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -6037,13 +8574,34 @@ public virtual Task GrantApiKeyAsync(GrantApiKeyRequestDesc /// /// Create an API key on behalf of another user. /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. + /// The caller must have authentication credentials for the user on whose behalf the API key will be created. + /// It is not possible to use this API to create an API key without that user's credentials. + /// The supported user authentication credential types are: + /// + /// + /// + /// + /// username and password + /// + /// + /// + /// + /// Elasticsearch access tokens + /// + /// + /// + /// + /// JWTs + /// + /// + /// + /// /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. /// In this case, the API key will be created on behalf of the impersonated user. /// /// /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. /// /// /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. @@ -6052,7 +8610,7 @@ public virtual Task GrantApiKeyAsync(GrantApiKeyRequestDesc /// /// By default, API keys never expire. You can specify expiration information when you create the API keys. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GrantApiKeyAsync(CancellationToken cancellationToken = default) { @@ -6068,13 +8626,34 @@ public virtual Task GrantApiKeyAsync(CancellationToken canc /// /// Create an API key on behalf of another user. /// This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. - /// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. - /// It is not possible to use this API to create an API key without that user’s credentials. + /// The caller must have authentication credentials for the user on whose behalf the API key will be created. + /// It is not possible to use this API to create an API key without that user's credentials. + /// The supported user authentication credential types are: + /// + /// + /// + /// + /// username and password + /// + /// + /// + /// + /// Elasticsearch access tokens + /// + /// + /// + /// + /// JWTs + /// + /// + /// + /// /// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. /// In this case, the API key will be created on behalf of the impersonated user. /// /// /// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. + /// The API keys are created by the Elasticsearch API key service, which is automatically enabled. /// /// /// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. @@ -6083,7 +8662,7 @@ public virtual Task GrantApiKeyAsync(CancellationToken canc /// /// By default, API keys never expire. You can specify expiration information when you create the API keys. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GrantApiKeyAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -6099,8 +8678,10 @@ public virtual Task GrantApiKeyAsync(Action /// /// Determine whether the specified user has a specified list of privileges. + /// All users can use this API, but only to determine their own privileges. + /// To check the privileges of other users, you must use the run as feature. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual HasPrivilegesResponse HasPrivileges(HasPrivilegesRequest request) @@ -6115,8 +8696,10 @@ public virtual HasPrivilegesResponse HasPrivileges(HasPrivilegesRequest request) /// /// /// Determine whether the specified user has a specified list of privileges. + /// All users can use this API, but only to determine their own privileges. + /// To check the privileges of other users, you must use the run as feature. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HasPrivilegesAsync(HasPrivilegesRequest request, CancellationToken cancellationToken = default) { @@ -6130,8 +8713,10 @@ public virtual Task HasPrivilegesAsync(HasPrivilegesReque /// /// /// Determine whether the specified user has a specified list of privileges. + /// All users can use this API, but only to determine their own privileges. + /// To check the privileges of other users, you must use the run as feature. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual HasPrivilegesResponse HasPrivileges(HasPrivilegesRequestDescriptor descriptor) @@ -6146,8 +8731,10 @@ public virtual HasPrivilegesResponse HasPrivileges(HasPrivilegesRequestDescripto /// /// /// Determine whether the specified user has a specified list of privileges. + /// All users can use this API, but only to determine their own privileges. + /// To check the privileges of other users, you must use the run as feature. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual HasPrivilegesResponse HasPrivileges(Elastic.Clients.Elasticsearch.Name? user) @@ -6163,8 +8750,10 @@ public virtual HasPrivilegesResponse HasPrivileges(Elastic.Clients.Elasticsearch /// /// /// Determine whether the specified user has a specified list of privileges. + /// All users can use this API, but only to determine their own privileges. + /// To check the privileges of other users, you must use the run as feature. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual HasPrivilegesResponse HasPrivileges(Elastic.Clients.Elasticsearch.Name? user, Action configureRequest) @@ -6181,8 +8770,10 @@ public virtual HasPrivilegesResponse HasPrivileges(Elastic.Clients.Elasticsearch /// /// /// Determine whether the specified user has a specified list of privileges. + /// All users can use this API, but only to determine their own privileges. + /// To check the privileges of other users, you must use the run as feature. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual HasPrivilegesResponse HasPrivileges() @@ -6198,8 +8789,10 @@ public virtual HasPrivilegesResponse HasPrivileges() /// /// /// Determine whether the specified user has a specified list of privileges. + /// All users can use this API, but only to determine their own privileges. + /// To check the privileges of other users, you must use the run as feature. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual HasPrivilegesResponse HasPrivileges(Action configureRequest) @@ -6216,8 +8809,10 @@ public virtual HasPrivilegesResponse HasPrivileges(Action /// /// Determine whether the specified user has a specified list of privileges. + /// All users can use this API, but only to determine their own privileges. + /// To check the privileges of other users, you must use the run as feature. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HasPrivilegesAsync(HasPrivilegesRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -6231,8 +8826,10 @@ public virtual Task HasPrivilegesAsync(HasPrivilegesReque /// /// /// Determine whether the specified user has a specified list of privileges. + /// All users can use this API, but only to determine their own privileges. + /// To check the privileges of other users, you must use the run as feature. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HasPrivilegesAsync(Elastic.Clients.Elasticsearch.Name? user, CancellationToken cancellationToken = default) { @@ -6247,8 +8844,10 @@ public virtual Task HasPrivilegesAsync(Elastic.Clients.El /// /// /// Determine whether the specified user has a specified list of privileges. + /// All users can use this API, but only to determine their own privileges. + /// To check the privileges of other users, you must use the run as feature. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HasPrivilegesAsync(Elastic.Clients.Elasticsearch.Name? user, Action configureRequest, CancellationToken cancellationToken = default) { @@ -6264,8 +8863,10 @@ public virtual Task HasPrivilegesAsync(Elastic.Clients.El /// /// /// Determine whether the specified user has a specified list of privileges. + /// All users can use this API, but only to determine their own privileges. + /// To check the privileges of other users, you must use the run as feature. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HasPrivilegesAsync(CancellationToken cancellationToken = default) { @@ -6280,8 +8881,10 @@ public virtual Task HasPrivilegesAsync(CancellationToken /// /// /// Determine whether the specified user has a specified list of privileges. + /// All users can use this API, but only to determine their own privileges. + /// To check the privileges of other users, you must use the run as feature. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HasPrivilegesAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -6298,7 +8901,11 @@ public virtual Task HasPrivilegesAsync(Action /// Determine whether the users associated with the specified user profile IDs have all the requested privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual HasPrivilegesUserProfileResponse HasPrivilegesUserProfile(HasPrivilegesUserProfileRequest request) @@ -6314,7 +8921,11 @@ public virtual HasPrivilegesUserProfileResponse HasPrivilegesUserProfile(HasPriv /// /// Determine whether the users associated with the specified user profile IDs have all the requested privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HasPrivilegesUserProfileAsync(HasPrivilegesUserProfileRequest request, CancellationToken cancellationToken = default) { @@ -6329,7 +8940,11 @@ public virtual Task HasPrivilegesUserProfileAs /// /// Determine whether the users associated with the specified user profile IDs have all the requested privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual HasPrivilegesUserProfileResponse HasPrivilegesUserProfile(HasPrivilegesUserProfileRequestDescriptor descriptor) @@ -6345,7 +8960,11 @@ public virtual HasPrivilegesUserProfileResponse HasPrivilegesUserProfile(HasPriv /// /// Determine whether the users associated with the specified user profile IDs have all the requested privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual HasPrivilegesUserProfileResponse HasPrivilegesUserProfile() @@ -6362,7 +8981,11 @@ public virtual HasPrivilegesUserProfileResponse HasPrivilegesUserProfile() /// /// Determine whether the users associated with the specified user profile IDs have all the requested privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual HasPrivilegesUserProfileResponse HasPrivilegesUserProfile(Action configureRequest) @@ -6380,7 +9003,11 @@ public virtual HasPrivilegesUserProfileResponse HasPrivilegesUserProfile(Action< /// /// Determine whether the users associated with the specified user profile IDs have all the requested privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HasPrivilegesUserProfileAsync(HasPrivilegesUserProfileRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -6395,7 +9022,11 @@ public virtual Task HasPrivilegesUserProfileAs /// /// Determine whether the users associated with the specified user profile IDs have all the requested privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HasPrivilegesUserProfileAsync(CancellationToken cancellationToken = default) { @@ -6411,7 +9042,11 @@ public virtual Task HasPrivilegesUserProfileAs /// /// Determine whether the users associated with the specified user profile IDs have all the requested privileges. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task HasPrivilegesUserProfileAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -6428,8 +9063,12 @@ public virtual Task HasPrivilegesUserProfileAs /// /// This API invalidates API keys created by the create API key or grant API key APIs. /// Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. - /// The manage_api_key privilege allows deleting any API keys. - /// The manage_own_api_key only allows deleting API keys that are owned by the user. + /// + /// + /// To use this API, you must have at least the manage_security, manage_api_key, or manage_own_api_key cluster privileges. + /// The manage_security privilege allows deleting any API key, including both REST and cross cluster API keys. + /// The manage_api_key privilege allows deleting any REST API key, but not cross cluster API keys. + /// The manage_own_api_key only allows deleting REST API keys that are owned by the user. /// In addition, with the manage_own_api_key privilege, an invalidation request must be issued in one of the three formats: /// /// @@ -6440,7 +9079,7 @@ public virtual Task HasPrivilegesUserProfileAs /// /// /// - /// Or, set both username and realm_name to match the user’s identity. + /// Or, set both username and realm_name to match the user's identity. /// /// /// @@ -6449,7 +9088,7 @@ public virtual Task HasPrivilegesUserProfileAs /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual InvalidateApiKeyResponse InvalidateApiKey(InvalidateApiKeyRequest request) @@ -6465,8 +9104,12 @@ public virtual InvalidateApiKeyResponse InvalidateApiKey(InvalidateApiKeyRequest /// /// This API invalidates API keys created by the create API key or grant API key APIs. /// Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. - /// The manage_api_key privilege allows deleting any API keys. - /// The manage_own_api_key only allows deleting API keys that are owned by the user. + /// + /// + /// To use this API, you must have at least the manage_security, manage_api_key, or manage_own_api_key cluster privileges. + /// The manage_security privilege allows deleting any API key, including both REST and cross cluster API keys. + /// The manage_api_key privilege allows deleting any REST API key, but not cross cluster API keys. + /// The manage_own_api_key only allows deleting REST API keys that are owned by the user. /// In addition, with the manage_own_api_key privilege, an invalidation request must be issued in one of the three formats: /// /// @@ -6477,7 +9120,7 @@ public virtual InvalidateApiKeyResponse InvalidateApiKey(InvalidateApiKeyRequest /// /// /// - /// Or, set both username and realm_name to match the user’s identity. + /// Or, set both username and realm_name to match the user's identity. /// /// /// @@ -6486,7 +9129,7 @@ public virtual InvalidateApiKeyResponse InvalidateApiKey(InvalidateApiKeyRequest /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task InvalidateApiKeyAsync(InvalidateApiKeyRequest request, CancellationToken cancellationToken = default) { @@ -6501,8 +9144,12 @@ public virtual Task InvalidateApiKeyAsync(InvalidateAp /// /// This API invalidates API keys created by the create API key or grant API key APIs. /// Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. - /// The manage_api_key privilege allows deleting any API keys. - /// The manage_own_api_key only allows deleting API keys that are owned by the user. + /// + /// + /// To use this API, you must have at least the manage_security, manage_api_key, or manage_own_api_key cluster privileges. + /// The manage_security privilege allows deleting any API key, including both REST and cross cluster API keys. + /// The manage_api_key privilege allows deleting any REST API key, but not cross cluster API keys. + /// The manage_own_api_key only allows deleting REST API keys that are owned by the user. /// In addition, with the manage_own_api_key privilege, an invalidation request must be issued in one of the three formats: /// /// @@ -6513,7 +9160,7 @@ public virtual Task InvalidateApiKeyAsync(InvalidateAp /// /// /// - /// Or, set both username and realm_name to match the user’s identity. + /// Or, set both username and realm_name to match the user's identity. /// /// /// @@ -6522,7 +9169,7 @@ public virtual Task InvalidateApiKeyAsync(InvalidateAp /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual InvalidateApiKeyResponse InvalidateApiKey(InvalidateApiKeyRequestDescriptor descriptor) @@ -6538,8 +9185,12 @@ public virtual InvalidateApiKeyResponse InvalidateApiKey(InvalidateApiKeyRequest /// /// This API invalidates API keys created by the create API key or grant API key APIs. /// Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. - /// The manage_api_key privilege allows deleting any API keys. - /// The manage_own_api_key only allows deleting API keys that are owned by the user. + /// + /// + /// To use this API, you must have at least the manage_security, manage_api_key, or manage_own_api_key cluster privileges. + /// The manage_security privilege allows deleting any API key, including both REST and cross cluster API keys. + /// The manage_api_key privilege allows deleting any REST API key, but not cross cluster API keys. + /// The manage_own_api_key only allows deleting REST API keys that are owned by the user. /// In addition, with the manage_own_api_key privilege, an invalidation request must be issued in one of the three formats: /// /// @@ -6550,7 +9201,7 @@ public virtual InvalidateApiKeyResponse InvalidateApiKey(InvalidateApiKeyRequest /// /// /// - /// Or, set both username and realm_name to match the user’s identity. + /// Or, set both username and realm_name to match the user's identity. /// /// /// @@ -6559,7 +9210,7 @@ public virtual InvalidateApiKeyResponse InvalidateApiKey(InvalidateApiKeyRequest /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual InvalidateApiKeyResponse InvalidateApiKey() @@ -6576,8 +9227,12 @@ public virtual InvalidateApiKeyResponse InvalidateApiKey() /// /// This API invalidates API keys created by the create API key or grant API key APIs. /// Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. - /// The manage_api_key privilege allows deleting any API keys. - /// The manage_own_api_key only allows deleting API keys that are owned by the user. + /// + /// + /// To use this API, you must have at least the manage_security, manage_api_key, or manage_own_api_key cluster privileges. + /// The manage_security privilege allows deleting any API key, including both REST and cross cluster API keys. + /// The manage_api_key privilege allows deleting any REST API key, but not cross cluster API keys. + /// The manage_own_api_key only allows deleting REST API keys that are owned by the user. /// In addition, with the manage_own_api_key privilege, an invalidation request must be issued in one of the three formats: /// /// @@ -6588,7 +9243,7 @@ public virtual InvalidateApiKeyResponse InvalidateApiKey() /// /// /// - /// Or, set both username and realm_name to match the user’s identity. + /// Or, set both username and realm_name to match the user's identity. /// /// /// @@ -6597,7 +9252,7 @@ public virtual InvalidateApiKeyResponse InvalidateApiKey() /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual InvalidateApiKeyResponse InvalidateApiKey(Action configureRequest) @@ -6615,8 +9270,12 @@ public virtual InvalidateApiKeyResponse InvalidateApiKey(Action /// This API invalidates API keys created by the create API key or grant API key APIs. /// Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. - /// The manage_api_key privilege allows deleting any API keys. - /// The manage_own_api_key only allows deleting API keys that are owned by the user. + /// + /// + /// To use this API, you must have at least the manage_security, manage_api_key, or manage_own_api_key cluster privileges. + /// The manage_security privilege allows deleting any API key, including both REST and cross cluster API keys. + /// The manage_api_key privilege allows deleting any REST API key, but not cross cluster API keys. + /// The manage_own_api_key only allows deleting REST API keys that are owned by the user. /// In addition, with the manage_own_api_key privilege, an invalidation request must be issued in one of the three formats: /// /// @@ -6627,7 +9286,7 @@ public virtual InvalidateApiKeyResponse InvalidateApiKey(Action /// /// - /// Or, set both username and realm_name to match the user’s identity. + /// Or, set both username and realm_name to match the user's identity. /// /// /// @@ -6636,7 +9295,7 @@ public virtual InvalidateApiKeyResponse InvalidateApiKey(Action /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task InvalidateApiKeyAsync(InvalidateApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -6651,8 +9310,12 @@ public virtual Task InvalidateApiKeyAsync(InvalidateAp /// /// This API invalidates API keys created by the create API key or grant API key APIs. /// Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. - /// The manage_api_key privilege allows deleting any API keys. - /// The manage_own_api_key only allows deleting API keys that are owned by the user. + /// + /// + /// To use this API, you must have at least the manage_security, manage_api_key, or manage_own_api_key cluster privileges. + /// The manage_security privilege allows deleting any API key, including both REST and cross cluster API keys. + /// The manage_api_key privilege allows deleting any REST API key, but not cross cluster API keys. + /// The manage_own_api_key only allows deleting REST API keys that are owned by the user. /// In addition, with the manage_own_api_key privilege, an invalidation request must be issued in one of the three formats: /// /// @@ -6663,7 +9326,7 @@ public virtual Task InvalidateApiKeyAsync(InvalidateAp /// /// /// - /// Or, set both username and realm_name to match the user’s identity. + /// Or, set both username and realm_name to match the user's identity. /// /// /// @@ -6672,7 +9335,7 @@ public virtual Task InvalidateApiKeyAsync(InvalidateAp /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task InvalidateApiKeyAsync(CancellationToken cancellationToken = default) { @@ -6688,8 +9351,12 @@ public virtual Task InvalidateApiKeyAsync(Cancellation /// /// This API invalidates API keys created by the create API key or grant API key APIs. /// Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. - /// The manage_api_key privilege allows deleting any API keys. - /// The manage_own_api_key only allows deleting API keys that are owned by the user. + /// + /// + /// To use this API, you must have at least the manage_security, manage_api_key, or manage_own_api_key cluster privileges. + /// The manage_security privilege allows deleting any API key, including both REST and cross cluster API keys. + /// The manage_api_key privilege allows deleting any REST API key, but not cross cluster API keys. + /// The manage_own_api_key only allows deleting REST API keys that are owned by the user. /// In addition, with the manage_own_api_key privilege, an invalidation request must be issued in one of the three formats: /// /// @@ -6700,7 +9367,7 @@ public virtual Task InvalidateApiKeyAsync(Cancellation /// /// /// - /// Or, set both username and realm_name to match the user’s identity. + /// Or, set both username and realm_name to match the user's identity. /// /// /// @@ -6709,7 +9376,7 @@ public virtual Task InvalidateApiKeyAsync(Cancellation /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task InvalidateApiKeyAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -6729,10 +9396,16 @@ public virtual Task InvalidateApiKeyAsync(Actionxpack.security.authc.token.timeout setting. /// /// - /// The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. + /// The refresh tokens returned by the get token API are only valid for 24 hours. + /// They can also be used exactly once. /// If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: While all parameters are optional, at least one of them is required. + /// More specifically, either one of token or refresh_token parameters is required. + /// If none of these two are specified, then realm_name and/or username need to be specified. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual InvalidateTokenResponse InvalidateToken(InvalidateTokenRequest request) @@ -6751,10 +9424,16 @@ public virtual InvalidateTokenResponse InvalidateToken(InvalidateTokenRequest re /// The time period is defined by the xpack.security.authc.token.timeout setting. /// /// - /// The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. + /// The refresh tokens returned by the get token API are only valid for 24 hours. + /// They can also be used exactly once. /// If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: While all parameters are optional, at least one of them is required. + /// More specifically, either one of token or refresh_token parameters is required. + /// If none of these two are specified, then realm_name and/or username need to be specified. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task InvalidateTokenAsync(InvalidateTokenRequest request, CancellationToken cancellationToken = default) { @@ -6772,10 +9451,16 @@ public virtual Task InvalidateTokenAsync(InvalidateToke /// The time period is defined by the xpack.security.authc.token.timeout setting. /// /// - /// The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. + /// The refresh tokens returned by the get token API are only valid for 24 hours. + /// They can also be used exactly once. /// If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: While all parameters are optional, at least one of them is required. + /// More specifically, either one of token or refresh_token parameters is required. + /// If none of these two are specified, then realm_name and/or username need to be specified. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual InvalidateTokenResponse InvalidateToken(InvalidateTokenRequestDescriptor descriptor) @@ -6794,10 +9479,16 @@ public virtual InvalidateTokenResponse InvalidateToken(InvalidateTokenRequestDes /// The time period is defined by the xpack.security.authc.token.timeout setting. /// /// - /// The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. + /// The refresh tokens returned by the get token API are only valid for 24 hours. + /// They can also be used exactly once. /// If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: While all parameters are optional, at least one of them is required. + /// More specifically, either one of token or refresh_token parameters is required. + /// If none of these two are specified, then realm_name and/or username need to be specified. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual InvalidateTokenResponse InvalidateToken() @@ -6817,10 +9508,16 @@ public virtual InvalidateTokenResponse InvalidateToken() /// The time period is defined by the xpack.security.authc.token.timeout setting. /// /// - /// The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. + /// The refresh tokens returned by the get token API are only valid for 24 hours. + /// They can also be used exactly once. /// If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: While all parameters are optional, at least one of them is required. + /// More specifically, either one of token or refresh_token parameters is required. + /// If none of these two are specified, then realm_name and/or username need to be specified. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual InvalidateTokenResponse InvalidateToken(Action configureRequest) @@ -6841,10 +9538,16 @@ public virtual InvalidateTokenResponse InvalidateToken(Actionxpack.security.authc.token.timeout setting. /// /// - /// The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. + /// The refresh tokens returned by the get token API are only valid for 24 hours. + /// They can also be used exactly once. /// If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: While all parameters are optional, at least one of them is required. + /// More specifically, either one of token or refresh_token parameters is required. + /// If none of these two are specified, then realm_name and/or username need to be specified. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task InvalidateTokenAsync(InvalidateTokenRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -6862,10 +9565,16 @@ public virtual Task InvalidateTokenAsync(InvalidateToke /// The time period is defined by the xpack.security.authc.token.timeout setting. /// /// - /// The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. + /// The refresh tokens returned by the get token API are only valid for 24 hours. + /// They can also be used exactly once. /// If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: While all parameters are optional, at least one of them is required. + /// More specifically, either one of token or refresh_token parameters is required. + /// If none of these two are specified, then realm_name and/or username need to be specified. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task InvalidateTokenAsync(CancellationToken cancellationToken = default) { @@ -6884,10 +9593,16 @@ public virtual Task InvalidateTokenAsync(CancellationTo /// The time period is defined by the xpack.security.authc.token.timeout setting. /// /// - /// The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. + /// The refresh tokens returned by the get token API are only valid for 24 hours. + /// They can also be used exactly once. /// If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: While all parameters are optional, at least one of them is required. + /// More specifically, either one of token or refresh_token parameters is required. + /// If none of these two are specified, then realm_name and/or username need to be specified. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task InvalidateTokenAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -6899,2846 +9614,5569 @@ public virtual Task InvalidateTokenAsync(Action /// - /// Create or update application privileges. + /// Authenticate OpenID Connect. + /// + /// + /// Exchange an OpenID Connect authentication response message for an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. + /// + /// + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutPrivilegesResponse PutPrivileges(PutPrivilegesRequest request) + public virtual OidcAuthenticateResponse OidcAuthenticate(OidcAuthenticateRequest request) { request.BeforeRequest(); - return DoRequest(request); + return DoRequest(request); } /// /// - /// Create or update application privileges. + /// Authenticate OpenID Connect. + /// + /// + /// Exchange an OpenID Connect authentication response message for an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. + /// + /// + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutPrivilegesAsync(PutPrivilegesRequest request, CancellationToken cancellationToken = default) + public virtual Task OidcAuthenticateAsync(OidcAuthenticateRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Create or update application privileges. + /// Authenticate OpenID Connect. + /// + /// + /// Exchange an OpenID Connect authentication response message for an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutPrivilegesResponse PutPrivileges(PutPrivilegesRequestDescriptor descriptor) + public virtual OidcAuthenticateResponse OidcAuthenticate(OidcAuthenticateRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Create or update application privileges. + /// Authenticate OpenID Connect. + /// + /// + /// Exchange an OpenID Connect authentication response message for an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. + /// + /// + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutPrivilegesResponse PutPrivileges() + public virtual OidcAuthenticateResponse OidcAuthenticate() { - var descriptor = new PutPrivilegesRequestDescriptor(); + var descriptor = new OidcAuthenticateRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Create or update application privileges. + /// Authenticate OpenID Connect. + /// + /// + /// Exchange an OpenID Connect authentication response message for an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. + /// + /// + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutPrivilegesResponse PutPrivileges(Action configureRequest) + public virtual OidcAuthenticateResponse OidcAuthenticate(Action configureRequest) { - var descriptor = new PutPrivilegesRequestDescriptor(); + var descriptor = new OidcAuthenticateRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Create or update application privileges. + /// Authenticate OpenID Connect. + /// + /// + /// Exchange an OpenID Connect authentication response message for an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. + /// + /// + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutPrivilegesAsync(PutPrivilegesRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task OidcAuthenticateAsync(OidcAuthenticateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Create or update application privileges. + /// Authenticate OpenID Connect. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Exchange an OpenID Connect authentication response message for an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. + /// + /// + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutPrivilegesAsync(CancellationToken cancellationToken = default) + public virtual Task OidcAuthenticateAsync(CancellationToken cancellationToken = default) { - var descriptor = new PutPrivilegesRequestDescriptor(); + var descriptor = new OidcAuthenticateRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Create or update application privileges. + /// Authenticate OpenID Connect. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Exchange an OpenID Connect authentication response message for an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. + /// + /// + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutPrivilegesAsync(Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task OidcAuthenticateAsync(Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new PutPrivilegesRequestDescriptor(); + var descriptor = new OidcAuthenticateRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Create or update roles. + /// Logout of OpenID Connect. /// /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. + /// Invalidate an access token and a refresh token that were generated as a response to the /_security/oidc/authenticate API. + /// + /// + /// If the OpenID Connect authentication realm in Elasticsearch is accordingly configured, the response to this call will contain a URI pointing to the end session endpoint of the OpenID Connect Provider in order to perform single logout. + /// + /// + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutRoleResponse PutRole(PutRoleRequest request) + public virtual OidcLogoutResponse OidcLogout(OidcLogoutRequest request) { request.BeforeRequest(); - return DoRequest(request); + return DoRequest(request); } /// /// - /// Create or update roles. + /// Logout of OpenID Connect. /// /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. + /// Invalidate an access token and a refresh token that were generated as a response to the /_security/oidc/authenticate API. + /// + /// + /// If the OpenID Connect authentication realm in Elasticsearch is accordingly configured, the response to this call will contain a URI pointing to the end session endpoint of the OpenID Connect Provider in order to perform single logout. + /// + /// + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutRoleAsync(PutRoleRequest request, CancellationToken cancellationToken = default) + public virtual Task OidcLogoutAsync(OidcLogoutRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Create or update roles. + /// Logout of OpenID Connect. /// /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. + /// Invalidate an access token and a refresh token that were generated as a response to the /_security/oidc/authenticate API. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutRoleResponse PutRole(PutRoleRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, PutRoleResponse, PutRoleRequestParameters>(descriptor); - } - - /// /// - /// Create or update roles. + /// If the OpenID Connect authentication realm in Elasticsearch is accordingly configured, the response to this call will contain a URI pointing to the end session endpoint of the OpenID Connect Provider in order to perform single logout. /// /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutRoleResponse PutRole(Elastic.Clients.Elasticsearch.Name name) + public virtual OidcLogoutResponse OidcLogout(OidcLogoutRequestDescriptor descriptor) { - var descriptor = new PutRoleRequestDescriptor(name); descriptor.BeforeRequest(); - return DoRequest, PutRoleResponse, PutRoleRequestParameters>(descriptor); + return DoRequest(descriptor); } /// /// - /// Create or update roles. + /// Logout of OpenID Connect. /// /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. + /// Invalidate an access token and a refresh token that were generated as a response to the /_security/oidc/authenticate API. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutRoleResponse PutRole(Elastic.Clients.Elasticsearch.Name name, Action> configureRequest) - { - var descriptor = new PutRoleRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, PutRoleResponse, PutRoleRequestParameters>(descriptor); - } - - /// /// - /// Create or update roles. + /// If the OpenID Connect authentication realm in Elasticsearch is accordingly configured, the response to this call will contain a URI pointing to the end session endpoint of the OpenID Connect Provider in order to perform single logout. /// /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutRoleResponse PutRole(PutRoleRequestDescriptor descriptor) + public virtual OidcLogoutResponse OidcLogout() { + var descriptor = new OidcLogoutRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Create or update roles. + /// Logout of OpenID Connect. /// /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. + /// Invalidate an access token and a refresh token that were generated as a response to the /_security/oidc/authenticate API. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutRoleResponse PutRole(Elastic.Clients.Elasticsearch.Name name) - { - var descriptor = new PutRoleRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Create or update roles. + /// If the OpenID Connect authentication realm in Elasticsearch is accordingly configured, the response to this call will contain a URI pointing to the end session endpoint of the OpenID Connect Provider in order to perform single logout. /// /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutRoleResponse PutRole(Elastic.Clients.Elasticsearch.Name name, Action configureRequest) + public virtual OidcLogoutResponse OidcLogout(Action configureRequest) { - var descriptor = new PutRoleRequestDescriptor(name); + var descriptor = new OidcLogoutRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Create or update roles. + /// Logout of OpenID Connect. /// /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. + /// Invalidate an access token and a refresh token that were generated as a response to the /_security/oidc/authenticate API. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRoleAsync(PutRoleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PutRoleResponse, PutRoleRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Create or update roles. + /// If the OpenID Connect authentication realm in Elasticsearch is accordingly configured, the response to this call will contain a URI pointing to the end session endpoint of the OpenID Connect Provider in order to perform single logout. /// /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutRoleAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) + public virtual Task OidcLogoutAsync(OidcLogoutRequestDescriptor descriptor, CancellationToken cancellationToken = default) { - var descriptor = new PutRoleRequestDescriptor(name); descriptor.BeforeRequest(); - return DoRequestAsync, PutRoleResponse, PutRoleRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Create or update roles. + /// Logout of OpenID Connect. /// /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. + /// Invalidate an access token and a refresh token that were generated as a response to the /_security/oidc/authenticate API. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRoleAsync(Elastic.Clients.Elasticsearch.Name name, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PutRoleRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, PutRoleResponse, PutRoleRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Create or update roles. + /// If the OpenID Connect authentication realm in Elasticsearch is accordingly configured, the response to this call will contain a URI pointing to the end session endpoint of the OpenID Connect Provider in order to perform single logout. /// /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutRoleAsync(PutRoleRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task OidcLogoutAsync(CancellationToken cancellationToken = default) { + var descriptor = new OidcLogoutRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Create or update roles. + /// Logout of OpenID Connect. /// /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. + /// Invalidate an access token and a refresh token that were generated as a response to the /_security/oidc/authenticate API. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutRoleAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new PutRoleRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Create or update roles. + /// If the OpenID Connect authentication realm in Elasticsearch is accordingly configured, the response to this call will contain a URI pointing to the end session endpoint of the OpenID Connect Provider in order to perform single logout. /// /// - /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. - /// The create or update roles API cannot update roles that are defined in roles files. - /// File-based role management is not available in Elastic Serverless. + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutRoleAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task OidcLogoutAsync(Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new PutRoleRequestDescriptor(name); + var descriptor = new OidcLogoutRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Create or update role mappings. + /// Prepare OpenID connect authentication. /// /// - /// Role mappings define which roles are assigned to each user. - /// Each mapping has rules that identify users and a list of roles that are granted to those users. - /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. + /// Create an oAuth 2.0 authentication request as a URL string based on the configuration of the OpenID Connect authentication realm in Elasticsearch. /// /// - /// This API does not create roles. Rather, it maps users to existing roles. - /// Roles can be created by using the create or update roles API or roles files. + /// The response of this API is a URL pointing to the Authorization Endpoint of the configured OpenID Connect Provider, which can be used to redirect the browser of the user in order to continue the authentication process. + /// + /// + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutRoleMappingResponse PutRoleMapping(PutRoleMappingRequest request) + public virtual OidcPrepareAuthenticationResponse OidcPrepareAuthentication(OidcPrepareAuthenticationRequest request) { request.BeforeRequest(); - return DoRequest(request); + return DoRequest(request); } /// /// - /// Create or update role mappings. + /// Prepare OpenID connect authentication. /// /// - /// Role mappings define which roles are assigned to each user. - /// Each mapping has rules that identify users and a list of roles that are granted to those users. - /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. + /// Create an oAuth 2.0 authentication request as a URL string based on the configuration of the OpenID Connect authentication realm in Elasticsearch. /// /// - /// This API does not create roles. Rather, it maps users to existing roles. - /// Roles can be created by using the create or update roles API or roles files. + /// The response of this API is a URL pointing to the Authorization Endpoint of the configured OpenID Connect Provider, which can be used to redirect the browser of the user in order to continue the authentication process. + /// + /// + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutRoleMappingAsync(PutRoleMappingRequest request, CancellationToken cancellationToken = default) + public virtual Task OidcPrepareAuthenticationAsync(OidcPrepareAuthenticationRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Create or update role mappings. + /// Prepare OpenID connect authentication. /// /// - /// Role mappings define which roles are assigned to each user. - /// Each mapping has rules that identify users and a list of roles that are granted to those users. - /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. + /// Create an oAuth 2.0 authentication request as a URL string based on the configuration of the OpenID Connect authentication realm in Elasticsearch. /// /// - /// This API does not create roles. Rather, it maps users to existing roles. - /// Roles can be created by using the create or update roles API or roles files. + /// The response of this API is a URL pointing to the Authorization Endpoint of the configured OpenID Connect Provider, which can be used to redirect the browser of the user in order to continue the authentication process. + /// + /// + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutRoleMappingResponse PutRoleMapping(PutRoleMappingRequestDescriptor descriptor) + public virtual OidcPrepareAuthenticationResponse OidcPrepareAuthentication(OidcPrepareAuthenticationRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Create or update role mappings. + /// Prepare OpenID connect authentication. /// /// - /// Role mappings define which roles are assigned to each user. - /// Each mapping has rules that identify users and a list of roles that are granted to those users. - /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. + /// Create an oAuth 2.0 authentication request as a URL string based on the configuration of the OpenID Connect authentication realm in Elasticsearch. /// /// - /// This API does not create roles. Rather, it maps users to existing roles. - /// Roles can be created by using the create or update roles API or roles files. + /// The response of this API is a URL pointing to the Authorization Endpoint of the configured OpenID Connect Provider, which can be used to redirect the browser of the user in order to continue the authentication process. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutRoleMappingResponse PutRoleMapping(Elastic.Clients.Elasticsearch.Name name) + public virtual OidcPrepareAuthenticationResponse OidcPrepareAuthentication() { - var descriptor = new PutRoleMappingRequestDescriptor(name); + var descriptor = new OidcPrepareAuthenticationRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Create or update role mappings. + /// Prepare OpenID connect authentication. /// /// - /// Role mappings define which roles are assigned to each user. - /// Each mapping has rules that identify users and a list of roles that are granted to those users. - /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. + /// Create an oAuth 2.0 authentication request as a URL string based on the configuration of the OpenID Connect authentication realm in Elasticsearch. /// /// - /// This API does not create roles. Rather, it maps users to existing roles. - /// Roles can be created by using the create or update roles API or roles files. + /// The response of this API is a URL pointing to the Authorization Endpoint of the configured OpenID Connect Provider, which can be used to redirect the browser of the user in order to continue the authentication process. + /// + /// + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutRoleMappingResponse PutRoleMapping(Elastic.Clients.Elasticsearch.Name name, Action configureRequest) + public virtual OidcPrepareAuthenticationResponse OidcPrepareAuthentication(Action configureRequest) { - var descriptor = new PutRoleMappingRequestDescriptor(name); + var descriptor = new OidcPrepareAuthenticationRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Create or update role mappings. + /// Prepare OpenID connect authentication. /// /// - /// Role mappings define which roles are assigned to each user. - /// Each mapping has rules that identify users and a list of roles that are granted to those users. - /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. + /// Create an oAuth 2.0 authentication request as a URL string based on the configuration of the OpenID Connect authentication realm in Elasticsearch. /// /// - /// This API does not create roles. Rather, it maps users to existing roles. - /// Roles can be created by using the create or update roles API or roles files. + /// The response of this API is a URL pointing to the Authorization Endpoint of the configured OpenID Connect Provider, which can be used to redirect the browser of the user in order to continue the authentication process. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutRoleMappingAsync(PutRoleMappingRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task OidcPrepareAuthenticationAsync(OidcPrepareAuthenticationRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Create or update role mappings. + /// Prepare OpenID connect authentication. /// /// - /// Role mappings define which roles are assigned to each user. - /// Each mapping has rules that identify users and a list of roles that are granted to those users. - /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. + /// Create an oAuth 2.0 authentication request as a URL string based on the configuration of the OpenID Connect authentication realm in Elasticsearch. /// /// - /// This API does not create roles. Rather, it maps users to existing roles. - /// Roles can be created by using the create or update roles API or roles files. + /// The response of this API is a URL pointing to the Authorization Endpoint of the configured OpenID Connect Provider, which can be used to redirect the browser of the user in order to continue the authentication process. + /// + /// + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutRoleMappingAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) + public virtual Task OidcPrepareAuthenticationAsync(CancellationToken cancellationToken = default) { - var descriptor = new PutRoleMappingRequestDescriptor(name); + var descriptor = new OidcPrepareAuthenticationRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Create or update role mappings. + /// Prepare OpenID connect authentication. /// /// - /// Role mappings define which roles are assigned to each user. - /// Each mapping has rules that identify users and a list of roles that are granted to those users. - /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. + /// Create an oAuth 2.0 authentication request as a URL string based on the configuration of the OpenID Connect authentication realm in Elasticsearch. /// /// - /// This API does not create roles. Rather, it maps users to existing roles. - /// Roles can be created by using the create or update roles API or roles files. + /// The response of this API is a URL pointing to the Authorization Endpoint of the configured OpenID Connect Provider, which can be used to redirect the browser of the user in order to continue the authentication process. + /// + /// + /// Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + /// These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutRoleMappingAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task OidcPrepareAuthenticationAsync(Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new PutRoleMappingRequestDescriptor(name); + var descriptor = new OidcPrepareAuthenticationRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Create or update users. + /// Create or update application privileges. /// /// - /// A password is required for adding a new user but is optional when updating an existing user. - /// To change a user’s password without updating any other fields, use the change password API. + /// To use this API, you must have one of the following privileges: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutUserResponse PutUser(PutUserRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// + /// + /// /// - /// Create or update users. + /// The manage_security cluster privilege (or a greater privilege such as all). /// + /// + /// /// - /// A password is required for adding a new user but is optional when updating an existing user. - /// To change a user’s password without updating any other fields, use the change password API. + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutUserAsync(PutUserRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// + /// + /// /// - /// Create or update users. + /// Application names are formed from a prefix, with an optional suffix that conform to the following rules: /// + /// + /// /// - /// A password is required for adding a new user but is optional when updating an existing user. - /// To change a user’s password without updating any other fields, use the change password API. + /// The prefix must begin with a lowercase ASCII letter. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutUserResponse PutUser(PutUserRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - + /// + /// + /// + /// The prefix must contain only ASCII letters or digits. + /// + /// + /// + /// + /// The prefix must be at least 3 characters long. + /// + /// + /// + /// + /// If the suffix exists, it must begin with either a dash - or _. + /// + /// + /// + /// + /// The suffix cannot contain any of the following characters: \, /, *, ?, ", <, >, |, ,, *. + /// + /// + /// + /// + /// No part of the name can contain whitespace. + /// + /// + /// + /// + /// Privilege names must begin with a lowercase ASCII letter and must contain only ASCII letters and digits along with the characters _, -, and .. + /// + /// + /// Action names can contain any number of printable ASCII characters and must contain at least one of the following characters: /, *, :. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutPrivilegesResponse PutPrivileges(PutPrivilegesRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Create or update application privileges. + /// + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_security cluster privilege (or a greater privilege such as all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// + /// Application names are formed from a prefix, with an optional suffix that conform to the following rules: + /// + /// + /// + /// + /// The prefix must begin with a lowercase ASCII letter. + /// + /// + /// + /// + /// The prefix must contain only ASCII letters or digits. + /// + /// + /// + /// + /// The prefix must be at least 3 characters long. + /// + /// + /// + /// + /// If the suffix exists, it must begin with either a dash - or _. + /// + /// + /// + /// + /// The suffix cannot contain any of the following characters: \, /, *, ?, ", <, >, |, ,, *. + /// + /// + /// + /// + /// No part of the name can contain whitespace. + /// + /// + /// + /// + /// Privilege names must begin with a lowercase ASCII letter and must contain only ASCII letters and digits along with the characters _, -, and .. + /// + /// + /// Action names can contain any number of printable ASCII characters and must contain at least one of the following characters: /, *, :. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutPrivilegesAsync(PutPrivilegesRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Create or update application privileges. + /// + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_security cluster privilege (or a greater privilege such as all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// + /// Application names are formed from a prefix, with an optional suffix that conform to the following rules: + /// + /// + /// + /// + /// The prefix must begin with a lowercase ASCII letter. + /// + /// + /// + /// + /// The prefix must contain only ASCII letters or digits. + /// + /// + /// + /// + /// The prefix must be at least 3 characters long. + /// + /// + /// + /// + /// If the suffix exists, it must begin with either a dash - or _. + /// + /// + /// + /// + /// The suffix cannot contain any of the following characters: \, /, *, ?, ", <, >, |, ,, *. + /// + /// + /// + /// + /// No part of the name can contain whitespace. + /// + /// + /// + /// + /// Privilege names must begin with a lowercase ASCII letter and must contain only ASCII letters and digits along with the characters _, -, and .. + /// + /// + /// Action names can contain any number of printable ASCII characters and must contain at least one of the following characters: /, *, :. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutPrivilegesResponse PutPrivileges(PutPrivilegesRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Create or update application privileges. + /// + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_security cluster privilege (or a greater privilege such as all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// + /// Application names are formed from a prefix, with an optional suffix that conform to the following rules: + /// + /// + /// + /// + /// The prefix must begin with a lowercase ASCII letter. + /// + /// + /// + /// + /// The prefix must contain only ASCII letters or digits. + /// + /// + /// + /// + /// The prefix must be at least 3 characters long. + /// + /// + /// + /// + /// If the suffix exists, it must begin with either a dash - or _. + /// + /// + /// + /// + /// The suffix cannot contain any of the following characters: \, /, *, ?, ", <, >, |, ,, *. + /// + /// + /// + /// + /// No part of the name can contain whitespace. + /// + /// + /// + /// + /// Privilege names must begin with a lowercase ASCII letter and must contain only ASCII letters and digits along with the characters _, -, and .. + /// + /// + /// Action names can contain any number of printable ASCII characters and must contain at least one of the following characters: /, *, :. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutPrivilegesResponse PutPrivileges() + { + var descriptor = new PutPrivilegesRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Create or update application privileges. + /// + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_security cluster privilege (or a greater privilege such as all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// + /// Application names are formed from a prefix, with an optional suffix that conform to the following rules: + /// + /// + /// + /// + /// The prefix must begin with a lowercase ASCII letter. + /// + /// + /// + /// + /// The prefix must contain only ASCII letters or digits. + /// + /// + /// + /// + /// The prefix must be at least 3 characters long. + /// + /// + /// + /// + /// If the suffix exists, it must begin with either a dash - or _. + /// + /// + /// + /// + /// The suffix cannot contain any of the following characters: \, /, *, ?, ", <, >, |, ,, *. + /// + /// + /// + /// + /// No part of the name can contain whitespace. + /// + /// + /// + /// + /// Privilege names must begin with a lowercase ASCII letter and must contain only ASCII letters and digits along with the characters _, -, and .. + /// + /// + /// Action names can contain any number of printable ASCII characters and must contain at least one of the following characters: /, *, :. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutPrivilegesResponse PutPrivileges(Action configureRequest) + { + var descriptor = new PutPrivilegesRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Create or update application privileges. + /// + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_security cluster privilege (or a greater privilege such as all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// + /// Application names are formed from a prefix, with an optional suffix that conform to the following rules: + /// + /// + /// + /// + /// The prefix must begin with a lowercase ASCII letter. + /// + /// + /// + /// + /// The prefix must contain only ASCII letters or digits. + /// + /// + /// + /// + /// The prefix must be at least 3 characters long. + /// + /// + /// + /// + /// If the suffix exists, it must begin with either a dash - or _. + /// + /// + /// + /// + /// The suffix cannot contain any of the following characters: \, /, *, ?, ", <, >, |, ,, *. + /// + /// + /// + /// + /// No part of the name can contain whitespace. + /// + /// + /// + /// + /// Privilege names must begin with a lowercase ASCII letter and must contain only ASCII letters and digits along with the characters _, -, and .. + /// + /// + /// Action names can contain any number of printable ASCII characters and must contain at least one of the following characters: /, *, :. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutPrivilegesAsync(PutPrivilegesRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create or update application privileges. + /// + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_security cluster privilege (or a greater privilege such as all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// + /// Application names are formed from a prefix, with an optional suffix that conform to the following rules: + /// + /// + /// + /// + /// The prefix must begin with a lowercase ASCII letter. + /// + /// + /// + /// + /// The prefix must contain only ASCII letters or digits. + /// + /// + /// + /// + /// The prefix must be at least 3 characters long. + /// + /// + /// + /// + /// If the suffix exists, it must begin with either a dash - or _. + /// + /// + /// + /// + /// The suffix cannot contain any of the following characters: \, /, *, ?, ", <, >, |, ,, *. + /// + /// + /// + /// + /// No part of the name can contain whitespace. + /// + /// + /// + /// + /// Privilege names must begin with a lowercase ASCII letter and must contain only ASCII letters and digits along with the characters _, -, and .. + /// + /// + /// Action names can contain any number of printable ASCII characters and must contain at least one of the following characters: /, *, :. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutPrivilegesAsync(CancellationToken cancellationToken = default) + { + var descriptor = new PutPrivilegesRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create or update application privileges. + /// + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_security cluster privilege (or a greater privilege such as all). + /// + /// + /// + /// + /// The "Manage Application Privileges" global privilege for the application being referenced in the request. + /// + /// + /// + /// + /// Application names are formed from a prefix, with an optional suffix that conform to the following rules: + /// + /// + /// + /// + /// The prefix must begin with a lowercase ASCII letter. + /// + /// + /// + /// + /// The prefix must contain only ASCII letters or digits. + /// + /// + /// + /// + /// The prefix must be at least 3 characters long. + /// + /// + /// + /// + /// If the suffix exists, it must begin with either a dash - or _. + /// + /// + /// + /// + /// The suffix cannot contain any of the following characters: \, /, *, ?, ", <, >, |, ,, *. + /// + /// + /// + /// + /// No part of the name can contain whitespace. + /// + /// + /// + /// + /// Privilege names must begin with a lowercase ASCII letter and must contain only ASCII letters and digits along with the characters _, -, and .. + /// + /// + /// Action names can contain any number of printable ASCII characters and must contain at least one of the following characters: /, *, :. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutPrivilegesAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new PutPrivilegesRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create or update roles. + /// + /// + /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. + /// The create or update roles API cannot update roles that are defined in roles files. + /// File-based role management is not available in Elastic Serverless. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutRoleResponse PutRole(PutRoleRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Create or update roles. + /// + /// + /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. + /// The create or update roles API cannot update roles that are defined in roles files. + /// File-based role management is not available in Elastic Serverless. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutRoleAsync(PutRoleRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Create or update roles. + /// + /// + /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. + /// The create or update roles API cannot update roles that are defined in roles files. + /// File-based role management is not available in Elastic Serverless. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutRoleResponse PutRole(PutRoleRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, PutRoleResponse, PutRoleRequestParameters>(descriptor); + } + + /// + /// + /// Create or update roles. + /// + /// + /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. + /// The create or update roles API cannot update roles that are defined in roles files. + /// File-based role management is not available in Elastic Serverless. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutRoleResponse PutRole(Elastic.Clients.Elasticsearch.Name name) + { + var descriptor = new PutRoleRequestDescriptor(name); + descriptor.BeforeRequest(); + return DoRequest, PutRoleResponse, PutRoleRequestParameters>(descriptor); + } + + /// + /// + /// Create or update roles. + /// + /// + /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. + /// The create or update roles API cannot update roles that are defined in roles files. + /// File-based role management is not available in Elastic Serverless. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutRoleResponse PutRole(Elastic.Clients.Elasticsearch.Name name, Action> configureRequest) + { + var descriptor = new PutRoleRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, PutRoleResponse, PutRoleRequestParameters>(descriptor); + } + + /// + /// + /// Create or update roles. + /// + /// + /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. + /// The create or update roles API cannot update roles that are defined in roles files. + /// File-based role management is not available in Elastic Serverless. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutRoleResponse PutRole(PutRoleRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Create or update roles. + /// + /// + /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. + /// The create or update roles API cannot update roles that are defined in roles files. + /// File-based role management is not available in Elastic Serverless. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutRoleResponse PutRole(Elastic.Clients.Elasticsearch.Name name) + { + var descriptor = new PutRoleRequestDescriptor(name); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Create or update roles. + /// + /// + /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. + /// The create or update roles API cannot update roles that are defined in roles files. + /// File-based role management is not available in Elastic Serverless. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutRoleResponse PutRole(Elastic.Clients.Elasticsearch.Name name, Action configureRequest) + { + var descriptor = new PutRoleRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Create or update roles. + /// + /// + /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. + /// The create or update roles API cannot update roles that are defined in roles files. + /// File-based role management is not available in Elastic Serverless. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutRoleAsync(PutRoleRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, PutRoleResponse, PutRoleRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Create or update roles. + /// + /// + /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. + /// The create or update roles API cannot update roles that are defined in roles files. + /// File-based role management is not available in Elastic Serverless. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutRoleAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) + { + var descriptor = new PutRoleRequestDescriptor(name); + descriptor.BeforeRequest(); + return DoRequestAsync, PutRoleResponse, PutRoleRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Create or update roles. + /// + /// + /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. + /// The create or update roles API cannot update roles that are defined in roles files. + /// File-based role management is not available in Elastic Serverless. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutRoleAsync(Elastic.Clients.Elasticsearch.Name name, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new PutRoleRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, PutRoleResponse, PutRoleRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Create or update roles. + /// + /// + /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. + /// The create or update roles API cannot update roles that are defined in roles files. + /// File-based role management is not available in Elastic Serverless. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutRoleAsync(PutRoleRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create or update roles. + /// + /// + /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. + /// The create or update roles API cannot update roles that are defined in roles files. + /// File-based role management is not available in Elastic Serverless. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutRoleAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) + { + var descriptor = new PutRoleRequestDescriptor(name); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create or update roles. + /// + /// + /// The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. + /// The create or update roles API cannot update roles that are defined in roles files. + /// File-based role management is not available in Elastic Serverless. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutRoleAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new PutRoleRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create or update role mappings. + /// + /// + /// Role mappings define which roles are assigned to each user. + /// Each mapping has rules that identify users and a list of roles that are granted to those users. + /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. + /// + /// + /// NOTE: This API does not create roles. Rather, it maps users to existing roles. + /// Roles can be created by using the create or update roles API or roles files. + /// + /// + /// Role templates + /// + /// + /// The most common use for role mappings is to create a mapping from a known value on the user to a fixed role name. + /// For example, all users in the cn=admin,dc=example,dc=com LDAP group should be given the superuser role in Elasticsearch. + /// The roles field is used for this purpose. + /// + /// + /// For more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user. + /// The role_templates field is used for this purpose. + /// + /// + /// NOTE: To use role templates successfully, the relevant scripting feature must be enabled. + /// Otherwise, all attempts to create a role mapping with role templates fail. + /// + /// + /// All of the user fields that are available in the role mapping rules are also available in the role templates. + /// Thus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated. + /// + /// + /// By default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user. + /// If the format of the template is set to "json" then the template is expected to produce a JSON string or an array of JSON strings for the role names. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutRoleMappingResponse PutRoleMapping(PutRoleMappingRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Create or update role mappings. + /// + /// + /// Role mappings define which roles are assigned to each user. + /// Each mapping has rules that identify users and a list of roles that are granted to those users. + /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. + /// + /// + /// NOTE: This API does not create roles. Rather, it maps users to existing roles. + /// Roles can be created by using the create or update roles API or roles files. + /// + /// + /// Role templates + /// + /// + /// The most common use for role mappings is to create a mapping from a known value on the user to a fixed role name. + /// For example, all users in the cn=admin,dc=example,dc=com LDAP group should be given the superuser role in Elasticsearch. + /// The roles field is used for this purpose. + /// + /// + /// For more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user. + /// The role_templates field is used for this purpose. + /// + /// + /// NOTE: To use role templates successfully, the relevant scripting feature must be enabled. + /// Otherwise, all attempts to create a role mapping with role templates fail. + /// + /// + /// All of the user fields that are available in the role mapping rules are also available in the role templates. + /// Thus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated. + /// + /// + /// By default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user. + /// If the format of the template is set to "json" then the template is expected to produce a JSON string or an array of JSON strings for the role names. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutRoleMappingAsync(PutRoleMappingRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Create or update role mappings. + /// + /// + /// Role mappings define which roles are assigned to each user. + /// Each mapping has rules that identify users and a list of roles that are granted to those users. + /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. + /// + /// + /// NOTE: This API does not create roles. Rather, it maps users to existing roles. + /// Roles can be created by using the create or update roles API or roles files. + /// + /// + /// Role templates + /// + /// + /// The most common use for role mappings is to create a mapping from a known value on the user to a fixed role name. + /// For example, all users in the cn=admin,dc=example,dc=com LDAP group should be given the superuser role in Elasticsearch. + /// The roles field is used for this purpose. + /// + /// + /// For more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user. + /// The role_templates field is used for this purpose. + /// + /// + /// NOTE: To use role templates successfully, the relevant scripting feature must be enabled. + /// Otherwise, all attempts to create a role mapping with role templates fail. + /// + /// + /// All of the user fields that are available in the role mapping rules are also available in the role templates. + /// Thus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated. + /// + /// + /// By default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user. + /// If the format of the template is set to "json" then the template is expected to produce a JSON string or an array of JSON strings for the role names. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutRoleMappingResponse PutRoleMapping(PutRoleMappingRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Create or update role mappings. + /// + /// + /// Role mappings define which roles are assigned to each user. + /// Each mapping has rules that identify users and a list of roles that are granted to those users. + /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. + /// + /// + /// NOTE: This API does not create roles. Rather, it maps users to existing roles. + /// Roles can be created by using the create or update roles API or roles files. + /// + /// + /// Role templates + /// + /// + /// The most common use for role mappings is to create a mapping from a known value on the user to a fixed role name. + /// For example, all users in the cn=admin,dc=example,dc=com LDAP group should be given the superuser role in Elasticsearch. + /// The roles field is used for this purpose. + /// + /// + /// For more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user. + /// The role_templates field is used for this purpose. + /// + /// + /// NOTE: To use role templates successfully, the relevant scripting feature must be enabled. + /// Otherwise, all attempts to create a role mapping with role templates fail. + /// + /// + /// All of the user fields that are available in the role mapping rules are also available in the role templates. + /// Thus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated. + /// + /// + /// By default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user. + /// If the format of the template is set to "json" then the template is expected to produce a JSON string or an array of JSON strings for the role names. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutRoleMappingResponse PutRoleMapping(Elastic.Clients.Elasticsearch.Name name) + { + var descriptor = new PutRoleMappingRequestDescriptor(name); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Create or update role mappings. + /// + /// + /// Role mappings define which roles are assigned to each user. + /// Each mapping has rules that identify users and a list of roles that are granted to those users. + /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. + /// + /// + /// NOTE: This API does not create roles. Rather, it maps users to existing roles. + /// Roles can be created by using the create or update roles API or roles files. + /// + /// + /// Role templates + /// + /// + /// The most common use for role mappings is to create a mapping from a known value on the user to a fixed role name. + /// For example, all users in the cn=admin,dc=example,dc=com LDAP group should be given the superuser role in Elasticsearch. + /// The roles field is used for this purpose. + /// + /// + /// For more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user. + /// The role_templates field is used for this purpose. + /// + /// + /// NOTE: To use role templates successfully, the relevant scripting feature must be enabled. + /// Otherwise, all attempts to create a role mapping with role templates fail. + /// + /// + /// All of the user fields that are available in the role mapping rules are also available in the role templates. + /// Thus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated. + /// + /// + /// By default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user. + /// If the format of the template is set to "json" then the template is expected to produce a JSON string or an array of JSON strings for the role names. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutRoleMappingResponse PutRoleMapping(Elastic.Clients.Elasticsearch.Name name, Action configureRequest) + { + var descriptor = new PutRoleMappingRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Create or update role mappings. + /// + /// + /// Role mappings define which roles are assigned to each user. + /// Each mapping has rules that identify users and a list of roles that are granted to those users. + /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. + /// + /// + /// NOTE: This API does not create roles. Rather, it maps users to existing roles. + /// Roles can be created by using the create or update roles API or roles files. + /// + /// + /// Role templates + /// + /// + /// The most common use for role mappings is to create a mapping from a known value on the user to a fixed role name. + /// For example, all users in the cn=admin,dc=example,dc=com LDAP group should be given the superuser role in Elasticsearch. + /// The roles field is used for this purpose. + /// + /// + /// For more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user. + /// The role_templates field is used for this purpose. + /// + /// + /// NOTE: To use role templates successfully, the relevant scripting feature must be enabled. + /// Otherwise, all attempts to create a role mapping with role templates fail. + /// + /// + /// All of the user fields that are available in the role mapping rules are also available in the role templates. + /// Thus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated. + /// + /// + /// By default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user. + /// If the format of the template is set to "json" then the template is expected to produce a JSON string or an array of JSON strings for the role names. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutRoleMappingAsync(PutRoleMappingRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create or update role mappings. + /// + /// + /// Role mappings define which roles are assigned to each user. + /// Each mapping has rules that identify users and a list of roles that are granted to those users. + /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. + /// + /// + /// NOTE: This API does not create roles. Rather, it maps users to existing roles. + /// Roles can be created by using the create or update roles API or roles files. + /// + /// + /// Role templates + /// + /// + /// The most common use for role mappings is to create a mapping from a known value on the user to a fixed role name. + /// For example, all users in the cn=admin,dc=example,dc=com LDAP group should be given the superuser role in Elasticsearch. + /// The roles field is used for this purpose. + /// + /// + /// For more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user. + /// The role_templates field is used for this purpose. + /// + /// + /// NOTE: To use role templates successfully, the relevant scripting feature must be enabled. + /// Otherwise, all attempts to create a role mapping with role templates fail. + /// + /// + /// All of the user fields that are available in the role mapping rules are also available in the role templates. + /// Thus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated. + /// + /// + /// By default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user. + /// If the format of the template is set to "json" then the template is expected to produce a JSON string or an array of JSON strings for the role names. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutRoleMappingAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) + { + var descriptor = new PutRoleMappingRequestDescriptor(name); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create or update role mappings. + /// + /// + /// Role mappings define which roles are assigned to each user. + /// Each mapping has rules that identify users and a list of roles that are granted to those users. + /// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. + /// + /// + /// NOTE: This API does not create roles. Rather, it maps users to existing roles. + /// Roles can be created by using the create or update roles API or roles files. + /// + /// + /// Role templates + /// + /// + /// The most common use for role mappings is to create a mapping from a known value on the user to a fixed role name. + /// For example, all users in the cn=admin,dc=example,dc=com LDAP group should be given the superuser role in Elasticsearch. + /// The roles field is used for this purpose. + /// + /// + /// For more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user. + /// The role_templates field is used for this purpose. + /// + /// + /// NOTE: To use role templates successfully, the relevant scripting feature must be enabled. + /// Otherwise, all attempts to create a role mapping with role templates fail. + /// + /// + /// All of the user fields that are available in the role mapping rules are also available in the role templates. + /// Thus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated. + /// + /// + /// By default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user. + /// If the format of the template is set to "json" then the template is expected to produce a JSON string or an array of JSON strings for the role names. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutRoleMappingAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new PutRoleMappingRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create or update users. + /// + /// + /// Add and update users in the native realm. + /// A password is required for adding a new user but is optional when updating an existing user. + /// To change a user's password without updating any other fields, use the change password API. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutUserResponse PutUser(PutUserRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Create or update users. + /// + /// + /// Add and update users in the native realm. + /// A password is required for adding a new user but is optional when updating an existing user. + /// To change a user's password without updating any other fields, use the change password API. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutUserAsync(PutUserRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Create or update users. + /// + /// + /// Add and update users in the native realm. + /// A password is required for adding a new user but is optional when updating an existing user. + /// To change a user's password without updating any other fields, use the change password API. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutUserResponse PutUser(PutUserRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Create or update users. + /// + /// + /// Add and update users in the native realm. + /// A password is required for adding a new user but is optional when updating an existing user. + /// To change a user's password without updating any other fields, use the change password API. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutUserAsync(PutUserRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Find API keys with a query. + /// + /// + /// Get a paginated list of API keys and their information. + /// You can optionally filter the results with a query. + /// + /// + /// To use this API, you must have at least the manage_own_api_key or the read_security cluster privileges. + /// If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. + /// If you have the read_security, manage_api_key, or greater privileges (including manage_security), this API returns all API keys regardless of ownership. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryApiKeysResponse QueryApiKeys(QueryApiKeysRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Find API keys with a query. + /// + /// + /// Get a paginated list of API keys and their information. + /// You can optionally filter the results with a query. + /// + /// + /// To use this API, you must have at least the manage_own_api_key or the read_security cluster privileges. + /// If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. + /// If you have the read_security, manage_api_key, or greater privileges (including manage_security), this API returns all API keys regardless of ownership. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryApiKeysAsync(QueryApiKeysRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Find API keys with a query. + /// + /// + /// Get a paginated list of API keys and their information. + /// You can optionally filter the results with a query. + /// + /// + /// To use this API, you must have at least the manage_own_api_key or the read_security cluster privileges. + /// If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. + /// If you have the read_security, manage_api_key, or greater privileges (including manage_security), this API returns all API keys regardless of ownership. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryApiKeysResponse QueryApiKeys(QueryApiKeysRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, QueryApiKeysResponse, QueryApiKeysRequestParameters>(descriptor); + } + + /// + /// + /// Find API keys with a query. + /// + /// + /// Get a paginated list of API keys and their information. + /// You can optionally filter the results with a query. + /// + /// + /// To use this API, you must have at least the manage_own_api_key or the read_security cluster privileges. + /// If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. + /// If you have the read_security, manage_api_key, or greater privileges (including manage_security), this API returns all API keys regardless of ownership. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryApiKeysResponse QueryApiKeys() + { + var descriptor = new QueryApiKeysRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest, QueryApiKeysResponse, QueryApiKeysRequestParameters>(descriptor); + } + + /// + /// + /// Find API keys with a query. + /// + /// + /// Get a paginated list of API keys and their information. + /// You can optionally filter the results with a query. + /// + /// + /// To use this API, you must have at least the manage_own_api_key or the read_security cluster privileges. + /// If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. + /// If you have the read_security, manage_api_key, or greater privileges (including manage_security), this API returns all API keys regardless of ownership. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryApiKeysResponse QueryApiKeys(Action> configureRequest) + { + var descriptor = new QueryApiKeysRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, QueryApiKeysResponse, QueryApiKeysRequestParameters>(descriptor); + } + + /// + /// + /// Find API keys with a query. + /// + /// + /// Get a paginated list of API keys and their information. + /// You can optionally filter the results with a query. + /// + /// + /// To use this API, you must have at least the manage_own_api_key or the read_security cluster privileges. + /// If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. + /// If you have the read_security, manage_api_key, or greater privileges (including manage_security), this API returns all API keys regardless of ownership. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryApiKeysResponse QueryApiKeys(QueryApiKeysRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Find API keys with a query. + /// + /// + /// Get a paginated list of API keys and their information. + /// You can optionally filter the results with a query. + /// + /// + /// To use this API, you must have at least the manage_own_api_key or the read_security cluster privileges. + /// If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. + /// If you have the read_security, manage_api_key, or greater privileges (including manage_security), this API returns all API keys regardless of ownership. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryApiKeysResponse QueryApiKeys() + { + var descriptor = new QueryApiKeysRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Find API keys with a query. + /// + /// + /// Get a paginated list of API keys and their information. + /// You can optionally filter the results with a query. + /// + /// + /// To use this API, you must have at least the manage_own_api_key or the read_security cluster privileges. + /// If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. + /// If you have the read_security, manage_api_key, or greater privileges (including manage_security), this API returns all API keys regardless of ownership. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryApiKeysResponse QueryApiKeys(Action configureRequest) + { + var descriptor = new QueryApiKeysRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Find API keys with a query. + /// + /// + /// Get a paginated list of API keys and their information. + /// You can optionally filter the results with a query. + /// + /// + /// To use this API, you must have at least the manage_own_api_key or the read_security cluster privileges. + /// If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. + /// If you have the read_security, manage_api_key, or greater privileges (including manage_security), this API returns all API keys regardless of ownership. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryApiKeysAsync(QueryApiKeysRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, QueryApiKeysResponse, QueryApiKeysRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Find API keys with a query. + /// + /// + /// Get a paginated list of API keys and their information. + /// You can optionally filter the results with a query. + /// + /// + /// To use this API, you must have at least the manage_own_api_key or the read_security cluster privileges. + /// If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. + /// If you have the read_security, manage_api_key, or greater privileges (including manage_security), this API returns all API keys regardless of ownership. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryApiKeysAsync(CancellationToken cancellationToken = default) + { + var descriptor = new QueryApiKeysRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync, QueryApiKeysResponse, QueryApiKeysRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Find API keys with a query. + /// + /// + /// Get a paginated list of API keys and their information. + /// You can optionally filter the results with a query. + /// + /// + /// To use this API, you must have at least the manage_own_api_key or the read_security cluster privileges. + /// If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. + /// If you have the read_security, manage_api_key, or greater privileges (including manage_security), this API returns all API keys regardless of ownership. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryApiKeysAsync(Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new QueryApiKeysRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, QueryApiKeysResponse, QueryApiKeysRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Find API keys with a query. + /// + /// + /// Get a paginated list of API keys and their information. + /// You can optionally filter the results with a query. + /// + /// + /// To use this API, you must have at least the manage_own_api_key or the read_security cluster privileges. + /// If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. + /// If you have the read_security, manage_api_key, or greater privileges (including manage_security), this API returns all API keys regardless of ownership. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryApiKeysAsync(QueryApiKeysRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Find API keys with a query. + /// + /// + /// Get a paginated list of API keys and their information. + /// You can optionally filter the results with a query. + /// + /// + /// To use this API, you must have at least the manage_own_api_key or the read_security cluster privileges. + /// If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. + /// If you have the read_security, manage_api_key, or greater privileges (including manage_security), this API returns all API keys regardless of ownership. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryApiKeysAsync(CancellationToken cancellationToken = default) + { + var descriptor = new QueryApiKeysRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Find API keys with a query. + /// + /// + /// Get a paginated list of API keys and their information. + /// You can optionally filter the results with a query. + /// + /// + /// To use this API, you must have at least the manage_own_api_key or the read_security cluster privileges. + /// If you have only the manage_own_api_key privilege, this API returns only the API keys that you own. + /// If you have the read_security, manage_api_key, or greater privileges (including manage_security), this API returns all API keys regardless of ownership. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryApiKeysAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new QueryApiKeysRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Find roles with a query. + /// + /// + /// Get roles in a paginated manner. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The query roles API does not retrieve roles that are defined in roles files, nor built-in ones. + /// You can optionally filter the results with a query. + /// Also, the results can be paginated and sorted. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryRoleResponse QueryRole(QueryRoleRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Find roles with a query. + /// + /// + /// Get roles in a paginated manner. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The query roles API does not retrieve roles that are defined in roles files, nor built-in ones. + /// You can optionally filter the results with a query. + /// Also, the results can be paginated and sorted. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryRoleAsync(QueryRoleRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Find roles with a query. + /// + /// + /// Get roles in a paginated manner. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The query roles API does not retrieve roles that are defined in roles files, nor built-in ones. + /// You can optionally filter the results with a query. + /// Also, the results can be paginated and sorted. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryRoleResponse QueryRole(QueryRoleRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, QueryRoleResponse, QueryRoleRequestParameters>(descriptor); + } + + /// + /// + /// Find roles with a query. + /// + /// + /// Get roles in a paginated manner. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The query roles API does not retrieve roles that are defined in roles files, nor built-in ones. + /// You can optionally filter the results with a query. + /// Also, the results can be paginated and sorted. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryRoleResponse QueryRole() + { + var descriptor = new QueryRoleRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest, QueryRoleResponse, QueryRoleRequestParameters>(descriptor); + } + + /// + /// + /// Find roles with a query. + /// + /// + /// Get roles in a paginated manner. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The query roles API does not retrieve roles that are defined in roles files, nor built-in ones. + /// You can optionally filter the results with a query. + /// Also, the results can be paginated and sorted. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryRoleResponse QueryRole(Action> configureRequest) + { + var descriptor = new QueryRoleRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, QueryRoleResponse, QueryRoleRequestParameters>(descriptor); + } + + /// + /// + /// Find roles with a query. + /// + /// + /// Get roles in a paginated manner. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The query roles API does not retrieve roles that are defined in roles files, nor built-in ones. + /// You can optionally filter the results with a query. + /// Also, the results can be paginated and sorted. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryRoleResponse QueryRole(QueryRoleRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Find roles with a query. + /// + /// + /// Get roles in a paginated manner. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The query roles API does not retrieve roles that are defined in roles files, nor built-in ones. + /// You can optionally filter the results with a query. + /// Also, the results can be paginated and sorted. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryRoleResponse QueryRole() + { + var descriptor = new QueryRoleRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Find roles with a query. + /// + /// + /// Get roles in a paginated manner. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The query roles API does not retrieve roles that are defined in roles files, nor built-in ones. + /// You can optionally filter the results with a query. + /// Also, the results can be paginated and sorted. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryRoleResponse QueryRole(Action configureRequest) + { + var descriptor = new QueryRoleRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Find roles with a query. + /// + /// + /// Get roles in a paginated manner. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The query roles API does not retrieve roles that are defined in roles files, nor built-in ones. + /// You can optionally filter the results with a query. + /// Also, the results can be paginated and sorted. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryRoleAsync(QueryRoleRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, QueryRoleResponse, QueryRoleRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Find roles with a query. + /// + /// + /// Get roles in a paginated manner. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The query roles API does not retrieve roles that are defined in roles files, nor built-in ones. + /// You can optionally filter the results with a query. + /// Also, the results can be paginated and sorted. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryRoleAsync(CancellationToken cancellationToken = default) + { + var descriptor = new QueryRoleRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync, QueryRoleResponse, QueryRoleRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Find roles with a query. + /// + /// + /// Get roles in a paginated manner. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The query roles API does not retrieve roles that are defined in roles files, nor built-in ones. + /// You can optionally filter the results with a query. + /// Also, the results can be paginated and sorted. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryRoleAsync(Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new QueryRoleRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, QueryRoleResponse, QueryRoleRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Find roles with a query. + /// + /// + /// Get roles in a paginated manner. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The query roles API does not retrieve roles that are defined in roles files, nor built-in ones. + /// You can optionally filter the results with a query. + /// Also, the results can be paginated and sorted. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryRoleAsync(QueryRoleRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Find roles with a query. + /// + /// + /// Get roles in a paginated manner. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The query roles API does not retrieve roles that are defined in roles files, nor built-in ones. + /// You can optionally filter the results with a query. + /// Also, the results can be paginated and sorted. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryRoleAsync(CancellationToken cancellationToken = default) + { + var descriptor = new QueryRoleRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Find roles with a query. + /// + /// + /// Get roles in a paginated manner. + /// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + /// The query roles API does not retrieve roles that are defined in roles files, nor built-in ones. + /// You can optionally filter the results with a query. + /// Also, the results can be paginated and sorted. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryRoleAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new QueryRoleRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Find users with a query. + /// + /// + /// Get information for users in a paginated manner. + /// You can optionally filter the results with a query. + /// + /// + /// NOTE: As opposed to the get user API, built-in users are excluded from the result. + /// This API is only for native users. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryUserResponse QueryUser(QueryUserRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Find users with a query. + /// + /// + /// Get information for users in a paginated manner. + /// You can optionally filter the results with a query. + /// + /// + /// NOTE: As opposed to the get user API, built-in users are excluded from the result. + /// This API is only for native users. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryUserAsync(QueryUserRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Find users with a query. + /// + /// + /// Get information for users in a paginated manner. + /// You can optionally filter the results with a query. + /// + /// + /// NOTE: As opposed to the get user API, built-in users are excluded from the result. + /// This API is only for native users. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryUserResponse QueryUser(QueryUserRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, QueryUserResponse, QueryUserRequestParameters>(descriptor); + } + + /// + /// + /// Find users with a query. + /// + /// + /// Get information for users in a paginated manner. + /// You can optionally filter the results with a query. + /// + /// + /// NOTE: As opposed to the get user API, built-in users are excluded from the result. + /// This API is only for native users. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryUserResponse QueryUser() + { + var descriptor = new QueryUserRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest, QueryUserResponse, QueryUserRequestParameters>(descriptor); + } + + /// + /// + /// Find users with a query. + /// + /// + /// Get information for users in a paginated manner. + /// You can optionally filter the results with a query. + /// + /// + /// NOTE: As opposed to the get user API, built-in users are excluded from the result. + /// This API is only for native users. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryUserResponse QueryUser(Action> configureRequest) + { + var descriptor = new QueryUserRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, QueryUserResponse, QueryUserRequestParameters>(descriptor); + } + + /// + /// + /// Find users with a query. + /// + /// + /// Get information for users in a paginated manner. + /// You can optionally filter the results with a query. + /// + /// + /// NOTE: As opposed to the get user API, built-in users are excluded from the result. + /// This API is only for native users. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryUserResponse QueryUser(QueryUserRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Find users with a query. + /// + /// + /// Get information for users in a paginated manner. + /// You can optionally filter the results with a query. + /// + /// + /// NOTE: As opposed to the get user API, built-in users are excluded from the result. + /// This API is only for native users. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryUserResponse QueryUser() + { + var descriptor = new QueryUserRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Find users with a query. + /// + /// + /// Get information for users in a paginated manner. + /// You can optionally filter the results with a query. + /// + /// + /// NOTE: As opposed to the get user API, built-in users are excluded from the result. + /// This API is only for native users. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual QueryUserResponse QueryUser(Action configureRequest) + { + var descriptor = new QueryUserRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Find users with a query. + /// + /// + /// Get information for users in a paginated manner. + /// You can optionally filter the results with a query. + /// + /// + /// NOTE: As opposed to the get user API, built-in users are excluded from the result. + /// This API is only for native users. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryUserAsync(QueryUserRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, QueryUserResponse, QueryUserRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Find users with a query. + /// + /// + /// Get information for users in a paginated manner. + /// You can optionally filter the results with a query. + /// + /// + /// NOTE: As opposed to the get user API, built-in users are excluded from the result. + /// This API is only for native users. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryUserAsync(CancellationToken cancellationToken = default) + { + var descriptor = new QueryUserRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync, QueryUserResponse, QueryUserRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Find users with a query. + /// + /// + /// Get information for users in a paginated manner. + /// You can optionally filter the results with a query. + /// + /// + /// NOTE: As opposed to the get user API, built-in users are excluded from the result. + /// This API is only for native users. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryUserAsync(Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new QueryUserRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, QueryUserResponse, QueryUserRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Find users with a query. + /// + /// + /// Get information for users in a paginated manner. + /// You can optionally filter the results with a query. + /// + /// + /// NOTE: As opposed to the get user API, built-in users are excluded from the result. + /// This API is only for native users. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryUserAsync(QueryUserRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Find users with a query. + /// + /// + /// Get information for users in a paginated manner. + /// You can optionally filter the results with a query. + /// + /// + /// NOTE: As opposed to the get user API, built-in users are excluded from the result. + /// This API is only for native users. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryUserAsync(CancellationToken cancellationToken = default) + { + var descriptor = new QueryUserRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Find users with a query. + /// + /// + /// Get information for users in a paginated manner. + /// You can optionally filter the results with a query. + /// + /// + /// NOTE: As opposed to the get user API, built-in users are excluded from the result. + /// This API is only for native users. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task QueryUserAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new QueryUserRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Authenticate SAML. + /// + /// + /// Submit a SAML response message to Elasticsearch for consumption. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + /// + /// + /// The SAML message that is submitted can be: + /// + /// + /// + /// + /// A response to a SAML authentication request that was previously created using the SAML prepare authentication API. + /// + /// + /// + /// + /// An unsolicited SAML message in the case of an IdP-initiated single sign-on (SSO) flow. + /// + /// + /// + /// + /// In either case, the SAML message needs to be a base64 encoded XML document with a root element of <Response>. + /// + /// + /// After successful validation, Elasticsearch responds with an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. + /// This API endpoint essentially exchanges SAML responses that indicate successful authentication in the IdP for Elasticsearch access and refresh tokens, which can be used for authentication against Elasticsearch. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual SamlAuthenticateResponse SamlAuthenticate(SamlAuthenticateRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + /// /// - /// Create or update users. + /// Authenticate SAML. + /// + /// + /// Submit a SAML response message to Elasticsearch for consumption. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + /// + /// + /// The SAML message that is submitted can be: + /// + /// + /// + /// + /// A response to a SAML authentication request that was previously created using the SAML prepare authentication API. /// + /// + /// /// - /// A password is required for adding a new user but is optional when updating an existing user. - /// To change a user’s password without updating any other fields, use the change password API. + /// An unsolicited SAML message in the case of an IdP-initiated single sign-on (SSO) flow. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutUserAsync(PutUserRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Find API keys with a query. + /// In either case, the SAML message needs to be a base64 encoded XML document with a root element of <Response>. /// /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. + /// After successful validation, Elasticsearch responds with an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. + /// This API endpoint essentially exchanges SAML responses that indicate successful authentication in the IdP for Elasticsearch access and refresh tokens, which can be used for authentication against Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryApiKeysResponse QueryApiKeys(QueryApiKeysRequest request) + public virtual Task SamlAuthenticateAsync(SamlAuthenticateRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); - return DoRequest(request); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Find API keys with a query. + /// Authenticate SAML. /// /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. + /// Submit a SAML response message to Elasticsearch for consumption. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryApiKeysAsync(QueryApiKeysRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// /// - /// Find API keys with a query. + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. + /// The SAML message that is submitted can be: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryApiKeysResponse QueryApiKeys(QueryApiKeysRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, QueryApiKeysResponse, QueryApiKeysRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Find API keys with a query. + /// A response to a SAML authentication request that was previously created using the SAML prepare authentication API. /// + /// + /// /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. + /// An unsolicited SAML message in the case of an IdP-initiated single sign-on (SSO) flow. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryApiKeysResponse QueryApiKeys() - { - var descriptor = new QueryApiKeysRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest, QueryApiKeysResponse, QueryApiKeysRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Find API keys with a query. + /// In either case, the SAML message needs to be a base64 encoded XML document with a root element of <Response>. /// /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. + /// After successful validation, Elasticsearch responds with an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. + /// This API endpoint essentially exchanges SAML responses that indicate successful authentication in the IdP for Elasticsearch access and refresh tokens, which can be used for authentication against Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryApiKeysResponse QueryApiKeys(Action> configureRequest) + public virtual SamlAuthenticateResponse SamlAuthenticate(SamlAuthenticateRequestDescriptor descriptor) { - var descriptor = new QueryApiKeysRequestDescriptor(); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, QueryApiKeysResponse, QueryApiKeysRequestParameters>(descriptor); + return DoRequest(descriptor); } /// /// - /// Find API keys with a query. + /// Authenticate SAML. /// /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. + /// Submit a SAML response message to Elasticsearch for consumption. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryApiKeysResponse QueryApiKeys(QueryApiKeysRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Find API keys with a query. + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + /// + /// + /// The SAML message that is submitted can be: + /// + /// + /// + /// + /// A response to a SAML authentication request that was previously created using the SAML prepare authentication API. + /// + /// + /// + /// + /// An unsolicited SAML message in the case of an IdP-initiated single sign-on (SSO) flow. + /// + /// + /// + /// + /// In either case, the SAML message needs to be a base64 encoded XML document with a root element of <Response>. /// /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. + /// After successful validation, Elasticsearch responds with an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. + /// This API endpoint essentially exchanges SAML responses that indicate successful authentication in the IdP for Elasticsearch access and refresh tokens, which can be used for authentication against Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryApiKeysResponse QueryApiKeys() + public virtual SamlAuthenticateResponse SamlAuthenticate() { - var descriptor = new QueryApiKeysRequestDescriptor(); + var descriptor = new SamlAuthenticateRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Find API keys with a query. + /// Authenticate SAML. + /// + /// + /// Submit a SAML response message to Elasticsearch for consumption. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + /// + /// + /// The SAML message that is submitted can be: + /// + /// + /// + /// + /// A response to a SAML authentication request that was previously created using the SAML prepare authentication API. + /// + /// + /// + /// + /// An unsolicited SAML message in the case of an IdP-initiated single sign-on (SSO) flow. + /// + /// + /// + /// + /// In either case, the SAML message needs to be a base64 encoded XML document with a root element of <Response>. /// /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. + /// After successful validation, Elasticsearch responds with an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. + /// This API endpoint essentially exchanges SAML responses that indicate successful authentication in the IdP for Elasticsearch access and refresh tokens, which can be used for authentication against Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryApiKeysResponse QueryApiKeys(Action configureRequest) + public virtual SamlAuthenticateResponse SamlAuthenticate(Action configureRequest) { - var descriptor = new QueryApiKeysRequestDescriptor(); + var descriptor = new SamlAuthenticateRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Find API keys with a query. + /// Authenticate SAML. /// /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. + /// Submit a SAML response message to Elasticsearch for consumption. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryApiKeysAsync(QueryApiKeysRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, QueryApiKeysResponse, QueryApiKeysRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Find API keys with a query. + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. + /// The SAML message that is submitted can be: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryApiKeysAsync(CancellationToken cancellationToken = default) - { - var descriptor = new QueryApiKeysRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, QueryApiKeysResponse, QueryApiKeysRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Find API keys with a query. + /// A response to a SAML authentication request that was previously created using the SAML prepare authentication API. /// + /// + /// /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. + /// An unsolicited SAML message in the case of an IdP-initiated single sign-on (SSO) flow. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryApiKeysAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new QueryApiKeysRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, QueryApiKeysResponse, QueryApiKeysRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Find API keys with a query. + /// In either case, the SAML message needs to be a base64 encoded XML document with a root element of <Response>. /// /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. + /// After successful validation, Elasticsearch responds with an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. + /// This API endpoint essentially exchanges SAML responses that indicate successful authentication in the IdP for Elasticsearch access and refresh tokens, which can be used for authentication against Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task QueryApiKeysAsync(QueryApiKeysRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task SamlAuthenticateAsync(SamlAuthenticateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Find API keys with a query. + /// Authenticate SAML. /// /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. + /// Submit a SAML response message to Elasticsearch for consumption. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryApiKeysAsync(CancellationToken cancellationToken = default) - { - var descriptor = new QueryApiKeysRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Find API keys with a query. + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + /// + /// + /// The SAML message that is submitted can be: + /// + /// + /// + /// + /// A response to a SAML authentication request that was previously created using the SAML prepare authentication API. + /// + /// + /// + /// + /// An unsolicited SAML message in the case of an IdP-initiated single sign-on (SSO) flow. + /// + /// + /// + /// + /// In either case, the SAML message needs to be a base64 encoded XML document with a root element of <Response>. /// /// - /// Get a paginated list of API keys and their information. You can optionally filter the results with a query. + /// After successful validation, Elasticsearch responds with an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. + /// This API endpoint essentially exchanges SAML responses that indicate successful authentication in the IdP for Elasticsearch access and refresh tokens, which can be used for authentication against Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task QueryApiKeysAsync(Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task SamlAuthenticateAsync(CancellationToken cancellationToken = default) { - var descriptor = new QueryApiKeysRequestDescriptor(); - configureRequest?.Invoke(descriptor); + var descriptor = new SamlAuthenticateRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Find roles with a query. + /// Authenticate SAML. /// /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. + /// Submit a SAML response message to Elasticsearch for consumption. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryRoleResponse QueryRole(QueryRoleRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// /// - /// Find roles with a query. + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. + /// The SAML message that is submitted can be: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryRoleAsync(QueryRoleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// + /// + /// /// - /// Find roles with a query. + /// A response to a SAML authentication request that was previously created using the SAML prepare authentication API. + /// + /// + /// + /// + /// An unsolicited SAML message in the case of an IdP-initiated single sign-on (SSO) flow. + /// + /// + /// + /// + /// In either case, the SAML message needs to be a base64 encoded XML document with a root element of <Response>. /// /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. + /// After successful validation, Elasticsearch responds with an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. + /// This API endpoint essentially exchanges SAML responses that indicate successful authentication in the IdP for Elasticsearch access and refresh tokens, which can be used for authentication against Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryRoleResponse QueryRole(QueryRoleRequestDescriptor descriptor) + public virtual Task SamlAuthenticateAsync(Action configureRequest, CancellationToken cancellationToken = default) { + var descriptor = new SamlAuthenticateRequestDescriptor(); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, QueryRoleResponse, QueryRoleRequestParameters>(descriptor); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Find roles with a query. + /// Logout of SAML completely. + /// + /// + /// Verifies the logout response sent from the SAML IdP. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. + /// The SAML IdP may send a logout response back to the SP after handling the SP-initiated SAML Single Logout. + /// This API verifies the response by ensuring the content is relevant and validating its signature. + /// An empty response is returned if the verification process is successful. + /// The response can be sent by the IdP with either the HTTP-Redirect or the HTTP-Post binding. + /// The caller of this API must prepare the request accordingly so that this API can handle either of them. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryRoleResponse QueryRole() + public virtual SamlCompleteLogoutResponse SamlCompleteLogout(SamlCompleteLogoutRequest request) { - var descriptor = new QueryRoleRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest, QueryRoleResponse, QueryRoleRequestParameters>(descriptor); + request.BeforeRequest(); + return DoRequest(request); } /// /// - /// Find roles with a query. + /// Logout of SAML completely. + /// + /// + /// Verifies the logout response sent from the SAML IdP. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. + /// The SAML IdP may send a logout response back to the SP after handling the SP-initiated SAML Single Logout. + /// This API verifies the response by ensuring the content is relevant and validating its signature. + /// An empty response is returned if the verification process is successful. + /// The response can be sent by the IdP with either the HTTP-Redirect or the HTTP-Post binding. + /// The caller of this API must prepare the request accordingly so that this API can handle either of them. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryRoleResponse QueryRole(Action> configureRequest) + public virtual Task SamlCompleteLogoutAsync(SamlCompleteLogoutRequest request, CancellationToken cancellationToken = default) { - var descriptor = new QueryRoleRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, QueryRoleResponse, QueryRoleRequestParameters>(descriptor); + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Find roles with a query. + /// Logout of SAML completely. + /// + /// + /// Verifies the logout response sent from the SAML IdP. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. + /// The SAML IdP may send a logout response back to the SP after handling the SP-initiated SAML Single Logout. + /// This API verifies the response by ensuring the content is relevant and validating its signature. + /// An empty response is returned if the verification process is successful. + /// The response can be sent by the IdP with either the HTTP-Redirect or the HTTP-Post binding. + /// The caller of this API must prepare the request accordingly so that this API can handle either of them. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryRoleResponse QueryRole(QueryRoleRequestDescriptor descriptor) + public virtual SamlCompleteLogoutResponse SamlCompleteLogout(SamlCompleteLogoutRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Find roles with a query. + /// Logout of SAML completely. + /// + /// + /// Verifies the logout response sent from the SAML IdP. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. + /// The SAML IdP may send a logout response back to the SP after handling the SP-initiated SAML Single Logout. + /// This API verifies the response by ensuring the content is relevant and validating its signature. + /// An empty response is returned if the verification process is successful. + /// The response can be sent by the IdP with either the HTTP-Redirect or the HTTP-Post binding. + /// The caller of this API must prepare the request accordingly so that this API can handle either of them. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryRoleResponse QueryRole() + public virtual SamlCompleteLogoutResponse SamlCompleteLogout() { - var descriptor = new QueryRoleRequestDescriptor(); + var descriptor = new SamlCompleteLogoutRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Find roles with a query. + /// Logout of SAML completely. + /// + /// + /// Verifies the logout response sent from the SAML IdP. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. + /// The SAML IdP may send a logout response back to the SP after handling the SP-initiated SAML Single Logout. + /// This API verifies the response by ensuring the content is relevant and validating its signature. + /// An empty response is returned if the verification process is successful. + /// The response can be sent by the IdP with either the HTTP-Redirect or the HTTP-Post binding. + /// The caller of this API must prepare the request accordingly so that this API can handle either of them. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryRoleResponse QueryRole(Action configureRequest) + public virtual SamlCompleteLogoutResponse SamlCompleteLogout(Action configureRequest) { - var descriptor = new QueryRoleRequestDescriptor(); + var descriptor = new SamlCompleteLogoutRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Find roles with a query. + /// Logout of SAML completely. + /// + /// + /// Verifies the logout response sent from the SAML IdP. /// /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// The SAML IdP may send a logout response back to the SP after handling the SP-initiated SAML Single Logout. + /// This API verifies the response by ensuring the content is relevant and validating its signature. + /// An empty response is returned if the verification process is successful. + /// The response can be sent by the IdP with either the HTTP-Redirect or the HTTP-Post binding. + /// The caller of this API must prepare the request accordingly so that this API can handle either of them. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task QueryRoleAsync(QueryRoleRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task SamlCompleteLogoutAsync(SamlCompleteLogoutRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequestAsync, QueryRoleResponse, QueryRoleRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Find roles with a query. + /// Logout of SAML completely. + /// + /// + /// Verifies the logout response sent from the SAML IdP. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. + /// The SAML IdP may send a logout response back to the SP after handling the SP-initiated SAML Single Logout. + /// This API verifies the response by ensuring the content is relevant and validating its signature. + /// An empty response is returned if the verification process is successful. + /// The response can be sent by the IdP with either the HTTP-Redirect or the HTTP-Post binding. + /// The caller of this API must prepare the request accordingly so that this API can handle either of them. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task QueryRoleAsync(CancellationToken cancellationToken = default) + public virtual Task SamlCompleteLogoutAsync(CancellationToken cancellationToken = default) { - var descriptor = new QueryRoleRequestDescriptor(); + var descriptor = new SamlCompleteLogoutRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync, QueryRoleResponse, QueryRoleRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Find roles with a query. + /// Logout of SAML completely. + /// + /// + /// Verifies the logout response sent from the SAML IdP. /// /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// The SAML IdP may send a logout response back to the SP after handling the SP-initiated SAML Single Logout. + /// This API verifies the response by ensuring the content is relevant and validating its signature. + /// An empty response is returned if the verification process is successful. + /// The response can be sent by the IdP with either the HTTP-Redirect or the HTTP-Post binding. + /// The caller of this API must prepare the request accordingly so that this API can handle either of them. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task QueryRoleAsync(Action> configureRequest, CancellationToken cancellationToken = default) + public virtual Task SamlCompleteLogoutAsync(Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new QueryRoleRequestDescriptor(); + var descriptor = new SamlCompleteLogoutRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, QueryRoleResponse, QueryRoleRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Find roles with a query. + /// Invalidate SAML. + /// + /// + /// Submit a SAML LogoutRequest message to Elasticsearch for consumption. /// /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// The logout request comes from the SAML IdP during an IdP initiated Single Logout. + /// The custom web application can use this API to have Elasticsearch process the LogoutRequest. + /// After successful validation of the request, Elasticsearch invalidates the access token and refresh token that corresponds to that specific SAML principal and provides a URL that contains a SAML LogoutResponse message. + /// Thus the user can be redirected back to their IdP. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task QueryRoleAsync(QueryRoleRequestDescriptor descriptor, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual SamlInvalidateResponse SamlInvalidate(SamlInvalidateRequest request) { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + request.BeforeRequest(); + return DoRequest(request); } /// /// - /// Find roles with a query. + /// Invalidate SAML. + /// + /// + /// Submit a SAML LogoutRequest message to Elasticsearch for consumption. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. + /// The logout request comes from the SAML IdP during an IdP initiated Single Logout. + /// The custom web application can use this API to have Elasticsearch process the LogoutRequest. + /// After successful validation of the request, Elasticsearch invalidates the access token and refresh token that corresponds to that specific SAML principal and provides a URL that contains a SAML LogoutResponse message. + /// Thus the user can be redirected back to their IdP. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task QueryRoleAsync(CancellationToken cancellationToken = default) + public virtual Task SamlInvalidateAsync(SamlInvalidateRequest request, CancellationToken cancellationToken = default) { - var descriptor = new QueryRoleRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Find roles with a query. + /// Invalidate SAML. /// /// - /// Get roles in a paginated manner. You can optionally filter the results with a query. + /// Submit a SAML LogoutRequest message to Elasticsearch for consumption. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + /// + /// + /// The logout request comes from the SAML IdP during an IdP initiated Single Logout. + /// The custom web application can use this API to have Elasticsearch process the LogoutRequest. + /// After successful validation of the request, Elasticsearch invalidates the access token and refresh token that corresponds to that specific SAML principal and provides a URL that contains a SAML LogoutResponse message. + /// Thus the user can be redirected back to their IdP. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task QueryRoleAsync(Action configureRequest, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual SamlInvalidateResponse SamlInvalidate(SamlInvalidateRequestDescriptor descriptor) { - var descriptor = new QueryRoleRequestDescriptor(); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequest(descriptor); } /// /// - /// Find users with a query. + /// Invalidate SAML. /// /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. + /// Submit a SAML LogoutRequest message to Elasticsearch for consumption. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + /// + /// + /// The logout request comes from the SAML IdP during an IdP initiated Single Logout. + /// The custom web application can use this API to have Elasticsearch process the LogoutRequest. + /// After successful validation of the request, Elasticsearch invalidates the access token and refresh token that corresponds to that specific SAML principal and provides a URL that contains a SAML LogoutResponse message. + /// Thus the user can be redirected back to their IdP. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryUserResponse QueryUser(QueryUserRequest request) + public virtual SamlInvalidateResponse SamlInvalidate() { - request.BeforeRequest(); - return DoRequest(request); + var descriptor = new SamlInvalidateRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); } /// /// - /// Find users with a query. + /// Invalidate SAML. /// /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. + /// Submit a SAML LogoutRequest message to Elasticsearch for consumption. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task QueryUserAsync(QueryUserRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// /// - /// Find users with a query. + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. + /// The logout request comes from the SAML IdP during an IdP initiated Single Logout. + /// The custom web application can use this API to have Elasticsearch process the LogoutRequest. + /// After successful validation of the request, Elasticsearch invalidates the access token and refresh token that corresponds to that specific SAML principal and provides a URL that contains a SAML LogoutResponse message. + /// Thus the user can be redirected back to their IdP. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryUserResponse QueryUser(QueryUserRequestDescriptor descriptor) + public virtual SamlInvalidateResponse SamlInvalidate(Action configureRequest) { + var descriptor = new SamlInvalidateRequestDescriptor(); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, QueryUserResponse, QueryUserRequestParameters>(descriptor); + return DoRequest(descriptor); } /// /// - /// Find users with a query. + /// Invalidate SAML. /// /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. + /// Submit a SAML LogoutRequest message to Elasticsearch for consumption. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + /// + /// + /// The logout request comes from the SAML IdP during an IdP initiated Single Logout. + /// The custom web application can use this API to have Elasticsearch process the LogoutRequest. + /// After successful validation of the request, Elasticsearch invalidates the access token and refresh token that corresponds to that specific SAML principal and provides a URL that contains a SAML LogoutResponse message. + /// Thus the user can be redirected back to their IdP. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryUserResponse QueryUser() + public virtual Task SamlInvalidateAsync(SamlInvalidateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { - var descriptor = new QueryUserRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest, QueryUserResponse, QueryUserRequestParameters>(descriptor); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Find users with a query. + /// Invalidate SAML. /// /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. + /// Submit a SAML LogoutRequest message to Elasticsearch for consumption. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + /// + /// + /// The logout request comes from the SAML IdP during an IdP initiated Single Logout. + /// The custom web application can use this API to have Elasticsearch process the LogoutRequest. + /// After successful validation of the request, Elasticsearch invalidates the access token and refresh token that corresponds to that specific SAML principal and provides a URL that contains a SAML LogoutResponse message. + /// Thus the user can be redirected back to their IdP. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryUserResponse QueryUser(Action> configureRequest) + public virtual Task SamlInvalidateAsync(CancellationToken cancellationToken = default) { - var descriptor = new QueryUserRequestDescriptor(); - configureRequest?.Invoke(descriptor); + var descriptor = new SamlInvalidateRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest, QueryUserResponse, QueryUserRequestParameters>(descriptor); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Find users with a query. + /// Invalidate SAML. /// /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. + /// Submit a SAML LogoutRequest message to Elasticsearch for consumption. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + /// + /// + /// The logout request comes from the SAML IdP during an IdP initiated Single Logout. + /// The custom web application can use this API to have Elasticsearch process the LogoutRequest. + /// After successful validation of the request, Elasticsearch invalidates the access token and refresh token that corresponds to that specific SAML principal and provides a URL that contains a SAML LogoutResponse message. + /// Thus the user can be redirected back to their IdP. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryUserResponse QueryUser(QueryUserRequestDescriptor descriptor) + public virtual Task SamlInvalidateAsync(Action configureRequest, CancellationToken cancellationToken = default) { + var descriptor = new SamlInvalidateRequestDescriptor(); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Find users with a query. + /// Logout of SAML. /// /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. + /// Submits a request to invalidate an access token and refresh token. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + /// + /// + /// This API invalidates the tokens that were generated for a user by the SAML authenticate API. + /// If the SAML realm in Elasticsearch is configured accordingly and the SAML IdP supports this, the Elasticsearch response contains a URL to redirect the user to the IdP that contains a SAML logout request (starting an SP-initiated SAML Single Logout). /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryUserResponse QueryUser() + public virtual SamlLogoutResponse SamlLogout(SamlLogoutRequest request) { - var descriptor = new QueryUserRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest(descriptor); + request.BeforeRequest(); + return DoRequest(request); } /// /// - /// Find users with a query. + /// Logout of SAML. /// /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. + /// Submits a request to invalidate an access token and refresh token. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + /// + /// + /// This API invalidates the tokens that were generated for a user by the SAML authenticate API. + /// If the SAML realm in Elasticsearch is configured accordingly and the SAML IdP supports this, the Elasticsearch response contains a URL to redirect the user to the IdP that contains a SAML logout request (starting an SP-initiated SAML Single Logout). /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual QueryUserResponse QueryUser(Action configureRequest) + public virtual Task SamlLogoutAsync(SamlLogoutRequest request, CancellationToken cancellationToken = default) { - var descriptor = new QueryUserRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Find users with a query. + /// Logout of SAML. /// /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. + /// Submits a request to invalidate an access token and refresh token. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + /// + /// + /// This API invalidates the tokens that were generated for a user by the SAML authenticate API. + /// If the SAML realm in Elasticsearch is configured accordingly and the SAML IdP supports this, the Elasticsearch response contains a URL to redirect the user to the IdP that contains a SAML logout request (starting an SP-initiated SAML Single Logout). /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task QueryUserAsync(QueryUserRequestDescriptor descriptor, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual SamlLogoutResponse SamlLogout(SamlLogoutRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequestAsync, QueryUserResponse, QueryUserRequestParameters>(descriptor, cancellationToken); + return DoRequest(descriptor); } /// /// - /// Find users with a query. + /// Logout of SAML. + /// + /// + /// Submits a request to invalidate an access token and refresh token. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. + /// This API invalidates the tokens that were generated for a user by the SAML authenticate API. + /// If the SAML realm in Elasticsearch is configured accordingly and the SAML IdP supports this, the Elasticsearch response contains a URL to redirect the user to the IdP that contains a SAML logout request (starting an SP-initiated SAML Single Logout). /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task QueryUserAsync(CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual SamlLogoutResponse SamlLogout() { - var descriptor = new QueryUserRequestDescriptor(); + var descriptor = new SamlLogoutRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync, QueryUserResponse, QueryUserRequestParameters>(descriptor, cancellationToken); + return DoRequest(descriptor); } /// /// - /// Find users with a query. + /// Logout of SAML. /// /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. + /// Submits a request to invalidate an access token and refresh token. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + /// + /// + /// This API invalidates the tokens that were generated for a user by the SAML authenticate API. + /// If the SAML realm in Elasticsearch is configured accordingly and the SAML IdP supports this, the Elasticsearch response contains a URL to redirect the user to the IdP that contains a SAML logout request (starting an SP-initiated SAML Single Logout). /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task QueryUserAsync(Action> configureRequest, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual SamlLogoutResponse SamlLogout(Action configureRequest) { - var descriptor = new QueryUserRequestDescriptor(); + var descriptor = new SamlLogoutRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, QueryUserResponse, QueryUserRequestParameters>(descriptor, cancellationToken); + return DoRequest(descriptor); } /// /// - /// Find users with a query. + /// Logout of SAML. /// /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. + /// Submits a request to invalidate an access token and refresh token. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + /// + /// + /// This API invalidates the tokens that were generated for a user by the SAML authenticate API. + /// If the SAML realm in Elasticsearch is configured accordingly and the SAML IdP supports this, the Elasticsearch response contains a URL to redirect the user to the IdP that contains a SAML logout request (starting an SP-initiated SAML Single Logout). /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task QueryUserAsync(QueryUserRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task SamlLogoutAsync(SamlLogoutRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Find users with a query. + /// Logout of SAML. /// /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. + /// Submits a request to invalidate an access token and refresh token. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// This API invalidates the tokens that were generated for a user by the SAML authenticate API. + /// If the SAML realm in Elasticsearch is configured accordingly and the SAML IdP supports this, the Elasticsearch response contains a URL to redirect the user to the IdP that contains a SAML logout request (starting an SP-initiated SAML Single Logout). + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task QueryUserAsync(CancellationToken cancellationToken = default) + public virtual Task SamlLogoutAsync(CancellationToken cancellationToken = default) { - var descriptor = new QueryUserRequestDescriptor(); + var descriptor = new SamlLogoutRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Find users with a query. + /// Logout of SAML. /// /// - /// Get information for users in a paginated manner. - /// You can optionally filter the results with a query. + /// Submits a request to invalidate an access token and refresh token. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + /// + /// + /// This API invalidates the tokens that were generated for a user by the SAML authenticate API. + /// If the SAML realm in Elasticsearch is configured accordingly and the SAML IdP supports this, the Elasticsearch response contains a URL to redirect the user to the IdP that contains a SAML logout request (starting an SP-initiated SAML Single Logout). /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task QueryUserAsync(Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task SamlLogoutAsync(Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new QueryUserRequestDescriptor(); + var descriptor = new SamlLogoutRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Authenticate SAML. + /// Prepare SAML authentication. + /// + /// + /// Create a SAML authentication request (<AuthnRequest>) as a URL string based on the configuration of the respective SAML realm in Elasticsearch. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// /// - /// Submits a SAML response message to Elasticsearch for consumption. + /// This API returns a URL pointing to the SAML Identity Provider. + /// You can use the URL to redirect the browser of the user in order to continue the authentication process. + /// The URL includes a single parameter named SAMLRequest, which contains a SAML Authentication request that is deflated and Base64 encoded. + /// If the configuration dictates that SAML authentication requests should be signed, the URL has two extra parameters named SigAlg and Signature. + /// These parameters contain the algorithm used for the signature and the signature value itself. + /// It also returns a random string that uniquely identifies this SAML Authentication request. + /// The caller of this API needs to store this identifier as it needs to be used in a following step of the authentication process. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlAuthenticateResponse SamlAuthenticate(SamlAuthenticateRequest request) + public virtual SamlPrepareAuthenticationResponse SamlPrepareAuthentication(SamlPrepareAuthenticationRequest request) { request.BeforeRequest(); - return DoRequest(request); + return DoRequest(request); } /// /// - /// Authenticate SAML. + /// Prepare SAML authentication. + /// + /// + /// Create a SAML authentication request (<AuthnRequest>) as a URL string based on the configuration of the respective SAML realm in Elasticsearch. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// /// - /// Submits a SAML response message to Elasticsearch for consumption. + /// This API returns a URL pointing to the SAML Identity Provider. + /// You can use the URL to redirect the browser of the user in order to continue the authentication process. + /// The URL includes a single parameter named SAMLRequest, which contains a SAML Authentication request that is deflated and Base64 encoded. + /// If the configuration dictates that SAML authentication requests should be signed, the URL has two extra parameters named SigAlg and Signature. + /// These parameters contain the algorithm used for the signature and the signature value itself. + /// It also returns a random string that uniquely identifies this SAML Authentication request. + /// The caller of this API needs to store this identifier as it needs to be used in a following step of the authentication process. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task SamlAuthenticateAsync(SamlAuthenticateRequest request, CancellationToken cancellationToken = default) + public virtual Task SamlPrepareAuthenticationAsync(SamlPrepareAuthenticationRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Authenticate SAML. + /// Prepare SAML authentication. + /// + /// + /// Create a SAML authentication request (<AuthnRequest>) as a URL string based on the configuration of the respective SAML realm in Elasticsearch. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// /// - /// Submits a SAML response message to Elasticsearch for consumption. + /// This API returns a URL pointing to the SAML Identity Provider. + /// You can use the URL to redirect the browser of the user in order to continue the authentication process. + /// The URL includes a single parameter named SAMLRequest, which contains a SAML Authentication request that is deflated and Base64 encoded. + /// If the configuration dictates that SAML authentication requests should be signed, the URL has two extra parameters named SigAlg and Signature. + /// These parameters contain the algorithm used for the signature and the signature value itself. + /// It also returns a random string that uniquely identifies this SAML Authentication request. + /// The caller of this API needs to store this identifier as it needs to be used in a following step of the authentication process. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlAuthenticateResponse SamlAuthenticate(SamlAuthenticateRequestDescriptor descriptor) + public virtual SamlPrepareAuthenticationResponse SamlPrepareAuthentication(SamlPrepareAuthenticationRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Authenticate SAML. + /// Prepare SAML authentication. + /// + /// + /// Create a SAML authentication request (<AuthnRequest>) as a URL string based on the configuration of the respective SAML realm in Elasticsearch. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// /// - /// Submits a SAML response message to Elasticsearch for consumption. + /// This API returns a URL pointing to the SAML Identity Provider. + /// You can use the URL to redirect the browser of the user in order to continue the authentication process. + /// The URL includes a single parameter named SAMLRequest, which contains a SAML Authentication request that is deflated and Base64 encoded. + /// If the configuration dictates that SAML authentication requests should be signed, the URL has two extra parameters named SigAlg and Signature. + /// These parameters contain the algorithm used for the signature and the signature value itself. + /// It also returns a random string that uniquely identifies this SAML Authentication request. + /// The caller of this API needs to store this identifier as it needs to be used in a following step of the authentication process. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlAuthenticateResponse SamlAuthenticate() + public virtual SamlPrepareAuthenticationResponse SamlPrepareAuthentication() { - var descriptor = new SamlAuthenticateRequestDescriptor(); + var descriptor = new SamlPrepareAuthenticationRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Authenticate SAML. + /// Prepare SAML authentication. + /// + /// + /// Create a SAML authentication request (<AuthnRequest>) as a URL string based on the configuration of the respective SAML realm in Elasticsearch. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// /// - /// Submits a SAML response message to Elasticsearch for consumption. + /// This API returns a URL pointing to the SAML Identity Provider. + /// You can use the URL to redirect the browser of the user in order to continue the authentication process. + /// The URL includes a single parameter named SAMLRequest, which contains a SAML Authentication request that is deflated and Base64 encoded. + /// If the configuration dictates that SAML authentication requests should be signed, the URL has two extra parameters named SigAlg and Signature. + /// These parameters contain the algorithm used for the signature and the signature value itself. + /// It also returns a random string that uniquely identifies this SAML Authentication request. + /// The caller of this API needs to store this identifier as it needs to be used in a following step of the authentication process. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlAuthenticateResponse SamlAuthenticate(Action configureRequest) + public virtual SamlPrepareAuthenticationResponse SamlPrepareAuthentication(Action configureRequest) { - var descriptor = new SamlAuthenticateRequestDescriptor(); + var descriptor = new SamlPrepareAuthenticationRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Authenticate SAML. + /// Prepare SAML authentication. + /// + /// + /// Create a SAML authentication request (<AuthnRequest>) as a URL string based on the configuration of the respective SAML realm in Elasticsearch. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// /// - /// Submits a SAML response message to Elasticsearch for consumption. + /// This API returns a URL pointing to the SAML Identity Provider. + /// You can use the URL to redirect the browser of the user in order to continue the authentication process. + /// The URL includes a single parameter named SAMLRequest, which contains a SAML Authentication request that is deflated and Base64 encoded. + /// If the configuration dictates that SAML authentication requests should be signed, the URL has two extra parameters named SigAlg and Signature. + /// These parameters contain the algorithm used for the signature and the signature value itself. + /// It also returns a random string that uniquely identifies this SAML Authentication request. + /// The caller of this API needs to store this identifier as it needs to be used in a following step of the authentication process. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task SamlAuthenticateAsync(SamlAuthenticateRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task SamlPrepareAuthenticationAsync(SamlPrepareAuthenticationRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Authenticate SAML. + /// Prepare SAML authentication. + /// + /// + /// Create a SAML authentication request (<AuthnRequest>) as a URL string based on the configuration of the respective SAML realm in Elasticsearch. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// /// - /// Submits a SAML response message to Elasticsearch for consumption. + /// This API returns a URL pointing to the SAML Identity Provider. + /// You can use the URL to redirect the browser of the user in order to continue the authentication process. + /// The URL includes a single parameter named SAMLRequest, which contains a SAML Authentication request that is deflated and Base64 encoded. + /// If the configuration dictates that SAML authentication requests should be signed, the URL has two extra parameters named SigAlg and Signature. + /// These parameters contain the algorithm used for the signature and the signature value itself. + /// It also returns a random string that uniquely identifies this SAML Authentication request. + /// The caller of this API needs to store this identifier as it needs to be used in a following step of the authentication process. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task SamlAuthenticateAsync(CancellationToken cancellationToken = default) + public virtual Task SamlPrepareAuthenticationAsync(CancellationToken cancellationToken = default) { - var descriptor = new SamlAuthenticateRequestDescriptor(); + var descriptor = new SamlPrepareAuthenticationRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Authenticate SAML. + /// Prepare SAML authentication. + /// + /// + /// Create a SAML authentication request (<AuthnRequest>) as a URL string based on the configuration of the respective SAML realm in Elasticsearch. + /// + /// + /// NOTE: This API is intended for use by custom web applications other than Kibana. + /// If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. /// /// - /// Submits a SAML response message to Elasticsearch for consumption. + /// This API returns a URL pointing to the SAML Identity Provider. + /// You can use the URL to redirect the browser of the user in order to continue the authentication process. + /// The URL includes a single parameter named SAMLRequest, which contains a SAML Authentication request that is deflated and Base64 encoded. + /// If the configuration dictates that SAML authentication requests should be signed, the URL has two extra parameters named SigAlg and Signature. + /// These parameters contain the algorithm used for the signature and the signature value itself. + /// It also returns a random string that uniquely identifies this SAML Authentication request. + /// The caller of this API needs to store this identifier as it needs to be used in a following step of the authentication process. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task SamlAuthenticateAsync(Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task SamlPrepareAuthenticationAsync(Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new SamlAuthenticateRequestDescriptor(); + var descriptor = new SamlPrepareAuthenticationRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Logout of SAML completely. + /// Create SAML service provider metadata. /// /// - /// Verifies the logout response sent from the SAML IdP. + /// Generate SAML metadata for a SAML 2.0 Service Provider. + /// + /// + /// The SAML 2.0 specification provides a mechanism for Service Providers to describe their capabilities and configuration using a metadata file. + /// This API generates Service Provider metadata based on the configuration of a SAML realm in Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlCompleteLogoutResponse SamlCompleteLogout(SamlCompleteLogoutRequest request) + public virtual SamlServiceProviderMetadataResponse SamlServiceProviderMetadata(SamlServiceProviderMetadataRequest request) { request.BeforeRequest(); - return DoRequest(request); + return DoRequest(request); } /// /// - /// Logout of SAML completely. + /// Create SAML service provider metadata. /// /// - /// Verifies the logout response sent from the SAML IdP. + /// Generate SAML metadata for a SAML 2.0 Service Provider. + /// + /// + /// The SAML 2.0 specification provides a mechanism for Service Providers to describe their capabilities and configuration using a metadata file. + /// This API generates Service Provider metadata based on the configuration of a SAML realm in Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task SamlCompleteLogoutAsync(SamlCompleteLogoutRequest request, CancellationToken cancellationToken = default) + public virtual Task SamlServiceProviderMetadataAsync(SamlServiceProviderMetadataRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Logout of SAML completely. + /// Create SAML service provider metadata. /// /// - /// Verifies the logout response sent from the SAML IdP. + /// Generate SAML metadata for a SAML 2.0 Service Provider. + /// + /// + /// The SAML 2.0 specification provides a mechanism for Service Providers to describe their capabilities and configuration using a metadata file. + /// This API generates Service Provider metadata based on the configuration of a SAML realm in Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlCompleteLogoutResponse SamlCompleteLogout(SamlCompleteLogoutRequestDescriptor descriptor) + public virtual SamlServiceProviderMetadataResponse SamlServiceProviderMetadata(SamlServiceProviderMetadataRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Logout of SAML completely. + /// Create SAML service provider metadata. /// /// - /// Verifies the logout response sent from the SAML IdP. + /// Generate SAML metadata for a SAML 2.0 Service Provider. + /// + /// + /// The SAML 2.0 specification provides a mechanism for Service Providers to describe their capabilities and configuration using a metadata file. + /// This API generates Service Provider metadata based on the configuration of a SAML realm in Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlCompleteLogoutResponse SamlCompleteLogout() + public virtual SamlServiceProviderMetadataResponse SamlServiceProviderMetadata(Elastic.Clients.Elasticsearch.Name realmName) { - var descriptor = new SamlCompleteLogoutRequestDescriptor(); + var descriptor = new SamlServiceProviderMetadataRequestDescriptor(realmName); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Logout of SAML completely. + /// Create SAML service provider metadata. /// /// - /// Verifies the logout response sent from the SAML IdP. + /// Generate SAML metadata for a SAML 2.0 Service Provider. + /// + /// + /// The SAML 2.0 specification provides a mechanism for Service Providers to describe their capabilities and configuration using a metadata file. + /// This API generates Service Provider metadata based on the configuration of a SAML realm in Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlCompleteLogoutResponse SamlCompleteLogout(Action configureRequest) + public virtual SamlServiceProviderMetadataResponse SamlServiceProviderMetadata(Elastic.Clients.Elasticsearch.Name realmName, Action configureRequest) { - var descriptor = new SamlCompleteLogoutRequestDescriptor(); + var descriptor = new SamlServiceProviderMetadataRequestDescriptor(realmName); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Logout of SAML completely. + /// Create SAML service provider metadata. /// /// - /// Verifies the logout response sent from the SAML IdP. + /// Generate SAML metadata for a SAML 2.0 Service Provider. + /// + /// + /// The SAML 2.0 specification provides a mechanism for Service Providers to describe their capabilities and configuration using a metadata file. + /// This API generates Service Provider metadata based on the configuration of a SAML realm in Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task SamlCompleteLogoutAsync(SamlCompleteLogoutRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task SamlServiceProviderMetadataAsync(SamlServiceProviderMetadataRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Logout of SAML completely. + /// Create SAML service provider metadata. /// /// - /// Verifies the logout response sent from the SAML IdP. + /// Generate SAML metadata for a SAML 2.0 Service Provider. + /// + /// + /// The SAML 2.0 specification provides a mechanism for Service Providers to describe their capabilities and configuration using a metadata file. + /// This API generates Service Provider metadata based on the configuration of a SAML realm in Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task SamlCompleteLogoutAsync(CancellationToken cancellationToken = default) + public virtual Task SamlServiceProviderMetadataAsync(Elastic.Clients.Elasticsearch.Name realmName, CancellationToken cancellationToken = default) { - var descriptor = new SamlCompleteLogoutRequestDescriptor(); + var descriptor = new SamlServiceProviderMetadataRequestDescriptor(realmName); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Logout of SAML completely. + /// Create SAML service provider metadata. /// /// - /// Verifies the logout response sent from the SAML IdP. + /// Generate SAML metadata for a SAML 2.0 Service Provider. + /// + /// + /// The SAML 2.0 specification provides a mechanism for Service Providers to describe their capabilities and configuration using a metadata file. + /// This API generates Service Provider metadata based on the configuration of a SAML realm in Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task SamlCompleteLogoutAsync(Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task SamlServiceProviderMetadataAsync(Elastic.Clients.Elasticsearch.Name realmName, Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new SamlCompleteLogoutRequestDescriptor(); + var descriptor = new SamlServiceProviderMetadataRequestDescriptor(realmName); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Invalidate SAML. + /// Suggest a user profile. + /// + /// + /// Get suggestions for user profiles that match specified search criteria. /// /// - /// Submits a SAML LogoutRequest message to Elasticsearch for consumption. + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlInvalidateResponse SamlInvalidate(SamlInvalidateRequest request) + public virtual SuggestUserProfilesResponse SuggestUserProfiles(SuggestUserProfilesRequest request) { request.BeforeRequest(); - return DoRequest(request); + return DoRequest(request); } /// /// - /// Invalidate SAML. + /// Suggest a user profile. + /// + /// + /// Get suggestions for user profiles that match specified search criteria. /// /// - /// Submits a SAML LogoutRequest message to Elasticsearch for consumption. + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task SamlInvalidateAsync(SamlInvalidateRequest request, CancellationToken cancellationToken = default) + public virtual Task SuggestUserProfilesAsync(SuggestUserProfilesRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Invalidate SAML. + /// Suggest a user profile. + /// + /// + /// Get suggestions for user profiles that match specified search criteria. /// /// - /// Submits a SAML LogoutRequest message to Elasticsearch for consumption. + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlInvalidateResponse SamlInvalidate(SamlInvalidateRequestDescriptor descriptor) + public virtual SuggestUserProfilesResponse SuggestUserProfiles(SuggestUserProfilesRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Invalidate SAML. + /// Suggest a user profile. /// /// - /// Submits a SAML LogoutRequest message to Elasticsearch for consumption. + /// Get suggestions for user profiles that match specified search criteria. + /// + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlInvalidateResponse SamlInvalidate() + public virtual SuggestUserProfilesResponse SuggestUserProfiles() { - var descriptor = new SamlInvalidateRequestDescriptor(); + var descriptor = new SuggestUserProfilesRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Invalidate SAML. + /// Suggest a user profile. + /// + /// + /// Get suggestions for user profiles that match specified search criteria. /// /// - /// Submits a SAML LogoutRequest message to Elasticsearch for consumption. + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlInvalidateResponse SamlInvalidate(Action configureRequest) + public virtual SuggestUserProfilesResponse SuggestUserProfiles(Action configureRequest) { - var descriptor = new SamlInvalidateRequestDescriptor(); + var descriptor = new SuggestUserProfilesRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Invalidate SAML. + /// Suggest a user profile. + /// + /// + /// Get suggestions for user profiles that match specified search criteria. /// /// - /// Submits a SAML LogoutRequest message to Elasticsearch for consumption. + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task SamlInvalidateAsync(SamlInvalidateRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task SuggestUserProfilesAsync(SuggestUserProfilesRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Invalidate SAML. + /// Suggest a user profile. + /// + /// + /// Get suggestions for user profiles that match specified search criteria. /// /// - /// Submits a SAML LogoutRequest message to Elasticsearch for consumption. + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task SamlInvalidateAsync(CancellationToken cancellationToken = default) + public virtual Task SuggestUserProfilesAsync(CancellationToken cancellationToken = default) { - var descriptor = new SamlInvalidateRequestDescriptor(); + var descriptor = new SuggestUserProfilesRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Invalidate SAML. + /// Suggest a user profile. + /// + /// + /// Get suggestions for user profiles that match specified search criteria. /// /// - /// Submits a SAML LogoutRequest message to Elasticsearch for consumption. + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task SamlInvalidateAsync(Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task SuggestUserProfilesAsync(Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new SamlInvalidateRequestDescriptor(); + var descriptor = new SuggestUserProfilesRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Logout of SAML. + /// Update an API key. /// /// - /// Submits a request to invalidate an access token and refresh token. + /// Update attributes of an existing API key. + /// This API supports updates to an API key's access scope, expiration, and metadata. + /// + /// + /// To use this API, you must have at least the manage_own_api_key cluster privilege. + /// Users can only update API keys that they created or that were granted to them. + /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. + /// + /// + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Use this API to update API keys created by the create API key or grant API Key APIs. + /// If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead. + /// It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// The access scope of an API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change the API key's access scope. + /// This change can occur if the owner user's permissions have changed since the API key was created or last modified. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlLogoutResponse SamlLogout(SamlLogoutRequest request) + public virtual UpdateApiKeyResponse UpdateApiKey(UpdateApiKeyRequest request) { request.BeforeRequest(); - return DoRequest(request); + return DoRequest(request); } /// /// - /// Logout of SAML. + /// Update an API key. /// /// - /// Submits a request to invalidate an access token and refresh token. + /// Update attributes of an existing API key. + /// This API supports updates to an API key's access scope, expiration, and metadata. + /// + /// + /// To use this API, you must have at least the manage_own_api_key cluster privilege. + /// Users can only update API keys that they created or that were granted to them. + /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. + /// + /// + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required. + /// + /// + /// Use this API to update API keys created by the create API key or grant API Key APIs. + /// If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead. + /// It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// The access scope of an API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change the API key's access scope. + /// This change can occur if the owner user's permissions have changed since the API key was created or last modified. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task SamlLogoutAsync(SamlLogoutRequest request, CancellationToken cancellationToken = default) + public virtual Task UpdateApiKeyAsync(UpdateApiKeyRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Logout of SAML. + /// Update an API key. /// /// - /// Submits a request to invalidate an access token and refresh token. + /// Update attributes of an existing API key. + /// This API supports updates to an API key's access scope, expiration, and metadata. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlLogoutResponse SamlLogout(SamlLogoutRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Logout of SAML. + /// To use this API, you must have at least the manage_own_api_key cluster privilege. + /// Users can only update API keys that they created or that were granted to them. + /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. /// /// - /// Submits a request to invalidate an access token and refresh token. + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required. + /// + /// + /// Use this API to update API keys created by the create API key or grant API Key APIs. + /// If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead. + /// It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// The access scope of an API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change the API key's access scope. + /// This change can occur if the owner user's permissions have changed since the API key was created or last modified. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlLogoutResponse SamlLogout() + public virtual UpdateApiKeyResponse UpdateApiKey(UpdateApiKeyRequestDescriptor descriptor) { - var descriptor = new SamlLogoutRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest, UpdateApiKeyResponse, UpdateApiKeyRequestParameters>(descriptor); } /// /// - /// Logout of SAML. + /// Update an API key. /// /// - /// Submits a request to invalidate an access token and refresh token. + /// Update attributes of an existing API key. + /// This API supports updates to an API key's access scope, expiration, and metadata. + /// + /// + /// To use this API, you must have at least the manage_own_api_key cluster privilege. + /// Users can only update API keys that they created or that were granted to them. + /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. + /// + /// + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required. + /// + /// + /// Use this API to update API keys created by the create API key or grant API Key APIs. + /// If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead. + /// It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// The access scope of an API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change the API key's access scope. + /// This change can occur if the owner user's permissions have changed since the API key was created or last modified. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlLogoutResponse SamlLogout(Action configureRequest) + public virtual UpdateApiKeyResponse UpdateApiKey(Elastic.Clients.Elasticsearch.Id id) { - var descriptor = new SamlLogoutRequestDescriptor(); - configureRequest?.Invoke(descriptor); + var descriptor = new UpdateApiKeyRequestDescriptor(id); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest, UpdateApiKeyResponse, UpdateApiKeyRequestParameters>(descriptor); } /// /// - /// Logout of SAML. + /// Update an API key. /// /// - /// Submits a request to invalidate an access token and refresh token. + /// Update attributes of an existing API key. + /// This API supports updates to an API key's access scope, expiration, and metadata. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlLogoutAsync(SamlLogoutRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Logout of SAML. + /// To use this API, you must have at least the manage_own_api_key cluster privilege. + /// Users can only update API keys that they created or that were granted to them. + /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. /// /// - /// Submits a request to invalidate an access token and refresh token. + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlLogoutAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SamlLogoutRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Logout of SAML. + /// Use this API to update API keys created by the create API key or grant API Key APIs. + /// If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead. + /// It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API. /// /// - /// Submits a request to invalidate an access token and refresh token. + /// The access scope of an API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change the API key's access scope. + /// This change can occur if the owner user's permissions have changed since the API key was created or last modified. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task SamlLogoutAsync(Action configureRequest, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual UpdateApiKeyResponse UpdateApiKey(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) { - var descriptor = new SamlLogoutRequestDescriptor(); + var descriptor = new UpdateApiKeyRequestDescriptor(id); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequest, UpdateApiKeyResponse, UpdateApiKeyRequestParameters>(descriptor); } /// /// - /// Prepare SAML authentication. + /// Update an API key. /// /// - /// Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch. + /// Update attributes of an existing API key. + /// This API supports updates to an API key's access scope, expiration, and metadata. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlPrepareAuthenticationResponse SamlPrepareAuthentication(SamlPrepareAuthenticationRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// /// - /// Prepare SAML authentication. + /// To use this API, you must have at least the manage_own_api_key cluster privilege. + /// Users can only update API keys that they created or that were granted to them. + /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. /// /// - /// Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch. + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlPrepareAuthenticationAsync(SamlPrepareAuthenticationRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// /// - /// Prepare SAML authentication. + /// Use this API to update API keys created by the create API key or grant API Key APIs. + /// If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead. + /// It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API. /// /// - /// Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch. + /// The access scope of an API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change the API key's access scope. + /// This change can occur if the owner user's permissions have changed since the API key was created or last modified. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlPrepareAuthenticationResponse SamlPrepareAuthentication(SamlPrepareAuthenticationRequestDescriptor descriptor) + public virtual UpdateApiKeyResponse UpdateApiKey(UpdateApiKeyRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Prepare SAML authentication. + /// Update an API key. /// /// - /// Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch. + /// Update attributes of an existing API key. + /// This API supports updates to an API key's access scope, expiration, and metadata. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have at least the manage_own_api_key cluster privilege. + /// Users can only update API keys that they created or that were granted to them. + /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. + /// + /// + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required. + /// + /// + /// Use this API to update API keys created by the create API key or grant API Key APIs. + /// If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead. + /// It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// The access scope of an API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change the API key's access scope. + /// This change can occur if the owner user's permissions have changed since the API key was created or last modified. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlPrepareAuthenticationResponse SamlPrepareAuthentication() + public virtual UpdateApiKeyResponse UpdateApiKey(Elastic.Clients.Elasticsearch.Id id) { - var descriptor = new SamlPrepareAuthenticationRequestDescriptor(); + var descriptor = new UpdateApiKeyRequestDescriptor(id); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Prepare SAML authentication. + /// Update an API key. + /// + /// + /// Update attributes of an existing API key. + /// This API supports updates to an API key's access scope, expiration, and metadata. + /// + /// + /// To use this API, you must have at least the manage_own_api_key cluster privilege. + /// Users can only update API keys that they created or that were granted to them. + /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. + /// + /// + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required. + /// + /// + /// Use this API to update API keys created by the create API key or grant API Key APIs. + /// If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead. + /// It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// The access scope of an API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. /// /// - /// Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch. + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change the API key's access scope. + /// This change can occur if the owner user's permissions have changed since the API key was created or last modified. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlPrepareAuthenticationResponse SamlPrepareAuthentication(Action configureRequest) + public virtual UpdateApiKeyResponse UpdateApiKey(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) { - var descriptor = new SamlPrepareAuthenticationRequestDescriptor(); + var descriptor = new UpdateApiKeyRequestDescriptor(id); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Prepare SAML authentication. + /// Update an API key. /// /// - /// Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch. + /// Update attributes of an existing API key. + /// This API supports updates to an API key's access scope, expiration, and metadata. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlPrepareAuthenticationAsync(SamlPrepareAuthenticationRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Prepare SAML authentication. + /// To use this API, you must have at least the manage_own_api_key cluster privilege. + /// Users can only update API keys that they created or that were granted to them. + /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. /// /// - /// Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch. + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlPrepareAuthenticationAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SamlPrepareAuthenticationRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Prepare SAML authentication. + /// Use this API to update API keys created by the create API key or grant API Key APIs. + /// If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead. + /// It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// The access scope of an API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. /// /// - /// Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch. + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change the API key's access scope. + /// This change can occur if the owner user's permissions have changed since the API key was created or last modified. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task SamlPrepareAuthenticationAsync(Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task UpdateApiKeyAsync(UpdateApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) { - var descriptor = new SamlPrepareAuthenticationRequestDescriptor(); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync, UpdateApiKeyResponse, UpdateApiKeyRequestParameters>(descriptor, cancellationToken); } /// /// - /// Create SAML service provider metadata. + /// Update an API key. /// /// - /// Generate SAML metadata for a SAML 2.0 Service Provider. + /// Update attributes of an existing API key. + /// This API supports updates to an API key's access scope, expiration, and metadata. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlServiceProviderMetadataResponse SamlServiceProviderMetadata(SamlServiceProviderMetadataRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// /// - /// Create SAML service provider metadata. + /// To use this API, you must have at least the manage_own_api_key cluster privilege. + /// Users can only update API keys that they created or that were granted to them. + /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. /// /// - /// Generate SAML metadata for a SAML 2.0 Service Provider. + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlServiceProviderMetadataAsync(SamlServiceProviderMetadataRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// /// - /// Create SAML service provider metadata. + /// Use this API to update API keys created by the create API key or grant API Key APIs. + /// If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead. + /// It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API. /// /// - /// Generate SAML metadata for a SAML 2.0 Service Provider. + /// The access scope of an API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change the API key's access scope. + /// This change can occur if the owner user's permissions have changed since the API key was created or last modified. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlServiceProviderMetadataResponse SamlServiceProviderMetadata(SamlServiceProviderMetadataRequestDescriptor descriptor) + public virtual Task UpdateApiKeyAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { + var descriptor = new UpdateApiKeyRequestDescriptor(id); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequestAsync, UpdateApiKeyResponse, UpdateApiKeyRequestParameters>(descriptor, cancellationToken); } /// /// - /// Create SAML service provider metadata. + /// Update an API key. /// /// - /// Generate SAML metadata for a SAML 2.0 Service Provider. + /// Update attributes of an existing API key. + /// This API supports updates to an API key's access scope, expiration, and metadata. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlServiceProviderMetadataResponse SamlServiceProviderMetadata(Elastic.Clients.Elasticsearch.Name realmName) - { - var descriptor = new SamlServiceProviderMetadataRequestDescriptor(realmName); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Create SAML service provider metadata. + /// To use this API, you must have at least the manage_own_api_key cluster privilege. + /// Users can only update API keys that they created or that were granted to them. + /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. /// /// - /// Generate SAML metadata for a SAML 2.0 Service Provider. + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Use this API to update API keys created by the create API key or grant API Key APIs. + /// If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead. + /// It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// The access scope of an API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change the API key's access scope. + /// This change can occur if the owner user's permissions have changed since the API key was created or last modified. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SamlServiceProviderMetadataResponse SamlServiceProviderMetadata(Elastic.Clients.Elasticsearch.Name realmName, Action configureRequest) + public virtual Task UpdateApiKeyAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new SamlServiceProviderMetadataRequestDescriptor(realmName); + var descriptor = new UpdateApiKeyRequestDescriptor(id); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequestAsync, UpdateApiKeyResponse, UpdateApiKeyRequestParameters>(descriptor, cancellationToken); } /// /// - /// Create SAML service provider metadata. + /// Update an API key. /// /// - /// Generate SAML metadata for a SAML 2.0 Service Provider. + /// Update attributes of an existing API key. + /// This API supports updates to an API key's access scope, expiration, and metadata. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlServiceProviderMetadataAsync(SamlServiceProviderMetadataRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Create SAML service provider metadata. + /// To use this API, you must have at least the manage_own_api_key cluster privilege. + /// Users can only update API keys that they created or that were granted to them. + /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. /// /// - /// Generate SAML metadata for a SAML 2.0 Service Provider. + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SamlServiceProviderMetadataAsync(Elastic.Clients.Elasticsearch.Name realmName, CancellationToken cancellationToken = default) - { - var descriptor = new SamlServiceProviderMetadataRequestDescriptor(realmName); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Create SAML service provider metadata. + /// Use this API to update API keys created by the create API key or grant API Key APIs. + /// If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead. + /// It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API. /// /// - /// Generate SAML metadata for a SAML 2.0 Service Provider. + /// The access scope of an API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change the API key's access scope. + /// This change can occur if the owner user's permissions have changed since the API key was created or last modified. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task SamlServiceProviderMetadataAsync(Elastic.Clients.Elasticsearch.Name realmName, Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task UpdateApiKeyAsync(UpdateApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) { - var descriptor = new SamlServiceProviderMetadataRequestDescriptor(realmName); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Suggest a user profile. + /// Update an API key. /// /// - /// Get suggestions for user profiles that match specified search criteria. + /// Update attributes of an existing API key. + /// This API supports updates to an API key's access scope, expiration, and metadata. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SuggestUserProfilesResponse SuggestUserProfiles(SuggestUserProfilesRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// /// - /// Suggest a user profile. + /// To use this API, you must have at least the manage_own_api_key cluster privilege. + /// Users can only update API keys that they created or that were granted to them. + /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. /// /// - /// Get suggestions for user profiles that match specified search criteria. + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SuggestUserProfilesAsync(SuggestUserProfilesRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// /// - /// Suggest a user profile. + /// Use this API to update API keys created by the create API key or grant API Key APIs. + /// If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead. + /// It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API. /// /// - /// Get suggestions for user profiles that match specified search criteria. + /// The access scope of an API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change the API key's access scope. + /// This change can occur if the owner user's permissions have changed since the API key was created or last modified. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SuggestUserProfilesResponse SuggestUserProfiles(SuggestUserProfilesRequestDescriptor descriptor) + public virtual Task UpdateApiKeyAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { + var descriptor = new UpdateApiKeyRequestDescriptor(id); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Suggest a user profile. + /// Update an API key. /// /// - /// Get suggestions for user profiles that match specified search criteria. + /// Update attributes of an existing API key. + /// This API supports updates to an API key's access scope, expiration, and metadata. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SuggestUserProfilesResponse SuggestUserProfiles() - { - var descriptor = new SuggestUserProfilesRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Suggest a user profile. + /// To use this API, you must have at least the manage_own_api_key cluster privilege. + /// Users can only update API keys that they created or that were granted to them. + /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. /// /// - /// Get suggestions for user profiles that match specified search criteria. + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SuggestUserProfilesResponse SuggestUserProfiles(Action configureRequest) - { - var descriptor = new SuggestUserProfilesRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Suggest a user profile. + /// Use this API to update API keys created by the create API key or grant API Key APIs. + /// If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead. + /// It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API. /// /// - /// Get suggestions for user profiles that match specified search criteria. + /// The access scope of an API key is derived from the role_descriptors you specify in the request and a snapshot of the owner user's permissions at the time of the request. + /// The snapshot of the owner's permissions is updated automatically on every call. + /// + /// + /// IMPORTANT: If you don't specify role_descriptors in the request, a call to this API might still change the API key's access scope. + /// This change can occur if the owner user's permissions have changed since the API key was created or last modified. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task SuggestUserProfilesAsync(SuggestUserProfilesRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task UpdateApiKeyAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) { + var descriptor = new UpdateApiKeyRequestDescriptor(id); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Suggest a user profile. + /// Update a cross-cluster API key. /// /// - /// Get suggestions for user profiles that match specified search criteria. + /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SuggestUserProfilesAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SuggestUserProfilesRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Suggest a user profile. + /// To use this API, you must have at least the manage_security cluster privilege. + /// Users can only update API keys that they created. + /// To update another user's API key, use the run_as feature to submit a request on behalf of another user. /// /// - /// Get suggestions for user profiles that match specified search criteria. + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. + /// To update an API key, the owner user's credentials are required. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SuggestUserProfilesAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SuggestUserProfilesRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Update an API key. + /// It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API. /// /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. + /// This API supports updates to an API key's access scope, metadata, and expiration. + /// The owner user's information, such as the username and realm, is also updated automatically on every call. + /// + /// + /// NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateApiKeyResponse UpdateApiKey(UpdateApiKeyRequest request) + public virtual UpdateCrossClusterApiKeyResponse UpdateCrossClusterApiKey(UpdateCrossClusterApiKeyRequest request) { request.BeforeRequest(); - return DoRequest(request); + return DoRequest(request); } /// /// - /// Update an API key. + /// Update a cross-cluster API key. /// /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. + /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// + /// + /// To use this API, you must have at least the manage_security cluster privilege. + /// Users can only update API keys that they created. + /// To update another user's API key, use the run_as feature to submit a request on behalf of another user. + /// + /// + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. + /// To update an API key, the owner user's credentials are required. + /// + /// + /// It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// This API supports updates to an API key's access scope, metadata, and expiration. + /// The owner user's information, such as the username and realm, is also updated automatically on every call. + /// + /// + /// NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task UpdateApiKeyAsync(UpdateApiKeyRequest request, CancellationToken cancellationToken = default) + public virtual Task UpdateCrossClusterApiKeyAsync(UpdateCrossClusterApiKeyRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Update an API key. + /// Update a cross-cluster API key. /// /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. + /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// + /// + /// To use this API, you must have at least the manage_security cluster privilege. + /// Users can only update API keys that they created. + /// To update another user's API key, use the run_as feature to submit a request on behalf of another user. + /// + /// + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. + /// To update an API key, the owner user's credentials are required. + /// + /// + /// It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// This API supports updates to an API key's access scope, metadata, and expiration. + /// The owner user's information, such as the username and realm, is also updated automatically on every call. + /// + /// + /// NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateApiKeyResponse UpdateApiKey(UpdateApiKeyRequestDescriptor descriptor) + public virtual UpdateCrossClusterApiKeyResponse UpdateCrossClusterApiKey(UpdateCrossClusterApiKeyRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequest, UpdateApiKeyResponse, UpdateApiKeyRequestParameters>(descriptor); + return DoRequest, UpdateCrossClusterApiKeyResponse, UpdateCrossClusterApiKeyRequestParameters>(descriptor); } /// /// - /// Update an API key. + /// Update a cross-cluster API key. /// /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. + /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// + /// + /// To use this API, you must have at least the manage_security cluster privilege. + /// Users can only update API keys that they created. + /// To update another user's API key, use the run_as feature to submit a request on behalf of another user. + /// + /// + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. + /// To update an API key, the owner user's credentials are required. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// This API supports updates to an API key's access scope, metadata, and expiration. + /// The owner user's information, such as the username and realm, is also updated automatically on every call. + /// + /// + /// NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateApiKeyResponse UpdateApiKey(Elastic.Clients.Elasticsearch.Id id) + public virtual UpdateCrossClusterApiKeyResponse UpdateCrossClusterApiKey(Elastic.Clients.Elasticsearch.Id id) { - var descriptor = new UpdateApiKeyRequestDescriptor(id); + var descriptor = new UpdateCrossClusterApiKeyRequestDescriptor(id); descriptor.BeforeRequest(); - return DoRequest, UpdateApiKeyResponse, UpdateApiKeyRequestParameters>(descriptor); + return DoRequest, UpdateCrossClusterApiKeyResponse, UpdateCrossClusterApiKeyRequestParameters>(descriptor); } /// /// - /// Update an API key. + /// Update a cross-cluster API key. /// /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. + /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// + /// + /// To use this API, you must have at least the manage_security cluster privilege. + /// Users can only update API keys that they created. + /// To update another user's API key, use the run_as feature to submit a request on behalf of another user. + /// + /// + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. + /// To update an API key, the owner user's credentials are required. + /// + /// + /// It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// This API supports updates to an API key's access scope, metadata, and expiration. + /// The owner user's information, such as the username and realm, is also updated automatically on every call. + /// + /// + /// NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateApiKeyResponse UpdateApiKey(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + public virtual UpdateCrossClusterApiKeyResponse UpdateCrossClusterApiKey(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) { - var descriptor = new UpdateApiKeyRequestDescriptor(id); + var descriptor = new UpdateCrossClusterApiKeyRequestDescriptor(id); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, UpdateApiKeyResponse, UpdateApiKeyRequestParameters>(descriptor); + return DoRequest, UpdateCrossClusterApiKeyResponse, UpdateCrossClusterApiKeyRequestParameters>(descriptor); } /// /// - /// Update an API key. + /// Update a cross-cluster API key. /// /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. + /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// + /// + /// To use this API, you must have at least the manage_security cluster privilege. + /// Users can only update API keys that they created. + /// To update another user's API key, use the run_as feature to submit a request on behalf of another user. + /// + /// + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. + /// To update an API key, the owner user's credentials are required. + /// + /// + /// It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// This API supports updates to an API key's access scope, metadata, and expiration. + /// The owner user's information, such as the username and realm, is also updated automatically on every call. + /// + /// + /// NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateApiKeyResponse UpdateApiKey(UpdateApiKeyRequestDescriptor descriptor) + public virtual UpdateCrossClusterApiKeyResponse UpdateCrossClusterApiKey(UpdateCrossClusterApiKeyRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Update an API key. + /// Update a cross-cluster API key. /// /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. + /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// + /// + /// To use this API, you must have at least the manage_security cluster privilege. + /// Users can only update API keys that they created. + /// To update another user's API key, use the run_as feature to submit a request on behalf of another user. + /// + /// + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. + /// To update an API key, the owner user's credentials are required. + /// + /// + /// It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// This API supports updates to an API key's access scope, metadata, and expiration. + /// The owner user's information, such as the username and realm, is also updated automatically on every call. + /// + /// + /// NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateApiKeyResponse UpdateApiKey(Elastic.Clients.Elasticsearch.Id id) + public virtual UpdateCrossClusterApiKeyResponse UpdateCrossClusterApiKey(Elastic.Clients.Elasticsearch.Id id) { - var descriptor = new UpdateApiKeyRequestDescriptor(id); + var descriptor = new UpdateCrossClusterApiKeyRequestDescriptor(id); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Update an API key. + /// Update a cross-cluster API key. /// /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. + /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// + /// + /// To use this API, you must have at least the manage_security cluster privilege. + /// Users can only update API keys that they created. + /// To update another user's API key, use the run_as feature to submit a request on behalf of another user. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. + /// To update an API key, the owner user's credentials are required. + /// + /// + /// It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// This API supports updates to an API key's access scope, metadata, and expiration. + /// The owner user's information, such as the username and realm, is also updated automatically on every call. + /// + /// + /// NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateApiKeyResponse UpdateApiKey(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) + public virtual UpdateCrossClusterApiKeyResponse UpdateCrossClusterApiKey(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) { - var descriptor = new UpdateApiKeyRequestDescriptor(id); + var descriptor = new UpdateCrossClusterApiKeyRequestDescriptor(id); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Update an API key. + /// Update a cross-cluster API key. /// /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. + /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// + /// + /// To use this API, you must have at least the manage_security cluster privilege. + /// Users can only update API keys that they created. + /// To update another user's API key, use the run_as feature to submit a request on behalf of another user. + /// + /// + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. + /// To update an API key, the owner user's credentials are required. + /// + /// + /// It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// This API supports updates to an API key's access scope, metadata, and expiration. + /// The owner user's information, such as the username and realm, is also updated automatically on every call. + /// + /// + /// NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task UpdateApiKeyAsync(UpdateApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task UpdateCrossClusterApiKeyAsync(UpdateCrossClusterApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequestAsync, UpdateApiKeyResponse, UpdateApiKeyRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, UpdateCrossClusterApiKeyResponse, UpdateCrossClusterApiKeyRequestParameters>(descriptor, cancellationToken); } /// /// - /// Update an API key. + /// Update a cross-cluster API key. /// /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. + /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// + /// + /// To use this API, you must have at least the manage_security cluster privilege. + /// Users can only update API keys that they created. + /// To update another user's API key, use the run_as feature to submit a request on behalf of another user. + /// + /// + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. + /// To update an API key, the owner user's credentials are required. + /// + /// + /// It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// This API supports updates to an API key's access scope, metadata, and expiration. + /// The owner user's information, such as the username and realm, is also updated automatically on every call. + /// + /// + /// NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task UpdateApiKeyAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + public virtual Task UpdateCrossClusterApiKeyAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { - var descriptor = new UpdateApiKeyRequestDescriptor(id); + var descriptor = new UpdateCrossClusterApiKeyRequestDescriptor(id); descriptor.BeforeRequest(); - return DoRequestAsync, UpdateApiKeyResponse, UpdateApiKeyRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, UpdateCrossClusterApiKeyResponse, UpdateCrossClusterApiKeyRequestParameters>(descriptor, cancellationToken); } /// /// - /// Update an API key. + /// Update a cross-cluster API key. /// /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. + /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// + /// + /// To use this API, you must have at least the manage_security cluster privilege. + /// Users can only update API keys that they created. + /// To update another user's API key, use the run_as feature to submit a request on behalf of another user. + /// + /// + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. + /// To update an API key, the owner user's credentials are required. + /// + /// + /// It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// This API supports updates to an API key's access scope, metadata, and expiration. + /// The owner user's information, such as the username and realm, is also updated automatically on every call. + /// + /// + /// NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task UpdateApiKeyAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + public virtual Task UpdateCrossClusterApiKeyAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new UpdateApiKeyRequestDescriptor(id); + var descriptor = new UpdateCrossClusterApiKeyRequestDescriptor(id); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, UpdateApiKeyResponse, UpdateApiKeyRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, UpdateCrossClusterApiKeyResponse, UpdateCrossClusterApiKeyRequestParameters>(descriptor, cancellationToken); } /// /// - /// Update an API key. + /// Update a cross-cluster API key. /// /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. + /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// To use this API, you must have at least the manage_security cluster privilege. + /// Users can only update API keys that they created. + /// To update another user's API key, use the run_as feature to submit a request on behalf of another user. + /// + /// + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. + /// To update an API key, the owner user's credentials are required. + /// + /// + /// It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// This API supports updates to an API key's access scope, metadata, and expiration. + /// The owner user's information, such as the username and realm, is also updated automatically on every call. + /// + /// + /// NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task UpdateApiKeyAsync(UpdateApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task UpdateCrossClusterApiKeyAsync(UpdateCrossClusterApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Update an API key. + /// Update a cross-cluster API key. /// /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. + /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// + /// + /// To use this API, you must have at least the manage_security cluster privilege. + /// Users can only update API keys that they created. + /// To update another user's API key, use the run_as feature to submit a request on behalf of another user. + /// + /// + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. + /// To update an API key, the owner user's credentials are required. + /// + /// + /// It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// This API supports updates to an API key's access scope, metadata, and expiration. + /// The owner user's information, such as the username and realm, is also updated automatically on every call. + /// + /// + /// NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task UpdateApiKeyAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + public virtual Task UpdateCrossClusterApiKeyAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { - var descriptor = new UpdateApiKeyRequestDescriptor(id); + var descriptor = new UpdateCrossClusterApiKeyRequestDescriptor(id); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Update an API key. + /// Update a cross-cluster API key. /// /// - /// Updates attributes of an existing API key. - /// Users can only update API keys that they created or that were granted to them. - /// Use this API to update API keys created by the create API Key or grant API Key APIs. - /// If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. - /// It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. - /// This API supports updates to an API key’s access scope and metadata. - /// The access scope of an API key is derived from the role_descriptors you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. - /// The snapshot of the owner’s permissions is updated automatically on every call. - /// If you don’t specify role_descriptors in the request, a call to this API might still change the API key’s access scope. - /// This change can occur if the owner user’s permissions have changed since the API key was created or last modified. - /// To update another user’s API key, use the run_as feature to submit a request on behalf of another user. - /// IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. - /// To update an API key, the owner user’s credentials are required. + /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// + /// + /// To use this API, you must have at least the manage_security cluster privilege. + /// Users can only update API keys that they created. + /// To update another user's API key, use the run_as feature to submit a request on behalf of another user. + /// + /// + /// IMPORTANT: It's not possible to use an API key as the authentication credential for this API. + /// To update an API key, the owner user's credentials are required. + /// + /// + /// It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API. + /// + /// + /// This API supports updates to an API key's access scope, metadata, and expiration. + /// The owner user's information, such as the username and realm, is also updated automatically on every call. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task UpdateApiKeyAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task UpdateCrossClusterApiKeyAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new UpdateApiKeyRequestDescriptor(id); + var descriptor = new UpdateCrossClusterApiKeyRequestDescriptor(id); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Update a cross-cluster API key. + /// Update security index settings. /// /// - /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// Update the user-configurable settings for the security internal index (.security and associated indices). Only a subset of settings are allowed to be modified. This includes index.auto_expand_replicas and index.number_of_replicas. + /// + /// + /// NOTE: If index.auto_expand_replicas is set, index.number_of_replicas will be ignored during updates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If a specific index is not in use on the system and settings are provided for it, the request will be rejected. + /// This API does not yet support configuring the settings for indices before they are in use. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateCrossClusterApiKeyResponse UpdateCrossClusterApiKey(UpdateCrossClusterApiKeyRequest request) + public virtual UpdateSettingsResponse UpdateSettings(UpdateSettingsRequest request) { request.BeforeRequest(); - return DoRequest(request); + return DoRequest(request); } /// /// - /// Update a cross-cluster API key. + /// Update security index settings. /// /// - /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// Update the user-configurable settings for the security internal index (.security and associated indices). Only a subset of settings are allowed to be modified. This includes index.auto_expand_replicas and index.number_of_replicas. + /// + /// + /// NOTE: If index.auto_expand_replicas is set, index.number_of_replicas will be ignored during updates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If a specific index is not in use on the system and settings are provided for it, the request will be rejected. + /// This API does not yet support configuring the settings for indices before they are in use. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task UpdateCrossClusterApiKeyAsync(UpdateCrossClusterApiKeyRequest request, CancellationToken cancellationToken = default) + public virtual Task UpdateSettingsAsync(UpdateSettingsRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Update a cross-cluster API key. + /// Update security index settings. /// /// - /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// Update the user-configurable settings for the security internal index (.security and associated indices). Only a subset of settings are allowed to be modified. This includes index.auto_expand_replicas and index.number_of_replicas. + /// + /// + /// NOTE: If index.auto_expand_replicas is set, index.number_of_replicas will be ignored during updates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If a specific index is not in use on the system and settings are provided for it, the request will be rejected. + /// This API does not yet support configuring the settings for indices before they are in use. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateCrossClusterApiKeyResponse UpdateCrossClusterApiKey(UpdateCrossClusterApiKeyRequestDescriptor descriptor) + public virtual UpdateSettingsResponse UpdateSettings(UpdateSettingsRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequest, UpdateCrossClusterApiKeyResponse, UpdateCrossClusterApiKeyRequestParameters>(descriptor); + return DoRequest, UpdateSettingsResponse, UpdateSettingsRequestParameters>(descriptor); } /// /// - /// Update a cross-cluster API key. + /// Update security index settings. /// /// - /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// Update the user-configurable settings for the security internal index (.security and associated indices). Only a subset of settings are allowed to be modified. This includes index.auto_expand_replicas and index.number_of_replicas. + /// + /// + /// NOTE: If index.auto_expand_replicas is set, index.number_of_replicas will be ignored during updates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If a specific index is not in use on the system and settings are provided for it, the request will be rejected. + /// This API does not yet support configuring the settings for indices before they are in use. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateCrossClusterApiKeyResponse UpdateCrossClusterApiKey(Elastic.Clients.Elasticsearch.Id id) + public virtual UpdateSettingsResponse UpdateSettings() { - var descriptor = new UpdateCrossClusterApiKeyRequestDescriptor(id); + var descriptor = new UpdateSettingsRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest, UpdateCrossClusterApiKeyResponse, UpdateCrossClusterApiKeyRequestParameters>(descriptor); + return DoRequest, UpdateSettingsResponse, UpdateSettingsRequestParameters>(descriptor); } /// /// - /// Update a cross-cluster API key. + /// Update security index settings. /// /// - /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// Update the user-configurable settings for the security internal index (.security and associated indices). Only a subset of settings are allowed to be modified. This includes index.auto_expand_replicas and index.number_of_replicas. + /// + /// + /// NOTE: If index.auto_expand_replicas is set, index.number_of_replicas will be ignored during updates. + /// + /// + /// If a specific index is not in use on the system and settings are provided for it, the request will be rejected. + /// This API does not yet support configuring the settings for indices before they are in use. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateCrossClusterApiKeyResponse UpdateCrossClusterApiKey(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + public virtual UpdateSettingsResponse UpdateSettings(Action> configureRequest) { - var descriptor = new UpdateCrossClusterApiKeyRequestDescriptor(id); + var descriptor = new UpdateSettingsRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, UpdateCrossClusterApiKeyResponse, UpdateCrossClusterApiKeyRequestParameters>(descriptor); + return DoRequest, UpdateSettingsResponse, UpdateSettingsRequestParameters>(descriptor); } /// /// - /// Update a cross-cluster API key. + /// Update security index settings. /// /// - /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// Update the user-configurable settings for the security internal index (.security and associated indices). Only a subset of settings are allowed to be modified. This includes index.auto_expand_replicas and index.number_of_replicas. + /// + /// + /// NOTE: If index.auto_expand_replicas is set, index.number_of_replicas will be ignored during updates. + /// + /// + /// If a specific index is not in use on the system and settings are provided for it, the request will be rejected. + /// This API does not yet support configuring the settings for indices before they are in use. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateCrossClusterApiKeyResponse UpdateCrossClusterApiKey(UpdateCrossClusterApiKeyRequestDescriptor descriptor) + public virtual UpdateSettingsResponse UpdateSettings(UpdateSettingsRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Update a cross-cluster API key. + /// Update security index settings. /// /// - /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// Update the user-configurable settings for the security internal index (.security and associated indices). Only a subset of settings are allowed to be modified. This includes index.auto_expand_replicas and index.number_of_replicas. + /// + /// + /// NOTE: If index.auto_expand_replicas is set, index.number_of_replicas will be ignored during updates. + /// + /// + /// If a specific index is not in use on the system and settings are provided for it, the request will be rejected. + /// This API does not yet support configuring the settings for indices before they are in use. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateCrossClusterApiKeyResponse UpdateCrossClusterApiKey(Elastic.Clients.Elasticsearch.Id id) + public virtual UpdateSettingsResponse UpdateSettings() { - var descriptor = new UpdateCrossClusterApiKeyRequestDescriptor(id); + var descriptor = new UpdateSettingsRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Update a cross-cluster API key. + /// Update security index settings. /// /// - /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// Update the user-configurable settings for the security internal index (.security and associated indices). Only a subset of settings are allowed to be modified. This includes index.auto_expand_replicas and index.number_of_replicas. + /// + /// + /// NOTE: If index.auto_expand_replicas is set, index.number_of_replicas will be ignored during updates. + /// + /// + /// If a specific index is not in use on the system and settings are provided for it, the request will be rejected. + /// This API does not yet support configuring the settings for indices before they are in use. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateCrossClusterApiKeyResponse UpdateCrossClusterApiKey(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) + public virtual UpdateSettingsResponse UpdateSettings(Action configureRequest) { - var descriptor = new UpdateCrossClusterApiKeyRequestDescriptor(id); + var descriptor = new UpdateSettingsRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Update a cross-cluster API key. + /// Update security index settings. /// /// - /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// Update the user-configurable settings for the security internal index (.security and associated indices). Only a subset of settings are allowed to be modified. This includes index.auto_expand_replicas and index.number_of_replicas. + /// + /// + /// NOTE: If index.auto_expand_replicas is set, index.number_of_replicas will be ignored during updates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If a specific index is not in use on the system and settings are provided for it, the request will be rejected. + /// This API does not yet support configuring the settings for indices before they are in use. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task UpdateCrossClusterApiKeyAsync(UpdateCrossClusterApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task UpdateSettingsAsync(UpdateSettingsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequestAsync, UpdateCrossClusterApiKeyResponse, UpdateCrossClusterApiKeyRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, UpdateSettingsResponse, UpdateSettingsRequestParameters>(descriptor, cancellationToken); } /// /// - /// Update a cross-cluster API key. + /// Update security index settings. /// /// - /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// Update the user-configurable settings for the security internal index (.security and associated indices). Only a subset of settings are allowed to be modified. This includes index.auto_expand_replicas and index.number_of_replicas. + /// + /// + /// NOTE: If index.auto_expand_replicas is set, index.number_of_replicas will be ignored during updates. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If a specific index is not in use on the system and settings are provided for it, the request will be rejected. + /// This API does not yet support configuring the settings for indices before they are in use. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task UpdateCrossClusterApiKeyAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + public virtual Task UpdateSettingsAsync(CancellationToken cancellationToken = default) { - var descriptor = new UpdateCrossClusterApiKeyRequestDescriptor(id); + var descriptor = new UpdateSettingsRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync, UpdateCrossClusterApiKeyResponse, UpdateCrossClusterApiKeyRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, UpdateSettingsResponse, UpdateSettingsRequestParameters>(descriptor, cancellationToken); } /// /// - /// Update a cross-cluster API key. + /// Update security index settings. /// /// - /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// Update the user-configurable settings for the security internal index (.security and associated indices). Only a subset of settings are allowed to be modified. This includes index.auto_expand_replicas and index.number_of_replicas. + /// + /// + /// NOTE: If index.auto_expand_replicas is set, index.number_of_replicas will be ignored during updates. + /// + /// + /// If a specific index is not in use on the system and settings are provided for it, the request will be rejected. + /// This API does not yet support configuring the settings for indices before they are in use. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task UpdateCrossClusterApiKeyAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + public virtual Task UpdateSettingsAsync(Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new UpdateCrossClusterApiKeyRequestDescriptor(id); + var descriptor = new UpdateSettingsRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, UpdateCrossClusterApiKeyResponse, UpdateCrossClusterApiKeyRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, UpdateSettingsResponse, UpdateSettingsRequestParameters>(descriptor, cancellationToken); } /// /// - /// Update a cross-cluster API key. + /// Update security index settings. /// /// - /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// Update the user-configurable settings for the security internal index (.security and associated indices). Only a subset of settings are allowed to be modified. This includes index.auto_expand_replicas and index.number_of_replicas. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: If index.auto_expand_replicas is set, index.number_of_replicas will be ignored during updates. + /// + /// + /// If a specific index is not in use on the system and settings are provided for it, the request will be rejected. + /// This API does not yet support configuring the settings for indices before they are in use. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task UpdateCrossClusterApiKeyAsync(UpdateCrossClusterApiKeyRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task UpdateSettingsAsync(UpdateSettingsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Update a cross-cluster API key. + /// Update security index settings. /// /// - /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// Update the user-configurable settings for the security internal index (.security and associated indices). Only a subset of settings are allowed to be modified. This includes index.auto_expand_replicas and index.number_of_replicas. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: If index.auto_expand_replicas is set, index.number_of_replicas will be ignored during updates. + /// + /// + /// If a specific index is not in use on the system and settings are provided for it, the request will be rejected. + /// This API does not yet support configuring the settings for indices before they are in use. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task UpdateCrossClusterApiKeyAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + public virtual Task UpdateSettingsAsync(CancellationToken cancellationToken = default) { - var descriptor = new UpdateCrossClusterApiKeyRequestDescriptor(id); + var descriptor = new UpdateSettingsRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Update a cross-cluster API key. + /// Update security index settings. /// /// - /// Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + /// Update the user-configurable settings for the security internal index (.security and associated indices). Only a subset of settings are allowed to be modified. This includes index.auto_expand_replicas and index.number_of_replicas. + /// + /// + /// NOTE: If index.auto_expand_replicas is set, index.number_of_replicas will be ignored during updates. + /// + /// + /// If a specific index is not in use on the system and settings are provided for it, the request will be rejected. + /// This API does not yet support configuring the settings for indices before they are in use. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task UpdateCrossClusterApiKeyAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task UpdateSettingsAsync(Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new UpdateCrossClusterApiKeyRequestDescriptor(id); + var descriptor = new UpdateSettingsRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// @@ -9748,7 +15186,35 @@ public virtual Task UpdateCrossClusterApiKeyAs /// /// Update specific data for the user profile that is associated with a unique ID. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_user_profile cluster privilege. + /// + /// + /// + /// + /// The update_profile_data global privilege for the namespaces that are referenced in the request. + /// + /// + /// + /// + /// This API updates the labels and data fields of an existing user profile document with JSON objects. + /// New keys and their values are added to the profile document and conflicting keys are replaced by data that's included in the request. + /// + /// + /// For both labels and data, content is namespaced by the top-level fields. + /// The update_profile_data global privilege grants privileges for updating only the allowed namespaces. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual UpdateUserProfileDataResponse UpdateUserProfileData(UpdateUserProfileDataRequest request) @@ -9764,7 +15230,35 @@ public virtual UpdateUserProfileDataResponse UpdateUserProfileData(UpdateUserPro /// /// Update specific data for the user profile that is associated with a unique ID. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_user_profile cluster privilege. + /// + /// + /// + /// + /// The update_profile_data global privilege for the namespaces that are referenced in the request. + /// + /// + /// + /// + /// This API updates the labels and data fields of an existing user profile document with JSON objects. + /// New keys and their values are added to the profile document and conflicting keys are replaced by data that's included in the request. + /// + /// + /// For both labels and data, content is namespaced by the top-level fields. + /// The update_profile_data global privilege grants privileges for updating only the allowed namespaces. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task UpdateUserProfileDataAsync(UpdateUserProfileDataRequest request, CancellationToken cancellationToken = default) { @@ -9779,7 +15273,35 @@ public virtual Task UpdateUserProfileDataAsync(Up /// /// Update specific data for the user profile that is associated with a unique ID. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_user_profile cluster privilege. + /// + /// + /// + /// + /// The update_profile_data global privilege for the namespaces that are referenced in the request. + /// + /// + /// + /// + /// This API updates the labels and data fields of an existing user profile document with JSON objects. + /// New keys and their values are added to the profile document and conflicting keys are replaced by data that's included in the request. + /// + /// + /// For both labels and data, content is namespaced by the top-level fields. + /// The update_profile_data global privilege grants privileges for updating only the allowed namespaces. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual UpdateUserProfileDataResponse UpdateUserProfileData(UpdateUserProfileDataRequestDescriptor descriptor) @@ -9795,7 +15317,35 @@ public virtual UpdateUserProfileDataResponse UpdateUserProfileData(UpdateUserPro /// /// Update specific data for the user profile that is associated with a unique ID. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_user_profile cluster privilege. + /// + /// + /// + /// + /// The update_profile_data global privilege for the namespaces that are referenced in the request. + /// + /// + /// + /// + /// This API updates the labels and data fields of an existing user profile document with JSON objects. + /// New keys and their values are added to the profile document and conflicting keys are replaced by data that's included in the request. + /// + /// + /// For both labels and data, content is namespaced by the top-level fields. + /// The update_profile_data global privilege grants privileges for updating only the allowed namespaces. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual UpdateUserProfileDataResponse UpdateUserProfileData(string uid) @@ -9812,7 +15362,35 @@ public virtual UpdateUserProfileDataResponse UpdateUserProfileData(string uid) /// /// Update specific data for the user profile that is associated with a unique ID. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_user_profile cluster privilege. + /// + /// + /// + /// + /// The update_profile_data global privilege for the namespaces that are referenced in the request. + /// + /// + /// + /// + /// This API updates the labels and data fields of an existing user profile document with JSON objects. + /// New keys and their values are added to the profile document and conflicting keys are replaced by data that's included in the request. + /// + /// + /// For both labels and data, content is namespaced by the top-level fields. + /// The update_profile_data global privilege grants privileges for updating only the allowed namespaces. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual UpdateUserProfileDataResponse UpdateUserProfileData(string uid, Action configureRequest) @@ -9830,7 +15408,35 @@ public virtual UpdateUserProfileDataResponse UpdateUserProfileData(string uid, A /// /// Update specific data for the user profile that is associated with a unique ID. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_user_profile cluster privilege. + /// + /// + /// + /// + /// The update_profile_data global privilege for the namespaces that are referenced in the request. + /// + /// + /// + /// + /// This API updates the labels and data fields of an existing user profile document with JSON objects. + /// New keys and their values are added to the profile document and conflicting keys are replaced by data that's included in the request. + /// + /// + /// For both labels and data, content is namespaced by the top-level fields. + /// The update_profile_data global privilege grants privileges for updating only the allowed namespaces. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task UpdateUserProfileDataAsync(UpdateUserProfileDataRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -9845,7 +15451,35 @@ public virtual Task UpdateUserProfileDataAsync(Up /// /// Update specific data for the user profile that is associated with a unique ID. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_user_profile cluster privilege. + /// + /// + /// + /// + /// The update_profile_data global privilege for the namespaces that are referenced in the request. + /// + /// + /// + /// + /// This API updates the labels and data fields of an existing user profile document with JSON objects. + /// New keys and their values are added to the profile document and conflicting keys are replaced by data that's included in the request. + /// + /// + /// For both labels and data, content is namespaced by the top-level fields. + /// The update_profile_data global privilege grants privileges for updating only the allowed namespaces. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task UpdateUserProfileDataAsync(string uid, CancellationToken cancellationToken = default) { @@ -9861,7 +15495,35 @@ public virtual Task UpdateUserProfileDataAsync(st /// /// Update specific data for the user profile that is associated with a unique ID. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + /// Individual users and external applications should not call this API directly. + /// Elastic reserves the right to change or remove this feature in future releases without prior notice. + /// + /// + /// To use this API, you must have one of the following privileges: + /// + /// + /// + /// + /// The manage_user_profile cluster privilege. + /// + /// + /// + /// + /// The update_profile_data global privilege for the namespaces that are referenced in the request. + /// + /// + /// + /// + /// This API updates the labels and data fields of an existing user profile document with JSON objects. + /// New keys and their values are added to the profile document and conflicting keys are replaced by data that's included in the request. + /// + /// + /// For both labels and data, content is namespaced by the top-level fields. + /// The update_profile_data global privilege grants privileges for updating only the allowed namespaces. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task UpdateUserProfileDataAsync(string uid, Action configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Simulate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Simulate.g.cs new file mode 100644 index 00000000000..ac004dcf4c8 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Simulate.g.cs @@ -0,0 +1,780 @@ +// 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 System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace Elastic.Clients.Elasticsearch.Simulate; + +public partial class SimulateNamespacedClient : NamespacedClientProxy +{ + /// + /// + /// Initializes a new instance of the class for mocking. + /// + /// + protected SimulateNamespacedClient() : base() + { + } + + internal SimulateNamespacedClient(ElasticsearchClient client) : base(client) + { + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IngestResponse Ingest(IngestRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IngestAsync(IngestRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IngestResponse Ingest(IngestRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, IngestResponse, IngestRequestParameters>(descriptor); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IngestResponse Ingest(Elastic.Clients.Elasticsearch.IndexName? index) + { + var descriptor = new IngestRequestDescriptor(index); + descriptor.BeforeRequest(); + return DoRequest, IngestResponse, IngestRequestParameters>(descriptor); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IngestResponse Ingest(Elastic.Clients.Elasticsearch.IndexName? index, Action> configureRequest) + { + var descriptor = new IngestRequestDescriptor(index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, IngestResponse, IngestRequestParameters>(descriptor); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IngestResponse Ingest() + { + var descriptor = new IngestRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest, IngestResponse, IngestRequestParameters>(descriptor); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IngestResponse Ingest(Action> configureRequest) + { + var descriptor = new IngestRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, IngestResponse, IngestRequestParameters>(descriptor); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IngestResponse Ingest(IngestRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IngestResponse Ingest(Elastic.Clients.Elasticsearch.IndexName? index) + { + var descriptor = new IngestRequestDescriptor(index); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IngestResponse Ingest(Elastic.Clients.Elasticsearch.IndexName? index, Action configureRequest) + { + var descriptor = new IngestRequestDescriptor(index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IngestResponse Ingest() + { + var descriptor = new IngestRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IngestResponse Ingest(Action configureRequest) + { + var descriptor = new IngestRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IngestAsync(IngestRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, IngestResponse, IngestRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IngestAsync(Elastic.Clients.Elasticsearch.IndexName? index, CancellationToken cancellationToken = default) + { + var descriptor = new IngestRequestDescriptor(index); + descriptor.BeforeRequest(); + return DoRequestAsync, IngestResponse, IngestRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IngestAsync(Elastic.Clients.Elasticsearch.IndexName? index, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new IngestRequestDescriptor(index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, IngestResponse, IngestRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IngestAsync(CancellationToken cancellationToken = default) + { + var descriptor = new IngestRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync, IngestResponse, IngestRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IngestAsync(Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new IngestRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, IngestResponse, IngestRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IngestAsync(IngestRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IngestAsync(Elastic.Clients.Elasticsearch.IndexName? index, CancellationToken cancellationToken = default) + { + var descriptor = new IngestRequestDescriptor(index); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IngestAsync(Elastic.Clients.Elasticsearch.IndexName? index, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new IngestRequestDescriptor(index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IngestAsync(CancellationToken cancellationToken = default) + { + var descriptor = new IngestRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Simulate data ingestion. + /// Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + /// + /// + /// This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + /// + /// + /// The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + /// If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + /// No data is indexed into Elasticsearch. + /// Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + /// The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + /// + /// + /// This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + /// The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + /// + /// + /// By default, the pipeline definitions that are currently in the system are used. + /// However, you can supply substitute pipeline definitions in the body of the request. + /// These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IngestAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new IngestRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Slm.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Slm.g.cs index 10afe02d0cf..0155e78e786 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Slm.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Slm.g.cs @@ -45,7 +45,7 @@ internal SnapshotLifecycleManagementNamespacedClient(ElasticsearchClient client) /// Delete a snapshot lifecycle policy definition. /// This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteLifecycleResponse DeleteLifecycle(DeleteLifecycleRequest request) @@ -60,7 +60,7 @@ public virtual DeleteLifecycleResponse DeleteLifecycle(DeleteLifecycleRequest re /// Delete a snapshot lifecycle policy definition. /// This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteLifecycleAsync(DeleteLifecycleRequest request, CancellationToken cancellationToken = default) { @@ -74,7 +74,7 @@ public virtual Task DeleteLifecycleAsync(DeleteLifecycl /// Delete a snapshot lifecycle policy definition. /// This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteLifecycleResponse DeleteLifecycle(DeleteLifecycleRequestDescriptor descriptor) @@ -89,7 +89,7 @@ public virtual DeleteLifecycleResponse DeleteLifecycle(DeleteLifecycleRequestDes /// Delete a snapshot lifecycle policy definition. /// This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteLifecycleResponse DeleteLifecycle(Elastic.Clients.Elasticsearch.Name policyId) @@ -105,7 +105,7 @@ public virtual DeleteLifecycleResponse DeleteLifecycle(Elastic.Clients.Elasticse /// Delete a snapshot lifecycle policy definition. /// This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteLifecycleResponse DeleteLifecycle(Elastic.Clients.Elasticsearch.Name policyId, Action configureRequest) @@ -122,7 +122,7 @@ public virtual DeleteLifecycleResponse DeleteLifecycle(Elastic.Clients.Elasticse /// Delete a snapshot lifecycle policy definition. /// This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteLifecycleAsync(DeleteLifecycleRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -136,7 +136,7 @@ public virtual Task DeleteLifecycleAsync(DeleteLifecycl /// Delete a snapshot lifecycle policy definition. /// This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteLifecycleAsync(Elastic.Clients.Elasticsearch.Name policyId, CancellationToken cancellationToken = default) { @@ -151,7 +151,7 @@ public virtual Task DeleteLifecycleAsync(Elastic.Client /// Delete a snapshot lifecycle policy definition. /// This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteLifecycleAsync(Elastic.Clients.Elasticsearch.Name policyId, Action configureRequest, CancellationToken cancellationToken = default) { @@ -167,7 +167,7 @@ public virtual Task DeleteLifecycleAsync(Elastic.Client /// Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time. /// The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExecuteLifecycleResponse ExecuteLifecycle(ExecuteLifecycleRequest request) @@ -182,7 +182,7 @@ public virtual ExecuteLifecycleResponse ExecuteLifecycle(ExecuteLifecycleRequest /// Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time. /// The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExecuteLifecycleAsync(ExecuteLifecycleRequest request, CancellationToken cancellationToken = default) { @@ -196,7 +196,7 @@ public virtual Task ExecuteLifecycleAsync(ExecuteLifec /// Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time. /// The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExecuteLifecycleResponse ExecuteLifecycle(ExecuteLifecycleRequestDescriptor descriptor) @@ -211,7 +211,7 @@ public virtual ExecuteLifecycleResponse ExecuteLifecycle(ExecuteLifecycleRequest /// Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time. /// The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExecuteLifecycleResponse ExecuteLifecycle(Elastic.Clients.Elasticsearch.Name policyId) @@ -227,7 +227,7 @@ public virtual ExecuteLifecycleResponse ExecuteLifecycle(Elastic.Clients.Elastic /// Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time. /// The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExecuteLifecycleResponse ExecuteLifecycle(Elastic.Clients.Elasticsearch.Name policyId, Action configureRequest) @@ -244,7 +244,7 @@ public virtual ExecuteLifecycleResponse ExecuteLifecycle(Elastic.Clients.Elastic /// Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time. /// The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExecuteLifecycleAsync(ExecuteLifecycleRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -258,7 +258,7 @@ public virtual Task ExecuteLifecycleAsync(ExecuteLifec /// Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time. /// The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExecuteLifecycleAsync(Elastic.Clients.Elasticsearch.Name policyId, CancellationToken cancellationToken = default) { @@ -273,7 +273,7 @@ public virtual Task ExecuteLifecycleAsync(Elastic.Clie /// Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time. /// The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExecuteLifecycleAsync(Elastic.Clients.Elasticsearch.Name policyId, Action configureRequest, CancellationToken cancellationToken = default) { @@ -289,7 +289,7 @@ public virtual Task ExecuteLifecycleAsync(Elastic.Clie /// Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules. /// The retention policy is normally applied according to its schedule. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExecuteRetentionResponse ExecuteRetention(ExecuteRetentionRequest request) @@ -304,7 +304,7 @@ public virtual ExecuteRetentionResponse ExecuteRetention(ExecuteRetentionRequest /// Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules. /// The retention policy is normally applied according to its schedule. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExecuteRetentionAsync(ExecuteRetentionRequest request, CancellationToken cancellationToken = default) { @@ -318,7 +318,7 @@ public virtual Task ExecuteRetentionAsync(ExecuteReten /// Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules. /// The retention policy is normally applied according to its schedule. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExecuteRetentionResponse ExecuteRetention(ExecuteRetentionRequestDescriptor descriptor) @@ -333,7 +333,7 @@ public virtual ExecuteRetentionResponse ExecuteRetention(ExecuteRetentionRequest /// Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules. /// The retention policy is normally applied according to its schedule. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExecuteRetentionResponse ExecuteRetention() @@ -349,7 +349,7 @@ public virtual ExecuteRetentionResponse ExecuteRetention() /// Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules. /// The retention policy is normally applied according to its schedule. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ExecuteRetentionResponse ExecuteRetention(Action configureRequest) @@ -366,7 +366,7 @@ public virtual ExecuteRetentionResponse ExecuteRetention(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExecuteRetentionAsync(ExecuteRetentionRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -380,7 +380,7 @@ public virtual Task ExecuteRetentionAsync(ExecuteReten /// Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules. /// The retention policy is normally applied according to its schedule. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExecuteRetentionAsync(CancellationToken cancellationToken = default) { @@ -395,7 +395,7 @@ public virtual Task ExecuteRetentionAsync(Cancellation /// Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules. /// The retention policy is normally applied according to its schedule. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ExecuteRetentionAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -410,7 +410,7 @@ public virtual Task ExecuteRetentionAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetLifecycleResponse GetLifecycle(GetLifecycleRequest request) @@ -424,7 +424,7 @@ public virtual GetLifecycleResponse GetLifecycle(GetLifecycleRequest request) /// Get policy information. /// Get snapshot lifecycle policy definitions and information about the latest snapshot attempts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetLifecycleAsync(GetLifecycleRequest request, CancellationToken cancellationToken = default) { @@ -437,7 +437,7 @@ public virtual Task GetLifecycleAsync(GetLifecycleRequest /// Get policy information. /// Get snapshot lifecycle policy definitions and information about the latest snapshot attempts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetLifecycleResponse GetLifecycle(GetLifecycleRequestDescriptor descriptor) @@ -451,7 +451,7 @@ public virtual GetLifecycleResponse GetLifecycle(GetLifecycleRequestDescriptor d /// Get policy information. /// Get snapshot lifecycle policy definitions and information about the latest snapshot attempts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetLifecycleResponse GetLifecycle(Elastic.Clients.Elasticsearch.Names? policyId) @@ -466,7 +466,7 @@ public virtual GetLifecycleResponse GetLifecycle(Elastic.Clients.Elasticsearch.N /// Get policy information. /// Get snapshot lifecycle policy definitions and information about the latest snapshot attempts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetLifecycleResponse GetLifecycle(Elastic.Clients.Elasticsearch.Names? policyId, Action configureRequest) @@ -482,7 +482,7 @@ public virtual GetLifecycleResponse GetLifecycle(Elastic.Clients.Elasticsearch.N /// Get policy information. /// Get snapshot lifecycle policy definitions and information about the latest snapshot attempts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetLifecycleResponse GetLifecycle() @@ -497,7 +497,7 @@ public virtual GetLifecycleResponse GetLifecycle() /// Get policy information. /// Get snapshot lifecycle policy definitions and information about the latest snapshot attempts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetLifecycleResponse GetLifecycle(Action configureRequest) @@ -513,7 +513,7 @@ public virtual GetLifecycleResponse GetLifecycle(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetLifecycleAsync(GetLifecycleRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -526,7 +526,7 @@ public virtual Task GetLifecycleAsync(GetLifecycleRequestD /// Get policy information. /// Get snapshot lifecycle policy definitions and information about the latest snapshot attempts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetLifecycleAsync(Elastic.Clients.Elasticsearch.Names? policyId, CancellationToken cancellationToken = default) { @@ -540,7 +540,7 @@ public virtual Task GetLifecycleAsync(Elastic.Clients.Elas /// Get policy information. /// Get snapshot lifecycle policy definitions and information about the latest snapshot attempts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetLifecycleAsync(Elastic.Clients.Elasticsearch.Names? policyId, Action configureRequest, CancellationToken cancellationToken = default) { @@ -555,7 +555,7 @@ public virtual Task GetLifecycleAsync(Elastic.Clients.Elas /// Get policy information. /// Get snapshot lifecycle policy definitions and information about the latest snapshot attempts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetLifecycleAsync(CancellationToken cancellationToken = default) { @@ -569,7 +569,7 @@ public virtual Task GetLifecycleAsync(CancellationToken ca /// Get policy information. /// Get snapshot lifecycle policy definitions and information about the latest snapshot attempts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetLifecycleAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -584,7 +584,7 @@ public virtual Task GetLifecycleAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetStatsResponse GetStats(GetStatsRequest request) @@ -598,7 +598,7 @@ public virtual GetStatsResponse GetStats(GetStatsRequest request) /// Get snapshot lifecycle management statistics. /// Get global and policy-level statistics about actions taken by snapshot lifecycle management. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetStatsAsync(GetStatsRequest request, CancellationToken cancellationToken = default) { @@ -611,7 +611,7 @@ public virtual Task GetStatsAsync(GetStatsRequest request, Can /// Get snapshot lifecycle management statistics. /// Get global and policy-level statistics about actions taken by snapshot lifecycle management. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetStatsResponse GetStats(GetStatsRequestDescriptor descriptor) @@ -625,7 +625,7 @@ public virtual GetStatsResponse GetStats(GetStatsRequestDescriptor descriptor) /// Get snapshot lifecycle management statistics. /// Get global and policy-level statistics about actions taken by snapshot lifecycle management. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetStatsResponse GetStats() @@ -640,7 +640,7 @@ public virtual GetStatsResponse GetStats() /// Get snapshot lifecycle management statistics. /// Get global and policy-level statistics about actions taken by snapshot lifecycle management. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetStatsResponse GetStats(Action configureRequest) @@ -656,7 +656,7 @@ public virtual GetStatsResponse GetStats(Action confi /// Get snapshot lifecycle management statistics. /// Get global and policy-level statistics about actions taken by snapshot lifecycle management. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetStatsAsync(GetStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -669,7 +669,7 @@ public virtual Task GetStatsAsync(GetStatsRequestDescriptor de /// Get snapshot lifecycle management statistics. /// Get global and policy-level statistics about actions taken by snapshot lifecycle management. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetStatsAsync(CancellationToken cancellationToken = default) { @@ -683,7 +683,7 @@ public virtual Task GetStatsAsync(CancellationToken cancellati /// Get snapshot lifecycle management statistics. /// Get global and policy-level statistics about actions taken by snapshot lifecycle management. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetStatsAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -697,7 +697,7 @@ public virtual Task GetStatsAsync(Action /// Get the snapshot lifecycle management status. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSlmStatusResponse GetStatus(GetSlmStatusRequest request) @@ -710,7 +710,7 @@ public virtual GetSlmStatusResponse GetStatus(GetSlmStatusRequest request) /// /// Get the snapshot lifecycle management status. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetStatusAsync(GetSlmStatusRequest request, CancellationToken cancellationToken = default) { @@ -722,7 +722,7 @@ public virtual Task GetStatusAsync(GetSlmStatusRequest req /// /// Get the snapshot lifecycle management status. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSlmStatusResponse GetStatus(GetSlmStatusRequestDescriptor descriptor) @@ -735,7 +735,7 @@ public virtual GetSlmStatusResponse GetStatus(GetSlmStatusRequestDescriptor desc /// /// Get the snapshot lifecycle management status. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSlmStatusResponse GetStatus() @@ -749,7 +749,7 @@ public virtual GetSlmStatusResponse GetStatus() /// /// Get the snapshot lifecycle management status. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSlmStatusResponse GetStatus(Action configureRequest) @@ -764,7 +764,7 @@ public virtual GetSlmStatusResponse GetStatus(Action /// Get the snapshot lifecycle management status. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetStatusAsync(GetSlmStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -776,7 +776,7 @@ public virtual Task GetStatusAsync(GetSlmStatusRequestDesc /// /// Get the snapshot lifecycle management status. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetStatusAsync(CancellationToken cancellationToken = default) { @@ -789,7 +789,7 @@ public virtual Task GetStatusAsync(CancellationToken cance /// /// Get the snapshot lifecycle management status. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetStatusAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -806,7 +806,7 @@ public virtual Task GetStatusAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutLifecycleResponse PutLifecycle(PutLifecycleRequest request) @@ -822,7 +822,7 @@ public virtual PutLifecycleResponse PutLifecycle(PutLifecycleRequest request) /// If the policy already exists, this request increments the policy version. /// Only the latest version of a policy is stored. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutLifecycleAsync(PutLifecycleRequest request, CancellationToken cancellationToken = default) { @@ -837,7 +837,7 @@ public virtual Task PutLifecycleAsync(PutLifecycleRequest /// If the policy already exists, this request increments the policy version. /// Only the latest version of a policy is stored. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutLifecycleResponse PutLifecycle(PutLifecycleRequestDescriptor descriptor) @@ -853,7 +853,7 @@ public virtual PutLifecycleResponse PutLifecycle(PutLifecycleRequestDescriptor d /// If the policy already exists, this request increments the policy version. /// Only the latest version of a policy is stored. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutLifecycleResponse PutLifecycle(Elastic.Clients.Elasticsearch.Name policyId) @@ -870,7 +870,7 @@ public virtual PutLifecycleResponse PutLifecycle(Elastic.Clients.Elasticsearch.N /// If the policy already exists, this request increments the policy version. /// Only the latest version of a policy is stored. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutLifecycleResponse PutLifecycle(Elastic.Clients.Elasticsearch.Name policyId, Action configureRequest) @@ -888,7 +888,7 @@ public virtual PutLifecycleResponse PutLifecycle(Elastic.Clients.Elasticsearch.N /// If the policy already exists, this request increments the policy version. /// Only the latest version of a policy is stored. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutLifecycleAsync(PutLifecycleRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -903,7 +903,7 @@ public virtual Task PutLifecycleAsync(PutLifecycleRequestD /// If the policy already exists, this request increments the policy version. /// Only the latest version of a policy is stored. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutLifecycleAsync(Elastic.Clients.Elasticsearch.Name policyId, CancellationToken cancellationToken = default) { @@ -919,7 +919,7 @@ public virtual Task PutLifecycleAsync(Elastic.Clients.Elas /// If the policy already exists, this request increments the policy version. /// Only the latest version of a policy is stored. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutLifecycleAsync(Elastic.Clients.Elasticsearch.Name policyId, Action configureRequest, CancellationToken cancellationToken = default) { @@ -935,7 +935,7 @@ public virtual Task PutLifecycleAsync(Elastic.Clients.Elas /// Snapshot lifecycle management (SLM) starts automatically when a cluster is formed. /// Manually starting SLM is necessary only if it has been stopped using the stop SLM API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StartSlmResponse Start(StartSlmRequest request) @@ -950,7 +950,7 @@ public virtual StartSlmResponse Start(StartSlmRequest request) /// Snapshot lifecycle management (SLM) starts automatically when a cluster is formed. /// Manually starting SLM is necessary only if it has been stopped using the stop SLM API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StartAsync(StartSlmRequest request, CancellationToken cancellationToken = default) { @@ -964,7 +964,7 @@ public virtual Task StartAsync(StartSlmRequest request, Cancel /// Snapshot lifecycle management (SLM) starts automatically when a cluster is formed. /// Manually starting SLM is necessary only if it has been stopped using the stop SLM API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StartSlmResponse Start(StartSlmRequestDescriptor descriptor) @@ -979,7 +979,7 @@ public virtual StartSlmResponse Start(StartSlmRequestDescriptor descriptor) /// Snapshot lifecycle management (SLM) starts automatically when a cluster is formed. /// Manually starting SLM is necessary only if it has been stopped using the stop SLM API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StartSlmResponse Start() @@ -995,7 +995,7 @@ public virtual StartSlmResponse Start() /// Snapshot lifecycle management (SLM) starts automatically when a cluster is formed. /// Manually starting SLM is necessary only if it has been stopped using the stop SLM API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StartSlmResponse Start(Action configureRequest) @@ -1012,7 +1012,7 @@ public virtual StartSlmResponse Start(Action configur /// Snapshot lifecycle management (SLM) starts automatically when a cluster is formed. /// Manually starting SLM is necessary only if it has been stopped using the stop SLM API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StartAsync(StartSlmRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1026,7 +1026,7 @@ public virtual Task StartAsync(StartSlmRequestDescriptor descr /// Snapshot lifecycle management (SLM) starts automatically when a cluster is formed. /// Manually starting SLM is necessary only if it has been stopped using the stop SLM API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StartAsync(CancellationToken cancellationToken = default) { @@ -1041,7 +1041,7 @@ public virtual Task StartAsync(CancellationToken cancellationT /// Snapshot lifecycle management (SLM) starts automatically when a cluster is formed. /// Manually starting SLM is necessary only if it has been stopped using the stop SLM API. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StartAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -1063,7 +1063,7 @@ public virtual Task StartAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StopSlmResponse Stop(StopSlmRequest request) @@ -1084,7 +1084,7 @@ public virtual StopSlmResponse Stop(StopSlmRequest request) /// The API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped. /// Use the get snapshot lifecycle management status API to see if SLM is running. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StopAsync(StopSlmRequest request, CancellationToken cancellationToken = default) { @@ -1104,7 +1104,7 @@ public virtual Task StopAsync(StopSlmRequest request, Cancellat /// The API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped. /// Use the get snapshot lifecycle management status API to see if SLM is running. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StopSlmResponse Stop(StopSlmRequestDescriptor descriptor) @@ -1125,7 +1125,7 @@ public virtual StopSlmResponse Stop(StopSlmRequestDescriptor descriptor) /// The API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped. /// Use the get snapshot lifecycle management status API to see if SLM is running. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StopSlmResponse Stop() @@ -1147,7 +1147,7 @@ public virtual StopSlmResponse Stop() /// The API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped. /// Use the get snapshot lifecycle management status API to see if SLM is running. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual StopSlmResponse Stop(Action configureRequest) @@ -1170,7 +1170,7 @@ public virtual StopSlmResponse Stop(Action configureRe /// The API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped. /// Use the get snapshot lifecycle management status API to see if SLM is running. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StopAsync(StopSlmRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1190,7 +1190,7 @@ public virtual Task StopAsync(StopSlmRequestDescriptor descript /// The API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped. /// Use the get snapshot lifecycle management status API to see if SLM is running. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StopAsync(CancellationToken cancellationToken = default) { @@ -1211,7 +1211,7 @@ public virtual Task StopAsync(CancellationToken cancellationTok /// The API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped. /// Use the get snapshot lifecycle management status API to see if SLM is running. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StopAsync(Action configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Snapshot.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Snapshot.g.cs index ad3a2767b86..d696321c120 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Snapshot.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Snapshot.g.cs @@ -44,7 +44,7 @@ internal SnapshotNamespacedClient(ElasticsearchClient client) : base(client) /// Clean up the snapshot repository. /// Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CleanupRepositoryResponse CleanupRepository(CleanupRepositoryRequest request) @@ -58,7 +58,7 @@ public virtual CleanupRepositoryResponse CleanupRepository(CleanupRepositoryRequ /// Clean up the snapshot repository. /// Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CleanupRepositoryAsync(CleanupRepositoryRequest request, CancellationToken cancellationToken = default) { @@ -71,7 +71,7 @@ public virtual Task CleanupRepositoryAsync(CleanupRep /// Clean up the snapshot repository. /// Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CleanupRepositoryResponse CleanupRepository(CleanupRepositoryRequestDescriptor descriptor) @@ -85,7 +85,7 @@ public virtual CleanupRepositoryResponse CleanupRepository(CleanupRepositoryRequ /// Clean up the snapshot repository. /// Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CleanupRepositoryResponse CleanupRepository(Elastic.Clients.Elasticsearch.Name name) @@ -100,7 +100,7 @@ public virtual CleanupRepositoryResponse CleanupRepository(Elastic.Clients.Elast /// Clean up the snapshot repository. /// Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CleanupRepositoryResponse CleanupRepository(Elastic.Clients.Elasticsearch.Name name, Action configureRequest) @@ -116,7 +116,7 @@ public virtual CleanupRepositoryResponse CleanupRepository(Elastic.Clients.Elast /// Clean up the snapshot repository. /// Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CleanupRepositoryAsync(CleanupRepositoryRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -129,7 +129,7 @@ public virtual Task CleanupRepositoryAsync(CleanupRep /// Clean up the snapshot repository. /// Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CleanupRepositoryAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) { @@ -143,7 +143,7 @@ public virtual Task CleanupRepositoryAsync(Elastic.Cl /// Clean up the snapshot repository. /// Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CleanupRepositoryAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -158,7 +158,7 @@ public virtual Task CleanupRepositoryAsync(Elastic.Cl /// Clone a snapshot. /// Clone part of all of a snapshot into another snapshot in the same repository. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CloneSnapshotResponse Clone(CloneSnapshotRequest request) @@ -172,7 +172,7 @@ public virtual CloneSnapshotResponse Clone(CloneSnapshotRequest request) /// Clone a snapshot. /// Clone part of all of a snapshot into another snapshot in the same repository. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloneAsync(CloneSnapshotRequest request, CancellationToken cancellationToken = default) { @@ -185,7 +185,7 @@ public virtual Task CloneAsync(CloneSnapshotRequest reque /// Clone a snapshot. /// Clone part of all of a snapshot into another snapshot in the same repository. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CloneSnapshotResponse Clone(CloneSnapshotRequestDescriptor descriptor) @@ -199,7 +199,7 @@ public virtual CloneSnapshotResponse Clone(CloneSnapshotRequestDescriptor descri /// Clone a snapshot. /// Clone part of all of a snapshot into another snapshot in the same repository. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CloneSnapshotResponse Clone(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, Elastic.Clients.Elasticsearch.Name targetSnapshot) @@ -214,7 +214,7 @@ public virtual CloneSnapshotResponse Clone(Elastic.Clients.Elasticsearch.Name re /// Clone a snapshot. /// Clone part of all of a snapshot into another snapshot in the same repository. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CloneSnapshotResponse Clone(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, Elastic.Clients.Elasticsearch.Name targetSnapshot, Action configureRequest) @@ -230,7 +230,7 @@ public virtual CloneSnapshotResponse Clone(Elastic.Clients.Elasticsearch.Name re /// Clone a snapshot. /// Clone part of all of a snapshot into another snapshot in the same repository. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloneAsync(CloneSnapshotRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -243,7 +243,7 @@ public virtual Task CloneAsync(CloneSnapshotRequestDescri /// Clone a snapshot. /// Clone part of all of a snapshot into another snapshot in the same repository. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloneAsync(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, Elastic.Clients.Elasticsearch.Name targetSnapshot, CancellationToken cancellationToken = default) { @@ -257,7 +257,7 @@ public virtual Task CloneAsync(Elastic.Clients.Elasticsea /// Clone a snapshot. /// Clone part of all of a snapshot into another snapshot in the same repository. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CloneAsync(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, Elastic.Clients.Elasticsearch.Name targetSnapshot, Action configureRequest, CancellationToken cancellationToken = default) { @@ -272,7 +272,7 @@ public virtual Task CloneAsync(Elastic.Clients.Elasticsea /// Create a snapshot. /// Take a snapshot of a cluster or of data streams and indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CreateSnapshotResponse Create(CreateSnapshotRequest request) @@ -286,7 +286,7 @@ public virtual CreateSnapshotResponse Create(CreateSnapshotRequest request) /// Create a snapshot. /// Take a snapshot of a cluster or of data streams and indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateAsync(CreateSnapshotRequest request, CancellationToken cancellationToken = default) { @@ -299,7 +299,7 @@ public virtual Task CreateAsync(CreateSnapshotRequest re /// Create a snapshot. /// Take a snapshot of a cluster or of data streams and indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CreateSnapshotResponse Create(CreateSnapshotRequestDescriptor descriptor) @@ -313,7 +313,7 @@ public virtual CreateSnapshotResponse Create(CreateSnapshotRequestDescriptor des /// Create a snapshot. /// Take a snapshot of a cluster or of data streams and indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CreateSnapshotResponse Create(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot) @@ -328,7 +328,7 @@ public virtual CreateSnapshotResponse Create(Elastic.Clients.Elasticsearch.Name /// Create a snapshot. /// Take a snapshot of a cluster or of data streams and indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual CreateSnapshotResponse Create(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, Action configureRequest) @@ -344,7 +344,7 @@ public virtual CreateSnapshotResponse Create(Elastic.Clients.Elasticsearch.Name /// Create a snapshot. /// Take a snapshot of a cluster or of data streams and indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateAsync(CreateSnapshotRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -357,7 +357,7 @@ public virtual Task CreateAsync(CreateSnapshotRequestDes /// Create a snapshot. /// Take a snapshot of a cluster or of data streams and indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateAsync(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, CancellationToken cancellationToken = default) { @@ -371,7 +371,7 @@ public virtual Task CreateAsync(Elastic.Clients.Elastics /// Create a snapshot. /// Take a snapshot of a cluster or of data streams and indices. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task CreateAsync(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, Action configureRequest, CancellationToken cancellationToken = default) { @@ -515,7 +515,7 @@ public virtual Task CreateRepositoryAsync(Elastic.Clie /// /// Delete snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteSnapshotResponse Delete(DeleteSnapshotRequest request) @@ -528,7 +528,7 @@ public virtual DeleteSnapshotResponse Delete(DeleteSnapshotRequest request) /// /// Delete snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(DeleteSnapshotRequest request, CancellationToken cancellationToken = default) { @@ -540,7 +540,7 @@ public virtual Task DeleteAsync(DeleteSnapshotRequest re /// /// Delete snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteSnapshotResponse Delete(DeleteSnapshotRequestDescriptor descriptor) @@ -553,7 +553,7 @@ public virtual DeleteSnapshotResponse Delete(DeleteSnapshotRequestDescriptor des /// /// Delete snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteSnapshotResponse Delete(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot) @@ -567,7 +567,7 @@ public virtual DeleteSnapshotResponse Delete(Elastic.Clients.Elasticsearch.Name /// /// Delete snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteSnapshotResponse Delete(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, Action configureRequest) @@ -582,7 +582,7 @@ public virtual DeleteSnapshotResponse Delete(Elastic.Clients.Elasticsearch.Name /// /// Delete snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(DeleteSnapshotRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -594,7 +594,7 @@ public virtual Task DeleteAsync(DeleteSnapshotRequestDes /// /// Delete snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, CancellationToken cancellationToken = default) { @@ -607,7 +607,7 @@ public virtual Task DeleteAsync(Elastic.Clients.Elastics /// /// Delete snapshots. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, Action configureRequest, CancellationToken cancellationToken = default) { @@ -623,7 +623,7 @@ public virtual Task DeleteAsync(Elastic.Clients.Elastics /// When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots. /// The snapshots themselves are left untouched and in place. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteRepositoryResponse DeleteRepository(DeleteRepositoryRequest request) @@ -638,7 +638,7 @@ public virtual DeleteRepositoryResponse DeleteRepository(DeleteRepositoryRequest /// When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots. /// The snapshots themselves are left untouched and in place. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteRepositoryAsync(DeleteRepositoryRequest request, CancellationToken cancellationToken = default) { @@ -652,7 +652,7 @@ public virtual Task DeleteRepositoryAsync(DeleteReposi /// When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots. /// The snapshots themselves are left untouched and in place. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteRepositoryResponse DeleteRepository(DeleteRepositoryRequestDescriptor descriptor) @@ -667,7 +667,7 @@ public virtual DeleteRepositoryResponse DeleteRepository(DeleteRepositoryRequest /// When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots. /// The snapshots themselves are left untouched and in place. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteRepositoryResponse DeleteRepository(Elastic.Clients.Elasticsearch.Names name) @@ -683,7 +683,7 @@ public virtual DeleteRepositoryResponse DeleteRepository(Elastic.Clients.Elastic /// When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots. /// The snapshots themselves are left untouched and in place. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteRepositoryResponse DeleteRepository(Elastic.Clients.Elasticsearch.Names name, Action configureRequest) @@ -700,7 +700,7 @@ public virtual DeleteRepositoryResponse DeleteRepository(Elastic.Clients.Elastic /// When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots. /// The snapshots themselves are left untouched and in place. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteRepositoryAsync(DeleteRepositoryRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -714,7 +714,7 @@ public virtual Task DeleteRepositoryAsync(DeleteReposi /// When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots. /// The snapshots themselves are left untouched and in place. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteRepositoryAsync(Elastic.Clients.Elasticsearch.Names name, CancellationToken cancellationToken = default) { @@ -729,7 +729,7 @@ public virtual Task DeleteRepositoryAsync(Elastic.Clie /// When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots. /// The snapshots themselves are left untouched and in place. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteRepositoryAsync(Elastic.Clients.Elasticsearch.Names name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -743,7 +743,7 @@ public virtual Task DeleteRepositoryAsync(Elastic.Clie /// /// Get snapshot information. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSnapshotResponse Get(GetSnapshotRequest request) @@ -756,7 +756,7 @@ public virtual GetSnapshotResponse Get(GetSnapshotRequest request) /// /// Get snapshot information. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(GetSnapshotRequest request, CancellationToken cancellationToken = default) { @@ -768,7 +768,7 @@ public virtual Task GetAsync(GetSnapshotRequest request, Ca /// /// Get snapshot information. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSnapshotResponse Get(GetSnapshotRequestDescriptor descriptor) @@ -779,232 +779,1338 @@ public virtual GetSnapshotResponse Get(GetSnapshotRequestDescriptor descriptor) /// /// - /// Get snapshot information. + /// Get snapshot information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetSnapshotResponse Get(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Names snapshot) + { + var descriptor = new GetSnapshotRequestDescriptor(repository, snapshot); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get snapshot information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetSnapshotResponse Get(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Names snapshot, Action configureRequest) + { + var descriptor = new GetSnapshotRequestDescriptor(repository, snapshot); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get snapshot information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetAsync(GetSnapshotRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get snapshot information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Names snapshot, CancellationToken cancellationToken = default) + { + var descriptor = new GetSnapshotRequestDescriptor(repository, snapshot); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get snapshot information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Names snapshot, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetSnapshotRequestDescriptor(repository, snapshot); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get snapshot repository information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetRepositoryResponse GetRepository(GetRepositoryRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Get snapshot repository information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetRepositoryAsync(GetRepositoryRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Get snapshot repository information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetRepositoryResponse GetRepository(GetRepositoryRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get snapshot repository information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetRepositoryResponse GetRepository(Elastic.Clients.Elasticsearch.Names? name) + { + var descriptor = new GetRepositoryRequestDescriptor(name); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get snapshot repository information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetRepositoryResponse GetRepository(Elastic.Clients.Elasticsearch.Names? name, Action configureRequest) + { + var descriptor = new GetRepositoryRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get snapshot repository information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetRepositoryResponse GetRepository() + { + var descriptor = new GetRepositoryRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get snapshot repository information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetRepositoryResponse GetRepository(Action configureRequest) + { + var descriptor = new GetRepositoryRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get snapshot repository information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetRepositoryAsync(GetRepositoryRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get snapshot repository information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetRepositoryAsync(Elastic.Clients.Elasticsearch.Names? name, CancellationToken cancellationToken = default) + { + var descriptor = new GetRepositoryRequestDescriptor(name); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get snapshot repository information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetRepositoryAsync(Elastic.Clients.Elasticsearch.Names? name, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetRepositoryRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get snapshot repository information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetRepositoryAsync(CancellationToken cancellationToken = default) + { + var descriptor = new GetRepositoryRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get snapshot repository information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetRepositoryAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetRepositoryRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Analyze a snapshot repository. + /// Analyze the performance characteristics and any incorrect behaviour found in a repository. + /// + /// + /// The response exposes implementation details of the analysis which may change from version to version. + /// The response body format is therefore not considered stable and may be different in newer versions. + /// + /// + /// There are a large number of third-party storage systems available, not all of which are suitable for use as a snapshot repository by Elasticsearch. + /// Some storage systems behave incorrectly, or perform poorly, especially when accessed concurrently by multiple clients as the nodes of an Elasticsearch cluster do. This API performs a collection of read and write operations on your repository which are designed to detect incorrect behaviour and to measure the performance characteristics of your storage system. + /// + /// + /// The default values for the parameters are deliberately low to reduce the impact of running an analysis inadvertently and to provide a sensible starting point for your investigations. + /// Run your first analysis with the default parameter values to check for simple problems. + /// If successful, run a sequence of increasingly large analyses until you encounter a failure or you reach a blob_count of at least 2000, a max_blob_size of at least 2gb, a max_total_data_size of at least 1tb, and a register_operation_count of at least 100. + /// Always specify a generous timeout, possibly 1h or longer, to allow time for each analysis to run to completion. + /// Perform the analyses using a multi-node cluster of a similar size to your production cluster so that it can detect any problems that only arise when the repository is accessed by many nodes at once. + /// + /// + /// If the analysis fails, Elasticsearch detected that your repository behaved unexpectedly. + /// This usually means you are using a third-party storage system with an incorrect or incompatible implementation of the API it claims to support. + /// If so, this storage system is not suitable for use as a snapshot repository. + /// You will need to work with the supplier of your storage system to address the incompatibilities that Elasticsearch detects. + /// + /// + /// If the analysis is successful, the API returns details of the testing process, optionally including how long each operation took. + /// You can use this information to determine the performance of your storage system. + /// If any operation fails or returns an incorrect result, the API returns an error. + /// If the API returns an error, it may not have removed all the data it wrote to the repository. + /// The error will indicate the location of any leftover data and this path is also recorded in the Elasticsearch logs. + /// You should verify that this location has been cleaned up correctly. + /// If there is still leftover data at the specified location, you should manually remove it. + /// + /// + /// If the connection from your client to Elasticsearch is closed while the client is waiting for the result of the analysis, the test is cancelled. + /// Some clients are configured to close their connection if no response is received within a certain timeout. + /// An analysis takes a long time to complete so you might need to relax any such client-side timeouts. + /// On cancellation the analysis attempts to clean up the data it was writing, but it may not be able to remove it all. + /// The path to the leftover data is recorded in the Elasticsearch logs. + /// You should verify that this location has been cleaned up correctly. + /// If there is still leftover data at the specified location, you should manually remove it. + /// + /// + /// If the analysis is successful then it detected no incorrect behaviour, but this does not mean that correct behaviour is guaranteed. + /// The analysis attempts to detect common bugs but it does not offer 100% coverage. + /// Additionally, it does not test the following: + /// + /// + /// + /// + /// Your repository must perform durable writes. Once a blob has been written it must remain in place until it is deleted, even after a power loss or similar disaster. + /// + /// + /// + /// + /// Your repository must not suffer from silent data corruption. Once a blob has been written, its contents must remain unchanged until it is deliberately modified or deleted. + /// + /// + /// + /// + /// Your repository must behave correctly even if connectivity from the cluster is disrupted. Reads and writes may fail in this case, but they must not return incorrect results. + /// + /// + /// + /// + /// IMPORTANT: An analysis writes a substantial amount of data to your repository and then reads it back again. + /// This consumes bandwidth on the network between the cluster and the repository, and storage space and I/O bandwidth on the repository itself. + /// You must ensure this load does not affect other users of these systems. + /// Analyses respect the repository settings max_snapshot_bytes_per_sec and max_restore_bytes_per_sec if available and the cluster setting indices.recovery.max_bytes_per_sec which you can use to limit the bandwidth they consume. + /// + /// + /// NOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions. + /// + /// + /// NOTE: Different versions of Elasticsearch may perform different checks for repository compatibility, with newer versions typically being stricter than older ones. + /// A storage system that passes repository analysis with one version of Elasticsearch may fail with a different version. + /// This indicates it behaves incorrectly in ways that the former version did not detect. + /// You must work with the supplier of your storage system to address the incompatibilities detected by the repository analysis API in any version of Elasticsearch. + /// + /// + /// NOTE: This API may not work correctly in a mixed-version cluster. + /// + /// + /// Implementation details + /// + /// + /// NOTE: This section of documentation describes how the repository analysis API works in this version of Elasticsearch, but you should expect the implementation to vary between versions. The request parameters and response format depend on details of the implementation so may also be different in newer versions. + /// + /// + /// The analysis comprises a number of blob-level tasks, as set by the blob_count parameter and a number of compare-and-exchange operations on linearizable registers, as set by the register_operation_count parameter. + /// These tasks are distributed over the data and master-eligible nodes in the cluster for execution. + /// + /// + /// For most blob-level tasks, the executing node first writes a blob to the repository and then instructs some of the other nodes in the cluster to attempt to read the data it just wrote. + /// The size of the blob is chosen randomly, according to the max_blob_size and max_total_data_size parameters. + /// If any of these reads fails then the repository does not implement the necessary read-after-write semantics that Elasticsearch requires. + /// + /// + /// For some blob-level tasks, the executing node will instruct some of its peers to attempt to read the data before the writing process completes. + /// These reads are permitted to fail, but must not return partial data. + /// If any read returns partial data then the repository does not implement the necessary atomicity semantics that Elasticsearch requires. + /// + /// + /// For some blob-level tasks, the executing node will overwrite the blob while its peers are reading it. + /// In this case the data read may come from either the original or the overwritten blob, but the read operation must not return partial data or a mix of data from the two blobs. + /// If any of these reads returns partial data or a mix of the two blobs then the repository does not implement the necessary atomicity semantics that Elasticsearch requires for overwrites. + /// + /// + /// The executing node will use a variety of different methods to write the blob. + /// For instance, where applicable, it will use both single-part and multi-part uploads. + /// Similarly, the reading nodes will use a variety of different methods to read the data back again. + /// For instance they may read the entire blob from start to end or may read only a subset of the data. + /// + /// + /// For some blob-level tasks, the executing node will cancel the write before it is complete. + /// In this case, it still instructs some of the other nodes in the cluster to attempt to read the blob but all of these reads must fail to find the blob. + /// + /// + /// Linearizable registers are special blobs that Elasticsearch manipulates using an atomic compare-and-exchange operation. + /// This operation ensures correct and strongly-consistent behavior even when the blob is accessed by multiple nodes at the same time. + /// The detailed implementation of the compare-and-exchange operation on linearizable registers varies by repository type. + /// Repository analysis verifies that that uncontended compare-and-exchange operations on a linearizable register blob always succeed. + /// Repository analysis also verifies that contended operations either succeed or report the contention but do not return incorrect results. + /// If an operation fails due to contention, Elasticsearch retries the operation until it succeeds. + /// Most of the compare-and-exchange operations performed by repository analysis atomically increment a counter which is represented as an 8-byte blob. + /// Some operations also verify the behavior on small blobs with sizes other than 8 bytes. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual RepositoryAnalyzeResponse RepositoryAnalyze(RepositoryAnalyzeRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Analyze a snapshot repository. + /// Analyze the performance characteristics and any incorrect behaviour found in a repository. + /// + /// + /// The response exposes implementation details of the analysis which may change from version to version. + /// The response body format is therefore not considered stable and may be different in newer versions. + /// + /// + /// There are a large number of third-party storage systems available, not all of which are suitable for use as a snapshot repository by Elasticsearch. + /// Some storage systems behave incorrectly, or perform poorly, especially when accessed concurrently by multiple clients as the nodes of an Elasticsearch cluster do. This API performs a collection of read and write operations on your repository which are designed to detect incorrect behaviour and to measure the performance characteristics of your storage system. + /// + /// + /// The default values for the parameters are deliberately low to reduce the impact of running an analysis inadvertently and to provide a sensible starting point for your investigations. + /// Run your first analysis with the default parameter values to check for simple problems. + /// If successful, run a sequence of increasingly large analyses until you encounter a failure or you reach a blob_count of at least 2000, a max_blob_size of at least 2gb, a max_total_data_size of at least 1tb, and a register_operation_count of at least 100. + /// Always specify a generous timeout, possibly 1h or longer, to allow time for each analysis to run to completion. + /// Perform the analyses using a multi-node cluster of a similar size to your production cluster so that it can detect any problems that only arise when the repository is accessed by many nodes at once. + /// + /// + /// If the analysis fails, Elasticsearch detected that your repository behaved unexpectedly. + /// This usually means you are using a third-party storage system with an incorrect or incompatible implementation of the API it claims to support. + /// If so, this storage system is not suitable for use as a snapshot repository. + /// You will need to work with the supplier of your storage system to address the incompatibilities that Elasticsearch detects. + /// + /// + /// If the analysis is successful, the API returns details of the testing process, optionally including how long each operation took. + /// You can use this information to determine the performance of your storage system. + /// If any operation fails or returns an incorrect result, the API returns an error. + /// If the API returns an error, it may not have removed all the data it wrote to the repository. + /// The error will indicate the location of any leftover data and this path is also recorded in the Elasticsearch logs. + /// You should verify that this location has been cleaned up correctly. + /// If there is still leftover data at the specified location, you should manually remove it. + /// + /// + /// If the connection from your client to Elasticsearch is closed while the client is waiting for the result of the analysis, the test is cancelled. + /// Some clients are configured to close their connection if no response is received within a certain timeout. + /// An analysis takes a long time to complete so you might need to relax any such client-side timeouts. + /// On cancellation the analysis attempts to clean up the data it was writing, but it may not be able to remove it all. + /// The path to the leftover data is recorded in the Elasticsearch logs. + /// You should verify that this location has been cleaned up correctly. + /// If there is still leftover data at the specified location, you should manually remove it. + /// + /// + /// If the analysis is successful then it detected no incorrect behaviour, but this does not mean that correct behaviour is guaranteed. + /// The analysis attempts to detect common bugs but it does not offer 100% coverage. + /// Additionally, it does not test the following: + /// + /// + /// + /// + /// Your repository must perform durable writes. Once a blob has been written it must remain in place until it is deleted, even after a power loss or similar disaster. + /// + /// + /// + /// + /// Your repository must not suffer from silent data corruption. Once a blob has been written, its contents must remain unchanged until it is deliberately modified or deleted. + /// + /// + /// + /// + /// Your repository must behave correctly even if connectivity from the cluster is disrupted. Reads and writes may fail in this case, but they must not return incorrect results. + /// + /// + /// + /// + /// IMPORTANT: An analysis writes a substantial amount of data to your repository and then reads it back again. + /// This consumes bandwidth on the network between the cluster and the repository, and storage space and I/O bandwidth on the repository itself. + /// You must ensure this load does not affect other users of these systems. + /// Analyses respect the repository settings max_snapshot_bytes_per_sec and max_restore_bytes_per_sec if available and the cluster setting indices.recovery.max_bytes_per_sec which you can use to limit the bandwidth they consume. + /// + /// + /// NOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions. + /// + /// + /// NOTE: Different versions of Elasticsearch may perform different checks for repository compatibility, with newer versions typically being stricter than older ones. + /// A storage system that passes repository analysis with one version of Elasticsearch may fail with a different version. + /// This indicates it behaves incorrectly in ways that the former version did not detect. + /// You must work with the supplier of your storage system to address the incompatibilities detected by the repository analysis API in any version of Elasticsearch. + /// + /// + /// NOTE: This API may not work correctly in a mixed-version cluster. + /// + /// + /// Implementation details + /// + /// + /// NOTE: This section of documentation describes how the repository analysis API works in this version of Elasticsearch, but you should expect the implementation to vary between versions. The request parameters and response format depend on details of the implementation so may also be different in newer versions. + /// + /// + /// The analysis comprises a number of blob-level tasks, as set by the blob_count parameter and a number of compare-and-exchange operations on linearizable registers, as set by the register_operation_count parameter. + /// These tasks are distributed over the data and master-eligible nodes in the cluster for execution. + /// + /// + /// For most blob-level tasks, the executing node first writes a blob to the repository and then instructs some of the other nodes in the cluster to attempt to read the data it just wrote. + /// The size of the blob is chosen randomly, according to the max_blob_size and max_total_data_size parameters. + /// If any of these reads fails then the repository does not implement the necessary read-after-write semantics that Elasticsearch requires. + /// + /// + /// For some blob-level tasks, the executing node will instruct some of its peers to attempt to read the data before the writing process completes. + /// These reads are permitted to fail, but must not return partial data. + /// If any read returns partial data then the repository does not implement the necessary atomicity semantics that Elasticsearch requires. + /// + /// + /// For some blob-level tasks, the executing node will overwrite the blob while its peers are reading it. + /// In this case the data read may come from either the original or the overwritten blob, but the read operation must not return partial data or a mix of data from the two blobs. + /// If any of these reads returns partial data or a mix of the two blobs then the repository does not implement the necessary atomicity semantics that Elasticsearch requires for overwrites. + /// + /// + /// The executing node will use a variety of different methods to write the blob. + /// For instance, where applicable, it will use both single-part and multi-part uploads. + /// Similarly, the reading nodes will use a variety of different methods to read the data back again. + /// For instance they may read the entire blob from start to end or may read only a subset of the data. + /// + /// + /// For some blob-level tasks, the executing node will cancel the write before it is complete. + /// In this case, it still instructs some of the other nodes in the cluster to attempt to read the blob but all of these reads must fail to find the blob. + /// + /// + /// Linearizable registers are special blobs that Elasticsearch manipulates using an atomic compare-and-exchange operation. + /// This operation ensures correct and strongly-consistent behavior even when the blob is accessed by multiple nodes at the same time. + /// The detailed implementation of the compare-and-exchange operation on linearizable registers varies by repository type. + /// Repository analysis verifies that that uncontended compare-and-exchange operations on a linearizable register blob always succeed. + /// Repository analysis also verifies that contended operations either succeed or report the contention but do not return incorrect results. + /// If an operation fails due to contention, Elasticsearch retries the operation until it succeeds. + /// Most of the compare-and-exchange operations performed by repository analysis atomically increment a counter which is represented as an 8-byte blob. + /// Some operations also verify the behavior on small blobs with sizes other than 8 bytes. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task RepositoryAnalyzeAsync(RepositoryAnalyzeRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Analyze a snapshot repository. + /// Analyze the performance characteristics and any incorrect behaviour found in a repository. + /// + /// + /// The response exposes implementation details of the analysis which may change from version to version. + /// The response body format is therefore not considered stable and may be different in newer versions. + /// + /// + /// There are a large number of third-party storage systems available, not all of which are suitable for use as a snapshot repository by Elasticsearch. + /// Some storage systems behave incorrectly, or perform poorly, especially when accessed concurrently by multiple clients as the nodes of an Elasticsearch cluster do. This API performs a collection of read and write operations on your repository which are designed to detect incorrect behaviour and to measure the performance characteristics of your storage system. + /// + /// + /// The default values for the parameters are deliberately low to reduce the impact of running an analysis inadvertently and to provide a sensible starting point for your investigations. + /// Run your first analysis with the default parameter values to check for simple problems. + /// If successful, run a sequence of increasingly large analyses until you encounter a failure or you reach a blob_count of at least 2000, a max_blob_size of at least 2gb, a max_total_data_size of at least 1tb, and a register_operation_count of at least 100. + /// Always specify a generous timeout, possibly 1h or longer, to allow time for each analysis to run to completion. + /// Perform the analyses using a multi-node cluster of a similar size to your production cluster so that it can detect any problems that only arise when the repository is accessed by many nodes at once. + /// + /// + /// If the analysis fails, Elasticsearch detected that your repository behaved unexpectedly. + /// This usually means you are using a third-party storage system with an incorrect or incompatible implementation of the API it claims to support. + /// If so, this storage system is not suitable for use as a snapshot repository. + /// You will need to work with the supplier of your storage system to address the incompatibilities that Elasticsearch detects. + /// + /// + /// If the analysis is successful, the API returns details of the testing process, optionally including how long each operation took. + /// You can use this information to determine the performance of your storage system. + /// If any operation fails or returns an incorrect result, the API returns an error. + /// If the API returns an error, it may not have removed all the data it wrote to the repository. + /// The error will indicate the location of any leftover data and this path is also recorded in the Elasticsearch logs. + /// You should verify that this location has been cleaned up correctly. + /// If there is still leftover data at the specified location, you should manually remove it. + /// + /// + /// If the connection from your client to Elasticsearch is closed while the client is waiting for the result of the analysis, the test is cancelled. + /// Some clients are configured to close their connection if no response is received within a certain timeout. + /// An analysis takes a long time to complete so you might need to relax any such client-side timeouts. + /// On cancellation the analysis attempts to clean up the data it was writing, but it may not be able to remove it all. + /// The path to the leftover data is recorded in the Elasticsearch logs. + /// You should verify that this location has been cleaned up correctly. + /// If there is still leftover data at the specified location, you should manually remove it. + /// + /// + /// If the analysis is successful then it detected no incorrect behaviour, but this does not mean that correct behaviour is guaranteed. + /// The analysis attempts to detect common bugs but it does not offer 100% coverage. + /// Additionally, it does not test the following: + /// + /// + /// + /// + /// Your repository must perform durable writes. Once a blob has been written it must remain in place until it is deleted, even after a power loss or similar disaster. + /// + /// + /// + /// + /// Your repository must not suffer from silent data corruption. Once a blob has been written, its contents must remain unchanged until it is deliberately modified or deleted. + /// + /// + /// + /// + /// Your repository must behave correctly even if connectivity from the cluster is disrupted. Reads and writes may fail in this case, but they must not return incorrect results. + /// + /// + /// + /// + /// IMPORTANT: An analysis writes a substantial amount of data to your repository and then reads it back again. + /// This consumes bandwidth on the network between the cluster and the repository, and storage space and I/O bandwidth on the repository itself. + /// You must ensure this load does not affect other users of these systems. + /// Analyses respect the repository settings max_snapshot_bytes_per_sec and max_restore_bytes_per_sec if available and the cluster setting indices.recovery.max_bytes_per_sec which you can use to limit the bandwidth they consume. + /// + /// + /// NOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions. + /// + /// + /// NOTE: Different versions of Elasticsearch may perform different checks for repository compatibility, with newer versions typically being stricter than older ones. + /// A storage system that passes repository analysis with one version of Elasticsearch may fail with a different version. + /// This indicates it behaves incorrectly in ways that the former version did not detect. + /// You must work with the supplier of your storage system to address the incompatibilities detected by the repository analysis API in any version of Elasticsearch. + /// + /// + /// NOTE: This API may not work correctly in a mixed-version cluster. + /// + /// + /// Implementation details + /// + /// + /// NOTE: This section of documentation describes how the repository analysis API works in this version of Elasticsearch, but you should expect the implementation to vary between versions. The request parameters and response format depend on details of the implementation so may also be different in newer versions. + /// + /// + /// The analysis comprises a number of blob-level tasks, as set by the blob_count parameter and a number of compare-and-exchange operations on linearizable registers, as set by the register_operation_count parameter. + /// These tasks are distributed over the data and master-eligible nodes in the cluster for execution. + /// + /// + /// For most blob-level tasks, the executing node first writes a blob to the repository and then instructs some of the other nodes in the cluster to attempt to read the data it just wrote. + /// The size of the blob is chosen randomly, according to the max_blob_size and max_total_data_size parameters. + /// If any of these reads fails then the repository does not implement the necessary read-after-write semantics that Elasticsearch requires. + /// + /// + /// For some blob-level tasks, the executing node will instruct some of its peers to attempt to read the data before the writing process completes. + /// These reads are permitted to fail, but must not return partial data. + /// If any read returns partial data then the repository does not implement the necessary atomicity semantics that Elasticsearch requires. + /// + /// + /// For some blob-level tasks, the executing node will overwrite the blob while its peers are reading it. + /// In this case the data read may come from either the original or the overwritten blob, but the read operation must not return partial data or a mix of data from the two blobs. + /// If any of these reads returns partial data or a mix of the two blobs then the repository does not implement the necessary atomicity semantics that Elasticsearch requires for overwrites. + /// + /// + /// The executing node will use a variety of different methods to write the blob. + /// For instance, where applicable, it will use both single-part and multi-part uploads. + /// Similarly, the reading nodes will use a variety of different methods to read the data back again. + /// For instance they may read the entire blob from start to end or may read only a subset of the data. + /// + /// + /// For some blob-level tasks, the executing node will cancel the write before it is complete. + /// In this case, it still instructs some of the other nodes in the cluster to attempt to read the blob but all of these reads must fail to find the blob. + /// + /// + /// Linearizable registers are special blobs that Elasticsearch manipulates using an atomic compare-and-exchange operation. + /// This operation ensures correct and strongly-consistent behavior even when the blob is accessed by multiple nodes at the same time. + /// The detailed implementation of the compare-and-exchange operation on linearizable registers varies by repository type. + /// Repository analysis verifies that that uncontended compare-and-exchange operations on a linearizable register blob always succeed. + /// Repository analysis also verifies that contended operations either succeed or report the contention but do not return incorrect results. + /// If an operation fails due to contention, Elasticsearch retries the operation until it succeeds. + /// Most of the compare-and-exchange operations performed by repository analysis atomically increment a counter which is represented as an 8-byte blob. + /// Some operations also verify the behavior on small blobs with sizes other than 8 bytes. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual RepositoryAnalyzeResponse RepositoryAnalyze(RepositoryAnalyzeRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Analyze a snapshot repository. + /// Analyze the performance characteristics and any incorrect behaviour found in a repository. + /// + /// + /// The response exposes implementation details of the analysis which may change from version to version. + /// The response body format is therefore not considered stable and may be different in newer versions. + /// + /// + /// There are a large number of third-party storage systems available, not all of which are suitable for use as a snapshot repository by Elasticsearch. + /// Some storage systems behave incorrectly, or perform poorly, especially when accessed concurrently by multiple clients as the nodes of an Elasticsearch cluster do. This API performs a collection of read and write operations on your repository which are designed to detect incorrect behaviour and to measure the performance characteristics of your storage system. + /// + /// + /// The default values for the parameters are deliberately low to reduce the impact of running an analysis inadvertently and to provide a sensible starting point for your investigations. + /// Run your first analysis with the default parameter values to check for simple problems. + /// If successful, run a sequence of increasingly large analyses until you encounter a failure or you reach a blob_count of at least 2000, a max_blob_size of at least 2gb, a max_total_data_size of at least 1tb, and a register_operation_count of at least 100. + /// Always specify a generous timeout, possibly 1h or longer, to allow time for each analysis to run to completion. + /// Perform the analyses using a multi-node cluster of a similar size to your production cluster so that it can detect any problems that only arise when the repository is accessed by many nodes at once. + /// + /// + /// If the analysis fails, Elasticsearch detected that your repository behaved unexpectedly. + /// This usually means you are using a third-party storage system with an incorrect or incompatible implementation of the API it claims to support. + /// If so, this storage system is not suitable for use as a snapshot repository. + /// You will need to work with the supplier of your storage system to address the incompatibilities that Elasticsearch detects. + /// + /// + /// If the analysis is successful, the API returns details of the testing process, optionally including how long each operation took. + /// You can use this information to determine the performance of your storage system. + /// If any operation fails or returns an incorrect result, the API returns an error. + /// If the API returns an error, it may not have removed all the data it wrote to the repository. + /// The error will indicate the location of any leftover data and this path is also recorded in the Elasticsearch logs. + /// You should verify that this location has been cleaned up correctly. + /// If there is still leftover data at the specified location, you should manually remove it. + /// + /// + /// If the connection from your client to Elasticsearch is closed while the client is waiting for the result of the analysis, the test is cancelled. + /// Some clients are configured to close their connection if no response is received within a certain timeout. + /// An analysis takes a long time to complete so you might need to relax any such client-side timeouts. + /// On cancellation the analysis attempts to clean up the data it was writing, but it may not be able to remove it all. + /// The path to the leftover data is recorded in the Elasticsearch logs. + /// You should verify that this location has been cleaned up correctly. + /// If there is still leftover data at the specified location, you should manually remove it. + /// + /// + /// If the analysis is successful then it detected no incorrect behaviour, but this does not mean that correct behaviour is guaranteed. + /// The analysis attempts to detect common bugs but it does not offer 100% coverage. + /// Additionally, it does not test the following: + /// + /// + /// + /// + /// Your repository must perform durable writes. Once a blob has been written it must remain in place until it is deleted, even after a power loss or similar disaster. + /// + /// + /// + /// + /// Your repository must not suffer from silent data corruption. Once a blob has been written, its contents must remain unchanged until it is deliberately modified or deleted. + /// + /// + /// + /// + /// Your repository must behave correctly even if connectivity from the cluster is disrupted. Reads and writes may fail in this case, but they must not return incorrect results. + /// + /// + /// + /// + /// IMPORTANT: An analysis writes a substantial amount of data to your repository and then reads it back again. + /// This consumes bandwidth on the network between the cluster and the repository, and storage space and I/O bandwidth on the repository itself. + /// You must ensure this load does not affect other users of these systems. + /// Analyses respect the repository settings max_snapshot_bytes_per_sec and max_restore_bytes_per_sec if available and the cluster setting indices.recovery.max_bytes_per_sec which you can use to limit the bandwidth they consume. + /// + /// + /// NOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions. + /// + /// + /// NOTE: Different versions of Elasticsearch may perform different checks for repository compatibility, with newer versions typically being stricter than older ones. + /// A storage system that passes repository analysis with one version of Elasticsearch may fail with a different version. + /// This indicates it behaves incorrectly in ways that the former version did not detect. + /// You must work with the supplier of your storage system to address the incompatibilities detected by the repository analysis API in any version of Elasticsearch. + /// + /// + /// NOTE: This API may not work correctly in a mixed-version cluster. + /// + /// + /// Implementation details + /// + /// + /// NOTE: This section of documentation describes how the repository analysis API works in this version of Elasticsearch, but you should expect the implementation to vary between versions. The request parameters and response format depend on details of the implementation so may also be different in newer versions. + /// + /// + /// The analysis comprises a number of blob-level tasks, as set by the blob_count parameter and a number of compare-and-exchange operations on linearizable registers, as set by the register_operation_count parameter. + /// These tasks are distributed over the data and master-eligible nodes in the cluster for execution. + /// + /// + /// For most blob-level tasks, the executing node first writes a blob to the repository and then instructs some of the other nodes in the cluster to attempt to read the data it just wrote. + /// The size of the blob is chosen randomly, according to the max_blob_size and max_total_data_size parameters. + /// If any of these reads fails then the repository does not implement the necessary read-after-write semantics that Elasticsearch requires. + /// + /// + /// For some blob-level tasks, the executing node will instruct some of its peers to attempt to read the data before the writing process completes. + /// These reads are permitted to fail, but must not return partial data. + /// If any read returns partial data then the repository does not implement the necessary atomicity semantics that Elasticsearch requires. + /// + /// + /// For some blob-level tasks, the executing node will overwrite the blob while its peers are reading it. + /// In this case the data read may come from either the original or the overwritten blob, but the read operation must not return partial data or a mix of data from the two blobs. + /// If any of these reads returns partial data or a mix of the two blobs then the repository does not implement the necessary atomicity semantics that Elasticsearch requires for overwrites. + /// + /// + /// The executing node will use a variety of different methods to write the blob. + /// For instance, where applicable, it will use both single-part and multi-part uploads. + /// Similarly, the reading nodes will use a variety of different methods to read the data back again. + /// For instance they may read the entire blob from start to end or may read only a subset of the data. + /// + /// + /// For some blob-level tasks, the executing node will cancel the write before it is complete. + /// In this case, it still instructs some of the other nodes in the cluster to attempt to read the blob but all of these reads must fail to find the blob. + /// + /// + /// Linearizable registers are special blobs that Elasticsearch manipulates using an atomic compare-and-exchange operation. + /// This operation ensures correct and strongly-consistent behavior even when the blob is accessed by multiple nodes at the same time. + /// The detailed implementation of the compare-and-exchange operation on linearizable registers varies by repository type. + /// Repository analysis verifies that that uncontended compare-and-exchange operations on a linearizable register blob always succeed. + /// Repository analysis also verifies that contended operations either succeed or report the contention but do not return incorrect results. + /// If an operation fails due to contention, Elasticsearch retries the operation until it succeeds. + /// Most of the compare-and-exchange operations performed by repository analysis atomically increment a counter which is represented as an 8-byte blob. + /// Some operations also verify the behavior on small blobs with sizes other than 8 bytes. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual RepositoryAnalyzeResponse RepositoryAnalyze(Elastic.Clients.Elasticsearch.Name name) + { + var descriptor = new RepositoryAnalyzeRequestDescriptor(name); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Analyze a snapshot repository. + /// Analyze the performance characteristics and any incorrect behaviour found in a repository. + /// + /// + /// The response exposes implementation details of the analysis which may change from version to version. + /// The response body format is therefore not considered stable and may be different in newer versions. + /// + /// + /// There are a large number of third-party storage systems available, not all of which are suitable for use as a snapshot repository by Elasticsearch. + /// Some storage systems behave incorrectly, or perform poorly, especially when accessed concurrently by multiple clients as the nodes of an Elasticsearch cluster do. This API performs a collection of read and write operations on your repository which are designed to detect incorrect behaviour and to measure the performance characteristics of your storage system. + /// + /// + /// The default values for the parameters are deliberately low to reduce the impact of running an analysis inadvertently and to provide a sensible starting point for your investigations. + /// Run your first analysis with the default parameter values to check for simple problems. + /// If successful, run a sequence of increasingly large analyses until you encounter a failure or you reach a blob_count of at least 2000, a max_blob_size of at least 2gb, a max_total_data_size of at least 1tb, and a register_operation_count of at least 100. + /// Always specify a generous timeout, possibly 1h or longer, to allow time for each analysis to run to completion. + /// Perform the analyses using a multi-node cluster of a similar size to your production cluster so that it can detect any problems that only arise when the repository is accessed by many nodes at once. + /// + /// + /// If the analysis fails, Elasticsearch detected that your repository behaved unexpectedly. + /// This usually means you are using a third-party storage system with an incorrect or incompatible implementation of the API it claims to support. + /// If so, this storage system is not suitable for use as a snapshot repository. + /// You will need to work with the supplier of your storage system to address the incompatibilities that Elasticsearch detects. + /// + /// + /// If the analysis is successful, the API returns details of the testing process, optionally including how long each operation took. + /// You can use this information to determine the performance of your storage system. + /// If any operation fails or returns an incorrect result, the API returns an error. + /// If the API returns an error, it may not have removed all the data it wrote to the repository. + /// The error will indicate the location of any leftover data and this path is also recorded in the Elasticsearch logs. + /// You should verify that this location has been cleaned up correctly. + /// If there is still leftover data at the specified location, you should manually remove it. + /// + /// + /// If the connection from your client to Elasticsearch is closed while the client is waiting for the result of the analysis, the test is cancelled. + /// Some clients are configured to close their connection if no response is received within a certain timeout. + /// An analysis takes a long time to complete so you might need to relax any such client-side timeouts. + /// On cancellation the analysis attempts to clean up the data it was writing, but it may not be able to remove it all. + /// The path to the leftover data is recorded in the Elasticsearch logs. + /// You should verify that this location has been cleaned up correctly. + /// If there is still leftover data at the specified location, you should manually remove it. + /// + /// + /// If the analysis is successful then it detected no incorrect behaviour, but this does not mean that correct behaviour is guaranteed. + /// The analysis attempts to detect common bugs but it does not offer 100% coverage. + /// Additionally, it does not test the following: + /// + /// + /// + /// + /// Your repository must perform durable writes. Once a blob has been written it must remain in place until it is deleted, even after a power loss or similar disaster. + /// + /// + /// + /// + /// Your repository must not suffer from silent data corruption. Once a blob has been written, its contents must remain unchanged until it is deliberately modified or deleted. + /// + /// + /// + /// + /// Your repository must behave correctly even if connectivity from the cluster is disrupted. Reads and writes may fail in this case, but they must not return incorrect results. + /// + /// + /// + /// + /// IMPORTANT: An analysis writes a substantial amount of data to your repository and then reads it back again. + /// This consumes bandwidth on the network between the cluster and the repository, and storage space and I/O bandwidth on the repository itself. + /// You must ensure this load does not affect other users of these systems. + /// Analyses respect the repository settings max_snapshot_bytes_per_sec and max_restore_bytes_per_sec if available and the cluster setting indices.recovery.max_bytes_per_sec which you can use to limit the bandwidth they consume. + /// + /// + /// NOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions. + /// + /// + /// NOTE: Different versions of Elasticsearch may perform different checks for repository compatibility, with newer versions typically being stricter than older ones. + /// A storage system that passes repository analysis with one version of Elasticsearch may fail with a different version. + /// This indicates it behaves incorrectly in ways that the former version did not detect. + /// You must work with the supplier of your storage system to address the incompatibilities detected by the repository analysis API in any version of Elasticsearch. + /// + /// + /// NOTE: This API may not work correctly in a mixed-version cluster. + /// + /// + /// Implementation details + /// + /// + /// NOTE: This section of documentation describes how the repository analysis API works in this version of Elasticsearch, but you should expect the implementation to vary between versions. The request parameters and response format depend on details of the implementation so may also be different in newer versions. + /// + /// + /// The analysis comprises a number of blob-level tasks, as set by the blob_count parameter and a number of compare-and-exchange operations on linearizable registers, as set by the register_operation_count parameter. + /// These tasks are distributed over the data and master-eligible nodes in the cluster for execution. + /// + /// + /// For most blob-level tasks, the executing node first writes a blob to the repository and then instructs some of the other nodes in the cluster to attempt to read the data it just wrote. + /// The size of the blob is chosen randomly, according to the max_blob_size and max_total_data_size parameters. + /// If any of these reads fails then the repository does not implement the necessary read-after-write semantics that Elasticsearch requires. + /// + /// + /// For some blob-level tasks, the executing node will instruct some of its peers to attempt to read the data before the writing process completes. + /// These reads are permitted to fail, but must not return partial data. + /// If any read returns partial data then the repository does not implement the necessary atomicity semantics that Elasticsearch requires. + /// + /// + /// For some blob-level tasks, the executing node will overwrite the blob while its peers are reading it. + /// In this case the data read may come from either the original or the overwritten blob, but the read operation must not return partial data or a mix of data from the two blobs. + /// If any of these reads returns partial data or a mix of the two blobs then the repository does not implement the necessary atomicity semantics that Elasticsearch requires for overwrites. + /// + /// + /// The executing node will use a variety of different methods to write the blob. + /// For instance, where applicable, it will use both single-part and multi-part uploads. + /// Similarly, the reading nodes will use a variety of different methods to read the data back again. + /// For instance they may read the entire blob from start to end or may read only a subset of the data. + /// + /// + /// For some blob-level tasks, the executing node will cancel the write before it is complete. + /// In this case, it still instructs some of the other nodes in the cluster to attempt to read the blob but all of these reads must fail to find the blob. + /// + /// + /// Linearizable registers are special blobs that Elasticsearch manipulates using an atomic compare-and-exchange operation. + /// This operation ensures correct and strongly-consistent behavior even when the blob is accessed by multiple nodes at the same time. + /// The detailed implementation of the compare-and-exchange operation on linearizable registers varies by repository type. + /// Repository analysis verifies that that uncontended compare-and-exchange operations on a linearizable register blob always succeed. + /// Repository analysis also verifies that contended operations either succeed or report the contention but do not return incorrect results. + /// If an operation fails due to contention, Elasticsearch retries the operation until it succeeds. + /// Most of the compare-and-exchange operations performed by repository analysis atomically increment a counter which is represented as an 8-byte blob. + /// Some operations also verify the behavior on small blobs with sizes other than 8 bytes. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual RepositoryAnalyzeResponse RepositoryAnalyze(Elastic.Clients.Elasticsearch.Name name, Action configureRequest) + { + var descriptor = new RepositoryAnalyzeRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Analyze a snapshot repository. + /// Analyze the performance characteristics and any incorrect behaviour found in a repository. + /// + /// + /// The response exposes implementation details of the analysis which may change from version to version. + /// The response body format is therefore not considered stable and may be different in newer versions. + /// + /// + /// There are a large number of third-party storage systems available, not all of which are suitable for use as a snapshot repository by Elasticsearch. + /// Some storage systems behave incorrectly, or perform poorly, especially when accessed concurrently by multiple clients as the nodes of an Elasticsearch cluster do. This API performs a collection of read and write operations on your repository which are designed to detect incorrect behaviour and to measure the performance characteristics of your storage system. + /// + /// + /// The default values for the parameters are deliberately low to reduce the impact of running an analysis inadvertently and to provide a sensible starting point for your investigations. + /// Run your first analysis with the default parameter values to check for simple problems. + /// If successful, run a sequence of increasingly large analyses until you encounter a failure or you reach a blob_count of at least 2000, a max_blob_size of at least 2gb, a max_total_data_size of at least 1tb, and a register_operation_count of at least 100. + /// Always specify a generous timeout, possibly 1h or longer, to allow time for each analysis to run to completion. + /// Perform the analyses using a multi-node cluster of a similar size to your production cluster so that it can detect any problems that only arise when the repository is accessed by many nodes at once. + /// + /// + /// If the analysis fails, Elasticsearch detected that your repository behaved unexpectedly. + /// This usually means you are using a third-party storage system with an incorrect or incompatible implementation of the API it claims to support. + /// If so, this storage system is not suitable for use as a snapshot repository. + /// You will need to work with the supplier of your storage system to address the incompatibilities that Elasticsearch detects. + /// + /// + /// If the analysis is successful, the API returns details of the testing process, optionally including how long each operation took. + /// You can use this information to determine the performance of your storage system. + /// If any operation fails or returns an incorrect result, the API returns an error. + /// If the API returns an error, it may not have removed all the data it wrote to the repository. + /// The error will indicate the location of any leftover data and this path is also recorded in the Elasticsearch logs. + /// You should verify that this location has been cleaned up correctly. + /// If there is still leftover data at the specified location, you should manually remove it. + /// + /// + /// If the connection from your client to Elasticsearch is closed while the client is waiting for the result of the analysis, the test is cancelled. + /// Some clients are configured to close their connection if no response is received within a certain timeout. + /// An analysis takes a long time to complete so you might need to relax any such client-side timeouts. + /// On cancellation the analysis attempts to clean up the data it was writing, but it may not be able to remove it all. + /// The path to the leftover data is recorded in the Elasticsearch logs. + /// You should verify that this location has been cleaned up correctly. + /// If there is still leftover data at the specified location, you should manually remove it. + /// + /// + /// If the analysis is successful then it detected no incorrect behaviour, but this does not mean that correct behaviour is guaranteed. + /// The analysis attempts to detect common bugs but it does not offer 100% coverage. + /// Additionally, it does not test the following: + /// + /// + /// + /// + /// Your repository must perform durable writes. Once a blob has been written it must remain in place until it is deleted, even after a power loss or similar disaster. + /// + /// + /// + /// + /// Your repository must not suffer from silent data corruption. Once a blob has been written, its contents must remain unchanged until it is deliberately modified or deleted. + /// + /// + /// + /// + /// Your repository must behave correctly even if connectivity from the cluster is disrupted. Reads and writes may fail in this case, but they must not return incorrect results. + /// + /// + /// + /// + /// IMPORTANT: An analysis writes a substantial amount of data to your repository and then reads it back again. + /// This consumes bandwidth on the network between the cluster and the repository, and storage space and I/O bandwidth on the repository itself. + /// You must ensure this load does not affect other users of these systems. + /// Analyses respect the repository settings max_snapshot_bytes_per_sec and max_restore_bytes_per_sec if available and the cluster setting indices.recovery.max_bytes_per_sec which you can use to limit the bandwidth they consume. + /// + /// + /// NOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions. + /// + /// + /// NOTE: Different versions of Elasticsearch may perform different checks for repository compatibility, with newer versions typically being stricter than older ones. + /// A storage system that passes repository analysis with one version of Elasticsearch may fail with a different version. + /// This indicates it behaves incorrectly in ways that the former version did not detect. + /// You must work with the supplier of your storage system to address the incompatibilities detected by the repository analysis API in any version of Elasticsearch. + /// + /// + /// NOTE: This API may not work correctly in a mixed-version cluster. + /// + /// + /// Implementation details + /// + /// + /// NOTE: This section of documentation describes how the repository analysis API works in this version of Elasticsearch, but you should expect the implementation to vary between versions. The request parameters and response format depend on details of the implementation so may also be different in newer versions. + /// + /// + /// The analysis comprises a number of blob-level tasks, as set by the blob_count parameter and a number of compare-and-exchange operations on linearizable registers, as set by the register_operation_count parameter. + /// These tasks are distributed over the data and master-eligible nodes in the cluster for execution. + /// + /// + /// For most blob-level tasks, the executing node first writes a blob to the repository and then instructs some of the other nodes in the cluster to attempt to read the data it just wrote. + /// The size of the blob is chosen randomly, according to the max_blob_size and max_total_data_size parameters. + /// If any of these reads fails then the repository does not implement the necessary read-after-write semantics that Elasticsearch requires. + /// + /// + /// For some blob-level tasks, the executing node will instruct some of its peers to attempt to read the data before the writing process completes. + /// These reads are permitted to fail, but must not return partial data. + /// If any read returns partial data then the repository does not implement the necessary atomicity semantics that Elasticsearch requires. + /// + /// + /// For some blob-level tasks, the executing node will overwrite the blob while its peers are reading it. + /// In this case the data read may come from either the original or the overwritten blob, but the read operation must not return partial data or a mix of data from the two blobs. + /// If any of these reads returns partial data or a mix of the two blobs then the repository does not implement the necessary atomicity semantics that Elasticsearch requires for overwrites. + /// + /// + /// The executing node will use a variety of different methods to write the blob. + /// For instance, where applicable, it will use both single-part and multi-part uploads. + /// Similarly, the reading nodes will use a variety of different methods to read the data back again. + /// For instance they may read the entire blob from start to end or may read only a subset of the data. + /// + /// + /// For some blob-level tasks, the executing node will cancel the write before it is complete. + /// In this case, it still instructs some of the other nodes in the cluster to attempt to read the blob but all of these reads must fail to find the blob. + /// + /// + /// Linearizable registers are special blobs that Elasticsearch manipulates using an atomic compare-and-exchange operation. + /// This operation ensures correct and strongly-consistent behavior even when the blob is accessed by multiple nodes at the same time. + /// The detailed implementation of the compare-and-exchange operation on linearizable registers varies by repository type. + /// Repository analysis verifies that that uncontended compare-and-exchange operations on a linearizable register blob always succeed. + /// Repository analysis also verifies that contended operations either succeed or report the contention but do not return incorrect results. + /// If an operation fails due to contention, Elasticsearch retries the operation until it succeeds. + /// Most of the compare-and-exchange operations performed by repository analysis atomically increment a counter which is represented as an 8-byte blob. + /// Some operations also verify the behavior on small blobs with sizes other than 8 bytes. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task RepositoryAnalyzeAsync(RepositoryAnalyzeRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Analyze a snapshot repository. + /// Analyze the performance characteristics and any incorrect behaviour found in a repository. + /// + /// + /// The response exposes implementation details of the analysis which may change from version to version. + /// The response body format is therefore not considered stable and may be different in newer versions. + /// + /// + /// There are a large number of third-party storage systems available, not all of which are suitable for use as a snapshot repository by Elasticsearch. + /// Some storage systems behave incorrectly, or perform poorly, especially when accessed concurrently by multiple clients as the nodes of an Elasticsearch cluster do. This API performs a collection of read and write operations on your repository which are designed to detect incorrect behaviour and to measure the performance characteristics of your storage system. + /// + /// + /// The default values for the parameters are deliberately low to reduce the impact of running an analysis inadvertently and to provide a sensible starting point for your investigations. + /// Run your first analysis with the default parameter values to check for simple problems. + /// If successful, run a sequence of increasingly large analyses until you encounter a failure or you reach a blob_count of at least 2000, a max_blob_size of at least 2gb, a max_total_data_size of at least 1tb, and a register_operation_count of at least 100. + /// Always specify a generous timeout, possibly 1h or longer, to allow time for each analysis to run to completion. + /// Perform the analyses using a multi-node cluster of a similar size to your production cluster so that it can detect any problems that only arise when the repository is accessed by many nodes at once. + /// + /// + /// If the analysis fails, Elasticsearch detected that your repository behaved unexpectedly. + /// This usually means you are using a third-party storage system with an incorrect or incompatible implementation of the API it claims to support. + /// If so, this storage system is not suitable for use as a snapshot repository. + /// You will need to work with the supplier of your storage system to address the incompatibilities that Elasticsearch detects. + /// + /// + /// If the analysis is successful, the API returns details of the testing process, optionally including how long each operation took. + /// You can use this information to determine the performance of your storage system. + /// If any operation fails or returns an incorrect result, the API returns an error. + /// If the API returns an error, it may not have removed all the data it wrote to the repository. + /// The error will indicate the location of any leftover data and this path is also recorded in the Elasticsearch logs. + /// You should verify that this location has been cleaned up correctly. + /// If there is still leftover data at the specified location, you should manually remove it. + /// + /// + /// If the connection from your client to Elasticsearch is closed while the client is waiting for the result of the analysis, the test is cancelled. + /// Some clients are configured to close their connection if no response is received within a certain timeout. + /// An analysis takes a long time to complete so you might need to relax any such client-side timeouts. + /// On cancellation the analysis attempts to clean up the data it was writing, but it may not be able to remove it all. + /// The path to the leftover data is recorded in the Elasticsearch logs. + /// You should verify that this location has been cleaned up correctly. + /// If there is still leftover data at the specified location, you should manually remove it. + /// + /// + /// If the analysis is successful then it detected no incorrect behaviour, but this does not mean that correct behaviour is guaranteed. + /// The analysis attempts to detect common bugs but it does not offer 100% coverage. + /// Additionally, it does not test the following: + /// + /// + /// + /// + /// Your repository must perform durable writes. Once a blob has been written it must remain in place until it is deleted, even after a power loss or similar disaster. + /// + /// + /// + /// + /// Your repository must not suffer from silent data corruption. Once a blob has been written, its contents must remain unchanged until it is deliberately modified or deleted. + /// + /// + /// + /// + /// Your repository must behave correctly even if connectivity from the cluster is disrupted. Reads and writes may fail in this case, but they must not return incorrect results. + /// + /// + /// + /// + /// IMPORTANT: An analysis writes a substantial amount of data to your repository and then reads it back again. + /// This consumes bandwidth on the network between the cluster and the repository, and storage space and I/O bandwidth on the repository itself. + /// You must ensure this load does not affect other users of these systems. + /// Analyses respect the repository settings max_snapshot_bytes_per_sec and max_restore_bytes_per_sec if available and the cluster setting indices.recovery.max_bytes_per_sec which you can use to limit the bandwidth they consume. + /// + /// + /// NOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions. + /// + /// + /// NOTE: Different versions of Elasticsearch may perform different checks for repository compatibility, with newer versions typically being stricter than older ones. + /// A storage system that passes repository analysis with one version of Elasticsearch may fail with a different version. + /// This indicates it behaves incorrectly in ways that the former version did not detect. + /// You must work with the supplier of your storage system to address the incompatibilities detected by the repository analysis API in any version of Elasticsearch. + /// + /// + /// NOTE: This API may not work correctly in a mixed-version cluster. + /// + /// + /// Implementation details + /// + /// + /// NOTE: This section of documentation describes how the repository analysis API works in this version of Elasticsearch, but you should expect the implementation to vary between versions. The request parameters and response format depend on details of the implementation so may also be different in newer versions. + /// + /// + /// The analysis comprises a number of blob-level tasks, as set by the blob_count parameter and a number of compare-and-exchange operations on linearizable registers, as set by the register_operation_count parameter. + /// These tasks are distributed over the data and master-eligible nodes in the cluster for execution. + /// + /// + /// For most blob-level tasks, the executing node first writes a blob to the repository and then instructs some of the other nodes in the cluster to attempt to read the data it just wrote. + /// The size of the blob is chosen randomly, according to the max_blob_size and max_total_data_size parameters. + /// If any of these reads fails then the repository does not implement the necessary read-after-write semantics that Elasticsearch requires. + /// + /// + /// For some blob-level tasks, the executing node will instruct some of its peers to attempt to read the data before the writing process completes. + /// These reads are permitted to fail, but must not return partial data. + /// If any read returns partial data then the repository does not implement the necessary atomicity semantics that Elasticsearch requires. + /// + /// + /// For some blob-level tasks, the executing node will overwrite the blob while its peers are reading it. + /// In this case the data read may come from either the original or the overwritten blob, but the read operation must not return partial data or a mix of data from the two blobs. + /// If any of these reads returns partial data or a mix of the two blobs then the repository does not implement the necessary atomicity semantics that Elasticsearch requires for overwrites. + /// + /// + /// The executing node will use a variety of different methods to write the blob. + /// For instance, where applicable, it will use both single-part and multi-part uploads. + /// Similarly, the reading nodes will use a variety of different methods to read the data back again. + /// For instance they may read the entire blob from start to end or may read only a subset of the data. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetSnapshotResponse Get(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Names snapshot) - { - var descriptor = new GetSnapshotRequestDescriptor(repository, snapshot); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Get snapshot information. + /// For some blob-level tasks, the executing node will cancel the write before it is complete. + /// In this case, it still instructs some of the other nodes in the cluster to attempt to read the blob but all of these reads must fail to find the blob. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetSnapshotResponse Get(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Names snapshot, Action configureRequest) - { - var descriptor = new GetSnapshotRequestDescriptor(repository, snapshot); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Get snapshot information. + /// Linearizable registers are special blobs that Elasticsearch manipulates using an atomic compare-and-exchange operation. + /// This operation ensures correct and strongly-consistent behavior even when the blob is accessed by multiple nodes at the same time. + /// The detailed implementation of the compare-and-exchange operation on linearizable registers varies by repository type. + /// Repository analysis verifies that that uncontended compare-and-exchange operations on a linearizable register blob always succeed. + /// Repository analysis also verifies that contended operations either succeed or report the contention but do not return incorrect results. + /// If an operation fails due to contention, Elasticsearch retries the operation until it succeeds. + /// Most of the compare-and-exchange operations performed by repository analysis atomically increment a counter which is represented as an 8-byte blob. + /// Some operations also verify the behavior on small blobs with sizes other than 8 bytes. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task GetAsync(GetSnapshotRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task RepositoryAnalyzeAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) { + var descriptor = new RepositoryAnalyzeRequestDescriptor(name); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Get snapshot information. + /// Analyze a snapshot repository. + /// Analyze the performance characteristics and any incorrect behaviour found in a repository. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Names snapshot, CancellationToken cancellationToken = default) - { - var descriptor = new GetSnapshotRequestDescriptor(repository, snapshot); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Get snapshot information. + /// The response exposes implementation details of the analysis which may change from version to version. + /// The response body format is therefore not considered stable and may be different in newer versions. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Names snapshot, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetSnapshotRequestDescriptor(repository, snapshot); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Get snapshot repository information. + /// There are a large number of third-party storage systems available, not all of which are suitable for use as a snapshot repository by Elasticsearch. + /// Some storage systems behave incorrectly, or perform poorly, especially when accessed concurrently by multiple clients as the nodes of an Elasticsearch cluster do. This API performs a collection of read and write operations on your repository which are designed to detect incorrect behaviour and to measure the performance characteristics of your storage system. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetRepositoryResponse GetRepository(GetRepositoryRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// /// - /// Get snapshot repository information. + /// The default values for the parameters are deliberately low to reduce the impact of running an analysis inadvertently and to provide a sensible starting point for your investigations. + /// Run your first analysis with the default parameter values to check for simple problems. + /// If successful, run a sequence of increasingly large analyses until you encounter a failure or you reach a blob_count of at least 2000, a max_blob_size of at least 2gb, a max_total_data_size of at least 1tb, and a register_operation_count of at least 100. + /// Always specify a generous timeout, possibly 1h or longer, to allow time for each analysis to run to completion. + /// Perform the analyses using a multi-node cluster of a similar size to your production cluster so that it can detect any problems that only arise when the repository is accessed by many nodes at once. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRepositoryAsync(GetRepositoryRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// /// - /// Get snapshot repository information. + /// If the analysis fails, Elasticsearch detected that your repository behaved unexpectedly. + /// This usually means you are using a third-party storage system with an incorrect or incompatible implementation of the API it claims to support. + /// If so, this storage system is not suitable for use as a snapshot repository. + /// You will need to work with the supplier of your storage system to address the incompatibilities that Elasticsearch detects. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetRepositoryResponse GetRepository(GetRepositoryRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Get snapshot repository information. + /// If the analysis is successful, the API returns details of the testing process, optionally including how long each operation took. + /// You can use this information to determine the performance of your storage system. + /// If any operation fails or returns an incorrect result, the API returns an error. + /// If the API returns an error, it may not have removed all the data it wrote to the repository. + /// The error will indicate the location of any leftover data and this path is also recorded in the Elasticsearch logs. + /// You should verify that this location has been cleaned up correctly. + /// If there is still leftover data at the specified location, you should manually remove it. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetRepositoryResponse GetRepository(Elastic.Clients.Elasticsearch.Names? name) - { - var descriptor = new GetRepositoryRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Get snapshot repository information. + /// If the connection from your client to Elasticsearch is closed while the client is waiting for the result of the analysis, the test is cancelled. + /// Some clients are configured to close their connection if no response is received within a certain timeout. + /// An analysis takes a long time to complete so you might need to relax any such client-side timeouts. + /// On cancellation the analysis attempts to clean up the data it was writing, but it may not be able to remove it all. + /// The path to the leftover data is recorded in the Elasticsearch logs. + /// You should verify that this location has been cleaned up correctly. + /// If there is still leftover data at the specified location, you should manually remove it. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetRepositoryResponse GetRepository(Elastic.Clients.Elasticsearch.Names? name, Action configureRequest) - { - var descriptor = new GetRepositoryRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Get snapshot repository information. + /// If the analysis is successful then it detected no incorrect behaviour, but this does not mean that correct behaviour is guaranteed. + /// The analysis attempts to detect common bugs but it does not offer 100% coverage. + /// Additionally, it does not test the following: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetRepositoryResponse GetRepository() - { - var descriptor = new GetRepositoryRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Get snapshot repository information. + /// Your repository must perform durable writes. Once a blob has been written it must remain in place until it is deleted, even after a power loss or similar disaster. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetRepositoryResponse GetRepository(Action configureRequest) - { - var descriptor = new GetRepositoryRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Get snapshot repository information. + /// Your repository must not suffer from silent data corruption. Once a blob has been written, its contents must remain unchanged until it is deliberately modified or deleted. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRepositoryAsync(GetRepositoryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get snapshot repository information. + /// Your repository must behave correctly even if connectivity from the cluster is disrupted. Reads and writes may fail in this case, but they must not return incorrect results. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRepositoryAsync(Elastic.Clients.Elasticsearch.Names? name, CancellationToken cancellationToken = default) - { - var descriptor = new GetRepositoryRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get snapshot repository information. + /// IMPORTANT: An analysis writes a substantial amount of data to your repository and then reads it back again. + /// This consumes bandwidth on the network between the cluster and the repository, and storage space and I/O bandwidth on the repository itself. + /// You must ensure this load does not affect other users of these systems. + /// Analyses respect the repository settings max_snapshot_bytes_per_sec and max_restore_bytes_per_sec if available and the cluster setting indices.recovery.max_bytes_per_sec which you can use to limit the bandwidth they consume. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRepositoryAsync(Elastic.Clients.Elasticsearch.Names? name, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetRepositoryRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Get snapshot repository information. + /// NOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetRepositoryAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetRepositoryRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Get snapshot repository information. + /// NOTE: Different versions of Elasticsearch may perform different checks for repository compatibility, with newer versions typically being stricter than older ones. + /// A storage system that passes repository analysis with one version of Elasticsearch may fail with a different version. + /// This indicates it behaves incorrectly in ways that the former version did not detect. + /// You must work with the supplier of your storage system to address the incompatibilities detected by the repository analysis API in any version of Elasticsearch. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// NOTE: This API may not work correctly in a mixed-version cluster. + /// + /// + /// Implementation details + /// + /// + /// NOTE: This section of documentation describes how the repository analysis API works in this version of Elasticsearch, but you should expect the implementation to vary between versions. The request parameters and response format depend on details of the implementation so may also be different in newer versions. + /// + /// + /// The analysis comprises a number of blob-level tasks, as set by the blob_count parameter and a number of compare-and-exchange operations on linearizable registers, as set by the register_operation_count parameter. + /// These tasks are distributed over the data and master-eligible nodes in the cluster for execution. + /// + /// + /// For most blob-level tasks, the executing node first writes a blob to the repository and then instructs some of the other nodes in the cluster to attempt to read the data it just wrote. + /// The size of the blob is chosen randomly, according to the max_blob_size and max_total_data_size parameters. + /// If any of these reads fails then the repository does not implement the necessary read-after-write semantics that Elasticsearch requires. + /// + /// + /// For some blob-level tasks, the executing node will instruct some of its peers to attempt to read the data before the writing process completes. + /// These reads are permitted to fail, but must not return partial data. + /// If any read returns partial data then the repository does not implement the necessary atomicity semantics that Elasticsearch requires. + /// + /// + /// For some blob-level tasks, the executing node will overwrite the blob while its peers are reading it. + /// In this case the data read may come from either the original or the overwritten blob, but the read operation must not return partial data or a mix of data from the two blobs. + /// If any of these reads returns partial data or a mix of the two blobs then the repository does not implement the necessary atomicity semantics that Elasticsearch requires for overwrites. + /// + /// + /// The executing node will use a variety of different methods to write the blob. + /// For instance, where applicable, it will use both single-part and multi-part uploads. + /// Similarly, the reading nodes will use a variety of different methods to read the data back again. + /// For instance they may read the entire blob from start to end or may read only a subset of the data. + /// + /// + /// For some blob-level tasks, the executing node will cancel the write before it is complete. + /// In this case, it still instructs some of the other nodes in the cluster to attempt to read the blob but all of these reads must fail to find the blob. + /// + /// + /// Linearizable registers are special blobs that Elasticsearch manipulates using an atomic compare-and-exchange operation. + /// This operation ensures correct and strongly-consistent behavior even when the blob is accessed by multiple nodes at the same time. + /// The detailed implementation of the compare-and-exchange operation on linearizable registers varies by repository type. + /// Repository analysis verifies that that uncontended compare-and-exchange operations on a linearizable register blob always succeed. + /// Repository analysis also verifies that contended operations either succeed or report the contention but do not return incorrect results. + /// If an operation fails due to contention, Elasticsearch retries the operation until it succeeds. + /// Most of the compare-and-exchange operations performed by repository analysis atomically increment a counter which is represented as an 8-byte blob. + /// Some operations also verify the behavior on small blobs with sizes other than 8 bytes. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task GetRepositoryAsync(Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task RepositoryAnalyzeAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new GetRepositoryRequestDescriptor(); + var descriptor = new RepositoryAnalyzeRequestDescriptor(name); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// @@ -1066,7 +2172,7 @@ public virtual Task GetRepositoryAsync(Action /// NOTE: This API may not work correctly in a mixed-version cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RepositoryVerifyIntegrityResponse RepositoryVerifyIntegrity(RepositoryVerifyIntegrityRequest request) @@ -1134,7 +2240,7 @@ public virtual RepositoryVerifyIntegrityResponse RepositoryVerifyIntegrity(Repos /// /// NOTE: This API may not work correctly in a mixed-version cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RepositoryVerifyIntegrityAsync(RepositoryVerifyIntegrityRequest request, CancellationToken cancellationToken = default) { @@ -1201,7 +2307,7 @@ public virtual Task RepositoryVerifyIntegrity /// /// NOTE: This API may not work correctly in a mixed-version cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RepositoryVerifyIntegrityResponse RepositoryVerifyIntegrity(RepositoryVerifyIntegrityRequestDescriptor descriptor) @@ -1269,7 +2375,7 @@ public virtual RepositoryVerifyIntegrityResponse RepositoryVerifyIntegrity(Repos /// /// NOTE: This API may not work correctly in a mixed-version cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RepositoryVerifyIntegrityResponse RepositoryVerifyIntegrity(Elastic.Clients.Elasticsearch.Names name) @@ -1338,7 +2444,7 @@ public virtual RepositoryVerifyIntegrityResponse RepositoryVerifyIntegrity(Elast /// /// NOTE: This API may not work correctly in a mixed-version cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RepositoryVerifyIntegrityResponse RepositoryVerifyIntegrity(Elastic.Clients.Elasticsearch.Names name, Action configureRequest) @@ -1408,7 +2514,7 @@ public virtual RepositoryVerifyIntegrityResponse RepositoryVerifyIntegrity(Elast /// /// NOTE: This API may not work correctly in a mixed-version cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RepositoryVerifyIntegrityAsync(RepositoryVerifyIntegrityRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1475,7 +2581,7 @@ public virtual Task RepositoryVerifyIntegrity /// /// NOTE: This API may not work correctly in a mixed-version cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RepositoryVerifyIntegrityAsync(Elastic.Clients.Elasticsearch.Names name, CancellationToken cancellationToken = default) { @@ -1543,7 +2649,7 @@ public virtual Task RepositoryVerifyIntegrity /// /// NOTE: This API may not work correctly in a mixed-version cluster. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RepositoryVerifyIntegrityAsync(Elastic.Clients.Elasticsearch.Names name, Action configureRequest, CancellationToken cancellationToken = default) { @@ -1578,7 +2684,7 @@ public virtual Task RepositoryVerifyIntegrity /// /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RestoreResponse Restore(RestoreRequest request) @@ -1612,7 +2718,7 @@ public virtual RestoreResponse Restore(RestoreRequest request) /// /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RestoreAsync(RestoreRequest request, CancellationToken cancellationToken = default) { @@ -1645,7 +2751,7 @@ public virtual Task RestoreAsync(RestoreRequest request, Cancel /// /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RestoreResponse Restore(RestoreRequestDescriptor descriptor) @@ -1679,7 +2785,7 @@ public virtual RestoreResponse Restore(RestoreRequestDescriptor /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RestoreResponse Restore(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot) @@ -1714,7 +2820,7 @@ public virtual RestoreResponse Restore(Elastic.Clients.Elasticsearch. /// /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RestoreResponse Restore(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, Action> configureRequest) @@ -1750,7 +2856,7 @@ public virtual RestoreResponse Restore(Elastic.Clients.Elasticsearch. /// /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RestoreResponse Restore(RestoreRequestDescriptor descriptor) @@ -1784,7 +2890,7 @@ public virtual RestoreResponse Restore(RestoreRequestDescriptor descriptor) /// /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RestoreResponse Restore(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot) @@ -1819,7 +2925,7 @@ public virtual RestoreResponse Restore(Elastic.Clients.Elasticsearch.Name reposi /// /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual RestoreResponse Restore(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, Action configureRequest) @@ -1855,7 +2961,7 @@ public virtual RestoreResponse Restore(Elastic.Clients.Elasticsearch.Name reposi /// /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RestoreAsync(RestoreRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1888,7 +2994,7 @@ public virtual Task RestoreAsync(RestoreRequestDescr /// /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RestoreAsync(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, CancellationToken cancellationToken = default) { @@ -1922,7 +3028,7 @@ public virtual Task RestoreAsync(Elastic.Clients.Ela /// /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RestoreAsync(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -1957,7 +3063,7 @@ public virtual Task RestoreAsync(Elastic.Clients.Ela /// /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RestoreAsync(RestoreRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1990,7 +3096,7 @@ public virtual Task RestoreAsync(RestoreRequestDescriptor descr /// /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RestoreAsync(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, CancellationToken cancellationToken = default) { @@ -2024,7 +3130,7 @@ public virtual Task RestoreAsync(Elastic.Clients.Elasticsearch. /// /// If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task RestoreAsync(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, Action configureRequest, CancellationToken cancellationToken = default) { @@ -2050,7 +3156,7 @@ public virtual Task RestoreAsync(Elastic.Clients.Elasticsearch. /// Depending on the latency of your storage, such requests can take an extremely long time to return results. /// These requests can also tax machine resources and, when using cloud storage, incur high processing costs. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SnapshotStatusResponse Status(SnapshotStatusRequest request) @@ -2075,7 +3181,7 @@ public virtual SnapshotStatusResponse Status(SnapshotStatusRequest request) /// Depending on the latency of your storage, such requests can take an extremely long time to return results. /// These requests can also tax machine resources and, when using cloud storage, incur high processing costs. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatusAsync(SnapshotStatusRequest request, CancellationToken cancellationToken = default) { @@ -2099,7 +3205,7 @@ public virtual Task StatusAsync(SnapshotStatusRequest re /// Depending on the latency of your storage, such requests can take an extremely long time to return results. /// These requests can also tax machine resources and, when using cloud storage, incur high processing costs. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SnapshotStatusResponse Status(SnapshotStatusRequestDescriptor descriptor) @@ -2124,7 +3230,7 @@ public virtual SnapshotStatusResponse Status(SnapshotStatusRequestDescriptor des /// Depending on the latency of your storage, such requests can take an extremely long time to return results. /// These requests can also tax machine resources and, when using cloud storage, incur high processing costs. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SnapshotStatusResponse Status(Elastic.Clients.Elasticsearch.Name? repository, Elastic.Clients.Elasticsearch.Names? snapshot) @@ -2150,7 +3256,7 @@ public virtual SnapshotStatusResponse Status(Elastic.Clients.Elasticsearch.Name? /// Depending on the latency of your storage, such requests can take an extremely long time to return results. /// These requests can also tax machine resources and, when using cloud storage, incur high processing costs. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SnapshotStatusResponse Status(Elastic.Clients.Elasticsearch.Name? repository, Elastic.Clients.Elasticsearch.Names? snapshot, Action configureRequest) @@ -2177,7 +3283,7 @@ public virtual SnapshotStatusResponse Status(Elastic.Clients.Elasticsearch.Name? /// Depending on the latency of your storage, such requests can take an extremely long time to return results. /// These requests can also tax machine resources and, when using cloud storage, incur high processing costs. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SnapshotStatusResponse Status() @@ -2203,7 +3309,7 @@ public virtual SnapshotStatusResponse Status() /// Depending on the latency of your storage, such requests can take an extremely long time to return results. /// These requests can also tax machine resources and, when using cloud storage, incur high processing costs. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual SnapshotStatusResponse Status(Action configureRequest) @@ -2230,7 +3336,7 @@ public virtual SnapshotStatusResponse Status(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatusAsync(SnapshotStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2254,7 +3360,7 @@ public virtual Task StatusAsync(SnapshotStatusRequestDes /// Depending on the latency of your storage, such requests can take an extremely long time to return results. /// These requests can also tax machine resources and, when using cloud storage, incur high processing costs. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatusAsync(Elastic.Clients.Elasticsearch.Name? repository, Elastic.Clients.Elasticsearch.Names? snapshot, CancellationToken cancellationToken = default) { @@ -2279,7 +3385,7 @@ public virtual Task StatusAsync(Elastic.Clients.Elastics /// Depending on the latency of your storage, such requests can take an extremely long time to return results. /// These requests can also tax machine resources and, when using cloud storage, incur high processing costs. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatusAsync(Elastic.Clients.Elasticsearch.Name? repository, Elastic.Clients.Elasticsearch.Names? snapshot, Action configureRequest, CancellationToken cancellationToken = default) { @@ -2305,7 +3411,7 @@ public virtual Task StatusAsync(Elastic.Clients.Elastics /// Depending on the latency of your storage, such requests can take an extremely long time to return results. /// These requests can also tax machine resources and, when using cloud storage, incur high processing costs. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatusAsync(CancellationToken cancellationToken = default) { @@ -2330,7 +3436,7 @@ public virtual Task StatusAsync(CancellationToken cancel /// Depending on the latency of your storage, such requests can take an extremely long time to return results. /// These requests can also tax machine resources and, when using cloud storage, incur high processing costs. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task StatusAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -2345,7 +3451,7 @@ public virtual Task StatusAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual VerifyRepositoryResponse VerifyRepository(VerifyRepositoryRequest request) @@ -2359,7 +3465,7 @@ public virtual VerifyRepositoryResponse VerifyRepository(VerifyRepositoryRequest /// Verify a snapshot repository. /// Check for common misconfigurations in a snapshot repository. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task VerifyRepositoryAsync(VerifyRepositoryRequest request, CancellationToken cancellationToken = default) { @@ -2372,7 +3478,7 @@ public virtual Task VerifyRepositoryAsync(VerifyReposi /// Verify a snapshot repository. /// Check for common misconfigurations in a snapshot repository. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual VerifyRepositoryResponse VerifyRepository(VerifyRepositoryRequestDescriptor descriptor) @@ -2386,7 +3492,7 @@ public virtual VerifyRepositoryResponse VerifyRepository(VerifyRepositoryRequest /// Verify a snapshot repository. /// Check for common misconfigurations in a snapshot repository. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual VerifyRepositoryResponse VerifyRepository(Elastic.Clients.Elasticsearch.Name name) @@ -2401,7 +3507,7 @@ public virtual VerifyRepositoryResponse VerifyRepository(Elastic.Clients.Elastic /// Verify a snapshot repository. /// Check for common misconfigurations in a snapshot repository. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual VerifyRepositoryResponse VerifyRepository(Elastic.Clients.Elasticsearch.Name name, Action configureRequest) @@ -2417,7 +3523,7 @@ public virtual VerifyRepositoryResponse VerifyRepository(Elastic.Clients.Elastic /// Verify a snapshot repository. /// Check for common misconfigurations in a snapshot repository. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task VerifyRepositoryAsync(VerifyRepositoryRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -2430,7 +3536,7 @@ public virtual Task VerifyRepositoryAsync(VerifyReposi /// Verify a snapshot repository. /// Check for common misconfigurations in a snapshot repository. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task VerifyRepositoryAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) { @@ -2444,7 +3550,7 @@ public virtual Task VerifyRepositoryAsync(Elastic.Clie /// Verify a snapshot repository. /// Check for common misconfigurations in a snapshot repository. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task VerifyRepositoryAsync(Elastic.Clients.Elasticsearch.Name name, Action configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Sql.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Sql.g.cs index 11a328ffb04..8f72a0423c4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Sql.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Sql.g.cs @@ -43,7 +43,7 @@ internal SqlNamespacedClient(ElasticsearchClient client) : base(client) /// /// Clear an SQL search cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ClearCursorResponse ClearCursor(ClearCursorRequest request) @@ -56,7 +56,7 @@ public virtual ClearCursorResponse ClearCursor(ClearCursorRequest request) /// /// Clear an SQL search cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCursorAsync(ClearCursorRequest request, CancellationToken cancellationToken = default) { @@ -68,7 +68,7 @@ public virtual Task ClearCursorAsync(ClearCursorRequest req /// /// Clear an SQL search cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ClearCursorResponse ClearCursor(ClearCursorRequestDescriptor descriptor) @@ -81,7 +81,7 @@ public virtual ClearCursorResponse ClearCursor(ClearCursorRequestDescriptor desc /// /// Clear an SQL search cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ClearCursorResponse ClearCursor() @@ -95,7 +95,7 @@ public virtual ClearCursorResponse ClearCursor() /// /// Clear an SQL search cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual ClearCursorResponse ClearCursor(Action configureRequest) @@ -110,7 +110,7 @@ public virtual ClearCursorResponse ClearCursor(Action /// Clear an SQL search cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCursorAsync(ClearCursorRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -122,7 +122,7 @@ public virtual Task ClearCursorAsync(ClearCursorRequestDesc /// /// Clear an SQL search cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCursorAsync(CancellationToken cancellationToken = default) { @@ -135,7 +135,7 @@ public virtual Task ClearCursorAsync(CancellationToken canc /// /// Clear an SQL search cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ClearCursorAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -151,7 +151,22 @@ public virtual Task ClearCursorAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the following users can use this API to delete a search: + /// + /// + /// + /// + /// Users with the cancel_task cluster privilege. + /// + /// + /// + /// + /// The user who first submitted the search. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteAsyncResponse DeleteAsync(DeleteAsyncRequest request) @@ -166,7 +181,22 @@ public virtual DeleteAsyncResponse DeleteAsync(DeleteAsyncRequest request) /// Delete an async SQL search or a stored synchronous SQL search. /// If the search is still running, the API cancels it. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the following users can use this API to delete a search: + /// + /// + /// + /// + /// Users with the cancel_task cluster privilege. + /// + /// + /// + /// + /// The user who first submitted the search. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsyncAsync(DeleteAsyncRequest request, CancellationToken cancellationToken = default) { @@ -180,7 +210,22 @@ public virtual Task DeleteAsyncAsync(DeleteAsyncRequest req /// Delete an async SQL search or a stored synchronous SQL search. /// If the search is still running, the API cancels it. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the following users can use this API to delete a search: + /// + /// + /// + /// + /// Users with the cancel_task cluster privilege. + /// + /// + /// + /// + /// The user who first submitted the search. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteAsyncResponse DeleteAsync(DeleteAsyncRequestDescriptor descriptor) @@ -195,7 +240,22 @@ public virtual DeleteAsyncResponse DeleteAsync(DeleteAsyncRequestDesc /// Delete an async SQL search or a stored synchronous SQL search. /// If the search is still running, the API cancels it. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the following users can use this API to delete a search: + /// + /// + /// + /// + /// Users with the cancel_task cluster privilege. + /// + /// + /// + /// + /// The user who first submitted the search. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteAsyncResponse DeleteAsync(Elastic.Clients.Elasticsearch.Id id) @@ -211,7 +271,22 @@ public virtual DeleteAsyncResponse DeleteAsync(Elastic.Clients.Elasti /// Delete an async SQL search or a stored synchronous SQL search. /// If the search is still running, the API cancels it. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the following users can use this API to delete a search: + /// + /// + /// + /// + /// Users with the cancel_task cluster privilege. + /// + /// + /// + /// + /// The user who first submitted the search. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteAsyncResponse DeleteAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) @@ -228,7 +303,22 @@ public virtual DeleteAsyncResponse DeleteAsync(Elastic.Clients.Elasti /// Delete an async SQL search or a stored synchronous SQL search. /// If the search is still running, the API cancels it. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the following users can use this API to delete a search: + /// + /// + /// + /// + /// Users with the cancel_task cluster privilege. + /// + /// + /// + /// + /// The user who first submitted the search. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteAsyncResponse DeleteAsync(DeleteAsyncRequestDescriptor descriptor) @@ -243,7 +333,22 @@ public virtual DeleteAsyncResponse DeleteAsync(DeleteAsyncRequestDescriptor desc /// Delete an async SQL search or a stored synchronous SQL search. /// If the search is still running, the API cancels it. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the following users can use this API to delete a search: + /// + /// + /// + /// + /// Users with the cancel_task cluster privilege. + /// + /// + /// + /// + /// The user who first submitted the search. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteAsyncResponse DeleteAsync(Elastic.Clients.Elasticsearch.Id id) @@ -259,7 +364,22 @@ public virtual DeleteAsyncResponse DeleteAsync(Elastic.Clients.Elasticsearch.Id /// Delete an async SQL search or a stored synchronous SQL search. /// If the search is still running, the API cancels it. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the following users can use this API to delete a search: + /// + /// + /// + /// + /// Users with the cancel_task cluster privilege. + /// + /// + /// + /// + /// The user who first submitted the search. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteAsyncResponse DeleteAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) @@ -276,7 +396,22 @@ public virtual DeleteAsyncResponse DeleteAsync(Elastic.Clients.Elasticsearch.Id /// Delete an async SQL search or a stored synchronous SQL search. /// If the search is still running, the API cancels it. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the following users can use this API to delete a search: + /// + /// + /// + /// + /// Users with the cancel_task cluster privilege. + /// + /// + /// + /// + /// The user who first submitted the search. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsyncAsync(DeleteAsyncRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -290,7 +425,22 @@ public virtual Task DeleteAsyncAsync(DeleteAsync /// Delete an async SQL search or a stored synchronous SQL search. /// If the search is still running, the API cancels it. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the following users can use this API to delete a search: + /// + /// + /// + /// + /// Users with the cancel_task cluster privilege. + /// + /// + /// + /// + /// The user who first submitted the search. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsyncAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -305,7 +455,22 @@ public virtual Task DeleteAsyncAsync(Elastic.Cli /// Delete an async SQL search or a stored synchronous SQL search. /// If the search is still running, the API cancels it. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the following users can use this API to delete a search: + /// + /// + /// + /// + /// Users with the cancel_task cluster privilege. + /// + /// + /// + /// + /// The user who first submitted the search. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsyncAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -321,7 +486,22 @@ public virtual Task DeleteAsyncAsync(Elastic.Cli /// Delete an async SQL search or a stored synchronous SQL search. /// If the search is still running, the API cancels it. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the following users can use this API to delete a search: + /// + /// + /// + /// + /// Users with the cancel_task cluster privilege. + /// + /// + /// + /// + /// The user who first submitted the search. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsyncAsync(DeleteAsyncRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -335,7 +515,22 @@ public virtual Task DeleteAsyncAsync(DeleteAsyncRequestDesc /// Delete an async SQL search or a stored synchronous SQL search. /// If the search is still running, the API cancels it. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the following users can use this API to delete a search: + /// + /// + /// + /// + /// Users with the cancel_task cluster privilege. + /// + /// + /// + /// + /// The user who first submitted the search. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsyncAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -350,7 +545,22 @@ public virtual Task DeleteAsyncAsync(Elastic.Clients.Elasti /// Delete an async SQL search or a stored synchronous SQL search. /// If the search is still running, the API cancels it. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the following users can use this API to delete a search: + /// + /// + /// + /// + /// Users with the cancel_task cluster privilege. + /// + /// + /// + /// + /// The user who first submitted the search. + /// + /// + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteAsyncAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -365,7 +575,10 @@ public virtual Task DeleteAsyncAsync(Elastic.Clients.Elasti /// Get async SQL search results. /// Get the current status and available results for an async SQL search or stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAsyncResponse GetAsync(GetAsyncRequest request) @@ -379,7 +592,10 @@ public virtual GetAsyncResponse GetAsync(GetAsyncRequest request) /// Get async SQL search results. /// Get the current status and available results for an async SQL search or stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsyncAsync(GetAsyncRequest request, CancellationToken cancellationToken = default) { @@ -392,7 +608,10 @@ public virtual Task GetAsyncAsync(GetAsyncRequest request, Can /// Get async SQL search results. /// Get the current status and available results for an async SQL search or stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAsyncResponse GetAsync(GetAsyncRequestDescriptor descriptor) @@ -406,7 +625,10 @@ public virtual GetAsyncResponse GetAsync(GetAsyncRequestDescriptor - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAsyncResponse GetAsync(Elastic.Clients.Elasticsearch.Id id) @@ -421,7 +643,10 @@ public virtual GetAsyncResponse GetAsync(Elastic.Clients.Elasticsearc /// Get async SQL search results. /// Get the current status and available results for an async SQL search or stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAsyncResponse GetAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) @@ -437,7 +662,10 @@ public virtual GetAsyncResponse GetAsync(Elastic.Clients.Elasticsearc /// Get async SQL search results. /// Get the current status and available results for an async SQL search or stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAsyncResponse GetAsync(GetAsyncRequestDescriptor descriptor) @@ -451,7 +679,10 @@ public virtual GetAsyncResponse GetAsync(GetAsyncRequestDescriptor descriptor) /// Get async SQL search results. /// Get the current status and available results for an async SQL search or stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAsyncResponse GetAsync(Elastic.Clients.Elasticsearch.Id id) @@ -466,7 +697,10 @@ public virtual GetAsyncResponse GetAsync(Elastic.Clients.Elasticsearch.Id id) /// Get async SQL search results. /// Get the current status and available results for an async SQL search or stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAsyncResponse GetAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) @@ -482,7 +716,10 @@ public virtual GetAsyncResponse GetAsync(Elastic.Clients.Elasticsearch.Id id, Ac /// Get async SQL search results. /// Get the current status and available results for an async SQL search or stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsyncAsync(GetAsyncRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -495,7 +732,10 @@ public virtual Task GetAsyncAsync(GetAsyncRequestDe /// Get async SQL search results. /// Get the current status and available results for an async SQL search or stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsyncAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -509,7 +749,10 @@ public virtual Task GetAsyncAsync(Elastic.Clients.E /// Get async SQL search results. /// Get the current status and available results for an async SQL search or stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsyncAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -524,7 +767,10 @@ public virtual Task GetAsyncAsync(Elastic.Clients.E /// Get async SQL search results. /// Get the current status and available results for an async SQL search or stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsyncAsync(GetAsyncRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -537,7 +783,10 @@ public virtual Task GetAsyncAsync(GetAsyncRequestDescriptor de /// Get async SQL search results. /// Get the current status and available results for an async SQL search or stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsyncAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -551,7 +800,10 @@ public virtual Task GetAsyncAsync(Elastic.Clients.Elasticsearc /// Get async SQL search results. /// Get the current status and available results for an async SQL search or stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsyncAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -566,7 +818,7 @@ public virtual Task GetAsyncAsync(Elastic.Clients.Elasticsearc /// Get the async SQL search status. /// Get the current status of an async SQL search or a stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAsyncStatusResponse GetAsyncStatus(GetAsyncStatusRequest request) @@ -580,7 +832,7 @@ public virtual GetAsyncStatusResponse GetAsyncStatus(GetAsyncStatusRequest reque /// Get the async SQL search status. /// Get the current status of an async SQL search or a stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsyncStatusAsync(GetAsyncStatusRequest request, CancellationToken cancellationToken = default) { @@ -593,7 +845,7 @@ public virtual Task GetAsyncStatusAsync(GetAsyncStatusRe /// Get the async SQL search status. /// Get the current status of an async SQL search or a stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAsyncStatusResponse GetAsyncStatus(GetAsyncStatusRequestDescriptor descriptor) @@ -607,7 +859,7 @@ public virtual GetAsyncStatusResponse GetAsyncStatus(GetAsyncStatusRe /// Get the async SQL search status. /// Get the current status of an async SQL search or a stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAsyncStatusResponse GetAsyncStatus(Elastic.Clients.Elasticsearch.Id id) @@ -622,7 +874,7 @@ public virtual GetAsyncStatusResponse GetAsyncStatus(Elastic.Clients. /// Get the async SQL search status. /// Get the current status of an async SQL search or a stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAsyncStatusResponse GetAsyncStatus(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) @@ -638,7 +890,7 @@ public virtual GetAsyncStatusResponse GetAsyncStatus(Elastic.Clients. /// Get the async SQL search status. /// Get the current status of an async SQL search or a stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAsyncStatusResponse GetAsyncStatus(GetAsyncStatusRequestDescriptor descriptor) @@ -652,7 +904,7 @@ public virtual GetAsyncStatusResponse GetAsyncStatus(GetAsyncStatusRequestDescri /// Get the async SQL search status. /// Get the current status of an async SQL search or a stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAsyncStatusResponse GetAsyncStatus(Elastic.Clients.Elasticsearch.Id id) @@ -667,7 +919,7 @@ public virtual GetAsyncStatusResponse GetAsyncStatus(Elastic.Clients.Elasticsear /// Get the async SQL search status. /// Get the current status of an async SQL search or a stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetAsyncStatusResponse GetAsyncStatus(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) @@ -683,7 +935,7 @@ public virtual GetAsyncStatusResponse GetAsyncStatus(Elastic.Clients.Elasticsear /// Get the async SQL search status. /// Get the current status of an async SQL search or a stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsyncStatusAsync(GetAsyncStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -696,7 +948,7 @@ public virtual Task GetAsyncStatusAsync(GetAs /// Get the async SQL search status. /// Get the current status of an async SQL search or a stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsyncStatusAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -710,7 +962,7 @@ public virtual Task GetAsyncStatusAsync(Elast /// Get the async SQL search status. /// Get the current status of an async SQL search or a stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsyncStatusAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -725,7 +977,7 @@ public virtual Task GetAsyncStatusAsync(Elast /// Get the async SQL search status. /// Get the current status of an async SQL search or a stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsyncStatusAsync(GetAsyncStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -738,7 +990,7 @@ public virtual Task GetAsyncStatusAsync(GetAsyncStatusRe /// Get the async SQL search status. /// Get the current status of an async SQL search or a stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsyncStatusAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -752,7 +1004,7 @@ public virtual Task GetAsyncStatusAsync(Elastic.Clients. /// Get the async SQL search status. /// Get the current status of an async SQL search or a stored synchronous SQL search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsyncStatusAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -767,7 +1019,7 @@ public virtual Task GetAsyncStatusAsync(Elastic.Clients. /// Get SQL search results. /// Run an SQL request. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual QueryResponse Query(QueryRequest request) @@ -781,7 +1033,7 @@ public virtual QueryResponse Query(QueryRequest request) /// Get SQL search results. /// Run an SQL request. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task QueryAsync(QueryRequest request, CancellationToken cancellationToken = default) { @@ -794,7 +1046,7 @@ public virtual Task QueryAsync(QueryRequest request, Cancellation /// Get SQL search results. /// Run an SQL request. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual QueryResponse Query(QueryRequestDescriptor descriptor) @@ -808,7 +1060,7 @@ public virtual QueryResponse Query(QueryRequestDescriptor /// Get SQL search results. /// Run an SQL request. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual QueryResponse Query() @@ -823,7 +1075,7 @@ public virtual QueryResponse Query() /// Get SQL search results. /// Run an SQL request. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual QueryResponse Query(Action> configureRequest) @@ -839,7 +1091,7 @@ public virtual QueryResponse Query(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual QueryResponse Query(QueryRequestDescriptor descriptor) @@ -853,7 +1105,7 @@ public virtual QueryResponse Query(QueryRequestDescriptor descriptor) /// Get SQL search results. /// Run an SQL request. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual QueryResponse Query() @@ -868,7 +1120,7 @@ public virtual QueryResponse Query() /// Get SQL search results. /// Run an SQL request. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual QueryResponse Query(Action configureRequest) @@ -884,7 +1136,7 @@ public virtual QueryResponse Query(Action configureReque /// Get SQL search results. /// Run an SQL request. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task QueryAsync(QueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -897,7 +1149,7 @@ public virtual Task QueryAsync(QueryRequestDescriptor< /// Get SQL search results. /// Run an SQL request. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task QueryAsync(CancellationToken cancellationToken = default) { @@ -911,7 +1163,7 @@ public virtual Task QueryAsync(CancellationToken cance /// Get SQL search results. /// Run an SQL request. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task QueryAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -926,7 +1178,7 @@ public virtual Task QueryAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task QueryAsync(QueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -939,7 +1191,7 @@ public virtual Task QueryAsync(QueryRequestDescriptor descriptor, /// Get SQL search results. /// Run an SQL request. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task QueryAsync(CancellationToken cancellationToken = default) { @@ -953,7 +1205,7 @@ public virtual Task QueryAsync(CancellationToken cancellationToke /// Get SQL search results. /// Run an SQL request. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task QueryAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -967,8 +1219,9 @@ public virtual Task QueryAsync(Action con /// /// Translate SQL into Elasticsearch queries. /// Translate an SQL search into a search API request containing Query DSL. + /// It accepts the same request body parameters as the SQL search API, excluding cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual TranslateResponse Translate(TranslateRequest request) @@ -981,8 +1234,9 @@ public virtual TranslateResponse Translate(TranslateRequest request) /// /// Translate SQL into Elasticsearch queries. /// Translate an SQL search into a search API request containing Query DSL. + /// It accepts the same request body parameters as the SQL search API, excluding cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task TranslateAsync(TranslateRequest request, CancellationToken cancellationToken = default) { @@ -994,8 +1248,9 @@ public virtual Task TranslateAsync(TranslateRequest request, /// /// Translate SQL into Elasticsearch queries. /// Translate an SQL search into a search API request containing Query DSL. + /// It accepts the same request body parameters as the SQL search API, excluding cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual TranslateResponse Translate(TranslateRequestDescriptor descriptor) @@ -1008,8 +1263,9 @@ public virtual TranslateResponse Translate(TranslateRequestDescriptor /// /// Translate SQL into Elasticsearch queries. /// Translate an SQL search into a search API request containing Query DSL. + /// It accepts the same request body parameters as the SQL search API, excluding cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual TranslateResponse Translate() @@ -1023,8 +1279,9 @@ public virtual TranslateResponse Translate() /// /// Translate SQL into Elasticsearch queries. /// Translate an SQL search into a search API request containing Query DSL. + /// It accepts the same request body parameters as the SQL search API, excluding cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual TranslateResponse Translate(Action> configureRequest) @@ -1039,8 +1296,9 @@ public virtual TranslateResponse Translate(Action /// Translate SQL into Elasticsearch queries. /// Translate an SQL search into a search API request containing Query DSL. + /// It accepts the same request body parameters as the SQL search API, excluding cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual TranslateResponse Translate(TranslateRequestDescriptor descriptor) @@ -1053,8 +1311,9 @@ public virtual TranslateResponse Translate(TranslateRequestDescriptor descriptor /// /// Translate SQL into Elasticsearch queries. /// Translate an SQL search into a search API request containing Query DSL. + /// It accepts the same request body parameters as the SQL search API, excluding cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual TranslateResponse Translate() @@ -1068,8 +1327,9 @@ public virtual TranslateResponse Translate() /// /// Translate SQL into Elasticsearch queries. /// Translate an SQL search into a search API request containing Query DSL. + /// It accepts the same request body parameters as the SQL search API, excluding cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual TranslateResponse Translate(Action configureRequest) @@ -1084,8 +1344,9 @@ public virtual TranslateResponse Translate(Action co /// /// Translate SQL into Elasticsearch queries. /// Translate an SQL search into a search API request containing Query DSL. + /// It accepts the same request body parameters as the SQL search API, excluding cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task TranslateAsync(TranslateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1097,8 +1358,9 @@ public virtual Task TranslateAsync(TranslateReques /// /// Translate SQL into Elasticsearch queries. /// Translate an SQL search into a search API request containing Query DSL. + /// It accepts the same request body parameters as the SQL search API, excluding cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task TranslateAsync(CancellationToken cancellationToken = default) { @@ -1111,8 +1373,9 @@ public virtual Task TranslateAsync(CancellationTok /// /// Translate SQL into Elasticsearch queries. /// Translate an SQL search into a search API request containing Query DSL. + /// It accepts the same request body parameters as the SQL search API, excluding cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task TranslateAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -1126,8 +1389,9 @@ public virtual Task TranslateAsync(Action /// Translate SQL into Elasticsearch queries. /// Translate an SQL search into a search API request containing Query DSL. + /// It accepts the same request body parameters as the SQL search API, excluding cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task TranslateAsync(TranslateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1139,8 +1403,9 @@ public virtual Task TranslateAsync(TranslateRequestDescriptor /// /// Translate SQL into Elasticsearch queries. /// Translate an SQL search into a search API request containing Query DSL. + /// It accepts the same request body parameters as the SQL search API, excluding cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task TranslateAsync(CancellationToken cancellationToken = default) { @@ -1153,8 +1418,9 @@ public virtual Task TranslateAsync(CancellationToken cancella /// /// Translate SQL into Elasticsearch queries. /// Translate an SQL search into a search API request containing Query DSL. + /// It accepts the same request body parameters as the SQL search API, excluding cursor. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task TranslateAsync(Action configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Synonyms.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Synonyms.g.cs index 8f7ca764fe7..09db9e200fc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Synonyms.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Synonyms.g.cs @@ -43,7 +43,29 @@ internal SynonymsNamespacedClient(ElasticsearchClient client) : base(client) /// /// Delete a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// You can only delete a synonyms set that is not in use by any index analyzer. + /// + /// + /// Synonyms sets can be used in synonym graph token filters and synonym token filters. + /// These synonym filters can be used as part of search analyzers. + /// + /// + /// Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open). + /// Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase. + /// + /// + /// If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available. + /// To prevent that, synonyms sets that are used in analyzers can't be deleted. + /// A delete request in this case will return a 400 response code. + /// + /// + /// To remove a synonyms set, you must first remove all indices that contain analyzers using it. + /// You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data. + /// Once finished, you can delete the index. + /// When the synonyms set is not used in analyzers, you will be able to delete it. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteSynonymResponse DeleteSynonym(DeleteSynonymRequest request) @@ -56,7 +78,29 @@ public virtual DeleteSynonymResponse DeleteSynonym(DeleteSynonymRequest request) /// /// Delete a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// You can only delete a synonyms set that is not in use by any index analyzer. + /// + /// + /// Synonyms sets can be used in synonym graph token filters and synonym token filters. + /// These synonym filters can be used as part of search analyzers. + /// + /// + /// Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open). + /// Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase. + /// + /// + /// If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available. + /// To prevent that, synonyms sets that are used in analyzers can't be deleted. + /// A delete request in this case will return a 400 response code. + /// + /// + /// To remove a synonyms set, you must first remove all indices that contain analyzers using it. + /// You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data. + /// Once finished, you can delete the index. + /// When the synonyms set is not used in analyzers, you will be able to delete it. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteSynonymAsync(DeleteSynonymRequest request, CancellationToken cancellationToken = default) { @@ -68,7 +112,29 @@ public virtual Task DeleteSynonymAsync(DeleteSynonymReque /// /// Delete a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// You can only delete a synonyms set that is not in use by any index analyzer. + /// + /// + /// Synonyms sets can be used in synonym graph token filters and synonym token filters. + /// These synonym filters can be used as part of search analyzers. + /// + /// + /// Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open). + /// Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase. + /// + /// + /// If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available. + /// To prevent that, synonyms sets that are used in analyzers can't be deleted. + /// A delete request in this case will return a 400 response code. + /// + /// + /// To remove a synonyms set, you must first remove all indices that contain analyzers using it. + /// You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data. + /// Once finished, you can delete the index. + /// When the synonyms set is not used in analyzers, you will be able to delete it. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteSynonymResponse DeleteSynonym(DeleteSynonymRequestDescriptor descriptor) @@ -81,7 +147,29 @@ public virtual DeleteSynonymResponse DeleteSynonym(DeleteSynonymReque /// /// Delete a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// You can only delete a synonyms set that is not in use by any index analyzer. + /// + /// + /// Synonyms sets can be used in synonym graph token filters and synonym token filters. + /// These synonym filters can be used as part of search analyzers. + /// + /// + /// Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open). + /// Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase. + /// + /// + /// If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available. + /// To prevent that, synonyms sets that are used in analyzers can't be deleted. + /// A delete request in this case will return a 400 response code. + /// + /// + /// To remove a synonyms set, you must first remove all indices that contain analyzers using it. + /// You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data. + /// Once finished, you can delete the index. + /// When the synonyms set is not used in analyzers, you will be able to delete it. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteSynonymResponse DeleteSynonym(Elastic.Clients.Elasticsearch.Id id) @@ -95,7 +183,29 @@ public virtual DeleteSynonymResponse DeleteSynonym(Elastic.Clients.El /// /// Delete a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// You can only delete a synonyms set that is not in use by any index analyzer. + /// + /// + /// Synonyms sets can be used in synonym graph token filters and synonym token filters. + /// These synonym filters can be used as part of search analyzers. + /// + /// + /// Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open). + /// Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase. + /// + /// + /// If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available. + /// To prevent that, synonyms sets that are used in analyzers can't be deleted. + /// A delete request in this case will return a 400 response code. + /// + /// + /// To remove a synonyms set, you must first remove all indices that contain analyzers using it. + /// You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data. + /// Once finished, you can delete the index. + /// When the synonyms set is not used in analyzers, you will be able to delete it. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteSynonymResponse DeleteSynonym(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) @@ -110,7 +220,29 @@ public virtual DeleteSynonymResponse DeleteSynonym(Elastic.Clients.El /// /// Delete a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// You can only delete a synonyms set that is not in use by any index analyzer. + /// + /// + /// Synonyms sets can be used in synonym graph token filters and synonym token filters. + /// These synonym filters can be used as part of search analyzers. + /// + /// + /// Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open). + /// Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase. + /// + /// + /// If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available. + /// To prevent that, synonyms sets that are used in analyzers can't be deleted. + /// A delete request in this case will return a 400 response code. + /// + /// + /// To remove a synonyms set, you must first remove all indices that contain analyzers using it. + /// You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data. + /// Once finished, you can delete the index. + /// When the synonyms set is not used in analyzers, you will be able to delete it. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteSynonymResponse DeleteSynonym(DeleteSynonymRequestDescriptor descriptor) @@ -123,7 +255,29 @@ public virtual DeleteSynonymResponse DeleteSynonym(DeleteSynonymRequestDescripto /// /// Delete a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// You can only delete a synonyms set that is not in use by any index analyzer. + /// + /// + /// Synonyms sets can be used in synonym graph token filters and synonym token filters. + /// These synonym filters can be used as part of search analyzers. + /// + /// + /// Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open). + /// Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase. + /// + /// + /// If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available. + /// To prevent that, synonyms sets that are used in analyzers can't be deleted. + /// A delete request in this case will return a 400 response code. + /// + /// + /// To remove a synonyms set, you must first remove all indices that contain analyzers using it. + /// You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data. + /// Once finished, you can delete the index. + /// When the synonyms set is not used in analyzers, you will be able to delete it. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteSynonymResponse DeleteSynonym(Elastic.Clients.Elasticsearch.Id id) @@ -137,7 +291,29 @@ public virtual DeleteSynonymResponse DeleteSynonym(Elastic.Clients.Elasticsearch /// /// Delete a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// You can only delete a synonyms set that is not in use by any index analyzer. + /// + /// + /// Synonyms sets can be used in synonym graph token filters and synonym token filters. + /// These synonym filters can be used as part of search analyzers. + /// + /// + /// Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open). + /// Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase. + /// + /// + /// If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available. + /// To prevent that, synonyms sets that are used in analyzers can't be deleted. + /// A delete request in this case will return a 400 response code. + /// + /// + /// To remove a synonyms set, you must first remove all indices that contain analyzers using it. + /// You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data. + /// Once finished, you can delete the index. + /// When the synonyms set is not used in analyzers, you will be able to delete it. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteSynonymResponse DeleteSynonym(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) @@ -152,7 +328,29 @@ public virtual DeleteSynonymResponse DeleteSynonym(Elastic.Clients.Elasticsearch /// /// Delete a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// You can only delete a synonyms set that is not in use by any index analyzer. + /// + /// + /// Synonyms sets can be used in synonym graph token filters and synonym token filters. + /// These synonym filters can be used as part of search analyzers. + /// + /// + /// Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open). + /// Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase. + /// + /// + /// If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available. + /// To prevent that, synonyms sets that are used in analyzers can't be deleted. + /// A delete request in this case will return a 400 response code. + /// + /// + /// To remove a synonyms set, you must first remove all indices that contain analyzers using it. + /// You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data. + /// Once finished, you can delete the index. + /// When the synonyms set is not used in analyzers, you will be able to delete it. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteSynonymAsync(DeleteSynonymRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -164,7 +362,29 @@ public virtual Task DeleteSynonymAsync(DeleteS /// /// Delete a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// You can only delete a synonyms set that is not in use by any index analyzer. + /// + /// + /// Synonyms sets can be used in synonym graph token filters and synonym token filters. + /// These synonym filters can be used as part of search analyzers. + /// + /// + /// Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open). + /// Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase. + /// + /// + /// If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available. + /// To prevent that, synonyms sets that are used in analyzers can't be deleted. + /// A delete request in this case will return a 400 response code. + /// + /// + /// To remove a synonyms set, you must first remove all indices that contain analyzers using it. + /// You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data. + /// Once finished, you can delete the index. + /// When the synonyms set is not used in analyzers, you will be able to delete it. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteSynonymAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -177,7 +397,29 @@ public virtual Task DeleteSynonymAsync(Elastic /// /// Delete a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// You can only delete a synonyms set that is not in use by any index analyzer. + /// + /// + /// Synonyms sets can be used in synonym graph token filters and synonym token filters. + /// These synonym filters can be used as part of search analyzers. + /// + /// + /// Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open). + /// Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase. + /// + /// + /// If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available. + /// To prevent that, synonyms sets that are used in analyzers can't be deleted. + /// A delete request in this case will return a 400 response code. + /// + /// + /// To remove a synonyms set, you must first remove all indices that contain analyzers using it. + /// You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data. + /// Once finished, you can delete the index. + /// When the synonyms set is not used in analyzers, you will be able to delete it. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteSynonymAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -191,7 +433,29 @@ public virtual Task DeleteSynonymAsync(Elastic /// /// Delete a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// You can only delete a synonyms set that is not in use by any index analyzer. + /// + /// + /// Synonyms sets can be used in synonym graph token filters and synonym token filters. + /// These synonym filters can be used as part of search analyzers. + /// + /// + /// Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open). + /// Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase. + /// + /// + /// If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available. + /// To prevent that, synonyms sets that are used in analyzers can't be deleted. + /// A delete request in this case will return a 400 response code. + /// + /// + /// To remove a synonyms set, you must first remove all indices that contain analyzers using it. + /// You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data. + /// Once finished, you can delete the index. + /// When the synonyms set is not used in analyzers, you will be able to delete it. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteSynonymAsync(DeleteSynonymRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -203,7 +467,29 @@ public virtual Task DeleteSynonymAsync(DeleteSynonymReque /// /// Delete a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// You can only delete a synonyms set that is not in use by any index analyzer. + /// + /// + /// Synonyms sets can be used in synonym graph token filters and synonym token filters. + /// These synonym filters can be used as part of search analyzers. + /// + /// + /// Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open). + /// Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase. + /// + /// + /// If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available. + /// To prevent that, synonyms sets that are used in analyzers can't be deleted. + /// A delete request in this case will return a 400 response code. + /// + /// + /// To remove a synonyms set, you must first remove all indices that contain analyzers using it. + /// You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data. + /// Once finished, you can delete the index. + /// When the synonyms set is not used in analyzers, you will be able to delete it. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteSynonymAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -216,7 +502,29 @@ public virtual Task DeleteSynonymAsync(Elastic.Clients.El /// /// Delete a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// You can only delete a synonyms set that is not in use by any index analyzer. + /// + /// + /// Synonyms sets can be used in synonym graph token filters and synonym token filters. + /// These synonym filters can be used as part of search analyzers. + /// + /// + /// Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open). + /// Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase. + /// + /// + /// If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available. + /// To prevent that, synonyms sets that are used in analyzers can't be deleted. + /// A delete request in this case will return a 400 response code. + /// + /// + /// To remove a synonyms set, you must first remove all indices that contain analyzers using it. + /// You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data. + /// Once finished, you can delete the index. + /// When the synonyms set is not used in analyzers, you will be able to delete it. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteSynonymAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -231,7 +539,7 @@ public virtual Task DeleteSynonymAsync(Elastic.Clients.El /// Delete a synonym rule. /// Delete a synonym rule from a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteSynonymRuleResponse DeleteSynonymRule(DeleteSynonymRuleRequest request) @@ -245,7 +553,7 @@ public virtual DeleteSynonymRuleResponse DeleteSynonymRule(DeleteSynonymRuleRequ /// Delete a synonym rule. /// Delete a synonym rule from a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteSynonymRuleAsync(DeleteSynonymRuleRequest request, CancellationToken cancellationToken = default) { @@ -258,7 +566,7 @@ public virtual Task DeleteSynonymRuleAsync(DeleteSyno /// Delete a synonym rule. /// Delete a synonym rule from a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteSynonymRuleResponse DeleteSynonymRule(DeleteSynonymRuleRequestDescriptor descriptor) @@ -272,7 +580,7 @@ public virtual DeleteSynonymRuleResponse DeleteSynonymRule(DeleteSynonymRuleRequ /// Delete a synonym rule. /// Delete a synonym rule from a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteSynonymRuleResponse DeleteSynonymRule(Elastic.Clients.Elasticsearch.Id setId, Elastic.Clients.Elasticsearch.Id ruleId) @@ -287,7 +595,7 @@ public virtual DeleteSynonymRuleResponse DeleteSynonymRule(Elastic.Clients.Elast /// Delete a synonym rule. /// Delete a synonym rule from a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual DeleteSynonymRuleResponse DeleteSynonymRule(Elastic.Clients.Elasticsearch.Id setId, Elastic.Clients.Elasticsearch.Id ruleId, Action configureRequest) @@ -303,7 +611,7 @@ public virtual DeleteSynonymRuleResponse DeleteSynonymRule(Elastic.Clients.Elast /// Delete a synonym rule. /// Delete a synonym rule from a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteSynonymRuleAsync(DeleteSynonymRuleRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -316,7 +624,7 @@ public virtual Task DeleteSynonymRuleAsync(DeleteSyno /// Delete a synonym rule. /// Delete a synonym rule from a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteSynonymRuleAsync(Elastic.Clients.Elasticsearch.Id setId, Elastic.Clients.Elasticsearch.Id ruleId, CancellationToken cancellationToken = default) { @@ -330,7 +638,7 @@ public virtual Task DeleteSynonymRuleAsync(Elastic.Cl /// Delete a synonym rule. /// Delete a synonym rule from a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task DeleteSynonymRuleAsync(Elastic.Clients.Elasticsearch.Id setId, Elastic.Clients.Elasticsearch.Id ruleId, Action configureRequest, CancellationToken cancellationToken = default) { @@ -344,7 +652,7 @@ public virtual Task DeleteSynonymRuleAsync(Elastic.Cl /// /// Get a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSynonymResponse GetSynonym(GetSynonymRequest request) @@ -357,7 +665,7 @@ public virtual GetSynonymResponse GetSynonym(GetSynonymRequest request) /// /// Get a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSynonymAsync(GetSynonymRequest request, CancellationToken cancellationToken = default) { @@ -369,7 +677,7 @@ public virtual Task GetSynonymAsync(GetSynonymRequest reques /// /// Get a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSynonymResponse GetSynonym(GetSynonymRequestDescriptor descriptor) @@ -382,7 +690,7 @@ public virtual GetSynonymResponse GetSynonym(GetSynonymRequestDescrip /// /// Get a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSynonymResponse GetSynonym(Elastic.Clients.Elasticsearch.Id id) @@ -396,7 +704,7 @@ public virtual GetSynonymResponse GetSynonym(Elastic.Clients.Elastics /// /// Get a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSynonymResponse GetSynonym(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) @@ -411,7 +719,7 @@ public virtual GetSynonymResponse GetSynonym(Elastic.Clients.Elastics /// /// Get a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSynonymResponse GetSynonym(GetSynonymRequestDescriptor descriptor) @@ -424,7 +732,7 @@ public virtual GetSynonymResponse GetSynonym(GetSynonymRequestDescriptor descrip /// /// Get a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSynonymResponse GetSynonym(Elastic.Clients.Elasticsearch.Id id) @@ -438,7 +746,7 @@ public virtual GetSynonymResponse GetSynonym(Elastic.Clients.Elasticsearch.Id id /// /// Get a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSynonymResponse GetSynonym(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) @@ -453,7 +761,7 @@ public virtual GetSynonymResponse GetSynonym(Elastic.Clients.Elasticsearch.Id id /// /// Get a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSynonymAsync(GetSynonymRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -465,7 +773,7 @@ public virtual Task GetSynonymAsync(GetSynonymReq /// /// Get a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSynonymAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -478,7 +786,7 @@ public virtual Task GetSynonymAsync(Elastic.Clien /// /// Get a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSynonymAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -492,7 +800,7 @@ public virtual Task GetSynonymAsync(Elastic.Clien /// /// Get a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSynonymAsync(GetSynonymRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -504,7 +812,7 @@ public virtual Task GetSynonymAsync(GetSynonymRequestDescrip /// /// Get a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSynonymAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -517,7 +825,7 @@ public virtual Task GetSynonymAsync(Elastic.Clients.Elastics /// /// Get a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSynonymAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -532,7 +840,7 @@ public virtual Task GetSynonymAsync(Elastic.Clients.Elastics /// Get a synonym rule. /// Get a synonym rule from a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSynonymRuleResponse GetSynonymRule(GetSynonymRuleRequest request) @@ -546,7 +854,7 @@ public virtual GetSynonymRuleResponse GetSynonymRule(GetSynonymRuleRequest reque /// Get a synonym rule. /// Get a synonym rule from a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSynonymRuleAsync(GetSynonymRuleRequest request, CancellationToken cancellationToken = default) { @@ -559,7 +867,7 @@ public virtual Task GetSynonymRuleAsync(GetSynonymRuleRe /// Get a synonym rule. /// Get a synonym rule from a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSynonymRuleResponse GetSynonymRule(GetSynonymRuleRequestDescriptor descriptor) @@ -573,7 +881,7 @@ public virtual GetSynonymRuleResponse GetSynonymRule(GetSynonymRuleRequestDescri /// Get a synonym rule. /// Get a synonym rule from a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSynonymRuleResponse GetSynonymRule(Elastic.Clients.Elasticsearch.Id setId, Elastic.Clients.Elasticsearch.Id ruleId) @@ -588,7 +896,7 @@ public virtual GetSynonymRuleResponse GetSynonymRule(Elastic.Clients.Elasticsear /// Get a synonym rule. /// Get a synonym rule from a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSynonymRuleResponse GetSynonymRule(Elastic.Clients.Elasticsearch.Id setId, Elastic.Clients.Elasticsearch.Id ruleId, Action configureRequest) @@ -604,7 +912,7 @@ public virtual GetSynonymRuleResponse GetSynonymRule(Elastic.Clients.Elasticsear /// Get a synonym rule. /// Get a synonym rule from a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSynonymRuleAsync(GetSynonymRuleRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -617,7 +925,7 @@ public virtual Task GetSynonymRuleAsync(GetSynonymRuleRe /// Get a synonym rule. /// Get a synonym rule from a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSynonymRuleAsync(Elastic.Clients.Elasticsearch.Id setId, Elastic.Clients.Elasticsearch.Id ruleId, CancellationToken cancellationToken = default) { @@ -631,7 +939,7 @@ public virtual Task GetSynonymRuleAsync(Elastic.Clients. /// Get a synonym rule. /// Get a synonym rule from a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSynonymRuleAsync(Elastic.Clients.Elasticsearch.Id setId, Elastic.Clients.Elasticsearch.Id ruleId, Action configureRequest, CancellationToken cancellationToken = default) { @@ -646,7 +954,7 @@ public virtual Task GetSynonymRuleAsync(Elastic.Clients. /// Get all synonym sets. /// Get a summary of all defined synonym sets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSynonymsSetsResponse GetSynonymsSets(GetSynonymsSetsRequest request) @@ -660,7 +968,7 @@ public virtual GetSynonymsSetsResponse GetSynonymsSets(GetSynonymsSetsRequest re /// Get all synonym sets. /// Get a summary of all defined synonym sets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSynonymsSetsAsync(GetSynonymsSetsRequest request, CancellationToken cancellationToken = default) { @@ -673,7 +981,7 @@ public virtual Task GetSynonymsSetsAsync(GetSynonymsSet /// Get all synonym sets. /// Get a summary of all defined synonym sets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSynonymsSetsResponse GetSynonymsSets(GetSynonymsSetsRequestDescriptor descriptor) @@ -687,7 +995,7 @@ public virtual GetSynonymsSetsResponse GetSynonymsSets(GetSynonymsSetsRequestDes /// Get all synonym sets. /// Get a summary of all defined synonym sets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSynonymsSetsResponse GetSynonymsSets() @@ -702,7 +1010,7 @@ public virtual GetSynonymsSetsResponse GetSynonymsSets() /// Get all synonym sets. /// Get a summary of all defined synonym sets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual GetSynonymsSetsResponse GetSynonymsSets(Action configureRequest) @@ -718,7 +1026,7 @@ public virtual GetSynonymsSetsResponse GetSynonymsSets(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSynonymsSetsAsync(GetSynonymsSetsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -731,7 +1039,7 @@ public virtual Task GetSynonymsSetsAsync(GetSynonymsSet /// Get all synonym sets. /// Get a summary of all defined synonym sets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSynonymsSetsAsync(CancellationToken cancellationToken = default) { @@ -745,7 +1053,7 @@ public virtual Task GetSynonymsSetsAsync(CancellationTo /// Get all synonym sets. /// Get a summary of all defined synonym sets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetSynonymsSetsAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -761,7 +1069,11 @@ public virtual Task GetSynonymsSetsAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// + /// When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. + /// This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutSynonymResponse PutSynonym(PutSynonymRequest request) @@ -776,7 +1088,11 @@ public virtual PutSynonymResponse PutSynonym(PutSynonymRequest request) /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. /// If you need to manage more synonym rules, you can create multiple synonym sets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. + /// This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSynonymAsync(PutSynonymRequest request, CancellationToken cancellationToken = default) { @@ -790,7 +1106,11 @@ public virtual Task PutSynonymAsync(PutSynonymRequest reques /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. /// If you need to manage more synonym rules, you can create multiple synonym sets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. + /// This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutSynonymResponse PutSynonym(PutSynonymRequestDescriptor descriptor) @@ -805,7 +1125,11 @@ public virtual PutSynonymResponse PutSynonym(PutSynonymRequestDescrip /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. /// If you need to manage more synonym rules, you can create multiple synonym sets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. + /// This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutSynonymResponse PutSynonym(Elastic.Clients.Elasticsearch.Id id) @@ -821,7 +1145,11 @@ public virtual PutSynonymResponse PutSynonym(Elastic.Clients.Elastics /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. /// If you need to manage more synonym rules, you can create multiple synonym sets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. + /// This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutSynonymResponse PutSynonym(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) @@ -838,7 +1166,11 @@ public virtual PutSynonymResponse PutSynonym(Elastic.Clients.Elastics /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. /// If you need to manage more synonym rules, you can create multiple synonym sets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. + /// This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutSynonymResponse PutSynonym(PutSynonymRequestDescriptor descriptor) @@ -853,7 +1185,11 @@ public virtual PutSynonymResponse PutSynonym(PutSynonymRequestDescriptor descrip /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. /// If you need to manage more synonym rules, you can create multiple synonym sets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. + /// This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutSynonymResponse PutSynonym(Elastic.Clients.Elasticsearch.Id id) @@ -869,7 +1205,11 @@ public virtual PutSynonymResponse PutSynonym(Elastic.Clients.Elasticsearch.Id id /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. /// If you need to manage more synonym rules, you can create multiple synonym sets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. + /// This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutSynonymResponse PutSynonym(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) @@ -886,7 +1226,11 @@ public virtual PutSynonymResponse PutSynonym(Elastic.Clients.Elasticsearch.Id id /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. /// If you need to manage more synonym rules, you can create multiple synonym sets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. + /// This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSynonymAsync(PutSynonymRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -900,7 +1244,11 @@ public virtual Task PutSynonymAsync(PutSynonymReq /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. /// If you need to manage more synonym rules, you can create multiple synonym sets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. + /// This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSynonymAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -915,7 +1263,11 @@ public virtual Task PutSynonymAsync(Elastic.Clien /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. /// If you need to manage more synonym rules, you can create multiple synonym sets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. + /// This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSynonymAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { @@ -931,7 +1283,11 @@ public virtual Task PutSynonymAsync(Elastic.Clien /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. /// If you need to manage more synonym rules, you can create multiple synonym sets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. + /// This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSynonymAsync(PutSynonymRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -945,7 +1301,11 @@ public virtual Task PutSynonymAsync(PutSynonymRequestDescrip /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. /// If you need to manage more synonym rules, you can create multiple synonym sets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. + /// This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSynonymAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { @@ -960,7 +1320,11 @@ public virtual Task PutSynonymAsync(Elastic.Clients.Elastics /// Synonyms sets are limited to a maximum of 10,000 synonym rules per set. /// If you need to manage more synonym rules, you can create multiple synonym sets. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. + /// This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSynonymAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) { @@ -975,7 +1339,13 @@ public virtual Task PutSynonymAsync(Elastic.Clients.Elastics /// Create or update a synonym rule. /// Create or update a synonym rule in a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If any of the synonym rules included is invalid, the API returns an error. + /// + /// + /// When you update a synonym rule, all analyzers using the synonyms set will be reloaded automatically to reflect the new rule. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutSynonymRuleResponse PutSynonymRule(PutSynonymRuleRequest request) @@ -989,7 +1359,13 @@ public virtual PutSynonymRuleResponse PutSynonymRule(PutSynonymRuleRequest reque /// Create or update a synonym rule. /// Create or update a synonym rule in a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If any of the synonym rules included is invalid, the API returns an error. + /// + /// + /// When you update a synonym rule, all analyzers using the synonyms set will be reloaded automatically to reflect the new rule. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSynonymRuleAsync(PutSynonymRuleRequest request, CancellationToken cancellationToken = default) { @@ -1002,7 +1378,13 @@ public virtual Task PutSynonymRuleAsync(PutSynonymRuleRe /// Create or update a synonym rule. /// Create or update a synonym rule in a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If any of the synonym rules included is invalid, the API returns an error. + /// + /// + /// When you update a synonym rule, all analyzers using the synonyms set will be reloaded automatically to reflect the new rule. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutSynonymRuleResponse PutSynonymRule(PutSynonymRuleRequestDescriptor descriptor) @@ -1016,7 +1398,13 @@ public virtual PutSynonymRuleResponse PutSynonymRule(PutSynonymRuleRequestDescri /// Create or update a synonym rule. /// Create or update a synonym rule in a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If any of the synonym rules included is invalid, the API returns an error. + /// + /// + /// When you update a synonym rule, all analyzers using the synonyms set will be reloaded automatically to reflect the new rule. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutSynonymRuleResponse PutSynonymRule(Elastic.Clients.Elasticsearch.Id setId, Elastic.Clients.Elasticsearch.Id ruleId) @@ -1031,7 +1419,13 @@ public virtual PutSynonymRuleResponse PutSynonymRule(Elastic.Clients.Elasticsear /// Create or update a synonym rule. /// Create or update a synonym rule in a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If any of the synonym rules included is invalid, the API returns an error. + /// + /// + /// When you update a synonym rule, all analyzers using the synonyms set will be reloaded automatically to reflect the new rule. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual PutSynonymRuleResponse PutSynonymRule(Elastic.Clients.Elasticsearch.Id setId, Elastic.Clients.Elasticsearch.Id ruleId, Action configureRequest) @@ -1047,7 +1441,13 @@ public virtual PutSynonymRuleResponse PutSynonymRule(Elastic.Clients.Elasticsear /// Create or update a synonym rule. /// Create or update a synonym rule in a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If any of the synonym rules included is invalid, the API returns an error. + /// + /// + /// When you update a synonym rule, all analyzers using the synonyms set will be reloaded automatically to reflect the new rule. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSynonymRuleAsync(PutSynonymRuleRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -1060,7 +1460,13 @@ public virtual Task PutSynonymRuleAsync(PutSynonymRuleRe /// Create or update a synonym rule. /// Create or update a synonym rule in a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If any of the synonym rules included is invalid, the API returns an error. + /// + /// + /// When you update a synonym rule, all analyzers using the synonyms set will be reloaded automatically to reflect the new rule. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSynonymRuleAsync(Elastic.Clients.Elasticsearch.Id setId, Elastic.Clients.Elasticsearch.Id ruleId, CancellationToken cancellationToken = default) { @@ -1074,7 +1480,13 @@ public virtual Task PutSynonymRuleAsync(Elastic.Clients. /// Create or update a synonym rule. /// Create or update a synonym rule in a synonym set. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If any of the synonym rules included is invalid, the API returns an error. + /// + /// + /// When you update a synonym rule, all analyzers using the synonyms set will be reloaded automatically to reflect the new rule. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task PutSynonymRuleAsync(Elastic.Clients.Elasticsearch.Id setId, Elastic.Clients.Elasticsearch.Id ruleId, Action configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Tasks.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Tasks.g.cs index 4ed8ca03514..30dbb5969b0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Tasks.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Tasks.g.cs @@ -42,6 +42,12 @@ internal TasksNamespacedClient(ElasticsearchClient client) : base(client) /// /// /// Cancel a task. + /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// /// A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. /// It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. /// The get task information API will continue to list these cancelled tasks until they complete. @@ -63,6 +69,12 @@ public virtual CancelResponse Cancel(CancelRequest request) /// /// /// Cancel a task. + /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// /// A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. /// It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. /// The get task information API will continue to list these cancelled tasks until they complete. @@ -83,6 +95,12 @@ public virtual Task CancelAsync(CancelRequest request, Cancellat /// /// /// Cancel a task. + /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// /// A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. /// It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. /// The get task information API will continue to list these cancelled tasks until they complete. @@ -104,6 +122,12 @@ public virtual CancelResponse Cancel(CancelRequestDescriptor descriptor) /// /// /// Cancel a task. + /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// /// A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. /// It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. /// The get task information API will continue to list these cancelled tasks until they complete. @@ -126,6 +150,12 @@ public virtual CancelResponse Cancel(Elastic.Clients.Elasticsearch.TaskId? taskI /// /// /// Cancel a task. + /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// /// A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. /// It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. /// The get task information API will continue to list these cancelled tasks until they complete. @@ -149,6 +179,12 @@ public virtual CancelResponse Cancel(Elastic.Clients.Elasticsearch.TaskId? taskI /// /// /// Cancel a task. + /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// /// A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. /// It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. /// The get task information API will continue to list these cancelled tasks until they complete. @@ -171,6 +207,12 @@ public virtual CancelResponse Cancel() /// /// /// Cancel a task. + /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// /// A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. /// It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. /// The get task information API will continue to list these cancelled tasks until they complete. @@ -194,6 +236,12 @@ public virtual CancelResponse Cancel(Action configureRe /// /// /// Cancel a task. + /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// /// A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. /// It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. /// The get task information API will continue to list these cancelled tasks until they complete. @@ -214,6 +262,12 @@ public virtual Task CancelAsync(CancelRequestDescriptor descript /// /// /// Cancel a task. + /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// /// A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. /// It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. /// The get task information API will continue to list these cancelled tasks until they complete. @@ -235,6 +289,12 @@ public virtual Task CancelAsync(Elastic.Clients.Elasticsearch.Ta /// /// /// Cancel a task. + /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// /// A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. /// It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. /// The get task information API will continue to list these cancelled tasks until they complete. @@ -257,6 +317,12 @@ public virtual Task CancelAsync(Elastic.Clients.Elasticsearch.Ta /// /// /// Cancel a task. + /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// /// A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. /// It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. /// The get task information API will continue to list these cancelled tasks until they complete. @@ -278,6 +344,12 @@ public virtual Task CancelAsync(CancellationToken cancellationTo /// /// /// Cancel a task. + /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// /// A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. /// It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. /// The get task information API will continue to list these cancelled tasks until they complete. @@ -302,6 +374,13 @@ public virtual Task CancelAsync(Action /// Get task information. /// Get information about a task currently running in the cluster. /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// + /// If the task identifier is not found, a 404 response code indicates that there are no resources that match the request. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -316,6 +395,13 @@ public virtual GetTasksResponse Get(GetTasksRequest request) /// Get task information. /// Get information about a task currently running in the cluster. /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// + /// If the task identifier is not found, a 404 response code indicates that there are no resources that match the request. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(GetTasksRequest request, CancellationToken cancellationToken = default) @@ -329,6 +415,13 @@ public virtual Task GetAsync(GetTasksRequest request, Cancella /// Get task information. /// Get information about a task currently running in the cluster. /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// + /// If the task identifier is not found, a 404 response code indicates that there are no resources that match the request. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -343,6 +436,13 @@ public virtual GetTasksResponse Get(GetTasksRequestDescriptor descriptor) /// Get task information. /// Get information about a task currently running in the cluster. /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// + /// If the task identifier is not found, a 404 response code indicates that there are no resources that match the request. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -358,6 +458,13 @@ public virtual GetTasksResponse Get(Elastic.Clients.Elasticsearch.Id taskId) /// Get task information. /// Get information about a task currently running in the cluster. /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// + /// If the task identifier is not found, a 404 response code indicates that there are no resources that match the request. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -374,6 +481,13 @@ public virtual GetTasksResponse Get(Elastic.Clients.Elasticsearch.Id taskId, Act /// Get task information. /// Get information about a task currently running in the cluster. /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// + /// If the task identifier is not found, a 404 response code indicates that there are no resources that match the request. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(GetTasksRequestDescriptor descriptor, CancellationToken cancellationToken = default) @@ -387,6 +501,13 @@ public virtual Task GetAsync(GetTasksRequestDescriptor descrip /// Get task information. /// Get information about a task currently running in the cluster. /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// + /// If the task identifier is not found, a 404 response code indicates that there are no resources that match the request. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Id taskId, CancellationToken cancellationToken = default) @@ -401,6 +522,13 @@ public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Id /// Get task information. /// Get information about a task currently running in the cluster. /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// + /// If the task identifier is not found, a 404 response code indicates that there are no resources that match the request. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Id taskId, Action configureRequest, CancellationToken cancellationToken = default) @@ -416,6 +544,67 @@ public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Id /// Get all tasks. /// Get information about the tasks currently running on one or more nodes in the cluster. /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// + /// Identifying running tasks + /// + /// + /// The X-Opaque-Id header, when provided on the HTTP request header, is going to be returned as a header in the response as well as in the headers field for in the task information. + /// This enables you to track certain calls or associate certain tasks with the client that started them. + /// For example: + /// + /// + /// curl -i -H "X-Opaque-Id: 123456" "http://localhost:9200/_tasks?group_by=parents" + /// + /// + /// The API returns the following result: + /// + /// + /// HTTP/1.1 200 OK + /// X-Opaque-Id: 123456 + /// content-type: application/json; charset=UTF-8 + /// content-length: 831 + /// + /// { + /// "tasks" : { + /// "u5lcZHqcQhu-rUoFaqDphA:45" : { + /// "node" : "u5lcZHqcQhu-rUoFaqDphA", + /// "id" : 45, + /// "type" : "transport", + /// "action" : "cluster:monitor/tasks/lists", + /// "start_time_in_millis" : 1513823752749, + /// "running_time_in_nanos" : 293139, + /// "cancellable" : false, + /// "headers" : { + /// "X-Opaque-Id" : "123456" + /// }, + /// "children" : [ + /// { + /// "node" : "u5lcZHqcQhu-rUoFaqDphA", + /// "id" : 46, + /// "type" : "direct", + /// "action" : "cluster:monitor/tasks/lists[n]", + /// "start_time_in_millis" : 1513823752750, + /// "running_time_in_nanos" : 92133, + /// "cancellable" : false, + /// "parent_task_id" : "u5lcZHqcQhu-rUoFaqDphA:45", + /// "headers" : { + /// "X-Opaque-Id" : "123456" + /// } + /// } + /// ] + /// } + /// } + /// } + /// + /// + /// In this example, X-Opaque-Id: 123456 is the ID as a part of the response header. + /// The X-Opaque-Id in the task headers is the ID for the task that was initiated by the REST request. + /// The X-Opaque-Id in the children headers is the child task of the task that was initiated by the REST request. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -430,6 +619,67 @@ public virtual ListResponse List(ListRequest request) /// Get all tasks. /// Get information about the tasks currently running on one or more nodes in the cluster. /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// + /// Identifying running tasks + /// + /// + /// The X-Opaque-Id header, when provided on the HTTP request header, is going to be returned as a header in the response as well as in the headers field for in the task information. + /// This enables you to track certain calls or associate certain tasks with the client that started them. + /// For example: + /// + /// + /// curl -i -H "X-Opaque-Id: 123456" "http://localhost:9200/_tasks?group_by=parents" + /// + /// + /// The API returns the following result: + /// + /// + /// HTTP/1.1 200 OK + /// X-Opaque-Id: 123456 + /// content-type: application/json; charset=UTF-8 + /// content-length: 831 + /// + /// { + /// "tasks" : { + /// "u5lcZHqcQhu-rUoFaqDphA:45" : { + /// "node" : "u5lcZHqcQhu-rUoFaqDphA", + /// "id" : 45, + /// "type" : "transport", + /// "action" : "cluster:monitor/tasks/lists", + /// "start_time_in_millis" : 1513823752749, + /// "running_time_in_nanos" : 293139, + /// "cancellable" : false, + /// "headers" : { + /// "X-Opaque-Id" : "123456" + /// }, + /// "children" : [ + /// { + /// "node" : "u5lcZHqcQhu-rUoFaqDphA", + /// "id" : 46, + /// "type" : "direct", + /// "action" : "cluster:monitor/tasks/lists[n]", + /// "start_time_in_millis" : 1513823752750, + /// "running_time_in_nanos" : 92133, + /// "cancellable" : false, + /// "parent_task_id" : "u5lcZHqcQhu-rUoFaqDphA:45", + /// "headers" : { + /// "X-Opaque-Id" : "123456" + /// } + /// } + /// ] + /// } + /// } + /// } + /// + /// + /// In this example, X-Opaque-Id: 123456 is the ID as a part of the response header. + /// The X-Opaque-Id in the task headers is the ID for the task that was initiated by the REST request. + /// The X-Opaque-Id in the children headers is the child task of the task that was initiated by the REST request. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ListAsync(ListRequest request, CancellationToken cancellationToken = default) @@ -443,6 +693,67 @@ public virtual Task ListAsync(ListRequest request, CancellationTok /// Get all tasks. /// Get information about the tasks currently running on one or more nodes in the cluster. /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// + /// Identifying running tasks + /// + /// + /// The X-Opaque-Id header, when provided on the HTTP request header, is going to be returned as a header in the response as well as in the headers field for in the task information. + /// This enables you to track certain calls or associate certain tasks with the client that started them. + /// For example: + /// + /// + /// curl -i -H "X-Opaque-Id: 123456" "http://localhost:9200/_tasks?group_by=parents" + /// + /// + /// The API returns the following result: + /// + /// + /// HTTP/1.1 200 OK + /// X-Opaque-Id: 123456 + /// content-type: application/json; charset=UTF-8 + /// content-length: 831 + /// + /// { + /// "tasks" : { + /// "u5lcZHqcQhu-rUoFaqDphA:45" : { + /// "node" : "u5lcZHqcQhu-rUoFaqDphA", + /// "id" : 45, + /// "type" : "transport", + /// "action" : "cluster:monitor/tasks/lists", + /// "start_time_in_millis" : 1513823752749, + /// "running_time_in_nanos" : 293139, + /// "cancellable" : false, + /// "headers" : { + /// "X-Opaque-Id" : "123456" + /// }, + /// "children" : [ + /// { + /// "node" : "u5lcZHqcQhu-rUoFaqDphA", + /// "id" : 46, + /// "type" : "direct", + /// "action" : "cluster:monitor/tasks/lists[n]", + /// "start_time_in_millis" : 1513823752750, + /// "running_time_in_nanos" : 92133, + /// "cancellable" : false, + /// "parent_task_id" : "u5lcZHqcQhu-rUoFaqDphA:45", + /// "headers" : { + /// "X-Opaque-Id" : "123456" + /// } + /// } + /// ] + /// } + /// } + /// } + /// + /// + /// In this example, X-Opaque-Id: 123456 is the ID as a part of the response header. + /// The X-Opaque-Id in the task headers is the ID for the task that was initiated by the REST request. + /// The X-Opaque-Id in the children headers is the child task of the task that was initiated by the REST request. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -457,6 +768,67 @@ public virtual ListResponse List(ListRequestDescriptor descriptor) /// Get all tasks. /// Get information about the tasks currently running on one or more nodes in the cluster. /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// + /// Identifying running tasks + /// + /// + /// The X-Opaque-Id header, when provided on the HTTP request header, is going to be returned as a header in the response as well as in the headers field for in the task information. + /// This enables you to track certain calls or associate certain tasks with the client that started them. + /// For example: + /// + /// + /// curl -i -H "X-Opaque-Id: 123456" "http://localhost:9200/_tasks?group_by=parents" + /// + /// + /// The API returns the following result: + /// + /// + /// HTTP/1.1 200 OK + /// X-Opaque-Id: 123456 + /// content-type: application/json; charset=UTF-8 + /// content-length: 831 + /// + /// { + /// "tasks" : { + /// "u5lcZHqcQhu-rUoFaqDphA:45" : { + /// "node" : "u5lcZHqcQhu-rUoFaqDphA", + /// "id" : 45, + /// "type" : "transport", + /// "action" : "cluster:monitor/tasks/lists", + /// "start_time_in_millis" : 1513823752749, + /// "running_time_in_nanos" : 293139, + /// "cancellable" : false, + /// "headers" : { + /// "X-Opaque-Id" : "123456" + /// }, + /// "children" : [ + /// { + /// "node" : "u5lcZHqcQhu-rUoFaqDphA", + /// "id" : 46, + /// "type" : "direct", + /// "action" : "cluster:monitor/tasks/lists[n]", + /// "start_time_in_millis" : 1513823752750, + /// "running_time_in_nanos" : 92133, + /// "cancellable" : false, + /// "parent_task_id" : "u5lcZHqcQhu-rUoFaqDphA:45", + /// "headers" : { + /// "X-Opaque-Id" : "123456" + /// } + /// } + /// ] + /// } + /// } + /// } + /// + /// + /// In this example, X-Opaque-Id: 123456 is the ID as a part of the response header. + /// The X-Opaque-Id in the task headers is the ID for the task that was initiated by the REST request. + /// The X-Opaque-Id in the children headers is the child task of the task that was initiated by the REST request. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -472,6 +844,67 @@ public virtual ListResponse List() /// Get all tasks. /// Get information about the tasks currently running on one or more nodes in the cluster. /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// + /// Identifying running tasks + /// + /// + /// The X-Opaque-Id header, when provided on the HTTP request header, is going to be returned as a header in the response as well as in the headers field for in the task information. + /// This enables you to track certain calls or associate certain tasks with the client that started them. + /// For example: + /// + /// + /// curl -i -H "X-Opaque-Id: 123456" "http://localhost:9200/_tasks?group_by=parents" + /// + /// + /// The API returns the following result: + /// + /// + /// HTTP/1.1 200 OK + /// X-Opaque-Id: 123456 + /// content-type: application/json; charset=UTF-8 + /// content-length: 831 + /// + /// { + /// "tasks" : { + /// "u5lcZHqcQhu-rUoFaqDphA:45" : { + /// "node" : "u5lcZHqcQhu-rUoFaqDphA", + /// "id" : 45, + /// "type" : "transport", + /// "action" : "cluster:monitor/tasks/lists", + /// "start_time_in_millis" : 1513823752749, + /// "running_time_in_nanos" : 293139, + /// "cancellable" : false, + /// "headers" : { + /// "X-Opaque-Id" : "123456" + /// }, + /// "children" : [ + /// { + /// "node" : "u5lcZHqcQhu-rUoFaqDphA", + /// "id" : 46, + /// "type" : "direct", + /// "action" : "cluster:monitor/tasks/lists[n]", + /// "start_time_in_millis" : 1513823752750, + /// "running_time_in_nanos" : 92133, + /// "cancellable" : false, + /// "parent_task_id" : "u5lcZHqcQhu-rUoFaqDphA:45", + /// "headers" : { + /// "X-Opaque-Id" : "123456" + /// } + /// } + /// ] + /// } + /// } + /// } + /// + /// + /// In this example, X-Opaque-Id: 123456 is the ID as a part of the response header. + /// The X-Opaque-Id in the task headers is the ID for the task that was initiated by the REST request. + /// The X-Opaque-Id in the children headers is the child task of the task that was initiated by the REST request. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -488,6 +921,67 @@ public virtual ListResponse List(Action configureRequest) /// Get all tasks. /// Get information about the tasks currently running on one or more nodes in the cluster. /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// + /// Identifying running tasks + /// + /// + /// The X-Opaque-Id header, when provided on the HTTP request header, is going to be returned as a header in the response as well as in the headers field for in the task information. + /// This enables you to track certain calls or associate certain tasks with the client that started them. + /// For example: + /// + /// + /// curl -i -H "X-Opaque-Id: 123456" "http://localhost:9200/_tasks?group_by=parents" + /// + /// + /// The API returns the following result: + /// + /// + /// HTTP/1.1 200 OK + /// X-Opaque-Id: 123456 + /// content-type: application/json; charset=UTF-8 + /// content-length: 831 + /// + /// { + /// "tasks" : { + /// "u5lcZHqcQhu-rUoFaqDphA:45" : { + /// "node" : "u5lcZHqcQhu-rUoFaqDphA", + /// "id" : 45, + /// "type" : "transport", + /// "action" : "cluster:monitor/tasks/lists", + /// "start_time_in_millis" : 1513823752749, + /// "running_time_in_nanos" : 293139, + /// "cancellable" : false, + /// "headers" : { + /// "X-Opaque-Id" : "123456" + /// }, + /// "children" : [ + /// { + /// "node" : "u5lcZHqcQhu-rUoFaqDphA", + /// "id" : 46, + /// "type" : "direct", + /// "action" : "cluster:monitor/tasks/lists[n]", + /// "start_time_in_millis" : 1513823752750, + /// "running_time_in_nanos" : 92133, + /// "cancellable" : false, + /// "parent_task_id" : "u5lcZHqcQhu-rUoFaqDphA:45", + /// "headers" : { + /// "X-Opaque-Id" : "123456" + /// } + /// } + /// ] + /// } + /// } + /// } + /// + /// + /// In this example, X-Opaque-Id: 123456 is the ID as a part of the response header. + /// The X-Opaque-Id in the task headers is the ID for the task that was initiated by the REST request. + /// The X-Opaque-Id in the children headers is the child task of the task that was initiated by the REST request. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ListAsync(ListRequestDescriptor descriptor, CancellationToken cancellationToken = default) @@ -501,6 +995,67 @@ public virtual Task ListAsync(ListRequestDescriptor descriptor, Ca /// Get all tasks. /// Get information about the tasks currently running on one or more nodes in the cluster. /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// + /// Identifying running tasks + /// + /// + /// The X-Opaque-Id header, when provided on the HTTP request header, is going to be returned as a header in the response as well as in the headers field for in the task information. + /// This enables you to track certain calls or associate certain tasks with the client that started them. + /// For example: + /// + /// + /// curl -i -H "X-Opaque-Id: 123456" "http://localhost:9200/_tasks?group_by=parents" + /// + /// + /// The API returns the following result: + /// + /// + /// HTTP/1.1 200 OK + /// X-Opaque-Id: 123456 + /// content-type: application/json; charset=UTF-8 + /// content-length: 831 + /// + /// { + /// "tasks" : { + /// "u5lcZHqcQhu-rUoFaqDphA:45" : { + /// "node" : "u5lcZHqcQhu-rUoFaqDphA", + /// "id" : 45, + /// "type" : "transport", + /// "action" : "cluster:monitor/tasks/lists", + /// "start_time_in_millis" : 1513823752749, + /// "running_time_in_nanos" : 293139, + /// "cancellable" : false, + /// "headers" : { + /// "X-Opaque-Id" : "123456" + /// }, + /// "children" : [ + /// { + /// "node" : "u5lcZHqcQhu-rUoFaqDphA", + /// "id" : 46, + /// "type" : "direct", + /// "action" : "cluster:monitor/tasks/lists[n]", + /// "start_time_in_millis" : 1513823752750, + /// "running_time_in_nanos" : 92133, + /// "cancellable" : false, + /// "parent_task_id" : "u5lcZHqcQhu-rUoFaqDphA:45", + /// "headers" : { + /// "X-Opaque-Id" : "123456" + /// } + /// } + /// ] + /// } + /// } + /// } + /// + /// + /// In this example, X-Opaque-Id: 123456 is the ID as a part of the response header. + /// The X-Opaque-Id in the task headers is the ID for the task that was initiated by the REST request. + /// The X-Opaque-Id in the children headers is the child task of the task that was initiated by the REST request. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ListAsync(CancellationToken cancellationToken = default) @@ -515,6 +1070,67 @@ public virtual Task ListAsync(CancellationToken cancellationToken /// Get all tasks. /// Get information about the tasks currently running on one or more nodes in the cluster. /// + /// + /// WARNING: The task management API is new and should still be considered a beta feature. + /// The API may change in ways that are not backwards compatible. + /// + /// + /// Identifying running tasks + /// + /// + /// The X-Opaque-Id header, when provided on the HTTP request header, is going to be returned as a header in the response as well as in the headers field for in the task information. + /// This enables you to track certain calls or associate certain tasks with the client that started them. + /// For example: + /// + /// + /// curl -i -H "X-Opaque-Id: 123456" "http://localhost:9200/_tasks?group_by=parents" + /// + /// + /// The API returns the following result: + /// + /// + /// HTTP/1.1 200 OK + /// X-Opaque-Id: 123456 + /// content-type: application/json; charset=UTF-8 + /// content-length: 831 + /// + /// { + /// "tasks" : { + /// "u5lcZHqcQhu-rUoFaqDphA:45" : { + /// "node" : "u5lcZHqcQhu-rUoFaqDphA", + /// "id" : 45, + /// "type" : "transport", + /// "action" : "cluster:monitor/tasks/lists", + /// "start_time_in_millis" : 1513823752749, + /// "running_time_in_nanos" : 293139, + /// "cancellable" : false, + /// "headers" : { + /// "X-Opaque-Id" : "123456" + /// }, + /// "children" : [ + /// { + /// "node" : "u5lcZHqcQhu-rUoFaqDphA", + /// "id" : 46, + /// "type" : "direct", + /// "action" : "cluster:monitor/tasks/lists[n]", + /// "start_time_in_millis" : 1513823752750, + /// "running_time_in_nanos" : 92133, + /// "cancellable" : false, + /// "parent_task_id" : "u5lcZHqcQhu-rUoFaqDphA:45", + /// "headers" : { + /// "X-Opaque-Id" : "123456" + /// } + /// } + /// ] + /// } + /// } + /// } + /// + /// + /// In this example, X-Opaque-Id: 123456 is the ID as a part of the response header. + /// The X-Opaque-Id in the task headers is the ID for the task that was initiated by the REST request. + /// The X-Opaque-Id in the children headers is the child task of the task that was initiated by the REST request. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task ListAsync(Action configureRequest, CancellationToken cancellationToken = default) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.TextStructure.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.TextStructure.g.cs index ed77c6ee9a8..3b1721dce1b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.TextStructure.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.TextStructure.g.cs @@ -44,6 +44,43 @@ internal TextStructureNamespacedClient(ElasticsearchClient client) : base(client /// Find the structure of a text field. /// Find the structure of a text field in an Elasticsearch index. /// + /// + /// This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch. + /// For example, if you have ingested data into a very simple index that has just @timestamp and message fields, you can use this API to see what common structure exists in the message field. + /// + /// + /// The response from the API contains: + /// + /// + /// + /// + /// Sample messages. + /// + /// + /// + /// + /// Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. + /// + /// + /// + /// + /// Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. + /// + /// + /// + /// + /// Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. + /// + /// + /// + /// + /// All this information can be calculated by the structure finder with no guidance. + /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. + /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -58,6 +95,43 @@ public virtual FindFieldStructureResponse FindFieldStructure(FindFieldStructureR /// Find the structure of a text field. /// Find the structure of a text field in an Elasticsearch index. /// + /// + /// This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch. + /// For example, if you have ingested data into a very simple index that has just @timestamp and message fields, you can use this API to see what common structure exists in the message field. + /// + /// + /// The response from the API contains: + /// + /// + /// + /// + /// Sample messages. + /// + /// + /// + /// + /// Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. + /// + /// + /// + /// + /// Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. + /// + /// + /// + /// + /// Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. + /// + /// + /// + /// + /// All this information can be calculated by the structure finder with no guidance. + /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. + /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FindFieldStructureAsync(FindFieldStructureRequest request, CancellationToken cancellationToken = default) @@ -71,6 +145,43 @@ public virtual Task FindFieldStructureAsync(FindFiel /// Find the structure of a text field. /// Find the structure of a text field in an Elasticsearch index. /// + /// + /// This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch. + /// For example, if you have ingested data into a very simple index that has just @timestamp and message fields, you can use this API to see what common structure exists in the message field. + /// + /// + /// The response from the API contains: + /// + /// + /// + /// + /// Sample messages. + /// + /// + /// + /// + /// Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. + /// + /// + /// + /// + /// Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. + /// + /// + /// + /// + /// Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. + /// + /// + /// + /// + /// All this information can be calculated by the structure finder with no guidance. + /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. + /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -85,6 +196,43 @@ public virtual FindFieldStructureResponse FindFieldStructure(FindFiel /// Find the structure of a text field. /// Find the structure of a text field in an Elasticsearch index. /// + /// + /// This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch. + /// For example, if you have ingested data into a very simple index that has just @timestamp and message fields, you can use this API to see what common structure exists in the message field. + /// + /// + /// The response from the API contains: + /// + /// + /// + /// + /// Sample messages. + /// + /// + /// + /// + /// Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. + /// + /// + /// + /// + /// Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. + /// + /// + /// + /// + /// Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. + /// + /// + /// + /// + /// All this information can be calculated by the structure finder with no guidance. + /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. + /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -100,6 +248,43 @@ public virtual FindFieldStructureResponse FindFieldStructure() /// Find the structure of a text field. /// Find the structure of a text field in an Elasticsearch index. /// + /// + /// This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch. + /// For example, if you have ingested data into a very simple index that has just @timestamp and message fields, you can use this API to see what common structure exists in the message field. + /// + /// + /// The response from the API contains: + /// + /// + /// + /// + /// Sample messages. + /// + /// + /// + /// + /// Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. + /// + /// + /// + /// + /// Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. + /// + /// + /// + /// + /// Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. + /// + /// + /// + /// + /// All this information can be calculated by the structure finder with no guidance. + /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. + /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -116,6 +301,43 @@ public virtual FindFieldStructureResponse FindFieldStructure(Action + /// + /// This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch. + /// For example, if you have ingested data into a very simple index that has just @timestamp and message fields, you can use this API to see what common structure exists in the message field. + /// + /// + /// The response from the API contains: + /// + /// + /// + /// + /// Sample messages. + /// + /// + /// + /// + /// Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. + /// + /// + /// + /// + /// Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. + /// + /// + /// + /// + /// Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. + /// + /// + /// + /// + /// All this information can be calculated by the structure finder with no guidance. + /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. + /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -130,6 +352,43 @@ public virtual FindFieldStructureResponse FindFieldStructure(FindFieldStructureR /// Find the structure of a text field. /// Find the structure of a text field in an Elasticsearch index. /// + /// + /// This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch. + /// For example, if you have ingested data into a very simple index that has just @timestamp and message fields, you can use this API to see what common structure exists in the message field. + /// + /// + /// The response from the API contains: + /// + /// + /// + /// + /// Sample messages. + /// + /// + /// + /// + /// Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. + /// + /// + /// + /// + /// Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. + /// + /// + /// + /// + /// Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. + /// + /// + /// + /// + /// All this information can be calculated by the structure finder with no guidance. + /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. + /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -142,8 +401,45 @@ public virtual FindFieldStructureResponse FindFieldStructure() /// /// - /// Find the structure of a text field. - /// Find the structure of a text field in an Elasticsearch index. + /// Find the structure of a text field. + /// Find the structure of a text field in an Elasticsearch index. + /// + /// + /// This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch. + /// For example, if you have ingested data into a very simple index that has just @timestamp and message fields, you can use this API to see what common structure exists in the message field. + /// + /// + /// The response from the API contains: + /// + /// + /// + /// + /// Sample messages. + /// + /// + /// + /// + /// Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. + /// + /// + /// + /// + /// Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. + /// + /// + /// + /// + /// Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. + /// + /// + /// + /// + /// All this information can be calculated by the structure finder with no guidance. + /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. + /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. /// /// Learn more about this API in the Elasticsearch documentation. /// @@ -161,6 +457,43 @@ public virtual FindFieldStructureResponse FindFieldStructure(Action + /// + /// This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch. + /// For example, if you have ingested data into a very simple index that has just @timestamp and message fields, you can use this API to see what common structure exists in the message field. + /// + /// + /// The response from the API contains: + /// + /// + /// + /// + /// Sample messages. + /// + /// + /// + /// + /// Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. + /// + /// + /// + /// + /// Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. + /// + /// + /// + /// + /// Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. + /// + /// + /// + /// + /// All this information can be calculated by the structure finder with no guidance. + /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. + /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FindFieldStructureAsync(FindFieldStructureRequestDescriptor descriptor, CancellationToken cancellationToken = default) @@ -174,6 +507,43 @@ public virtual Task FindFieldStructureAsync + /// + /// This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch. + /// For example, if you have ingested data into a very simple index that has just @timestamp and message fields, you can use this API to see what common structure exists in the message field. + /// + /// + /// The response from the API contains: + /// + /// + /// + /// + /// Sample messages. + /// + /// + /// + /// + /// Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. + /// + /// + /// + /// + /// Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. + /// + /// + /// + /// + /// Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. + /// + /// + /// + /// + /// All this information can be calculated by the structure finder with no guidance. + /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. + /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FindFieldStructureAsync(CancellationToken cancellationToken = default) @@ -188,6 +558,43 @@ public virtual Task FindFieldStructureAsync + /// + /// This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch. + /// For example, if you have ingested data into a very simple index that has just @timestamp and message fields, you can use this API to see what common structure exists in the message field. + /// + /// + /// The response from the API contains: + /// + /// + /// + /// + /// Sample messages. + /// + /// + /// + /// + /// Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. + /// + /// + /// + /// + /// Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. + /// + /// + /// + /// + /// Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. + /// + /// + /// + /// + /// All this information can be calculated by the structure finder with no guidance. + /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. + /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FindFieldStructureAsync(Action> configureRequest, CancellationToken cancellationToken = default) @@ -203,6 +610,43 @@ public virtual Task FindFieldStructureAsync + /// + /// This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch. + /// For example, if you have ingested data into a very simple index that has just @timestamp and message fields, you can use this API to see what common structure exists in the message field. + /// + /// + /// The response from the API contains: + /// + /// + /// + /// + /// Sample messages. + /// + /// + /// + /// + /// Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. + /// + /// + /// + /// + /// Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. + /// + /// + /// + /// + /// Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. + /// + /// + /// + /// + /// All this information can be calculated by the structure finder with no guidance. + /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. + /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FindFieldStructureAsync(FindFieldStructureRequestDescriptor descriptor, CancellationToken cancellationToken = default) @@ -216,6 +660,43 @@ public virtual Task FindFieldStructureAsync(FindFiel /// Find the structure of a text field. /// Find the structure of a text field in an Elasticsearch index. /// + /// + /// This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch. + /// For example, if you have ingested data into a very simple index that has just @timestamp and message fields, you can use this API to see what common structure exists in the message field. + /// + /// + /// The response from the API contains: + /// + /// + /// + /// + /// Sample messages. + /// + /// + /// + /// + /// Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. + /// + /// + /// + /// + /// Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. + /// + /// + /// + /// + /// Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. + /// + /// + /// + /// + /// All this information can be calculated by the structure finder with no guidance. + /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. + /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FindFieldStructureAsync(CancellationToken cancellationToken = default) @@ -230,6 +711,43 @@ public virtual Task FindFieldStructureAsync(Cancella /// Find the structure of a text field. /// Find the structure of a text field in an Elasticsearch index. /// + /// + /// This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch. + /// For example, if you have ingested data into a very simple index that has just @timestamp and message fields, you can use this API to see what common structure exists in the message field. + /// + /// + /// The response from the API contains: + /// + /// + /// + /// + /// Sample messages. + /// + /// + /// + /// + /// Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. + /// + /// + /// + /// + /// Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. + /// + /// + /// + /// + /// Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. + /// + /// + /// + /// + /// All this information can be calculated by the structure finder with no guidance. + /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. + /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FindFieldStructureAsync(Action configureRequest, CancellationToken cancellationToken = default) @@ -249,6 +767,8 @@ public virtual Task FindFieldStructureAsync(Action /// This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. /// Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process. + /// + /// /// The response from the API contains: /// /// @@ -273,6 +793,10 @@ public virtual Task FindFieldStructureAsync(Action + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -291,6 +815,8 @@ public virtual FindMessageStructureResponse FindMessageStructure(FindMessageStru /// /// This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. /// Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process. + /// + /// /// The response from the API contains: /// /// @@ -315,6 +841,10 @@ public virtual FindMessageStructureResponse FindMessageStructure(FindMessageStru /// All this information can be calculated by the structure finder with no guidance. /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FindMessageStructureAsync(FindMessageStructureRequest request, CancellationToken cancellationToken = default) @@ -332,6 +862,8 @@ public virtual Task FindMessageStructureAsync(Find /// /// This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. /// Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process. + /// + /// /// The response from the API contains: /// /// @@ -356,6 +888,10 @@ public virtual Task FindMessageStructureAsync(Find /// All this information can be calculated by the structure finder with no guidance. /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -374,6 +910,8 @@ public virtual FindMessageStructureResponse FindMessageStructure(Find /// /// This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. /// Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process. + /// + /// /// The response from the API contains: /// /// @@ -398,6 +936,10 @@ public virtual FindMessageStructureResponse FindMessageStructure(Find /// All this information can be calculated by the structure finder with no guidance. /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -417,6 +959,8 @@ public virtual FindMessageStructureResponse FindMessageStructure() /// /// This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. /// Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process. + /// + /// /// The response from the API contains: /// /// @@ -441,6 +985,10 @@ public virtual FindMessageStructureResponse FindMessageStructure() /// All this information can be calculated by the structure finder with no guidance. /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -461,6 +1009,8 @@ public virtual FindMessageStructureResponse FindMessageStructure(Acti /// /// This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. /// Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process. + /// + /// /// The response from the API contains: /// /// @@ -485,6 +1035,10 @@ public virtual FindMessageStructureResponse FindMessageStructure(Acti /// All this information can be calculated by the structure finder with no guidance. /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -503,6 +1057,8 @@ public virtual FindMessageStructureResponse FindMessageStructure(FindMessageStru /// /// This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. /// Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process. + /// + /// /// The response from the API contains: /// /// @@ -527,6 +1083,10 @@ public virtual FindMessageStructureResponse FindMessageStructure(FindMessageStru /// All this information can be calculated by the structure finder with no guidance. /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -546,6 +1106,8 @@ public virtual FindMessageStructureResponse FindMessageStructure() /// /// This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. /// Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process. + /// + /// /// The response from the API contains: /// /// @@ -570,6 +1132,10 @@ public virtual FindMessageStructureResponse FindMessageStructure() /// All this information can be calculated by the structure finder with no guidance. /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -590,6 +1156,8 @@ public virtual FindMessageStructureResponse FindMessageStructure(Action /// This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. /// Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process. + /// + /// /// The response from the API contains: /// /// @@ -614,6 +1182,10 @@ public virtual FindMessageStructureResponse FindMessageStructure(Action + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FindMessageStructureAsync(FindMessageStructureRequestDescriptor descriptor, CancellationToken cancellationToken = default) @@ -631,6 +1203,8 @@ public virtual Task FindMessageStructureAsync /// This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. /// Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process. + /// + /// /// The response from the API contains: /// /// @@ -655,6 +1229,10 @@ public virtual Task FindMessageStructureAsync + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FindMessageStructureAsync(CancellationToken cancellationToken = default) @@ -673,6 +1251,8 @@ public virtual Task FindMessageStructureAsync /// This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. /// Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process. + /// + /// /// The response from the API contains: /// /// @@ -697,6 +1277,10 @@ public virtual Task FindMessageStructureAsync + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FindMessageStructureAsync(Action> configureRequest, CancellationToken cancellationToken = default) @@ -716,6 +1300,8 @@ public virtual Task FindMessageStructureAsync /// This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. /// Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process. + /// + /// /// The response from the API contains: /// /// @@ -740,6 +1326,10 @@ public virtual Task FindMessageStructureAsync + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FindMessageStructureAsync(FindMessageStructureRequestDescriptor descriptor, CancellationToken cancellationToken = default) @@ -757,6 +1347,8 @@ public virtual Task FindMessageStructureAsync(Find /// /// This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. /// Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process. + /// + /// /// The response from the API contains: /// /// @@ -781,6 +1373,10 @@ public virtual Task FindMessageStructureAsync(Find /// All this information can be calculated by the structure finder with no guidance. /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FindMessageStructureAsync(CancellationToken cancellationToken = default) @@ -799,6 +1395,8 @@ public virtual Task FindMessageStructureAsync(Canc /// /// This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. /// Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process. + /// + /// /// The response from the API contains: /// /// @@ -823,6 +1421,10 @@ public virtual Task FindMessageStructureAsync(Canc /// All this information can be calculated by the structure finder with no guidance. /// However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. /// + /// + /// If the structure finder produces unexpected results, specify the explain query parameter and an explanation will appear in the response. + /// It helps determine why the returned structure was chosen. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task FindMessageStructureAsync(Action configureRequest, CancellationToken cancellationToken = default) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Xpack.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Xpack.g.cs index c456147620c..6ba1065a617 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Xpack.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Xpack.g.cs @@ -61,7 +61,7 @@ internal XpackNamespacedClient(ElasticsearchClient client) : base(client) /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual XpackInfoResponse Info(XpackInfoRequest request) @@ -92,7 +92,7 @@ public virtual XpackInfoResponse Info(XpackInfoRequest request) /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task InfoAsync(XpackInfoRequest request, CancellationToken cancellationToken = default) { @@ -122,7 +122,7 @@ public virtual Task InfoAsync(XpackInfoRequest request, Cance /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual XpackInfoResponse Info(XpackInfoRequestDescriptor descriptor) @@ -153,7 +153,7 @@ public virtual XpackInfoResponse Info(XpackInfoRequestDescriptor descriptor) /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual XpackInfoResponse Info() @@ -185,7 +185,7 @@ public virtual XpackInfoResponse Info() /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual XpackInfoResponse Info(Action configureRequest) @@ -218,7 +218,7 @@ public virtual XpackInfoResponse Info(Action configu /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task InfoAsync(XpackInfoRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -248,7 +248,7 @@ public virtual Task InfoAsync(XpackInfoRequestDescriptor desc /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task InfoAsync(CancellationToken cancellationToken = default) { @@ -279,7 +279,7 @@ public virtual Task InfoAsync(CancellationToken cancellationT /// /// /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task InfoAsync(Action configureRequest, CancellationToken cancellationToken = default) { @@ -295,7 +295,7 @@ public virtual Task InfoAsync(Action - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual XpackUsageResponse Usage(XpackUsageRequest request) @@ -310,7 +310,7 @@ public virtual XpackUsageResponse Usage(XpackUsageRequest request) /// Get information about the features that are currently enabled and available under the current license. /// The API also provides some usage statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task UsageAsync(XpackUsageRequest request, CancellationToken cancellationToken = default) { @@ -324,7 +324,7 @@ public virtual Task UsageAsync(XpackUsageRequest request, Ca /// Get information about the features that are currently enabled and available under the current license. /// The API also provides some usage statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual XpackUsageResponse Usage(XpackUsageRequestDescriptor descriptor) @@ -339,7 +339,7 @@ public virtual XpackUsageResponse Usage(XpackUsageRequestDescriptor descriptor) /// Get information about the features that are currently enabled and available under the current license. /// The API also provides some usage statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual XpackUsageResponse Usage() @@ -355,7 +355,7 @@ public virtual XpackUsageResponse Usage() /// Get information about the features that are currently enabled and available under the current license. /// The API also provides some usage statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual XpackUsageResponse Usage(Action configureRequest) @@ -372,7 +372,7 @@ public virtual XpackUsageResponse Usage(Action conf /// Get information about the features that are currently enabled and available under the current license. /// The API also provides some usage statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task UsageAsync(XpackUsageRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -386,7 +386,7 @@ public virtual Task UsageAsync(XpackUsageRequestDescriptor d /// Get information about the features that are currently enabled and available under the current license. /// The API also provides some usage statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task UsageAsync(CancellationToken cancellationToken = default) { @@ -401,7 +401,7 @@ public virtual Task UsageAsync(CancellationToken cancellatio /// Get information about the features that are currently enabled and available under the current license. /// The API also provides some usage statistics. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task UsageAsync(Action configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs index d3ce0ad78fe..01649feef83 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs @@ -38,6 +38,7 @@ using Elastic.Clients.Elasticsearch.SearchableSnapshots; using Elastic.Clients.Elasticsearch.SearchApplication; using Elastic.Clients.Elasticsearch.Security; +using Elastic.Clients.Elasticsearch.Simulate; using Elastic.Clients.Elasticsearch.Snapshot; using Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement; using Elastic.Clients.Elasticsearch.Sql; @@ -76,6 +77,7 @@ public partial class ElasticsearchClient public virtual SearchableSnapshotsNamespacedClient SearchableSnapshots { get; private set; } public virtual SearchApplicationNamespacedClient SearchApplication { get; private set; } public virtual SecurityNamespacedClient Security { get; private set; } + public virtual SimulateNamespacedClient Simulate { get; private set; } public virtual SnapshotNamespacedClient Snapshot { get; private set; } public virtual SnapshotLifecycleManagementNamespacedClient SnapshotLifecycleManagement { get; private set; } public virtual SqlNamespacedClient Sql { get; private set; } @@ -108,6 +110,7 @@ private partial void SetupNamespaces() SearchableSnapshots = new SearchableSnapshotsNamespacedClient(this); SearchApplication = new SearchApplicationNamespacedClient(this); Security = new SecurityNamespacedClient(this); + Simulate = new SimulateNamespacedClient(this); Snapshot = new SnapshotNamespacedClient(this); SnapshotLifecycleManagement = new SnapshotLifecycleManagementNamespacedClient(this); Sql = new SqlNamespacedClient(this); @@ -121,9 +124,192 @@ private partial void SetupNamespaces() /// /// /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -136,9 +322,192 @@ public virtual BulkResponse Bulk(BulkRequest request) /// /// /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task BulkAsync(BulkRequest request, CancellationToken cancellationToken = default) @@ -150,9 +519,192 @@ public virtual Task BulkAsync(BulkRequest request, CancellationTok /// /// /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -165,13 +717,196 @@ public virtual BulkResponse Bulk(BulkRequestDescriptor des /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual BulkResponse Bulk(Elastic.Clients.Elasticsearch.IndexName? index) + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual BulkResponse Bulk(Elastic.Clients.Elasticsearch.IndexName? index) { var descriptor = new BulkRequestDescriptor(index); descriptor.BeforeRequest(); @@ -181,9 +916,192 @@ public virtual BulkResponse Bulk(Elastic.Clients.Elasticsearch.IndexN /// /// /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -198,9 +1116,192 @@ public virtual BulkResponse Bulk(Elastic.Clients.Elasticsearch.IndexN /// /// /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -214,9 +1315,192 @@ public virtual BulkResponse Bulk() /// /// /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -231,9 +1515,192 @@ public virtual BulkResponse Bulk(Action /// /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -246,9 +1713,192 @@ public virtual BulkResponse Bulk(BulkRequestDescriptor descriptor) /// /// /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -262,13 +1912,196 @@ public virtual BulkResponse Bulk(Elastic.Clients.Elasticsearch.IndexName? index) /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual BulkResponse Bulk(Elastic.Clients.Elasticsearch.IndexName? index, Action configureRequest) + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual BulkResponse Bulk(Elastic.Clients.Elasticsearch.IndexName? index, Action configureRequest) { var descriptor = new BulkRequestDescriptor(index); configureRequest?.Invoke(descriptor); @@ -279,9 +2112,192 @@ public virtual BulkResponse Bulk(Elastic.Clients.Elasticsearch.IndexName? index, /// /// /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -295,9 +2311,192 @@ public virtual BulkResponse Bulk() /// /// /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] @@ -312,9 +2511,192 @@ public virtual BulkResponse Bulk(Action configureRequest) /// /// /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task BulkAsync(BulkRequestDescriptor descriptor, CancellationToken cancellationToken = default) @@ -326,9 +2708,192 @@ public virtual Task BulkAsync(BulkRequestDescriptor /// /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task BulkAsync(Elastic.Clients.Elasticsearch.IndexName? index, CancellationToken cancellationToken = default) @@ -341,9 +2906,192 @@ public virtual Task BulkAsync(Elastic.Clients.Elasticse /// /// /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task BulkAsync(Elastic.Clients.Elasticsearch.IndexName? index, Action> configureRequest, CancellationToken cancellationToken = default) @@ -357,13 +3105,196 @@ public virtual Task BulkAsync(Elastic.Clients.Elasticse /// /// /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkAsync(CancellationToken cancellationToken = default) - { + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task BulkAsync(CancellationToken cancellationToken = default) + { var descriptor = new BulkRequestDescriptor(); descriptor.BeforeRequest(); return DoRequestAsync, BulkResponse, BulkRequestParameters>(descriptor, cancellationToken); @@ -372,9 +3303,192 @@ public virtual Task BulkAsync(CancellationToken cancell /// /// /// 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. + /// /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task BulkAsync(Action> configureRequest, CancellationToken cancellationToken = default) @@ -387,11448 +3501,38277 @@ public virtual Task BulkAsync(Action /// - /// Bulk index or delete documents. - /// Performs multiple indexing or delete operations in a single API call. - /// This reduces overhead and can greatly increase indexing speed. + /// Bulk index or delete documents. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task BulkAsync(BulkRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Bulk index or delete documents. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task BulkAsync(Elastic.Clients.Elasticsearch.IndexName? index, CancellationToken cancellationToken = default) + { + var descriptor = new BulkRequestDescriptor(index); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Bulk index or delete documents. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task BulkAsync(Elastic.Clients.Elasticsearch.IndexName? index, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new BulkRequestDescriptor(index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Bulk index or delete documents. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task BulkAsync(CancellationToken cancellationToken = default) + { + var descriptor = new BulkRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Bulk index or delete documents. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task BulkAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new BulkRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Clear a scrolling search. + /// Clear the search context and results for a scrolling search. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ClearScrollResponse ClearScroll(ClearScrollRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Clear a scrolling search. + /// Clear the search context and results for a scrolling search. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ClearScrollAsync(ClearScrollRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Clear a scrolling search. + /// Clear the search context and results for a scrolling search. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ClearScrollResponse ClearScroll(ClearScrollRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Clear a scrolling search. + /// Clear the search context and results for a scrolling search. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ClearScrollResponse ClearScroll() + { + var descriptor = new ClearScrollRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Clear a scrolling search. + /// Clear the search context and results for a scrolling search. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ClearScrollResponse ClearScroll(Action configureRequest) + { + var descriptor = new ClearScrollRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Clear a scrolling search. + /// Clear the search context and results for a scrolling search. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ClearScrollAsync(ClearScrollRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Clear a scrolling search. + /// Clear the search context and results for a scrolling search. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ClearScrollAsync(CancellationToken cancellationToken = default) + { + var descriptor = new ClearScrollRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Clear a scrolling search. + /// Clear the search context and results for a scrolling search. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ClearScrollAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ClearScrollRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ClosePointInTimeResponse ClosePointInTime(ClosePointInTimeRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// 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. + /// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ClosePointInTimeAsync(ClosePointInTimeRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// 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. + /// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ClosePointInTimeResponse ClosePointInTime(ClosePointInTimeRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ClosePointInTimeResponse ClosePointInTime() + { + var descriptor = new ClosePointInTimeRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ClosePointInTimeResponse ClosePointInTime(Action configureRequest) + { + var descriptor = new ClosePointInTimeRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ClosePointInTimeAsync(ClosePointInTimeRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ClosePointInTimeAsync(CancellationToken cancellationToken = default) + { + var descriptor = new ClosePointInTimeRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ClosePointInTimeAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ClosePointInTimeRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CountResponse Count(CountRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CountAsync(CountRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CountResponse Count(CountRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, CountResponse, CountRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CountResponse Count(Elastic.Clients.Elasticsearch.Indices? indices) + { + var descriptor = new CountRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequest, CountResponse, CountRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CountResponse Count(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) + { + var descriptor = new CountRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, CountResponse, CountRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CountResponse Count() + { + var descriptor = new CountRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest, CountResponse, CountRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CountResponse Count(Action> configureRequest) + { + var descriptor = new CountRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, CountResponse, CountRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CountResponse Count(CountRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CountResponse Count(Elastic.Clients.Elasticsearch.Indices? indices) + { + var descriptor = new CountRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CountResponse Count(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest) + { + var descriptor = new CountRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CountResponse Count() + { + var descriptor = new CountRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CountResponse Count(Action configureRequest) + { + var descriptor = new CountRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CountAsync(CountRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, CountResponse, CountRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CountAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) + { + var descriptor = new CountRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequestAsync, CountResponse, CountRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CountAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new CountRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, CountResponse, CountRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CountAsync(CancellationToken cancellationToken = default) + { + var descriptor = new CountRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync, CountResponse, CountRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CountAsync(Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new CountRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, CountResponse, CountRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CountAsync(CountRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CountAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) + { + var descriptor = new CountRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CountAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new CountRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CountAsync(CancellationToken cancellationToken = default) + { + var descriptor = new CountRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CountAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new CountRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CreateResponse Create(CreateRequest request) + { + request.BeforeRequest(); + return DoRequest, CreateResponse, CreateRequestParameters>(request); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateAsync(CreateRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync, CreateResponse, CreateRequestParameters>(request, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CreateResponse Create(CreateRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, CreateResponse, CreateRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CreateResponse Create(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new CreateRequestDescriptor(document, index, id); + descriptor.BeforeRequest(); + return DoRequest, CreateResponse, CreateRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CreateResponse Create(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new CreateRequestDescriptor(document, index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, CreateResponse, CreateRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CreateResponse Create(TDocument document) + { + var descriptor = new CreateRequestDescriptor(document); + descriptor.BeforeRequest(); + return DoRequest, CreateResponse, CreateRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CreateResponse Create(TDocument document, Action> configureRequest) + { + var descriptor = new CreateRequestDescriptor(document); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, CreateResponse, CreateRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CreateResponse Create(TDocument document, Elastic.Clients.Elasticsearch.IndexName index) + { + var descriptor = new CreateRequestDescriptor(document, index); + descriptor.BeforeRequest(); + return DoRequest, CreateResponse, CreateRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CreateResponse Create(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) + { + var descriptor = new CreateRequestDescriptor(document, index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, CreateResponse, CreateRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CreateResponse Create(TDocument document, Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new CreateRequestDescriptor(document, id); + descriptor.BeforeRequest(); + return DoRequest, CreateResponse, CreateRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual CreateResponse Create(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new CreateRequestDescriptor(document, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, CreateResponse, CreateRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateAsync(CreateRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new CreateRequestDescriptor(document, index, id); + descriptor.BeforeRequest(); + return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new CreateRequestDescriptor(document, index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateAsync(TDocument document, CancellationToken cancellationToken = default) + { + var descriptor = new CreateRequestDescriptor(document); + descriptor.BeforeRequest(); + return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new CreateRequestDescriptor(document); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) + { + var descriptor = new CreateRequestDescriptor(document, index); + descriptor.BeforeRequest(); + return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new CreateRequestDescriptor(document, index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new CreateRequestDescriptor(document, id); + descriptor.BeforeRequest(); + return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task CreateAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new CreateRequestDescriptor(document, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteResponse Delete(DeleteRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(DeleteRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteResponse Delete(DeleteRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteResponse Delete(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new DeleteRequestDescriptor(index, id); + descriptor.BeforeRequest(); + return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteResponse Delete(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new DeleteRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteResponse Delete(TDocument document) + { + var descriptor = new DeleteRequestDescriptor(document); + descriptor.BeforeRequest(); + return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteResponse Delete(TDocument document, Action> configureRequest) + { + var descriptor = new DeleteRequestDescriptor(document); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteResponse Delete(TDocument document, Elastic.Clients.Elasticsearch.IndexName index) + { + var descriptor = new DeleteRequestDescriptor(document, index); + descriptor.BeforeRequest(); + return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteResponse Delete(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) + { + var descriptor = new DeleteRequestDescriptor(document, index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteResponse Delete(TDocument document, Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new DeleteRequestDescriptor(document, id); + descriptor.BeforeRequest(); + return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteResponse Delete(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new DeleteRequestDescriptor(document, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteResponse Delete(Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new DeleteRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteResponse Delete(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new DeleteRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteResponse Delete(DeleteRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteResponse Delete(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new DeleteRequestDescriptor(index, id); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteResponse Delete(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action configureRequest) + { + var descriptor = new DeleteRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(DeleteRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteRequestDescriptor(index, id); + descriptor.BeforeRequest(); + return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(TDocument document, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteRequestDescriptor(document); + descriptor.BeforeRequest(); + return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteRequestDescriptor(document); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteRequestDescriptor(document, index); + descriptor.BeforeRequest(); + return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteRequestDescriptor(document, index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteRequestDescriptor(document, id); + descriptor.BeforeRequest(); + return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteRequestDescriptor(document, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(DeleteRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteRequestDescriptor(index, id); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Delete a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteByQueryResponse DeleteByQuery(DeleteByQueryRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteByQueryAsync(DeleteByQueryRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteByQueryResponse DeleteByQuery(DeleteByQueryRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteByQueryResponse DeleteByQuery(Elastic.Clients.Elasticsearch.Indices indices) + { + var descriptor = new DeleteByQueryRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequest, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteByQueryResponse DeleteByQuery(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest) + { + var descriptor = new DeleteByQueryRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteByQueryResponse DeleteByQuery() + { + var descriptor = new DeleteByQueryRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteByQueryResponse DeleteByQuery(Action> configureRequest) + { + var descriptor = new DeleteByQueryRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteByQueryResponse DeleteByQuery(DeleteByQueryRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteByQueryResponse DeleteByQuery(Elastic.Clients.Elasticsearch.Indices indices) + { + var descriptor = new DeleteByQueryRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteByQueryResponse DeleteByQuery(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest) + { + var descriptor = new DeleteByQueryRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteByQueryAsync(DeleteByQueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteByQueryAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteByQueryRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequestAsync, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteByQueryAsync(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteByQueryRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteByQueryAsync(CancellationToken cancellationToken = default) + { + var descriptor = new DeleteByQueryRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteByQueryAsync(Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteByQueryRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteByQueryAsync(DeleteByQueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteByQueryAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteByQueryRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteByQueryAsync(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteByQueryRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Throttle a delete by query operation. + /// + /// + /// Change the number of requests per second for a particular delete by query operation. + /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteByQueryRethrottleResponse DeleteByQueryRethrottle(DeleteByQueryRethrottleRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Throttle a delete by query operation. + /// + /// + /// Change the number of requests per second for a particular delete by query operation. + /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteByQueryRethrottleAsync(DeleteByQueryRethrottleRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Throttle a delete by query operation. + /// + /// + /// Change the number of requests per second for a particular delete by query operation. + /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteByQueryRethrottleResponse DeleteByQueryRethrottle(DeleteByQueryRethrottleRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Throttle a delete by query operation. + /// + /// + /// Change the number of requests per second for a particular delete by query operation. + /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteByQueryRethrottleResponse DeleteByQueryRethrottle(Elastic.Clients.Elasticsearch.TaskId taskId) + { + var descriptor = new DeleteByQueryRethrottleRequestDescriptor(taskId); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Throttle a delete by query operation. + /// + /// + /// Change the number of requests per second for a particular delete by query operation. + /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteByQueryRethrottleResponse DeleteByQueryRethrottle(Elastic.Clients.Elasticsearch.TaskId taskId, Action configureRequest) + { + var descriptor = new DeleteByQueryRethrottleRequestDescriptor(taskId); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Throttle a delete by query operation. + /// + /// + /// Change the number of requests per second for a particular delete by query operation. + /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteByQueryRethrottleAsync(DeleteByQueryRethrottleRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Throttle a delete by query operation. + /// + /// + /// Change the number of requests per second for a particular delete by query operation. + /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteByQueryRethrottleAsync(Elastic.Clients.Elasticsearch.TaskId taskId, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteByQueryRethrottleRequestDescriptor(taskId); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Throttle a delete by query operation. + /// + /// + /// Change the number of requests per second for a particular delete by query operation. + /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteByQueryRethrottleAsync(Elastic.Clients.Elasticsearch.TaskId taskId, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteByQueryRethrottleRequestDescriptor(taskId); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Delete a script or search template. + /// Deletes a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteScriptResponse DeleteScript(DeleteScriptRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Delete a script or search template. + /// Deletes a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteScriptAsync(DeleteScriptRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Delete a script or search template. + /// Deletes a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteScriptResponse DeleteScript(DeleteScriptRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, DeleteScriptResponse, DeleteScriptRequestParameters>(descriptor); + } + + /// + /// + /// Delete a script or search template. + /// Deletes a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteScriptResponse DeleteScript(Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new DeleteScriptRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequest, DeleteScriptResponse, DeleteScriptRequestParameters>(descriptor); + } + + /// + /// + /// Delete a script or search template. + /// Deletes a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteScriptResponse DeleteScript(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new DeleteScriptRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, DeleteScriptResponse, DeleteScriptRequestParameters>(descriptor); + } + + /// + /// + /// Delete a script or search template. + /// Deletes a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteScriptResponse DeleteScript(DeleteScriptRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Delete a script or search template. + /// Deletes a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteScriptResponse DeleteScript(Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new DeleteScriptRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Delete a script or search template. + /// Deletes a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual DeleteScriptResponse DeleteScript(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) + { + var descriptor = new DeleteScriptRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Delete a script or search template. + /// Deletes a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteScriptAsync(DeleteScriptRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, DeleteScriptResponse, DeleteScriptRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Delete a script or search template. + /// Deletes a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteScriptAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteScriptRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequestAsync, DeleteScriptResponse, DeleteScriptRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Delete a script or search template. + /// Deletes a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteScriptAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteScriptRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, DeleteScriptResponse, DeleteScriptRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Delete a script or search template. + /// Deletes a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteScriptAsync(DeleteScriptRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Delete a script or search template. + /// Deletes a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteScriptAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteScriptRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Delete a script or search template. + /// Deletes a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteScriptAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteScriptRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsResponse Exists(ExistsRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsAsync(ExistsRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsResponse Exists(ExistsRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsResponse Exists(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new ExistsRequestDescriptor(index, id); + descriptor.BeforeRequest(); + return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsResponse Exists(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new ExistsRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsResponse Exists(TDocument document) + { + var descriptor = new ExistsRequestDescriptor(document); + descriptor.BeforeRequest(); + return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsResponse Exists(TDocument document, Action> configureRequest) + { + var descriptor = new ExistsRequestDescriptor(document); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsResponse Exists(TDocument document, Elastic.Clients.Elasticsearch.IndexName index) + { + var descriptor = new ExistsRequestDescriptor(document, index); + descriptor.BeforeRequest(); + return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsResponse Exists(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) + { + var descriptor = new ExistsRequestDescriptor(document, index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsResponse Exists(TDocument document, Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new ExistsRequestDescriptor(document, id); + descriptor.BeforeRequest(); + return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsResponse Exists(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new ExistsRequestDescriptor(document, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsResponse Exists(Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new ExistsRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsResponse Exists(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new ExistsRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsResponse Exists(ExistsRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsResponse Exists(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new ExistsRequestDescriptor(index, id); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsResponse Exists(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action configureRequest) + { + var descriptor = new ExistsRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsAsync(ExistsRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsRequestDescriptor(index, id); + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsAsync(TDocument document, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsRequestDescriptor(document); + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsRequestDescriptor(document); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsRequestDescriptor(document, index); + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsRequestDescriptor(document, index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsRequestDescriptor(document, id); + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsRequestDescriptor(document, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsAsync(ExistsRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsRequestDescriptor(index, id); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Check a document. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsSourceResponse ExistsSource(ExistsSourceRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsSourceAsync(ExistsSourceRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsSourceResponse ExistsSource(ExistsSourceRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsSourceResponse ExistsSource(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new ExistsSourceRequestDescriptor(index, id); + descriptor.BeforeRequest(); + return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsSourceResponse ExistsSource(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new ExistsSourceRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsSourceResponse ExistsSource(TDocument document) + { + var descriptor = new ExistsSourceRequestDescriptor(document); + descriptor.BeforeRequest(); + return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsSourceResponse ExistsSource(TDocument document, Action> configureRequest) + { + var descriptor = new ExistsSourceRequestDescriptor(document); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsSourceResponse ExistsSource(TDocument document, Elastic.Clients.Elasticsearch.IndexName index) + { + var descriptor = new ExistsSourceRequestDescriptor(document, index); + descriptor.BeforeRequest(); + return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsSourceResponse ExistsSource(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) + { + var descriptor = new ExistsSourceRequestDescriptor(document, index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsSourceResponse ExistsSource(TDocument document, Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new ExistsSourceRequestDescriptor(document, id); + descriptor.BeforeRequest(); + return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsSourceResponse ExistsSource(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new ExistsSourceRequestDescriptor(document, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsSourceResponse ExistsSource(Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new ExistsSourceRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsSourceResponse ExistsSource(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new ExistsSourceRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsSourceResponse ExistsSource(ExistsSourceRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsSourceResponse ExistsSource(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new ExistsSourceRequestDescriptor(index, id); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExistsSourceResponse ExistsSource(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action configureRequest) + { + var descriptor = new ExistsSourceRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsSourceAsync(ExistsSourceRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsSourceAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsSourceRequestDescriptor(index, id); + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsSourceAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsSourceRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsSourceAsync(TDocument document, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsSourceRequestDescriptor(document); + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsSourceAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsSourceRequestDescriptor(document); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsSourceRequestDescriptor(document, index); + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsSourceRequestDescriptor(document, index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsSourceRequestDescriptor(document, id); + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsSourceRequestDescriptor(document, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsSourceAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsSourceRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsSourceAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsSourceRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsSourceAsync(ExistsSourceRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsSourceAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsSourceRequestDescriptor(index, id); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Check for a document source. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ExistsSourceAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsSourceRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExplainResponse Explain(ExplainRequest request) + { + request.BeforeRequest(); + return DoRequest, ExplainRequestParameters>(request); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> ExplainAsync(ExplainRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync, ExplainRequestParameters>(request, cancellationToken); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExplainResponse Explain(ExplainRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExplainResponse Explain(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new ExplainRequestDescriptor(index, id); + descriptor.BeforeRequest(); + return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExplainResponse Explain(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new ExplainRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExplainResponse Explain(TDocument document) + { + var descriptor = new ExplainRequestDescriptor(document); + descriptor.BeforeRequest(); + return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExplainResponse Explain(TDocument document, Action> configureRequest) + { + var descriptor = new ExplainRequestDescriptor(document); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExplainResponse Explain(TDocument document, Elastic.Clients.Elasticsearch.IndexName index) + { + var descriptor = new ExplainRequestDescriptor(document, index); + descriptor.BeforeRequest(); + return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExplainResponse Explain(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) + { + var descriptor = new ExplainRequestDescriptor(document, index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExplainResponse Explain(TDocument document, Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new ExplainRequestDescriptor(document, id); + descriptor.BeforeRequest(); + return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExplainResponse Explain(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new ExplainRequestDescriptor(document, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExplainResponse Explain(Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new ExplainRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ExplainResponse Explain(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new ExplainRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> ExplainAsync(ExplainRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> ExplainAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new ExplainRequestDescriptor(index, id); + descriptor.BeforeRequest(); + return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> ExplainAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ExplainRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> ExplainAsync(TDocument document, CancellationToken cancellationToken = default) + { + var descriptor = new ExplainRequestDescriptor(document); + descriptor.BeforeRequest(); + return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> ExplainAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ExplainRequestDescriptor(document); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> ExplainAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) + { + var descriptor = new ExplainRequestDescriptor(document, index); + descriptor.BeforeRequest(); + return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> ExplainAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ExplainRequestDescriptor(document, index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> ExplainAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new ExplainRequestDescriptor(document, id); + descriptor.BeforeRequest(); + return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> ExplainAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ExplainRequestDescriptor(document, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> ExplainAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new ExplainRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Explain a document match result. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> ExplainAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ExplainRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual FieldCapsResponse FieldCaps(FieldCapsRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task FieldCapsAsync(FieldCapsRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual FieldCapsResponse FieldCaps(FieldCapsRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, FieldCapsResponse, FieldCapsRequestParameters>(descriptor); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual FieldCapsResponse FieldCaps(Elastic.Clients.Elasticsearch.Indices? indices) + { + var descriptor = new FieldCapsRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequest, FieldCapsResponse, FieldCapsRequestParameters>(descriptor); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual FieldCapsResponse FieldCaps(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) + { + var descriptor = new FieldCapsRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, FieldCapsResponse, FieldCapsRequestParameters>(descriptor); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual FieldCapsResponse FieldCaps() + { + var descriptor = new FieldCapsRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest, FieldCapsResponse, FieldCapsRequestParameters>(descriptor); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual FieldCapsResponse FieldCaps(Action> configureRequest) + { + var descriptor = new FieldCapsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, FieldCapsResponse, FieldCapsRequestParameters>(descriptor); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual FieldCapsResponse FieldCaps(FieldCapsRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual FieldCapsResponse FieldCaps(Elastic.Clients.Elasticsearch.Indices? indices) + { + var descriptor = new FieldCapsRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual FieldCapsResponse FieldCaps(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest) + { + var descriptor = new FieldCapsRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual FieldCapsResponse FieldCaps() + { + var descriptor = new FieldCapsRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual FieldCapsResponse FieldCaps(Action configureRequest) + { + var descriptor = new FieldCapsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task FieldCapsAsync(FieldCapsRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, FieldCapsResponse, FieldCapsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task FieldCapsAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) + { + var descriptor = new FieldCapsRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequestAsync, FieldCapsResponse, FieldCapsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task FieldCapsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new FieldCapsRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, FieldCapsResponse, FieldCapsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task FieldCapsAsync(CancellationToken cancellationToken = default) + { + var descriptor = new FieldCapsRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync, FieldCapsResponse, FieldCapsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task FieldCapsAsync(Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new FieldCapsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, FieldCapsResponse, FieldCapsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task FieldCapsAsync(FieldCapsRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task FieldCapsAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) + { + var descriptor = new FieldCapsRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task FieldCapsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new FieldCapsRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task FieldCapsAsync(CancellationToken cancellationToken = default) + { + var descriptor = new FieldCapsRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get the field capabilities. + /// + /// + /// Get information about the capabilities of fields among multiple indices. + /// + /// + /// For data streams, the API returns field capabilities among the stream’s backing indices. + /// It returns runtime fields like any other field. + /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task FieldCapsAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new FieldCapsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetResponse Get(GetRequest request) + { + request.BeforeRequest(); + return DoRequest, GetRequestParameters>(request); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetAsync(GetRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync, GetRequestParameters>(request, cancellationToken); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetResponse Get(GetRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, GetResponse, GetRequestParameters>(descriptor); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetResponse Get(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new GetRequestDescriptor(index, id); + descriptor.BeforeRequest(); + return DoRequest, GetResponse, GetRequestParameters>(descriptor); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetResponse Get(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new GetRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, GetResponse, GetRequestParameters>(descriptor); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetResponse Get(TDocument document) + { + var descriptor = new GetRequestDescriptor(document); + descriptor.BeforeRequest(); + return DoRequest, GetResponse, GetRequestParameters>(descriptor); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetResponse Get(TDocument document, Action> configureRequest) + { + var descriptor = new GetRequestDescriptor(document); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, GetResponse, GetRequestParameters>(descriptor); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetResponse Get(TDocument document, Elastic.Clients.Elasticsearch.IndexName index) + { + var descriptor = new GetRequestDescriptor(document, index); + descriptor.BeforeRequest(); + return DoRequest, GetResponse, GetRequestParameters>(descriptor); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetResponse Get(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) + { + var descriptor = new GetRequestDescriptor(document, index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, GetResponse, GetRequestParameters>(descriptor); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetResponse Get(TDocument document, Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new GetRequestDescriptor(document, id); + descriptor.BeforeRequest(); + return DoRequest, GetResponse, GetRequestParameters>(descriptor); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetResponse Get(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new GetRequestDescriptor(document, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, GetResponse, GetRequestParameters>(descriptor); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetResponse Get(Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new GetRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequest, GetResponse, GetRequestParameters>(descriptor); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetResponse Get(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new GetRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, GetResponse, GetRequestParameters>(descriptor); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetAsync(GetRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new GetRequestDescriptor(index, id); + descriptor.BeforeRequest(); + return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetAsync(TDocument document, CancellationToken cancellationToken = default) + { + var descriptor = new GetRequestDescriptor(document); + descriptor.BeforeRequest(); + return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetRequestDescriptor(document); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) + { + var descriptor = new GetRequestDescriptor(document, index); + descriptor.BeforeRequest(); + return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetRequestDescriptor(document, index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new GetRequestDescriptor(document, id); + descriptor.BeforeRequest(); + return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetRequestDescriptor(document, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new GetRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a document by its ID. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a script or search template. + /// Retrieves a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetScriptResponse GetScript(GetScriptRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Get a script or search template. + /// Retrieves a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetScriptAsync(GetScriptRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Get a script or search template. + /// Retrieves a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetScriptResponse GetScript(GetScriptRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, GetScriptResponse, GetScriptRequestParameters>(descriptor); + } + + /// + /// + /// Get a script or search template. + /// Retrieves a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetScriptResponse GetScript(Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new GetScriptRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequest, GetScriptResponse, GetScriptRequestParameters>(descriptor); + } + + /// + /// + /// Get a script or search template. + /// Retrieves a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetScriptResponse GetScript(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new GetScriptRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, GetScriptResponse, GetScriptRequestParameters>(descriptor); + } + + /// + /// + /// Get a script or search template. + /// Retrieves a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetScriptResponse GetScript(GetScriptRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get a script or search template. + /// Retrieves a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetScriptResponse GetScript(Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new GetScriptRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get a script or search template. + /// Retrieves a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetScriptResponse GetScript(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) + { + var descriptor = new GetScriptRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get a script or search template. + /// Retrieves a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetScriptAsync(GetScriptRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, GetScriptResponse, GetScriptRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a script or search template. + /// Retrieves a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetScriptAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new GetScriptRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequestAsync, GetScriptResponse, GetScriptRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a script or search template. + /// Retrieves a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetScriptAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetScriptRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, GetScriptResponse, GetScriptRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a script or search template. + /// Retrieves a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetScriptAsync(GetScriptRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get a script or search template. + /// Retrieves a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetScriptAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new GetScriptRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get a script or search template. + /// Retrieves a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetScriptAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetScriptRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get script contexts. + /// + /// + /// Get a list of supported script contexts and their methods. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetScriptContextResponse GetScriptContext(GetScriptContextRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Get script contexts. + /// + /// + /// Get a list of supported script contexts and their methods. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetScriptContextAsync(GetScriptContextRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Get script contexts. + /// + /// + /// Get a list of supported script contexts and their methods. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetScriptContextResponse GetScriptContext(GetScriptContextRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get script contexts. + /// + /// + /// Get a list of supported script contexts and their methods. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetScriptContextResponse GetScriptContext() + { + var descriptor = new GetScriptContextRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get script contexts. + /// + /// + /// Get a list of supported script contexts and their methods. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetScriptContextResponse GetScriptContext(Action configureRequest) + { + var descriptor = new GetScriptContextRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get script contexts. + /// + /// + /// Get a list of supported script contexts and their methods. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetScriptContextAsync(GetScriptContextRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get script contexts. + /// + /// + /// Get a list of supported script contexts and their methods. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetScriptContextAsync(CancellationToken cancellationToken = default) + { + var descriptor = new GetScriptContextRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get script contexts. + /// + /// + /// Get a list of supported script contexts and their methods. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetScriptContextAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetScriptContextRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get script languages. + /// + /// + /// Get a list of available script types, languages, and contexts. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetScriptLanguagesResponse GetScriptLanguages(GetScriptLanguagesRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Get script languages. + /// + /// + /// Get a list of available script types, languages, and contexts. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetScriptLanguagesAsync(GetScriptLanguagesRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Get script languages. + /// + /// + /// Get a list of available script types, languages, and contexts. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetScriptLanguagesResponse GetScriptLanguages(GetScriptLanguagesRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get script languages. + /// + /// + /// Get a list of available script types, languages, and contexts. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetScriptLanguagesResponse GetScriptLanguages() + { + var descriptor = new GetScriptLanguagesRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get script languages. + /// + /// + /// Get a list of available script types, languages, and contexts. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetScriptLanguagesResponse GetScriptLanguages(Action configureRequest) + { + var descriptor = new GetScriptLanguagesRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get script languages. + /// + /// + /// Get a list of available script types, languages, and contexts. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetScriptLanguagesAsync(GetScriptLanguagesRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get script languages. + /// + /// + /// Get a list of available script types, languages, and contexts. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetScriptLanguagesAsync(CancellationToken cancellationToken = default) + { + var descriptor = new GetScriptLanguagesRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get script languages. + /// + /// + /// Get a list of available script types, languages, and contexts. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetScriptLanguagesAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetScriptLanguagesRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetSourceResponse GetSource(GetSourceRequest request) + { + request.BeforeRequest(); + return DoRequest, GetSourceRequestParameters>(request); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetSourceAsync(GetSourceRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync, GetSourceRequestParameters>(request, cancellationToken); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetSourceResponse GetSource(GetSourceRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetSourceResponse GetSource(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new GetSourceRequestDescriptor(index, id); + descriptor.BeforeRequest(); + return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetSourceResponse GetSource(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new GetSourceRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetSourceResponse GetSource(TDocument document) + { + var descriptor = new GetSourceRequestDescriptor(document); + descriptor.BeforeRequest(); + return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetSourceResponse GetSource(TDocument document, Action> configureRequest) + { + var descriptor = new GetSourceRequestDescriptor(document); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetSourceResponse GetSource(TDocument document, Elastic.Clients.Elasticsearch.IndexName index) + { + var descriptor = new GetSourceRequestDescriptor(document, index); + descriptor.BeforeRequest(); + return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetSourceResponse GetSource(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) + { + var descriptor = new GetSourceRequestDescriptor(document, index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetSourceResponse GetSource(TDocument document, Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new GetSourceRequestDescriptor(document, id); + descriptor.BeforeRequest(); + return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetSourceResponse GetSource(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new GetSourceRequestDescriptor(document, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetSourceResponse GetSource(Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new GetSourceRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual GetSourceResponse GetSource(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new GetSourceRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetSourceAsync(GetSourceRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetSourceAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new GetSourceRequestDescriptor(index, id); + descriptor.BeforeRequest(); + return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetSourceAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetSourceRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetSourceAsync(TDocument document, CancellationToken cancellationToken = default) + { + var descriptor = new GetSourceRequestDescriptor(document); + descriptor.BeforeRequest(); + return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetSourceAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetSourceRequestDescriptor(document); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) + { + var descriptor = new GetSourceRequestDescriptor(document, index); + descriptor.BeforeRequest(); + return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetSourceRequestDescriptor(document, index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new GetSourceRequestDescriptor(document, id); + descriptor.BeforeRequest(); + return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetSourceRequestDescriptor(document, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetSourceAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new GetSourceRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get a document's source. + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> GetSourceAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetSourceRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get the cluster health. + /// Get a report with the health status of an Elasticsearch cluster. + /// The report contains a list of indicators that compose Elasticsearch functionality. + /// + /// + /// Each indicator has a health status of: green, unknown, yellow or red. + /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// + /// + /// The cluster’s status is controlled by the worst indicator status. + /// + /// + /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. + /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// + /// + /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. + /// The root cause and remediation steps are encapsulated in a diagnosis. + /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// + /// + /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. + /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual HealthReportResponse HealthReport(HealthReportRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Get the cluster health. + /// Get a report with the health status of an Elasticsearch cluster. + /// The report contains a list of indicators that compose Elasticsearch functionality. + /// + /// + /// Each indicator has a health status of: green, unknown, yellow or red. + /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// + /// + /// The cluster’s status is controlled by the worst indicator status. + /// + /// + /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. + /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// + /// + /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. + /// The root cause and remediation steps are encapsulated in a diagnosis. + /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// + /// + /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. + /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task HealthReportAsync(HealthReportRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Get the cluster health. + /// Get a report with the health status of an Elasticsearch cluster. + /// The report contains a list of indicators that compose Elasticsearch functionality. + /// + /// + /// Each indicator has a health status of: green, unknown, yellow or red. + /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// + /// + /// The cluster’s status is controlled by the worst indicator status. + /// + /// + /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. + /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// + /// + /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. + /// The root cause and remediation steps are encapsulated in a diagnosis. + /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// + /// + /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. + /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual HealthReportResponse HealthReport(HealthReportRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get the cluster health. + /// Get a report with the health status of an Elasticsearch cluster. + /// The report contains a list of indicators that compose Elasticsearch functionality. + /// + /// + /// Each indicator has a health status of: green, unknown, yellow or red. + /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// + /// + /// The cluster’s status is controlled by the worst indicator status. + /// + /// + /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. + /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// + /// + /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. + /// The root cause and remediation steps are encapsulated in a diagnosis. + /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// + /// + /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. + /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual HealthReportResponse HealthReport(IReadOnlyCollection? feature) + { + var descriptor = new HealthReportRequestDescriptor(feature); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get the cluster health. + /// Get a report with the health status of an Elasticsearch cluster. + /// The report contains a list of indicators that compose Elasticsearch functionality. + /// + /// + /// Each indicator has a health status of: green, unknown, yellow or red. + /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// + /// + /// The cluster’s status is controlled by the worst indicator status. + /// + /// + /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. + /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// + /// + /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. + /// The root cause and remediation steps are encapsulated in a diagnosis. + /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// + /// + /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. + /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual HealthReportResponse HealthReport(IReadOnlyCollection? feature, Action configureRequest) + { + var descriptor = new HealthReportRequestDescriptor(feature); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get the cluster health. + /// Get a report with the health status of an Elasticsearch cluster. + /// The report contains a list of indicators that compose Elasticsearch functionality. + /// + /// + /// Each indicator has a health status of: green, unknown, yellow or red. + /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// + /// + /// The cluster’s status is controlled by the worst indicator status. + /// + /// + /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. + /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// + /// + /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. + /// The root cause and remediation steps are encapsulated in a diagnosis. + /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// + /// + /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. + /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual HealthReportResponse HealthReport() + { + var descriptor = new HealthReportRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get the cluster health. + /// Get a report with the health status of an Elasticsearch cluster. + /// The report contains a list of indicators that compose Elasticsearch functionality. + /// + /// + /// Each indicator has a health status of: green, unknown, yellow or red. + /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// + /// + /// The cluster’s status is controlled by the worst indicator status. + /// + /// + /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. + /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// + /// + /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. + /// The root cause and remediation steps are encapsulated in a diagnosis. + /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// + /// + /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. + /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual HealthReportResponse HealthReport(Action configureRequest) + { + var descriptor = new HealthReportRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get the cluster health. + /// Get a report with the health status of an Elasticsearch cluster. + /// The report contains a list of indicators that compose Elasticsearch functionality. + /// + /// + /// Each indicator has a health status of: green, unknown, yellow or red. + /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// + /// + /// The cluster’s status is controlled by the worst indicator status. + /// + /// + /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. + /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// + /// + /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. + /// The root cause and remediation steps are encapsulated in a diagnosis. + /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// + /// + /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. + /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task HealthReportAsync(HealthReportRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get the cluster health. + /// Get a report with the health status of an Elasticsearch cluster. + /// The report contains a list of indicators that compose Elasticsearch functionality. + /// + /// + /// Each indicator has a health status of: green, unknown, yellow or red. + /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// + /// + /// The cluster’s status is controlled by the worst indicator status. + /// + /// + /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. + /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// + /// + /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. + /// The root cause and remediation steps are encapsulated in a diagnosis. + /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// + /// + /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. + /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task HealthReportAsync(IReadOnlyCollection? feature, CancellationToken cancellationToken = default) + { + var descriptor = new HealthReportRequestDescriptor(feature); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get the cluster health. + /// Get a report with the health status of an Elasticsearch cluster. + /// The report contains a list of indicators that compose Elasticsearch functionality. + /// + /// + /// Each indicator has a health status of: green, unknown, yellow or red. + /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// + /// + /// The cluster’s status is controlled by the worst indicator status. + /// + /// + /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. + /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// + /// + /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. + /// The root cause and remediation steps are encapsulated in a diagnosis. + /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// + /// + /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. + /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task HealthReportAsync(IReadOnlyCollection? feature, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new HealthReportRequestDescriptor(feature); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get the cluster health. + /// Get a report with the health status of an Elasticsearch cluster. + /// The report contains a list of indicators that compose Elasticsearch functionality. + /// + /// + /// Each indicator has a health status of: green, unknown, yellow or red. + /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// + /// + /// The cluster’s status is controlled by the worst indicator status. + /// + /// + /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. + /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// + /// + /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. + /// The root cause and remediation steps are encapsulated in a diagnosis. + /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// + /// + /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. + /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task HealthReportAsync(CancellationToken cancellationToken = default) + { + var descriptor = new HealthReportRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get the cluster health. + /// Get a report with the health status of an Elasticsearch cluster. + /// The report contains a list of indicators that compose Elasticsearch functionality. + /// + /// + /// Each indicator has a health status of: green, unknown, yellow or red. + /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// + /// + /// The cluster’s status is controlled by the worst indicator status. + /// + /// + /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. + /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// + /// + /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. + /// The root cause and remediation steps are encapsulated in a diagnosis. + /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// + /// + /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. + /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task HealthReportAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new HealthReportRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IndexResponse Index(IndexRequest request) + { + request.BeforeRequest(); + return DoRequest, IndexResponse, IndexRequestParameters>(request); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IndexAsync(IndexRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync, IndexResponse, IndexRequestParameters>(request, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IndexResponse Index(IndexRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, IndexResponse, IndexRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IndexResponse Index(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id? id) + { + var descriptor = new IndexRequestDescriptor(document, index, id); + descriptor.BeforeRequest(); + return DoRequest, IndexResponse, IndexRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IndexResponse Index(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest) + { + var descriptor = new IndexRequestDescriptor(document, index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, IndexResponse, IndexRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IndexResponse Index(TDocument document) + { + var descriptor = new IndexRequestDescriptor(document); + descriptor.BeforeRequest(); + return DoRequest, IndexResponse, IndexRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IndexResponse Index(TDocument document, Action> configureRequest) + { + var descriptor = new IndexRequestDescriptor(document); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, IndexResponse, IndexRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IndexResponse Index(TDocument document, Elastic.Clients.Elasticsearch.IndexName index) + { + var descriptor = new IndexRequestDescriptor(document, index); + descriptor.BeforeRequest(); + return DoRequest, IndexResponse, IndexRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IndexResponse Index(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) + { + var descriptor = new IndexRequestDescriptor(document, index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, IndexResponse, IndexRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IndexResponse Index(TDocument document, Elastic.Clients.Elasticsearch.Id? id) + { + var descriptor = new IndexRequestDescriptor(document, id); + descriptor.BeforeRequest(); + return DoRequest, IndexResponse, IndexRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual IndexResponse Index(TDocument document, Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest) + { + var descriptor = new IndexRequestDescriptor(document, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, IndexResponse, IndexRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IndexAsync(IndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IndexAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id? id, CancellationToken cancellationToken = default) + { + var descriptor = new IndexRequestDescriptor(document, index, id); + descriptor.BeforeRequest(); + return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IndexAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new IndexRequestDescriptor(document, index, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IndexAsync(TDocument document, CancellationToken cancellationToken = default) + { + var descriptor = new IndexRequestDescriptor(document); + descriptor.BeforeRequest(); + return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IndexAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new IndexRequestDescriptor(document); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IndexAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) + { + var descriptor = new IndexRequestDescriptor(document, index); + descriptor.BeforeRequest(); + return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IndexAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new IndexRequestDescriptor(document, index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IndexAsync(TDocument document, Elastic.Clients.Elasticsearch.Id? id, CancellationToken cancellationToken = default) + { + var descriptor = new IndexRequestDescriptor(document, id); + descriptor.BeforeRequest(); + return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task IndexAsync(TDocument document, Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new IndexRequestDescriptor(document, id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get cluster info. + /// Get basic build, version, and cluster information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual InfoResponse Info(InfoRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Get cluster info. + /// Get basic build, version, and cluster information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task InfoAsync(InfoRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Get cluster info. + /// Get basic build, version, and cluster information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual InfoResponse Info(InfoRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get cluster info. + /// Get basic build, version, and cluster information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual InfoResponse Info() + { + var descriptor = new InfoRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get cluster info. + /// Get basic build, version, and cluster information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual InfoResponse Info(Action configureRequest) + { + var descriptor = new InfoRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Get cluster info. + /// Get basic build, version, and cluster information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task InfoAsync(InfoRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get cluster info. + /// Get basic build, version, and cluster information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task InfoAsync(CancellationToken cancellationToken = default) + { + var descriptor = new InfoRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get cluster info. + /// Get basic build, version, and cluster information. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task InfoAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new InfoRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiTermVectorsResponse Mtermvectors(MultiTermVectorsRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task MtermvectorsAsync(MultiTermVectorsRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiTermVectorsResponse Mtermvectors(MultiTermVectorsRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiTermVectorsResponse Mtermvectors(Elastic.Clients.Elasticsearch.IndexName? index) + { + var descriptor = new MultiTermVectorsRequestDescriptor(index); + descriptor.BeforeRequest(); + return DoRequest, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiTermVectorsResponse Mtermvectors(Elastic.Clients.Elasticsearch.IndexName? index, Action> configureRequest) + { + var descriptor = new MultiTermVectorsRequestDescriptor(index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiTermVectorsResponse Mtermvectors() + { + var descriptor = new MultiTermVectorsRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiTermVectorsResponse Mtermvectors(Action> configureRequest) + { + var descriptor = new MultiTermVectorsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiTermVectorsResponse Mtermvectors(MultiTermVectorsRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiTermVectorsResponse Mtermvectors(Elastic.Clients.Elasticsearch.IndexName? index) + { + var descriptor = new MultiTermVectorsRequestDescriptor(index); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiTermVectorsResponse Mtermvectors(Elastic.Clients.Elasticsearch.IndexName? index, Action configureRequest) + { + var descriptor = new MultiTermVectorsRequestDescriptor(index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiTermVectorsResponse Mtermvectors() + { + var descriptor = new MultiTermVectorsRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiTermVectorsResponse Mtermvectors(Action configureRequest) + { + var descriptor = new MultiTermVectorsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task MtermvectorsAsync(MultiTermVectorsRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task MtermvectorsAsync(Elastic.Clients.Elasticsearch.IndexName? index, CancellationToken cancellationToken = default) + { + var descriptor = new MultiTermVectorsRequestDescriptor(index); + descriptor.BeforeRequest(); + return DoRequestAsync, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task MtermvectorsAsync(Elastic.Clients.Elasticsearch.IndexName? index, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new MultiTermVectorsRequestDescriptor(index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task MtermvectorsAsync(CancellationToken cancellationToken = default) + { + var descriptor = new MultiTermVectorsRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task MtermvectorsAsync(Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new MultiTermVectorsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task MtermvectorsAsync(MultiTermVectorsRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task MtermvectorsAsync(Elastic.Clients.Elasticsearch.IndexName? index, CancellationToken cancellationToken = default) + { + var descriptor = new MultiTermVectorsRequestDescriptor(index); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task MtermvectorsAsync(Elastic.Clients.Elasticsearch.IndexName? index, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new MultiTermVectorsRequestDescriptor(index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task MtermvectorsAsync(CancellationToken cancellationToken = default) + { + var descriptor = new MultiTermVectorsRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task MtermvectorsAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new MultiTermVectorsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get multiple documents. + /// + /// + /// Get multiple JSON documents by ID from one or more indices. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiGetResponse MultiGet(MultiGetRequest request) + { + request.BeforeRequest(); + return DoRequest, MultiGetRequestParameters>(request); + } + + /// + /// + /// Get multiple documents. + /// + /// + /// Get multiple JSON documents by ID from one or more indices. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> MultiGetAsync(MultiGetRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync, MultiGetRequestParameters>(request, cancellationToken); + } + + /// + /// + /// Get multiple documents. + /// + /// + /// Get multiple JSON documents by ID from one or more indices. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiGetResponse MultiGet(MultiGetRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, MultiGetResponse, MultiGetRequestParameters>(descriptor); + } + + /// + /// + /// Get multiple documents. + /// + /// + /// Get multiple JSON documents by ID from one or more indices. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiGetResponse MultiGet(Elastic.Clients.Elasticsearch.IndexName? index) + { + var descriptor = new MultiGetRequestDescriptor(index); + descriptor.BeforeRequest(); + return DoRequest, MultiGetResponse, MultiGetRequestParameters>(descriptor); + } + + /// + /// + /// Get multiple documents. + /// + /// + /// Get multiple JSON documents by ID from one or more indices. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiGetResponse MultiGet(Elastic.Clients.Elasticsearch.IndexName? index, Action> configureRequest) + { + var descriptor = new MultiGetRequestDescriptor(index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, MultiGetResponse, MultiGetRequestParameters>(descriptor); + } + + /// + /// + /// Get multiple documents. + /// + /// + /// Get multiple JSON documents by ID from one or more indices. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiGetResponse MultiGet() + { + var descriptor = new MultiGetRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest, MultiGetResponse, MultiGetRequestParameters>(descriptor); + } + + /// + /// + /// Get multiple documents. + /// + /// + /// Get multiple JSON documents by ID from one or more indices. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiGetResponse MultiGet(Action> configureRequest) + { + var descriptor = new MultiGetRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, MultiGetResponse, MultiGetRequestParameters>(descriptor); + } + + /// + /// + /// Get multiple documents. + /// + /// + /// Get multiple JSON documents by ID from one or more indices. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> MultiGetAsync(MultiGetRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, MultiGetResponse, MultiGetRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get multiple documents. + /// + /// + /// Get multiple JSON documents by ID from one or more indices. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> MultiGetAsync(Elastic.Clients.Elasticsearch.IndexName? index, CancellationToken cancellationToken = default) + { + var descriptor = new MultiGetRequestDescriptor(index); + descriptor.BeforeRequest(); + return DoRequestAsync, MultiGetResponse, MultiGetRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get multiple documents. + /// + /// + /// Get multiple JSON documents by ID from one or more indices. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> MultiGetAsync(Elastic.Clients.Elasticsearch.IndexName? index, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new MultiGetRequestDescriptor(index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, MultiGetResponse, MultiGetRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get multiple documents. + /// + /// + /// Get multiple JSON documents by ID from one or more indices. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> MultiGetAsync(CancellationToken cancellationToken = default) + { + var descriptor = new MultiGetRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync, MultiGetResponse, MultiGetRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Get multiple documents. + /// + /// + /// Get multiple JSON documents by ID from one or more indices. + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> MultiGetAsync(Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new MultiGetRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, MultiGetResponse, MultiGetRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Run multiple searches. + /// + /// + /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. + /// The structure is as follows: + /// + /// + /// header\n + /// body\n + /// header\n + /// body\n + /// + /// + /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// + /// + /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiSearchResponse MultiSearch(MultiSearchRequest request) + { + request.BeforeRequest(); + return DoRequest, MultiSearchRequestParameters>(request); + } + + /// + /// + /// Run multiple searches. + /// + /// + /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. + /// The structure is as follows: + /// + /// + /// header\n + /// body\n + /// header\n + /// body\n + /// + /// + /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// + /// + /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> MultiSearchAsync(MultiSearchRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync, MultiSearchRequestParameters>(request, cancellationToken); + } + + /// + /// + /// Run multiple searches. + /// + /// + /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. + /// The structure is as follows: + /// + /// + /// header\n + /// body\n + /// header\n + /// body\n + /// + /// + /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// + /// + /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiSearchResponse MultiSearch(MultiSearchRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, MultiSearchResponse, MultiSearchRequestParameters>(descriptor); + } + + /// + /// + /// Run multiple searches. + /// + /// + /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. + /// The structure is as follows: + /// + /// + /// header\n + /// body\n + /// header\n + /// body\n + /// + /// + /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// + /// + /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiSearchResponse MultiSearch(Elastic.Clients.Elasticsearch.Indices? indices) + { + var descriptor = new MultiSearchRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequest, MultiSearchResponse, MultiSearchRequestParameters>(descriptor); + } + + /// + /// + /// Run multiple searches. + /// + /// + /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. + /// The structure is as follows: + /// + /// + /// header\n + /// body\n + /// header\n + /// body\n + /// + /// + /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// + /// + /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiSearchResponse MultiSearch(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) + { + var descriptor = new MultiSearchRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, MultiSearchResponse, MultiSearchRequestParameters>(descriptor); + } + + /// + /// + /// Run multiple searches. + /// + /// + /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. + /// The structure is as follows: + /// + /// + /// header\n + /// body\n + /// header\n + /// body\n + /// + /// + /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// + /// + /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiSearchResponse MultiSearch() + { + var descriptor = new MultiSearchRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest, MultiSearchResponse, MultiSearchRequestParameters>(descriptor); + } + + /// + /// + /// Run multiple searches. + /// + /// + /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. + /// The structure is as follows: + /// + /// + /// header\n + /// body\n + /// header\n + /// body\n + /// + /// + /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// + /// + /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiSearchResponse MultiSearch(Action> configureRequest) + { + var descriptor = new MultiSearchRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, MultiSearchResponse, MultiSearchRequestParameters>(descriptor); + } + + /// + /// + /// Run multiple searches. + /// + /// + /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. + /// The structure is as follows: + /// + /// + /// header\n + /// body\n + /// header\n + /// body\n + /// + /// + /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// + /// + /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> MultiSearchAsync(MultiSearchRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, MultiSearchResponse, MultiSearchRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Run multiple searches. + /// + /// + /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. + /// The structure is as follows: + /// + /// + /// header\n + /// body\n + /// header\n + /// body\n + /// + /// + /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// + /// + /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> MultiSearchAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) + { + var descriptor = new MultiSearchRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequestAsync, MultiSearchResponse, MultiSearchRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Run multiple searches. + /// + /// + /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. + /// The structure is as follows: + /// + /// + /// header\n + /// body\n + /// header\n + /// body\n + /// + /// + /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// + /// + /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> MultiSearchAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new MultiSearchRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, MultiSearchResponse, MultiSearchRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Run multiple searches. + /// + /// + /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. + /// The structure is as follows: + /// + /// + /// header\n + /// body\n + /// header\n + /// body\n + /// + /// + /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// + /// + /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> MultiSearchAsync(CancellationToken cancellationToken = default) + { + var descriptor = new MultiSearchRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync, MultiSearchResponse, MultiSearchRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Run multiple searches. + /// + /// + /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. + /// The structure is as follows: + /// + /// + /// header\n + /// body\n + /// header\n + /// body\n + /// + /// + /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// + /// + /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> MultiSearchAsync(Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new MultiSearchRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, MultiSearchResponse, MultiSearchRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiSearchTemplateResponse MultiSearchTemplate(MultiSearchTemplateRequest request) + { + request.BeforeRequest(); + return DoRequest, MultiSearchTemplateRequestParameters>(request); + } + + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> MultiSearchTemplateAsync(MultiSearchTemplateRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync, MultiSearchTemplateRequestParameters>(request, cancellationToken); + } + + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiSearchTemplateResponse MultiSearchTemplate(MultiSearchTemplateRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor); + } + + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiSearchTemplateResponse MultiSearchTemplate(Elastic.Clients.Elasticsearch.Indices? indices) + { + var descriptor = new MultiSearchTemplateRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequest, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor); + } + + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiSearchTemplateResponse MultiSearchTemplate(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) + { + var descriptor = new MultiSearchTemplateRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor); + } + + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiSearchTemplateResponse MultiSearchTemplate() + { + var descriptor = new MultiSearchTemplateRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor); + } + + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual MultiSearchTemplateResponse MultiSearchTemplate(Action> configureRequest) + { + var descriptor = new MultiSearchTemplateRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor); + } + + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> MultiSearchTemplateAsync(MultiSearchTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> MultiSearchTemplateAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) + { + var descriptor = new MultiSearchTemplateRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequestAsync, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> MultiSearchTemplateAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new MultiSearchTemplateRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> MultiSearchTemplateAsync(CancellationToken cancellationToken = default) + { + var descriptor = new MultiSearchTemplateRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// 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 + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task> MultiSearchTemplateAsync(Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new MultiSearchTemplateRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Open a point in time. + /// + /// + /// A search request by default runs against the most recent visible data of the target indices, + /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the + /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple + /// search requests using the same point in time. For example, if refreshes happen between + /// search_after requests, then the results of those requests might not be consistent as changes happening + /// between searches are only visible to the more recent point in time. + /// + /// + /// A point in time must be opened explicitly before being used in search requests. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual OpenPointInTimeResponse OpenPointInTime(OpenPointInTimeRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Open a point in time. + /// + /// + /// A search request by default runs against the most recent visible data of the target indices, + /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the + /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple + /// search requests using the same point in time. For example, if refreshes happen between + /// search_after requests, then the results of those requests might not be consistent as changes happening + /// between searches are only visible to the more recent point in time. + /// + /// + /// A point in time must be opened explicitly before being used in search requests. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task OpenPointInTimeAsync(OpenPointInTimeRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Open a point in time. + /// + /// + /// A search request by default runs against the most recent visible data of the target indices, + /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the + /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple + /// search requests using the same point in time. For example, if refreshes happen between + /// search_after requests, then the results of those requests might not be consistent as changes happening + /// between searches are only visible to the more recent point in time. + /// + /// + /// A point in time must be opened explicitly before being used in search requests. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual OpenPointInTimeResponse OpenPointInTime(OpenPointInTimeRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor); + } + + /// + /// + /// Open a point in time. + /// + /// + /// A search request by default runs against the most recent visible data of the target indices, + /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the + /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple + /// search requests using the same point in time. For example, if refreshes happen between + /// search_after requests, then the results of those requests might not be consistent as changes happening + /// between searches are only visible to the more recent point in time. + /// + /// + /// A point in time must be opened explicitly before being used in search requests. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual OpenPointInTimeResponse OpenPointInTime(Elastic.Clients.Elasticsearch.Indices indices) + { + var descriptor = new OpenPointInTimeRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequest, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor); + } + + /// + /// + /// Open a point in time. + /// + /// + /// A search request by default runs against the most recent visible data of the target indices, + /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the + /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple + /// search requests using the same point in time. For example, if refreshes happen between + /// search_after requests, then the results of those requests might not be consistent as changes happening + /// between searches are only visible to the more recent point in time. + /// + /// + /// A point in time must be opened explicitly before being used in search requests. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual OpenPointInTimeResponse OpenPointInTime(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest) + { + var descriptor = new OpenPointInTimeRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor); + } + + /// + /// + /// Open a point in time. + /// + /// + /// A search request by default runs against the most recent visible data of the target indices, + /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the + /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple + /// search requests using the same point in time. For example, if refreshes happen between + /// search_after requests, then the results of those requests might not be consistent as changes happening + /// between searches are only visible to the more recent point in time. + /// + /// + /// A point in time must be opened explicitly before being used in search requests. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual OpenPointInTimeResponse OpenPointInTime() + { + var descriptor = new OpenPointInTimeRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor); + } + + /// + /// + /// Open a point in time. + /// + /// + /// A search request by default runs against the most recent visible data of the target indices, + /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the + /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple + /// search requests using the same point in time. For example, if refreshes happen between + /// search_after requests, then the results of those requests might not be consistent as changes happening + /// between searches are only visible to the more recent point in time. + /// + /// + /// A point in time must be opened explicitly before being used in search requests. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual OpenPointInTimeResponse OpenPointInTime(Action> configureRequest) + { + var descriptor = new OpenPointInTimeRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor); + } + + /// + /// + /// Open a point in time. + /// + /// + /// A search request by default runs against the most recent visible data of the target indices, + /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the + /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple + /// search requests using the same point in time. For example, if refreshes happen between + /// search_after requests, then the results of those requests might not be consistent as changes happening + /// between searches are only visible to the more recent point in time. + /// + /// + /// A point in time must be opened explicitly before being used in search requests. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual OpenPointInTimeResponse OpenPointInTime(OpenPointInTimeRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Open a point in time. + /// + /// + /// A search request by default runs against the most recent visible data of the target indices, + /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the + /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple + /// search requests using the same point in time. For example, if refreshes happen between + /// search_after requests, then the results of those requests might not be consistent as changes happening + /// between searches are only visible to the more recent point in time. + /// + /// + /// A point in time must be opened explicitly before being used in search requests. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual OpenPointInTimeResponse OpenPointInTime(Elastic.Clients.Elasticsearch.Indices indices) + { + var descriptor = new OpenPointInTimeRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Open a point in time. + /// + /// + /// A search request by default runs against the most recent visible data of the target indices, + /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the + /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple + /// search requests using the same point in time. For example, if refreshes happen between + /// search_after requests, then the results of those requests might not be consistent as changes happening + /// between searches are only visible to the more recent point in time. + /// + /// + /// A point in time must be opened explicitly before being used in search requests. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual OpenPointInTimeResponse OpenPointInTime(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest) + { + var descriptor = new OpenPointInTimeRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Open a point in time. + /// + /// + /// A search request by default runs against the most recent visible data of the target indices, + /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the + /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple + /// search requests using the same point in time. For example, if refreshes happen between + /// search_after requests, then the results of those requests might not be consistent as changes happening + /// between searches are only visible to the more recent point in time. + /// + /// + /// A point in time must be opened explicitly before being used in search requests. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task OpenPointInTimeAsync(OpenPointInTimeRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Open a point in time. + /// + /// + /// A search request by default runs against the most recent visible data of the target indices, + /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the + /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple + /// search requests using the same point in time. For example, if refreshes happen between + /// search_after requests, then the results of those requests might not be consistent as changes happening + /// between searches are only visible to the more recent point in time. + /// + /// + /// A point in time must be opened explicitly before being used in search requests. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task OpenPointInTimeAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) + { + var descriptor = new OpenPointInTimeRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequestAsync, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Open a point in time. + /// + /// + /// A search request by default runs against the most recent visible data of the target indices, + /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the + /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple + /// search requests using the same point in time. For example, if refreshes happen between + /// search_after requests, then the results of those requests might not be consistent as changes happening + /// between searches are only visible to the more recent point in time. + /// + /// + /// A point in time must be opened explicitly before being used in search requests. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task OpenPointInTimeAsync(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new OpenPointInTimeRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Open a point in time. + /// + /// + /// A search request by default runs against the most recent visible data of the target indices, + /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the + /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple + /// search requests using the same point in time. For example, if refreshes happen between + /// search_after requests, then the results of those requests might not be consistent as changes happening + /// between searches are only visible to the more recent point in time. + /// + /// + /// A point in time must be opened explicitly before being used in search requests. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task OpenPointInTimeAsync(CancellationToken cancellationToken = default) + { + var descriptor = new OpenPointInTimeRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Open a point in time. + /// + /// + /// A search request by default runs against the most recent visible data of the target indices, + /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the + /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple + /// search requests using the same point in time. For example, if refreshes happen between + /// search_after requests, then the results of those requests might not be consistent as changes happening + /// between searches are only visible to the more recent point in time. + /// + /// + /// A point in time must be opened explicitly before being used in search requests. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task OpenPointInTimeAsync(Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new OpenPointInTimeRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Open a point in time. + /// + /// + /// A search request by default runs against the most recent visible data of the target indices, + /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the + /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple + /// search requests using the same point in time. For example, if refreshes happen between + /// search_after requests, then the results of those requests might not be consistent as changes happening + /// between searches are only visible to the more recent point in time. + /// + /// + /// A point in time must be opened explicitly before being used in search requests. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task OpenPointInTimeAsync(OpenPointInTimeRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Open a point in time. + /// + /// + /// A search request by default runs against the most recent visible data of the target indices, + /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the + /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple + /// search requests using the same point in time. For example, if refreshes happen between + /// search_after requests, then the results of those requests might not be consistent as changes happening + /// between searches are only visible to the more recent point in time. + /// + /// + /// A point in time must be opened explicitly before being used in search requests. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task OpenPointInTimeAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) + { + var descriptor = new OpenPointInTimeRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Open a point in time. + /// + /// + /// A search request by default runs against the most recent visible data of the target indices, + /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the + /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple + /// search requests using the same point in time. For example, if refreshes happen between + /// search_after requests, then the results of those requests might not be consistent as changes happening + /// between searches are only visible to the more recent point in time. + /// + /// + /// A point in time must be opened explicitly before being used in search requests. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task OpenPointInTimeAsync(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new OpenPointInTimeRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Ping the cluster. + /// Get information about whether the cluster is running. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PingResponse Ping(PingRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Ping the cluster. + /// Get information about whether the cluster is running. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PingAsync(PingRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Ping the cluster. + /// Get information about whether the cluster is running. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PingResponse Ping(PingRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Ping the cluster. + /// Get information about whether the cluster is running. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PingResponse Ping() + { + var descriptor = new PingRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Ping the cluster. + /// Get information about whether the cluster is running. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PingResponse Ping(Action configureRequest) + { + var descriptor = new PingRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Ping the cluster. + /// Get information about whether the cluster is running. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PingAsync(PingRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Ping the cluster. + /// Get information about whether the cluster is running. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PingAsync(CancellationToken cancellationToken = default) + { + var descriptor = new PingRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Ping the cluster. + /// Get information about whether the cluster is running. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PingAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new PingRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutScriptResponse PutScript(PutScriptRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutScriptAsync(PutScriptRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutScriptResponse PutScript(PutScriptRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, PutScriptResponse, PutScriptRequestParameters>(descriptor); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutScriptResponse PutScript(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Elasticsearch.Name? context) + { + var descriptor = new PutScriptRequestDescriptor(id, context); + descriptor.BeforeRequest(); + return DoRequest, PutScriptResponse, PutScriptRequestParameters>(descriptor); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutScriptResponse PutScript(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Elasticsearch.Name? context, Action> configureRequest) + { + var descriptor = new PutScriptRequestDescriptor(id, context); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, PutScriptResponse, PutScriptRequestParameters>(descriptor); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutScriptResponse PutScript(Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new PutScriptRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequest, PutScriptResponse, PutScriptRequestParameters>(descriptor); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutScriptResponse PutScript(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + { + var descriptor = new PutScriptRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, PutScriptResponse, PutScriptRequestParameters>(descriptor); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutScriptResponse PutScript(PutScriptRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutScriptResponse PutScript(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Elasticsearch.Name? context) + { + var descriptor = new PutScriptRequestDescriptor(id, context); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutScriptResponse PutScript(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Elasticsearch.Name? context, Action configureRequest) + { + var descriptor = new PutScriptRequestDescriptor(id, context); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutScriptResponse PutScript(Elastic.Clients.Elasticsearch.Id id) + { + var descriptor = new PutScriptRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual PutScriptResponse PutScript(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) + { + var descriptor = new PutScriptRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutScriptAsync(PutScriptRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, PutScriptResponse, PutScriptRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Elasticsearch.Name? context, CancellationToken cancellationToken = default) + { + var descriptor = new PutScriptRequestDescriptor(id, context); + descriptor.BeforeRequest(); + return DoRequestAsync, PutScriptResponse, PutScriptRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Elasticsearch.Name? context, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new PutScriptRequestDescriptor(id, context); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, PutScriptResponse, PutScriptRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new PutScriptRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequestAsync, PutScriptResponse, PutScriptRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new PutScriptRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, PutScriptResponse, PutScriptRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutScriptAsync(PutScriptRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Elasticsearch.Name? context, CancellationToken cancellationToken = default) + { + var descriptor = new PutScriptRequestDescriptor(id, context); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Elasticsearch.Name? context, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new PutScriptRequestDescriptor(id, context); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + { + var descriptor = new PutScriptRequestDescriptor(id); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create or update a script or search template. + /// Creates or updates a stored script or search template. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new PutScriptRequestDescriptor(id); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual RankEvalResponse RankEval(RankEvalRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task RankEvalAsync(RankEvalRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual RankEvalResponse RankEval(RankEvalRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, RankEvalResponse, RankEvalRequestParameters>(descriptor); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual RankEvalResponse RankEval(Elastic.Clients.Elasticsearch.Indices? indices) + { + var descriptor = new RankEvalRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequest, RankEvalResponse, RankEvalRequestParameters>(descriptor); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual RankEvalResponse RankEval(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) + { + var descriptor = new RankEvalRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, RankEvalResponse, RankEvalRequestParameters>(descriptor); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual RankEvalResponse RankEval() + { + var descriptor = new RankEvalRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest, RankEvalResponse, RankEvalRequestParameters>(descriptor); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual RankEvalResponse RankEval(Action> configureRequest) + { + var descriptor = new RankEvalRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, RankEvalResponse, RankEvalRequestParameters>(descriptor); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual RankEvalResponse RankEval(RankEvalRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual RankEvalResponse RankEval(Elastic.Clients.Elasticsearch.Indices? indices) + { + var descriptor = new RankEvalRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual RankEvalResponse RankEval(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest) + { + var descriptor = new RankEvalRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual RankEvalResponse RankEval() + { + var descriptor = new RankEvalRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual RankEvalResponse RankEval(Action configureRequest) + { + var descriptor = new RankEvalRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task RankEvalAsync(RankEvalRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, RankEvalResponse, RankEvalRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task RankEvalAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) + { + var descriptor = new RankEvalRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequestAsync, RankEvalResponse, RankEvalRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task RankEvalAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new RankEvalRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, RankEvalResponse, RankEvalRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task RankEvalAsync(CancellationToken cancellationToken = default) + { + var descriptor = new RankEvalRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync, RankEvalResponse, RankEvalRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task RankEvalAsync(Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new RankEvalRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, RankEvalResponse, RankEvalRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task RankEvalAsync(RankEvalRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task RankEvalAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) + { + var descriptor = new RankEvalRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task RankEvalAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new RankEvalRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task RankEvalAsync(CancellationToken cancellationToken = default) + { + var descriptor = new RankEvalRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Evaluate ranked search results. + /// + /// + /// Evaluate the quality of ranked search results over a set of typical search queries. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task RankEvalAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new RankEvalRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Reindex documents. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ReindexResponse Reindex(ReindexRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// + /// + /// Reindex documents. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ReindexAsync(ReindexRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Reindex documents. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ReindexResponse Reindex(ReindexRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, ReindexResponse, ReindexRequestParameters>(descriptor); + } + + /// + /// + /// Reindex documents. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ReindexResponse Reindex() + { + var descriptor = new ReindexRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest, ReindexResponse, ReindexRequestParameters>(descriptor); + } + + /// + /// + /// Reindex documents. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ReindexResponse Reindex(Action> configureRequest) + { + var descriptor = new ReindexRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, ReindexResponse, ReindexRequestParameters>(descriptor); + } + + /// + /// + /// Reindex documents. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ReindexResponse Reindex(ReindexRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Reindex documents. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ReindexResponse Reindex() + { + var descriptor = new ReindexRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Reindex documents. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ReindexResponse Reindex(Action configureRequest) + { + var descriptor = new ReindexRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// + /// + /// Reindex documents. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ReindexAsync(ReindexRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, ReindexResponse, ReindexRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Reindex documents. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ReindexAsync(CancellationToken cancellationToken = default) + { + var descriptor = new ReindexRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync, ReindexResponse, ReindexRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Reindex documents. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ReindexAsync(Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new ReindexRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, ReindexResponse, ReindexRequestParameters>(descriptor, cancellationToken); + } + + /// + /// + /// Reindex documents. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ReindexAsync(ReindexRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Reindex documents. + /// + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task ReindexAsync(CancellationToken cancellationToken = default) + { + var descriptor = new ReindexRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Reindex documents. + /// + /// + /// 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** /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkAsync(BulkRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Bulk index or delete documents. - /// Performs multiple indexing or delete operations in a single API call. - /// This reduces overhead and can greatly increase indexing speed. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkAsync(Elastic.Clients.Elasticsearch.IndexName? index, CancellationToken cancellationToken = default) - { - var descriptor = new BulkRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Bulk index or delete documents. - /// Performs multiple indexing or delete operations in a single API call. - /// This reduces overhead and can greatly increase indexing speed. + /// 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: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkAsync(Elastic.Clients.Elasticsearch.IndexName? index, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new BulkRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// target_time = 1000 / 500 per second = 2 seconds + /// wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds + /// /// - /// Bulk index or delete documents. - /// Performs multiple indexing or delete operations in a single API call. - /// This reduces overhead and can greatly increase indexing speed. + /// 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". /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkAsync(CancellationToken cancellationToken = default) - { - var descriptor = new BulkRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Bulk index or delete documents. - /// Performs multiple indexing or delete operations in a single API call. - /// This reduces overhead and can greatly increase indexing speed. + /// Slicing /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task BulkAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new BulkRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Clear a scrolling search. + /// 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. /// /// - /// Clear the search context and results for a scrolling search. + /// NOTE: Reindexing from remote clusters does not support manual or automatic slicing. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearScrollResponse ClearScroll(ClearScrollRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// /// - /// Clear a scrolling search. + /// 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. /// /// - /// Clear the search context and results for a scrolling search. + /// Adding slices to the reindex request just automates the manual process, creating sub-requests which means it has some quirks: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearScrollAsync(ClearScrollRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// + /// + /// /// - /// Clear a scrolling search. + /// You can see these requests in the tasks API. These sub-requests are "child" tasks of the task for the request with slices. /// + /// + /// /// - /// Clear the search context and results for a scrolling search. + /// Fetching the status of the task for the request with slices only contains the status of completed slices. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearScrollResponse ClearScroll(ClearScrollRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Clear a scrolling search. + /// These sub-requests are individually addressable for things like cancellation and rethrottling. /// + /// + /// /// - /// Clear the search context and results for a scrolling search. + /// Rethrottling the request with slices will rethrottle the unfinished sub-request proportionally. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearScrollResponse ClearScroll() - { - var descriptor = new ClearScrollRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Clear a scrolling search. + /// Canceling the request with slices will cancel each sub-request. /// + /// + /// /// - /// Clear the search context and results for a scrolling search. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClearScrollResponse ClearScroll(Action configureRequest) - { - var descriptor = new ClearScrollRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Clear a scrolling search. + /// 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. /// + /// + /// /// - /// Clear the search context and results for a scrolling search. + /// Each sub-request gets a slightly different snapshot of the source, though these are all taken at approximately the same time. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearScrollAsync(ClearScrollRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Clear a scrolling search. + /// 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. /// /// - /// Clear the search context and results for a scrolling search. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearScrollAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ClearScrollRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Clear a scrolling search. + /// Indexing performance scales linearly across available resources with the number of slices. /// /// - /// Clear the search context and results for a scrolling search. + /// Whether query or indexing performance dominates the runtime depends on the documents being reindexed and cluster resources. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClearScrollAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ClearScrollRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Close a point in time. + /// Modify documents during reindexing /// /// - /// 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. - /// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClosePointInTimeResponse ClosePointInTime(ClosePointInTimeRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// /// - /// Close a point in time. + /// 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. /// /// - /// 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. - /// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. + /// Think of the possibilities! Just be careful; you are able to change: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClosePointInTimeAsync(ClosePointInTimeRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// + /// + /// /// - /// Close a point in time. + /// _id /// + /// + /// /// - /// 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. - /// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. + /// _index /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClosePointInTimeResponse ClosePointInTime(ClosePointInTimeRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Close a point in time. + /// _version /// + /// + /// /// - /// 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. - /// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. + /// _routing /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClosePointInTimeResponse ClosePointInTime() - { - var descriptor = new ClosePointInTimeRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Close a point in time. + /// 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. /// /// - /// 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. - /// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. + /// Reindex from remote /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ClosePointInTimeResponse ClosePointInTime(Action configureRequest) - { - var descriptor = new ClosePointInTimeRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Close a point in time. + /// 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. /// /// - /// 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. - /// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. + /// 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: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClosePointInTimeAsync(ClosePointInTimeRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// reindex.remote.whitelist: [otherhost:9200, another:9200, 127.0.10.*:9200, localhost:*"] + /// /// - /// Close a point in time. + /// 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. /// /// - /// 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. - /// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClosePointInTimeAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ClosePointInTimeRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Close a point in time. + /// To enable queries sent to older versions of Elasticsearch, the query parameter is sent directly to the remote host without validation or modification. /// /// - /// 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. - /// However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. + /// NOTE: Reindexing from remote clusters does not support manual or automatic slicing. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ClosePointInTimeAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ClosePointInTimeRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CountResponse Count(CountRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// Configuring SSL parameters /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CountAsync(CountRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CountResponse Count(CountRequestDescriptor descriptor) + public virtual Task ReindexAsync(Action configureRequest, CancellationToken cancellationToken = default) { + var descriptor = new ReindexRequestDescriptor(); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, CountResponse, CountRequestParameters>(descriptor); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// Throttle a reindex operation. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CountResponse Count(Elastic.Clients.Elasticsearch.Indices? indices) - { - var descriptor = new CountRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequest, CountResponse, CountRequestParameters>(descriptor); - } - - /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// Change the number of requests per second for a particular reindex operation. + /// For example: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CountResponse Count(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) - { - var descriptor = new CountRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, CountResponse, CountRequestParameters>(descriptor); - } - - /// + /// + /// POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1 + /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CountResponse Count() + public virtual ReindexRethrottleResponse ReindexRethrottle(ReindexRethrottleRequest request) { - var descriptor = new CountRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest, CountResponse, CountRequestParameters>(descriptor); + request.BeforeRequest(); + return DoRequest(request); } /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// Throttle a reindex operation. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CountResponse Count(Action> configureRequest) - { - var descriptor = new CountRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, CountResponse, CountRequestParameters>(descriptor); - } - - /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// Change the number of requests per second for a particular reindex operation. + /// For example: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CountResponse Count(CountRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1 + /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CountResponse Count(Elastic.Clients.Elasticsearch.Indices? indices) + public virtual Task ReindexRethrottleAsync(ReindexRethrottleRequest request, CancellationToken cancellationToken = default) { - var descriptor = new CountRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequest(descriptor); + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// Throttle a reindex operation. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CountResponse Count(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest) - { - var descriptor = new CountRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// Change the number of requests per second for a particular reindex operation. + /// For example: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CountResponse Count() - { - var descriptor = new CountRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1 + /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CountResponse Count(Action configureRequest) - { - var descriptor = new CountRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// - /// - /// Count search results. - /// Get the number of documents matching a query. - /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CountAsync(CountRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual ReindexRethrottleResponse ReindexRethrottle(ReindexRethrottleRequestDescriptor descriptor) { descriptor.BeforeRequest(); - return DoRequestAsync, CountResponse, CountRequestParameters>(descriptor, cancellationToken); + return DoRequest(descriptor); } /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// Throttle a reindex operation. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CountAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new CountRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, CountResponse, CountRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// Change the number of requests per second for a particular reindex operation. + /// For example: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CountAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CountRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, CountResponse, CountRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1 + /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CountAsync(CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ReindexRethrottleResponse ReindexRethrottle(Elastic.Clients.Elasticsearch.Id taskId) { - var descriptor = new CountRequestDescriptor(); + var descriptor = new ReindexRethrottleRequestDescriptor(taskId); descriptor.BeforeRequest(); - return DoRequestAsync, CountResponse, CountRequestParameters>(descriptor, cancellationToken); + return DoRequest(descriptor); } /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// Throttle a reindex operation. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CountAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new CountRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, CountResponse, CountRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// Change the number of requests per second for a particular reindex operation. + /// For example: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CountAsync(CountRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1 + /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CountAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ReindexRethrottleResponse ReindexRethrottle(Elastic.Clients.Elasticsearch.Id taskId, Action configureRequest) { - var descriptor = new CountRequestDescriptor(indices); + var descriptor = new ReindexRethrottleRequestDescriptor(taskId); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequest(descriptor); } /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// Throttle a reindex operation. + /// + /// + /// Change the number of requests per second for a particular reindex operation. + /// For example: /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CountAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task ReindexRethrottleAsync(ReindexRethrottleRequestDescriptor descriptor, CancellationToken cancellationToken = default) { - var descriptor = new CountRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// Throttle a reindex operation. + /// + /// + /// Change the number of requests per second for a particular reindex operation. + /// For example: /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CountAsync(CancellationToken cancellationToken = default) + public virtual Task ReindexRethrottleAsync(Elastic.Clients.Elasticsearch.Id taskId, CancellationToken cancellationToken = default) { - var descriptor = new CountRequestDescriptor(); + var descriptor = new ReindexRethrottleRequestDescriptor(taskId); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Count search results. - /// Get the number of documents matching a query. + /// Throttle a reindex operation. + /// + /// + /// Change the number of requests per second for a particular reindex operation. + /// For example: /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// 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. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CountAsync(Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task ReindexRethrottleAsync(Elastic.Clients.Elasticsearch.Id taskId, Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new CountRequestDescriptor(); + var descriptor = new ReindexRethrottleRequestDescriptor(taskId); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// 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. + /// Render a search template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Render a search template as a search request body. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateResponse Create(CreateRequest request) + public virtual RenderSearchTemplateResponse RenderSearchTemplate(RenderSearchTemplateRequest request) { request.BeforeRequest(); - return DoRequest, CreateResponse, CreateRequestParameters>(request); + return DoRequest(request); } /// /// - /// 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. + /// Render a search template. + /// + /// + /// Render a search template as a search request body. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateAsync(CreateRequest request, CancellationToken cancellationToken = default) + public virtual Task RenderSearchTemplateAsync(RenderSearchTemplateRequest request, CancellationToken cancellationToken = default) { request.BeforeRequest(); - return DoRequestAsync, CreateResponse, CreateRequestParameters>(request, cancellationToken); + return DoRequestAsync(request, cancellationToken); } /// /// - /// 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. + /// Render a search template. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateResponse Create(CreateRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, CreateResponse, CreateRequestParameters>(descriptor); - } - - /// /// - /// 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. + /// Render a search template as a search request body. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateResponse Create(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) + public virtual RenderSearchTemplateResponse RenderSearchTemplate(RenderSearchTemplateRequestDescriptor descriptor) { - var descriptor = new CreateRequestDescriptor(document, index, id); descriptor.BeforeRequest(); - return DoRequest, CreateResponse, CreateRequestParameters>(descriptor); + return DoRequest, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor); } /// /// - /// 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. + /// Render a search template. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateResponse Create(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) - { - var descriptor = new CreateRequestDescriptor(document, index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, CreateResponse, CreateRequestParameters>(descriptor); - } - - /// /// - /// 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. + /// Render a search template as a search request body. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateResponse Create(TDocument document) + public virtual RenderSearchTemplateResponse RenderSearchTemplate() { - var descriptor = new CreateRequestDescriptor(document); + var descriptor = new RenderSearchTemplateRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest, CreateResponse, CreateRequestParameters>(descriptor); + return DoRequest, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor); } /// /// - /// 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. + /// Render a search template. + /// + /// + /// Render a search template as a search request body. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateResponse Create(TDocument document, Action> configureRequest) + public virtual RenderSearchTemplateResponse RenderSearchTemplate(Action> configureRequest) { - var descriptor = new CreateRequestDescriptor(document); + var descriptor = new RenderSearchTemplateRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, CreateResponse, CreateRequestParameters>(descriptor); + return DoRequest, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor); } /// /// - /// 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. + /// Render a search template. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateResponse Create(TDocument document, Elastic.Clients.Elasticsearch.IndexName index) - { - var descriptor = new CreateRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequest, CreateResponse, CreateRequestParameters>(descriptor); - } - - /// /// - /// 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. + /// Render a search template as a search request body. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateResponse Create(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) + public virtual RenderSearchTemplateResponse RenderSearchTemplate(RenderSearchTemplateRequestDescriptor descriptor) { - var descriptor = new CreateRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, CreateResponse, CreateRequestParameters>(descriptor); + return DoRequest(descriptor); } /// /// - /// 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. + /// Render a search template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Render a search template as a search request body. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateResponse Create(TDocument document, Elastic.Clients.Elasticsearch.Id id) + public virtual RenderSearchTemplateResponse RenderSearchTemplate() { - var descriptor = new CreateRequestDescriptor(document, id); + var descriptor = new RenderSearchTemplateRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest, CreateResponse, CreateRequestParameters>(descriptor); + return DoRequest(descriptor); } /// /// - /// 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. + /// Render a search template. + /// + /// + /// Render a search template as a search request body. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual CreateResponse Create(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + public virtual RenderSearchTemplateResponse RenderSearchTemplate(Action configureRequest) { - var descriptor = new CreateRequestDescriptor(document, id); + var descriptor = new RenderSearchTemplateRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, CreateResponse, CreateRequestParameters>(descriptor); + return DoRequest(descriptor); } /// /// - /// 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. + /// Render a search template. + /// + /// + /// Render a search template as a search request body. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateAsync(CreateRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task RenderSearchTemplateAsync(RenderSearchTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor, cancellationToken); } /// /// - /// 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. + /// Render a search template. + /// + /// + /// Render a search template as a search request body. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + public virtual Task RenderSearchTemplateAsync(CancellationToken cancellationToken = default) { - var descriptor = new CreateRequestDescriptor(document, index, id); + var descriptor = new RenderSearchTemplateRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor, cancellationToken); } /// /// - /// 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. + /// Render a search template. + /// + /// + /// Render a search template as a search request body. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + public virtual Task RenderSearchTemplateAsync(Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new CreateRequestDescriptor(document, index, id); + var descriptor = new RenderSearchTemplateRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor, cancellationToken); } /// /// - /// 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. + /// Render a search template. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task CreateAsync(TDocument document, CancellationToken cancellationToken = default) - { - var descriptor = new CreateRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// 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. + /// Render a search template as a search request body. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) + public virtual Task RenderSearchTemplateAsync(RenderSearchTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { - var descriptor = new CreateRequestDescriptor(document); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// 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. + /// Render a search template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Render a search template as a search request body. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) + public virtual Task RenderSearchTemplateAsync(CancellationToken cancellationToken = default) { - var descriptor = new CreateRequestDescriptor(document, index); + var descriptor = new RenderSearchTemplateRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// 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. + /// Render a search template. + /// + /// + /// Render a search template as a search request body. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) + public virtual Task RenderSearchTemplateAsync(Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new CreateRequestDescriptor(document, index); + var descriptor = new RenderSearchTemplateRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// 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. + /// Run a script. + /// Runs a script and returns a result. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ScriptsPainlessExecuteResponse ScriptsPainlessExecute(ScriptsPainlessExecuteRequest request) { - var descriptor = new CreateRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); + request.BeforeRequest(); + return DoRequest, ScriptsPainlessExecuteRequestParameters>(request); } /// /// - /// 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. + /// Run a script. + /// Runs a script and returns a result. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task CreateAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + public virtual Task> ScriptsPainlessExecuteAsync(ScriptsPainlessExecuteRequest request, CancellationToken cancellationToken = default) { - var descriptor = new CreateRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, CreateResponse, CreateRequestParameters>(descriptor, cancellationToken); + request.BeforeRequest(); + return DoRequestAsync, ScriptsPainlessExecuteRequestParameters>(request, cancellationToken); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Run a script. + /// Runs a script and returns a result. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteResponse Delete(DeleteRequest request) + public virtual ScriptsPainlessExecuteResponse ScriptsPainlessExecute(ScriptsPainlessExecuteRequestDescriptor descriptor) { - request.BeforeRequest(); - return DoRequest(request); + descriptor.BeforeRequest(); + return DoRequest, ScriptsPainlessExecuteResponse, ScriptsPainlessExecuteRequestParameters>(descriptor); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Run a script. + /// Runs a script and returns a result. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task DeleteAsync(DeleteRequest request, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual ScriptsPainlessExecuteResponse ScriptsPainlessExecute() { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + var descriptor = new ScriptsPainlessExecuteRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest, ScriptsPainlessExecuteResponse, ScriptsPainlessExecuteRequestParameters>(descriptor); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Run a script. + /// Runs a script and returns a result. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteResponse Delete(DeleteRequestDescriptor descriptor) + public virtual ScriptsPainlessExecuteResponse ScriptsPainlessExecute(Action> configureRequest) { + var descriptor = new ScriptsPainlessExecuteRequestDescriptor(); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + return DoRequest, ScriptsPainlessExecuteResponse, ScriptsPainlessExecuteRequestParameters>(descriptor); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Run a script. + /// Runs a script and returns a result. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteResponse Delete(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) + public virtual Task> ScriptsPainlessExecuteAsync(ScriptsPainlessExecuteRequestDescriptor descriptor, CancellationToken cancellationToken = default) { - var descriptor = new DeleteRequestDescriptor(index, id); descriptor.BeforeRequest(); - return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + return DoRequestAsync, ScriptsPainlessExecuteResponse, ScriptsPainlessExecuteRequestParameters>(descriptor, cancellationToken); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Run a script. + /// Runs a script and returns a result. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteResponse Delete(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + public virtual Task> ScriptsPainlessExecuteAsync(CancellationToken cancellationToken = default) { - var descriptor = new DeleteRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); + var descriptor = new ScriptsPainlessExecuteRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + return DoRequestAsync, ScriptsPainlessExecuteResponse, ScriptsPainlessExecuteRequestParameters>(descriptor, cancellationToken); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Run a script. + /// Runs a script and returns a result. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteResponse Delete(TDocument document) + public virtual Task> ScriptsPainlessExecuteAsync(Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new DeleteRequestDescriptor(document); + var descriptor = new ScriptsPainlessExecuteRequestDescriptor(); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + return DoRequestAsync, ScriptsPainlessExecuteResponse, ScriptsPainlessExecuteRequestParameters>(descriptor, cancellationToken); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Run a scrolling search. + /// + /// + /// IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the search_after parameter with a point in time (PIT). + /// + /// + /// The scroll API gets large sets of results from a single scrolling search request. + /// To get the necessary scroll ID, submit a search API request that includes an argument for the scroll query parameter. + /// The scroll parameter indicates how long Elasticsearch should retain the search context for the request. + /// The search response returns a scroll ID in the _scroll_id response body parameter. + /// You can then use the scroll ID with the scroll API to retrieve the next batch of results for the request. + /// If the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search. + /// + /// + /// You can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context. + /// + /// + /// IMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteResponse Delete(TDocument document, Action> configureRequest) + public virtual ScrollResponse Scroll(ScrollRequest request) { - var descriptor = new DeleteRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + request.BeforeRequest(); + return DoRequest, ScrollRequestParameters>(request); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Run a scrolling search. + /// + /// + /// IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the search_after parameter with a point in time (PIT). + /// + /// + /// The scroll API gets large sets of results from a single scrolling search request. + /// To get the necessary scroll ID, submit a search API request that includes an argument for the scroll query parameter. + /// The scroll parameter indicates how long Elasticsearch should retain the search context for the request. + /// The search response returns a scroll ID in the _scroll_id response body parameter. + /// You can then use the scroll ID with the scroll API to retrieve the next batch of results for the request. + /// If the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search. + /// + /// + /// You can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context. + /// + /// + /// IMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteResponse Delete(TDocument document, Elastic.Clients.Elasticsearch.IndexName index) + public virtual Task> ScrollAsync(ScrollRequest request, CancellationToken cancellationToken = default) { - var descriptor = new DeleteRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + request.BeforeRequest(); + return DoRequestAsync, ScrollRequestParameters>(request, cancellationToken); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Run a search. + /// + /// + /// Get search hits that match the query defined in the request. + /// You can provide search queries using the q query string parameter or the request body. + /// If both are specified, only the query parameter is used. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges. + /// To search a point in time (PIT) for an alias, you must have the read index privilege for the alias's data streams or indices. + /// + /// + /// Search slicing + /// + /// + /// When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the slice and pit properties. + /// By default the splitting is done first on the shards, then locally on each shard. + /// The local splitting partitions the shard into contiguous ranges based on Lucene document IDs. + /// + /// + /// For instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard. + /// + /// + /// IMPORTANT: The same point-in-time ID should be used for all slices. + /// If different PIT IDs are used, slices can overlap and miss documents. + /// This situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteResponse Delete(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) + public virtual SearchResponse Search(SearchRequest request) { - var descriptor = new DeleteRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + request.BeforeRequest(); + return DoRequest, SearchRequestParameters>(request); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Run a search. + /// + /// + /// Get search hits that match the query defined in the request. + /// You can provide search queries using the q query string parameter or the request body. + /// If both are specified, only the query parameter is used. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges. + /// To search a point in time (PIT) for an alias, you must have the read index privilege for the alias's data streams or indices. + /// + /// + /// Search slicing + /// + /// + /// When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the slice and pit properties. + /// By default the splitting is done first on the shards, then locally on each shard. + /// The local splitting partitions the shard into contiguous ranges based on Lucene document IDs. + /// + /// + /// For instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// IMPORTANT: The same point-in-time ID should be used for all slices. + /// If different PIT IDs are used, slices can overlap and miss documents. + /// This situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteResponse Delete(TDocument document, Elastic.Clients.Elasticsearch.Id id) + public virtual Task> SearchAsync(SearchRequest request, CancellationToken cancellationToken = default) { - var descriptor = new DeleteRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + request.BeforeRequest(); + return DoRequestAsync, SearchRequestParameters>(request, cancellationToken); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Run a search. + /// + /// + /// Get search hits that match the query defined in the request. + /// You can provide search queries using the q query string parameter or the request body. + /// If both are specified, only the query parameter is used. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges. + /// To search a point in time (PIT) for an alias, you must have the read index privilege for the alias's data streams or indices. + /// + /// + /// Search slicing + /// + /// + /// When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the slice and pit properties. + /// By default the splitting is done first on the shards, then locally on each shard. + /// The local splitting partitions the shard into contiguous ranges based on Lucene document IDs. + /// + /// + /// For instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard. + /// + /// + /// IMPORTANT: The same point-in-time ID should be used for all slices. + /// If different PIT IDs are used, slices can overlap and miss documents. + /// This situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteResponse Delete(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + public virtual SearchResponse Search(SearchRequestDescriptor descriptor) { - var descriptor = new DeleteRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + return DoRequest, SearchResponse, SearchRequestParameters>(descriptor); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Run a search. + /// + /// + /// Get search hits that match the query defined in the request. + /// You can provide search queries using the q query string parameter or the request body. + /// If both are specified, only the query parameter is used. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges. + /// To search a point in time (PIT) for an alias, you must have the read index privilege for the alias's data streams or indices. + /// + /// + /// Search slicing + /// + /// + /// When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the slice and pit properties. + /// By default the splitting is done first on the shards, then locally on each shard. + /// The local splitting partitions the shard into contiguous ranges based on Lucene document IDs. + /// + /// + /// For instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// IMPORTANT: The same point-in-time ID should be used for all slices. + /// If different PIT IDs are used, slices can overlap and miss documents. + /// This situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteResponse Delete(Elastic.Clients.Elasticsearch.Id id) + public virtual SearchResponse Search(Elastic.Clients.Elasticsearch.Indices? indices) { - var descriptor = new DeleteRequestDescriptor(id); + var descriptor = new SearchRequestDescriptor(indices); descriptor.BeforeRequest(); - return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + return DoRequest, SearchResponse, SearchRequestParameters>(descriptor); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Run a search. + /// + /// + /// Get search hits that match the query defined in the request. + /// You can provide search queries using the q query string parameter or the request body. + /// If both are specified, only the query parameter is used. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges. + /// To search a point in time (PIT) for an alias, you must have the read index privilege for the alias's data streams or indices. + /// + /// + /// Search slicing + /// + /// + /// When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the slice and pit properties. + /// By default the splitting is done first on the shards, then locally on each shard. + /// The local splitting partitions the shard into contiguous ranges based on Lucene document IDs. + /// + /// + /// For instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard. + /// + /// + /// IMPORTANT: The same point-in-time ID should be used for all slices. + /// If different PIT IDs are used, slices can overlap and miss documents. + /// This situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteResponse Delete(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + public virtual SearchResponse Search(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) { - var descriptor = new DeleteRequestDescriptor(id); + var descriptor = new SearchRequestDescriptor(indices); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, DeleteResponse, DeleteRequestParameters>(descriptor); + return DoRequest, SearchResponse, SearchRequestParameters>(descriptor); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Run a search. + /// + /// + /// Get search hits that match the query defined in the request. + /// You can provide search queries using the q query string parameter or the request body. + /// If both are specified, only the query parameter is used. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges. + /// To search a point in time (PIT) for an alias, you must have the read index privilege for the alias's data streams or indices. + /// + /// + /// Search slicing + /// + /// + /// When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the slice and pit properties. + /// By default the splitting is done first on the shards, then locally on each shard. + /// The local splitting partitions the shard into contiguous ranges based on Lucene document IDs. + /// + /// + /// For instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard. + /// + /// + /// IMPORTANT: The same point-in-time ID should be used for all slices. + /// If different PIT IDs are used, slices can overlap and miss documents. + /// This situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteResponse Delete(DeleteRequestDescriptor descriptor) + public virtual SearchResponse Search() { + var descriptor = new SearchRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest, SearchResponse, SearchRequestParameters>(descriptor); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Run a search. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteResponse Delete(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new DeleteRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Get search hits that match the query defined in the request. + /// You can provide search queries using the q query string parameter or the request body. + /// If both are specified, only the query parameter is used. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges. + /// To search a point in time (PIT) for an alias, you must have the read index privilege for the alias's data streams or indices. + /// + /// + /// Search slicing + /// + /// + /// When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the slice and pit properties. + /// By default the splitting is done first on the shards, then locally on each shard. + /// The local splitting partitions the shard into contiguous ranges based on Lucene document IDs. + /// + /// + /// For instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard. + /// + /// + /// IMPORTANT: The same point-in-time ID should be used for all slices. + /// If different PIT IDs are used, slices can overlap and miss documents. + /// This situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteResponse Delete(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action configureRequest) + public virtual SearchResponse Search(Action> configureRequest) { - var descriptor = new DeleteRequestDescriptor(index, id); + var descriptor = new SearchRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest, SearchResponse, SearchRequestParameters>(descriptor); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Run a search. + /// + /// + /// Get search hits that match the query defined in the request. + /// You can provide search queries using the q query string parameter or the request body. + /// If both are specified, only the query parameter is used. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges. + /// To search a point in time (PIT) for an alias, you must have the read index privilege for the alias's data streams or indices. + /// + /// + /// Search slicing /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the slice and pit properties. + /// By default the splitting is done first on the shards, then locally on each shard. + /// The local splitting partitions the shard into contiguous ranges based on Lucene document IDs. + /// + /// + /// For instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard. + /// + /// + /// IMPORTANT: The same point-in-time ID should be used for all slices. + /// If different PIT IDs are used, slices can overlap and miss documents. + /// This situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task DeleteAsync(DeleteRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task> SearchAsync(SearchRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, SearchResponse, SearchRequestParameters>(descriptor, cancellationToken); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Run a search. + /// + /// + /// Get search hits that match the query defined in the request. + /// You can provide search queries using the q query string parameter or the request body. + /// If both are specified, only the query parameter is used. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges. + /// To search a point in time (PIT) for an alias, you must have the read index privilege for the alias's data streams or indices. + /// + /// + /// Search slicing + /// + /// + /// When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the slice and pit properties. + /// By default the splitting is done first on the shards, then locally on each shard. + /// The local splitting partitions the shard into contiguous ranges based on Lucene document IDs. + /// + /// + /// For instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard. + /// + /// + /// IMPORTANT: The same point-in-time ID should be used for all slices. + /// If different PIT IDs are used, slices can overlap and miss documents. + /// This situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + public virtual Task> SearchAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { - var descriptor = new DeleteRequestDescriptor(index, id); + var descriptor = new SearchRequestDescriptor(indices); descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, SearchResponse, SearchRequestParameters>(descriptor, cancellationToken); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Run a search. + /// + /// + /// Get search hits that match the query defined in the request. + /// You can provide search queries using the q query string parameter or the request body. + /// If both are specified, only the query parameter is used. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges. + /// To search a point in time (PIT) for an alias, you must have the read index privilege for the alias's data streams or indices. + /// + /// + /// Search slicing + /// + /// + /// When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the slice and pit properties. + /// By default the splitting is done first on the shards, then locally on each shard. + /// The local splitting partitions the shard into contiguous ranges based on Lucene document IDs. + /// + /// + /// For instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// IMPORTANT: The same point-in-time ID should be used for all slices. + /// If different PIT IDs are used, slices can overlap and miss documents. + /// This situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + public virtual Task> SearchAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new DeleteRequestDescriptor(index, id); + var descriptor = new SearchRequestDescriptor(indices); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, SearchResponse, SearchRequestParameters>(descriptor, cancellationToken); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Run a search. + /// + /// + /// Get search hits that match the query defined in the request. + /// You can provide search queries using the q query string parameter or the request body. + /// If both are specified, only the query parameter is used. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges. + /// To search a point in time (PIT) for an alias, you must have the read index privilege for the alias's data streams or indices. + /// + /// + /// Search slicing + /// + /// + /// When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the slice and pit properties. + /// By default the splitting is done first on the shards, then locally on each shard. + /// The local splitting partitions the shard into contiguous ranges based on Lucene document IDs. + /// + /// + /// For instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard. + /// + /// + /// IMPORTANT: The same point-in-time ID should be used for all slices. + /// If different PIT IDs are used, slices can overlap and miss documents. + /// This situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task DeleteAsync(TDocument document, CancellationToken cancellationToken = default) + public virtual Task> SearchAsync(CancellationToken cancellationToken = default) { - var descriptor = new DeleteRequestDescriptor(document); + var descriptor = new SearchRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, SearchResponse, SearchRequestParameters>(descriptor, cancellationToken); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Run a search. + /// + /// + /// Get search hits that match the query defined in the request. + /// You can provide search queries using the q query string parameter or the request body. + /// If both are specified, only the query parameter is used. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges. + /// To search a point in time (PIT) for an alias, you must have the read index privilege for the alias's data streams or indices. + /// + /// + /// Search slicing + /// + /// + /// When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the slice and pit properties. + /// By default the splitting is done first on the shards, then locally on each shard. + /// The local splitting partitions the shard into contiguous ranges based on Lucene document IDs. + /// + /// + /// For instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard. + /// + /// + /// IMPORTANT: The same point-in-time ID should be used for all slices. + /// If different PIT IDs are used, slices can overlap and miss documents. + /// This situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task DeleteAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) + public virtual Task> SearchAsync(Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new DeleteRequestDescriptor(document); + var descriptor = new SearchRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, SearchResponse, SearchRequestParameters>(descriptor, cancellationToken); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Search a vector tile. + /// + /// + /// Search a vector tile for geospatial values. + /// Before using this API, you should be familiar with the Mapbox vector tile specification. + /// The API returns results as a binary mapbox vector tile. + /// + /// + /// Internally, Elasticsearch translates a vector tile search API request into a search containing: + /// + /// + /// + /// + /// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. + /// + /// + /// + /// + /// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. + /// + /// + /// + /// + /// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. + /// + /// + /// + /// + /// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. + /// + /// + /// + /// + /// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search + /// + /// + /// GET my-index/_search + /// { + /// "size": 10000, + /// "query": { + /// "geo_bounding_box": { + /// "my-geo-field": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "aggregations": { + /// "grid": { + /// "geotile_grid": { + /// "field": "my-geo-field", + /// "precision": 11, + /// "size": 65536, + /// "bounds": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "bounds": { + /// "geo_bounds": { + /// "field": "my-geo-field", + /// "wrap_longitude": false + /// } + /// } + /// } + /// } + /// + /// + /// The API returns results as a binary Mapbox vector tile. + /// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: + /// + /// + /// + /// + /// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. + /// + /// + /// + /// + /// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. + /// + /// + /// + /// + /// A meta layer containing: + /// + /// + /// + /// + /// A feature containing a bounding box. By default, this is the bounding box of the tile. + /// + /// + /// + /// + /// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. + /// + /// + /// + /// + /// Metadata for the search. + /// + /// + /// + /// + /// + /// + /// The API only returns features that can display at its zoom level. + /// For example, if a polygon feature has no area at its zoom level, the API omits it. + /// The API returns errors as UTF-8 encoded JSON. + /// + /// + /// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. + /// If you specify both parameters, the query parameter takes precedence. + /// + /// + /// Grid precision for geotile + /// + /// + /// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. + /// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. + /// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. + /// The maximum final precision is 29. + /// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). + /// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. + /// The aggs layer only contains features for cells with matching data. + /// + /// + /// Grid precision for geohex + /// + /// + /// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. + /// + /// + /// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. + /// The following table maps the H3 resolution for each precision. + /// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. + /// At a precision of 6, hexagonal cells have an H3 resolution of 2. + /// If <zoom> is 3 and grid_precision is 4, the precision is 7. + /// At a precision of 7, hexagonal cells have an H3 resolution of 3. + /// + /// + /// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | + /// | --------- | ---------------- | ------------- | ----------------| ----- | + /// | 1 | 4 | 0 | 122 | 30.5 | + /// | 2 | 16 | 0 | 122 | 7.625 | + /// | 3 | 64 | 1 | 842 | 13.15625 | + /// | 4 | 256 | 1 | 842 | 3.2890625 | + /// | 5 | 1024 | 2 | 5882 | 5.744140625 | + /// | 6 | 4096 | 2 | 5882 | 1.436035156 | + /// | 7 | 16384 | 3 | 41162 | 2.512329102 | + /// | 8 | 65536 | 3 | 41162 | 0.6280822754 | + /// | 9 | 262144 | 4 | 288122 | 1.099098206 | + /// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | + /// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | + /// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | + /// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | + /// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | + /// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | + /// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | + /// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | + /// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | + /// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | + /// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | + /// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | + /// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | + /// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | + /// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | + /// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | + /// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | + /// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | + /// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | + /// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | + /// + /// + /// Hexagonal cells don't align perfectly on a vector tile. + /// Some cells may intersect more than one vector tile. + /// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. + /// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task DeleteAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual SearchMvtResponse SearchMvt(SearchMvtRequest request) { - var descriptor = new DeleteRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); + request.BeforeRequest(); + return DoRequest(request); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Search a vector tile. + /// + /// + /// Search a vector tile for geospatial values. + /// Before using this API, you should be familiar with the Mapbox vector tile specification. + /// The API returns results as a binary mapbox vector tile. + /// + /// + /// Internally, Elasticsearch translates a vector tile search API request into a search containing: + /// + /// + /// + /// + /// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. + /// + /// + /// + /// + /// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. + /// + /// + /// + /// + /// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. + /// + /// + /// + /// + /// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. + /// + /// + /// + /// + /// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search + /// + /// + /// GET my-index/_search + /// { + /// "size": 10000, + /// "query": { + /// "geo_bounding_box": { + /// "my-geo-field": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "aggregations": { + /// "grid": { + /// "geotile_grid": { + /// "field": "my-geo-field", + /// "precision": 11, + /// "size": 65536, + /// "bounds": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "bounds": { + /// "geo_bounds": { + /// "field": "my-geo-field", + /// "wrap_longitude": false + /// } + /// } + /// } + /// } + /// + /// + /// The API returns results as a binary Mapbox vector tile. + /// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: + /// + /// + /// + /// + /// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. + /// + /// + /// + /// + /// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. + /// + /// + /// + /// + /// A meta layer containing: + /// + /// + /// + /// + /// A feature containing a bounding box. By default, this is the bounding box of the tile. + /// + /// + /// + /// + /// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. + /// + /// + /// + /// + /// Metadata for the search. + /// + /// + /// + /// + /// + /// + /// The API only returns features that can display at its zoom level. + /// For example, if a polygon feature has no area at its zoom level, the API omits it. + /// The API returns errors as UTF-8 encoded JSON. + /// + /// + /// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. + /// If you specify both parameters, the query parameter takes precedence. + /// + /// + /// Grid precision for geotile + /// + /// + /// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. + /// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. + /// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. + /// The maximum final precision is 29. + /// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). + /// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. + /// The aggs layer only contains features for cells with matching data. + /// + /// + /// Grid precision for geohex + /// + /// + /// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. + /// + /// + /// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. + /// The following table maps the H3 resolution for each precision. + /// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. + /// At a precision of 6, hexagonal cells have an H3 resolution of 2. + /// If <zoom> is 3 and grid_precision is 4, the precision is 7. + /// At a precision of 7, hexagonal cells have an H3 resolution of 3. + /// + /// + /// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | + /// | --------- | ---------------- | ------------- | ----------------| ----- | + /// | 1 | 4 | 0 | 122 | 30.5 | + /// | 2 | 16 | 0 | 122 | 7.625 | + /// | 3 | 64 | 1 | 842 | 13.15625 | + /// | 4 | 256 | 1 | 842 | 3.2890625 | + /// | 5 | 1024 | 2 | 5882 | 5.744140625 | + /// | 6 | 4096 | 2 | 5882 | 1.436035156 | + /// | 7 | 16384 | 3 | 41162 | 2.512329102 | + /// | 8 | 65536 | 3 | 41162 | 0.6280822754 | + /// | 9 | 262144 | 4 | 288122 | 1.099098206 | + /// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | + /// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | + /// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | + /// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | + /// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | + /// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | + /// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | + /// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | + /// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | + /// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | + /// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | + /// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | + /// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | + /// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | + /// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | + /// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | + /// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | + /// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | + /// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | + /// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Hexagonal cells don't align perfectly on a vector tile. + /// Some cells may intersect more than one vector tile. + /// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. + /// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task DeleteAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + public virtual Task SearchMvtAsync(SearchMvtRequest request, CancellationToken cancellationToken = default) { - var descriptor = new DeleteRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Search a vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Search a vector tile for geospatial values. + /// Before using this API, you should be familiar with the Mapbox vector tile specification. + /// The API returns results as a binary mapbox vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Internally, Elasticsearch translates a vector tile search API request into a search containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteResponse, DeleteRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(DeleteRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Delete a document. - /// Removes a JSON document from the specified index. + /// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Delete documents. - /// Deletes documents that match the specified query. + /// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteByQueryResponse DeleteByQuery(DeleteByQueryRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// + /// + /// /// - /// Delete documents. - /// Deletes documents that match the specified query. + /// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryAsync(DeleteByQueryRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// + /// + /// GET my-index/_search + /// { + /// "size": 10000, + /// "query": { + /// "geo_bounding_box": { + /// "my-geo-field": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "aggregations": { + /// "grid": { + /// "geotile_grid": { + /// "field": "my-geo-field", + /// "precision": 11, + /// "size": 65536, + /// "bounds": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "bounds": { + /// "geo_bounds": { + /// "field": "my-geo-field", + /// "wrap_longitude": false + /// } + /// } + /// } + /// } + /// /// - /// Delete documents. - /// Deletes documents that match the specified query. + /// The API returns results as a binary Mapbox vector tile. + /// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteByQueryResponse DeleteByQuery(DeleteByQueryRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Delete documents. - /// Deletes documents that match the specified query. + /// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteByQueryResponse DeleteByQuery(Elastic.Clients.Elasticsearch.Indices indices) - { - var descriptor = new DeleteByQueryRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequest, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Delete documents. - /// Deletes documents that match the specified query. + /// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteByQueryResponse DeleteByQuery(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest) - { - var descriptor = new DeleteByQueryRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Delete documents. - /// Deletes documents that match the specified query. + /// A meta layer containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteByQueryResponse DeleteByQuery() - { - var descriptor = new DeleteByQueryRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Delete documents. - /// Deletes documents that match the specified query. + /// A feature containing a bounding box. By default, this is the bounding box of the tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteByQueryResponse DeleteByQuery(Action> configureRequest) - { - var descriptor = new DeleteByQueryRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Delete documents. - /// Deletes documents that match the specified query. + /// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteByQueryResponse DeleteByQuery(DeleteByQueryRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Delete documents. - /// Deletes documents that match the specified query. + /// Metadata for the search. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteByQueryResponse DeleteByQuery(Elastic.Clients.Elasticsearch.Indices indices) - { - var descriptor = new DeleteByQueryRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// + /// + /// /// - /// Delete documents. - /// Deletes documents that match the specified query. + /// The API only returns features that can display at its zoom level. + /// For example, if a polygon feature has no area at its zoom level, the API omits it. + /// The API returns errors as UTF-8 encoded JSON. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteByQueryResponse DeleteByQuery(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest) - { - var descriptor = new DeleteByQueryRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Delete documents. - /// Deletes documents that match the specified query. + /// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. + /// If you specify both parameters, the query parameter takes precedence. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryAsync(DeleteByQueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Delete documents. - /// Deletes documents that match the specified query. + /// Grid precision for geotile /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteByQueryRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Delete documents. - /// Deletes documents that match the specified query. + /// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. + /// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. + /// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. + /// The maximum final precision is 29. + /// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). + /// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. + /// The aggs layer only contains features for cells with matching data. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryAsync(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteByQueryRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Delete documents. - /// Deletes documents that match the specified query. + /// Grid precision for geohex /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryAsync(CancellationToken cancellationToken = default) - { - var descriptor = new DeleteByQueryRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Delete documents. - /// Deletes documents that match the specified query. + /// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. + /// + /// + /// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. + /// The following table maps the H3 resolution for each precision. + /// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. + /// At a precision of 6, hexagonal cells have an H3 resolution of 2. + /// If <zoom> is 3 and grid_precision is 4, the precision is 7. + /// At a precision of 7, hexagonal cells have an H3 resolution of 3. + /// + /// + /// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | + /// | --------- | ---------------- | ------------- | ----------------| ----- | + /// | 1 | 4 | 0 | 122 | 30.5 | + /// | 2 | 16 | 0 | 122 | 7.625 | + /// | 3 | 64 | 1 | 842 | 13.15625 | + /// | 4 | 256 | 1 | 842 | 3.2890625 | + /// | 5 | 1024 | 2 | 5882 | 5.744140625 | + /// | 6 | 4096 | 2 | 5882 | 1.436035156 | + /// | 7 | 16384 | 3 | 41162 | 2.512329102 | + /// | 8 | 65536 | 3 | 41162 | 0.6280822754 | + /// | 9 | 262144 | 4 | 288122 | 1.099098206 | + /// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | + /// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | + /// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | + /// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | + /// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | + /// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | + /// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | + /// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | + /// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | + /// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | + /// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | + /// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | + /// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | + /// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | + /// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | + /// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | + /// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | + /// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | + /// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | + /// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | + /// + /// + /// Hexagonal cells don't align perfectly on a vector tile. + /// Some cells may intersect more than one vector tile. + /// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. + /// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task DeleteByQueryAsync(Action> configureRequest, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual SearchMvtResponse SearchMvt(SearchMvtRequestDescriptor descriptor) { - var descriptor = new DeleteByQueryRequestDescriptor(); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, DeleteByQueryResponse, DeleteByQueryRequestParameters>(descriptor, cancellationToken); + return DoRequest, SearchMvtResponse, SearchMvtRequestParameters>(descriptor); } /// /// - /// Delete documents. - /// Deletes documents that match the specified query. + /// Search a vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryAsync(DeleteByQueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Delete documents. - /// Deletes documents that match the specified query. + /// Search a vector tile for geospatial values. + /// Before using this API, you should be familiar with the Mapbox vector tile specification. + /// The API returns results as a binary mapbox vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteByQueryRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Delete documents. - /// Deletes documents that match the specified query. + /// Internally, Elasticsearch translates a vector tile search API request into a search containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryAsync(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteByQueryRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Throttle a delete by query operation. + /// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. /// + /// + /// /// - /// Change the number of requests per second for a particular delete by query operation. - /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. + /// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteByQueryRethrottleResponse DeleteByQueryRethrottle(DeleteByQueryRethrottleRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// + /// + /// /// - /// Throttle a delete by query operation. + /// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. /// + /// + /// /// - /// Change the number of requests per second for a particular delete by query operation. - /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. + /// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryRethrottleAsync(DeleteByQueryRethrottleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// + /// + /// /// - /// Throttle a delete by query operation. + /// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search /// + /// + /// GET my-index/_search + /// { + /// "size": 10000, + /// "query": { + /// "geo_bounding_box": { + /// "my-geo-field": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "aggregations": { + /// "grid": { + /// "geotile_grid": { + /// "field": "my-geo-field", + /// "precision": 11, + /// "size": 65536, + /// "bounds": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "bounds": { + /// "geo_bounds": { + /// "field": "my-geo-field", + /// "wrap_longitude": false + /// } + /// } + /// } + /// } + /// /// - /// Change the number of requests per second for a particular delete by query operation. - /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. + /// The API returns results as a binary Mapbox vector tile. + /// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteByQueryRethrottleResponse DeleteByQueryRethrottle(DeleteByQueryRethrottleRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Throttle a delete by query operation. + /// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. /// + /// + /// /// - /// Change the number of requests per second for a particular delete by query operation. - /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. + /// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteByQueryRethrottleResponse DeleteByQueryRethrottle(Elastic.Clients.Elasticsearch.TaskId taskId) - { - var descriptor = new DeleteByQueryRethrottleRequestDescriptor(taskId); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Throttle a delete by query operation. + /// A meta layer containing: /// + /// + /// /// - /// Change the number of requests per second for a particular delete by query operation. - /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. + /// A feature containing a bounding box. By default, this is the bounding box of the tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteByQueryRethrottleResponse DeleteByQueryRethrottle(Elastic.Clients.Elasticsearch.TaskId taskId, Action configureRequest) - { - var descriptor = new DeleteByQueryRethrottleRequestDescriptor(taskId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Throttle a delete by query operation. + /// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. /// + /// + /// /// - /// Change the number of requests per second for a particular delete by query operation. - /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. + /// Metadata for the search. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryRethrottleAsync(DeleteByQueryRethrottleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// + /// + /// /// - /// Throttle a delete by query operation. + /// The API only returns features that can display at its zoom level. + /// For example, if a polygon feature has no area at its zoom level, the API omits it. + /// The API returns errors as UTF-8 encoded JSON. /// /// - /// Change the number of requests per second for a particular delete by query operation. - /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. + /// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. + /// If you specify both parameters, the query parameter takes precedence. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryRethrottleAsync(Elastic.Clients.Elasticsearch.TaskId taskId, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteByQueryRethrottleRequestDescriptor(taskId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Throttle a delete by query operation. + /// Grid precision for geotile /// /// - /// Change the number of requests per second for a particular delete by query operation. - /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. + /// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. + /// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. + /// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. + /// The maximum final precision is 29. + /// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). + /// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. + /// The aggs layer only contains features for cells with matching data. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteByQueryRethrottleAsync(Elastic.Clients.Elasticsearch.TaskId taskId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteByQueryRethrottleRequestDescriptor(taskId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Delete a script or search template. - /// Deletes a stored script or search template. + /// Grid precision for geohex /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteScriptResponse DeleteScript(DeleteScriptRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// /// - /// Delete a script or search template. - /// Deletes a stored script or search template. + /// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteScriptAsync(DeleteScriptRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// /// - /// Delete a script or search template. - /// Deletes a stored script or search template. + /// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. + /// The following table maps the H3 resolution for each precision. + /// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. + /// At a precision of 6, hexagonal cells have an H3 resolution of 2. + /// If <zoom> is 3 and grid_precision is 4, the precision is 7. + /// At a precision of 7, hexagonal cells have an H3 resolution of 3. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteScriptResponse DeleteScript(DeleteScriptRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, DeleteScriptResponse, DeleteScriptRequestParameters>(descriptor); - } - - /// /// - /// Delete a script or search template. - /// Deletes a stored script or search template. + /// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | + /// | --------- | ---------------- | ------------- | ----------------| ----- | + /// | 1 | 4 | 0 | 122 | 30.5 | + /// | 2 | 16 | 0 | 122 | 7.625 | + /// | 3 | 64 | 1 | 842 | 13.15625 | + /// | 4 | 256 | 1 | 842 | 3.2890625 | + /// | 5 | 1024 | 2 | 5882 | 5.744140625 | + /// | 6 | 4096 | 2 | 5882 | 1.436035156 | + /// | 7 | 16384 | 3 | 41162 | 2.512329102 | + /// | 8 | 65536 | 3 | 41162 | 0.6280822754 | + /// | 9 | 262144 | 4 | 288122 | 1.099098206 | + /// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | + /// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | + /// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | + /// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | + /// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | + /// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | + /// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | + /// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | + /// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | + /// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | + /// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | + /// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | + /// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | + /// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | + /// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | + /// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | + /// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | + /// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | + /// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | + /// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteScriptResponse DeleteScript(Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new DeleteScriptRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequest, DeleteScriptResponse, DeleteScriptRequestParameters>(descriptor); - } - - /// /// - /// Delete a script or search template. - /// Deletes a stored script or search template. + /// Hexagonal cells don't align perfectly on a vector tile. + /// Some cells may intersect more than one vector tile. + /// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. + /// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteScriptResponse DeleteScript(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + public virtual SearchMvtResponse SearchMvt(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y) { - var descriptor = new DeleteScriptRequestDescriptor(id); - configureRequest?.Invoke(descriptor); + var descriptor = new SearchMvtRequestDescriptor(indices, field, zoom, x, y); descriptor.BeforeRequest(); - return DoRequest, DeleteScriptResponse, DeleteScriptRequestParameters>(descriptor); + return DoRequest, SearchMvtResponse, SearchMvtRequestParameters>(descriptor); } /// /// - /// Delete a script or search template. - /// Deletes a stored script or search template. + /// Search a vector tile. + /// + /// + /// Search a vector tile for geospatial values. + /// Before using this API, you should be familiar with the Mapbox vector tile specification. + /// The API returns results as a binary mapbox vector tile. + /// + /// + /// Internally, Elasticsearch translates a vector tile search API request into a search containing: + /// + /// + /// + /// + /// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. + /// + /// + /// + /// + /// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. + /// + /// + /// + /// + /// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. + /// + /// + /// + /// + /// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. + /// + /// + /// + /// + /// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search + /// + /// + /// GET my-index/_search + /// { + /// "size": 10000, + /// "query": { + /// "geo_bounding_box": { + /// "my-geo-field": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "aggregations": { + /// "grid": { + /// "geotile_grid": { + /// "field": "my-geo-field", + /// "precision": 11, + /// "size": 65536, + /// "bounds": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "bounds": { + /// "geo_bounds": { + /// "field": "my-geo-field", + /// "wrap_longitude": false + /// } + /// } + /// } + /// } + /// + /// + /// The API returns results as a binary Mapbox vector tile. + /// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: + /// + /// + /// + /// + /// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. + /// + /// + /// + /// + /// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. + /// + /// + /// + /// + /// A meta layer containing: + /// + /// + /// + /// + /// A feature containing a bounding box. By default, this is the bounding box of the tile. + /// + /// + /// + /// + /// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. + /// + /// + /// + /// + /// Metadata for the search. + /// + /// + /// + /// + /// + /// + /// The API only returns features that can display at its zoom level. + /// For example, if a polygon feature has no area at its zoom level, the API omits it. + /// The API returns errors as UTF-8 encoded JSON. + /// + /// + /// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. + /// If you specify both parameters, the query parameter takes precedence. + /// + /// + /// Grid precision for geotile + /// + /// + /// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. + /// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. + /// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. + /// The maximum final precision is 29. + /// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). + /// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. + /// The aggs layer only contains features for cells with matching data. + /// + /// + /// Grid precision for geohex + /// + /// + /// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteScriptResponse DeleteScript(DeleteScriptRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Delete a script or search template. - /// Deletes a stored script or search template. + /// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. + /// The following table maps the H3 resolution for each precision. + /// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. + /// At a precision of 6, hexagonal cells have an H3 resolution of 2. + /// If <zoom> is 3 and grid_precision is 4, the precision is 7. + /// At a precision of 7, hexagonal cells have an H3 resolution of 3. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteScriptResponse DeleteScript(Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new DeleteScriptRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Delete a script or search template. - /// Deletes a stored script or search template. + /// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | + /// | --------- | ---------------- | ------------- | ----------------| ----- | + /// | 1 | 4 | 0 | 122 | 30.5 | + /// | 2 | 16 | 0 | 122 | 7.625 | + /// | 3 | 64 | 1 | 842 | 13.15625 | + /// | 4 | 256 | 1 | 842 | 3.2890625 | + /// | 5 | 1024 | 2 | 5882 | 5.744140625 | + /// | 6 | 4096 | 2 | 5882 | 1.436035156 | + /// | 7 | 16384 | 3 | 41162 | 2.512329102 | + /// | 8 | 65536 | 3 | 41162 | 0.6280822754 | + /// | 9 | 262144 | 4 | 288122 | 1.099098206 | + /// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | + /// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | + /// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | + /// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | + /// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | + /// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | + /// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | + /// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | + /// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | + /// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | + /// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | + /// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | + /// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | + /// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | + /// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | + /// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | + /// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | + /// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | + /// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | + /// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Hexagonal cells don't align perfectly on a vector tile. + /// Some cells may intersect more than one vector tile. + /// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. + /// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual DeleteScriptResponse DeleteScript(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) + public virtual SearchMvtResponse SearchMvt(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y, Action> configureRequest) { - var descriptor = new DeleteScriptRequestDescriptor(id); + var descriptor = new SearchMvtRequestDescriptor(indices, field, zoom, x, y); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest, SearchMvtResponse, SearchMvtRequestParameters>(descriptor); } /// /// - /// Delete a script or search template. - /// Deletes a stored script or search template. + /// Search a vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteScriptAsync(DeleteScriptRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteScriptResponse, DeleteScriptRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Delete a script or search template. - /// Deletes a stored script or search template. + /// Search a vector tile for geospatial values. + /// Before using this API, you should be familiar with the Mapbox vector tile specification. + /// The API returns results as a binary mapbox vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteScriptAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteScriptRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteScriptResponse, DeleteScriptRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Delete a script or search template. - /// Deletes a stored script or search template. + /// Internally, Elasticsearch translates a vector tile search API request into a search containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteScriptAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteScriptRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, DeleteScriptResponse, DeleteScriptRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Delete a script or search template. - /// Deletes a stored script or search template. + /// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteScriptAsync(DeleteScriptRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Delete a script or search template. - /// Deletes a stored script or search template. + /// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteScriptAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteScriptRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Delete a script or search template. - /// Deletes a stored script or search template. + /// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task DeleteScriptAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new DeleteScriptRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsResponse Exists(ExistsRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// + /// + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(ExistsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// + /// + /// GET my-index/_search + /// { + /// "size": 10000, + /// "query": { + /// "geo_bounding_box": { + /// "my-geo-field": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "aggregations": { + /// "grid": { + /// "geotile_grid": { + /// "field": "my-geo-field", + /// "precision": 11, + /// "size": 65536, + /// "bounds": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "bounds": { + /// "geo_bounds": { + /// "field": "my-geo-field", + /// "wrap_longitude": false + /// } + /// } + /// } + /// } + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// The API returns results as a binary Mapbox vector tile. + /// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsResponse Exists(ExistsRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsResponse Exists(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new ExistsRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsResponse Exists(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) - { - var descriptor = new ExistsRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// A meta layer containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsResponse Exists(TDocument document) - { - var descriptor = new ExistsRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// A feature containing a bounding box. By default, this is the bounding box of the tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsResponse Exists(TDocument document, Action> configureRequest) - { - var descriptor = new ExistsRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsResponse Exists(TDocument document, Elastic.Clients.Elasticsearch.IndexName index) - { - var descriptor = new ExistsRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// Metadata for the search. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsResponse Exists(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) - { - var descriptor = new ExistsRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); - } - - /// + /// + /// + /// + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// The API only returns features that can display at its zoom level. + /// For example, if a polygon feature has no area at its zoom level, the API omits it. + /// The API returns errors as UTF-8 encoded JSON. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsResponse Exists(TDocument document, Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new ExistsRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); - } - - /// /// - /// Check a document. - /// Checks if a specified document exists. + /// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. + /// If you specify both parameters, the query parameter takes precedence. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsResponse Exists(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) - { - var descriptor = new ExistsRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); - } - - /// /// - /// Check a document. - /// Checks if a specified document exists. + /// Grid precision for geotile /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsResponse Exists(Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new ExistsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); - } - - /// /// - /// Check a document. - /// Checks if a specified document exists. + /// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. + /// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. + /// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. + /// The maximum final precision is 29. + /// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). + /// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. + /// The aggs layer only contains features for cells with matching data. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsResponse Exists(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) - { - var descriptor = new ExistsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, ExistsResponse, ExistsRequestParameters>(descriptor); - } - - /// /// - /// Check a document. - /// Checks if a specified document exists. + /// Grid precision for geohex + /// + /// + /// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsResponse Exists(ExistsRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Check a document. - /// Checks if a specified document exists. + /// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. + /// The following table maps the H3 resolution for each precision. + /// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. + /// At a precision of 6, hexagonal cells have an H3 resolution of 2. + /// If <zoom> is 3 and grid_precision is 4, the precision is 7. + /// At a precision of 7, hexagonal cells have an H3 resolution of 3. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsResponse Exists(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new ExistsRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Check a document. - /// Checks if a specified document exists. + /// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | + /// | --------- | ---------------- | ------------- | ----------------| ----- | + /// | 1 | 4 | 0 | 122 | 30.5 | + /// | 2 | 16 | 0 | 122 | 7.625 | + /// | 3 | 64 | 1 | 842 | 13.15625 | + /// | 4 | 256 | 1 | 842 | 3.2890625 | + /// | 5 | 1024 | 2 | 5882 | 5.744140625 | + /// | 6 | 4096 | 2 | 5882 | 1.436035156 | + /// | 7 | 16384 | 3 | 41162 | 2.512329102 | + /// | 8 | 65536 | 3 | 41162 | 0.6280822754 | + /// | 9 | 262144 | 4 | 288122 | 1.099098206 | + /// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | + /// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | + /// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | + /// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | + /// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | + /// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | + /// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | + /// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | + /// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | + /// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | + /// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | + /// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | + /// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | + /// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | + /// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | + /// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | + /// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | + /// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | + /// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | + /// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Hexagonal cells don't align perfectly on a vector tile. + /// Some cells may intersect more than one vector tile. + /// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. + /// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsResponse Exists(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action configureRequest) + public virtual SearchMvtResponse SearchMvt(Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y) { - var descriptor = new ExistsRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); + var descriptor = new SearchMvtRequestDescriptor(field, zoom, x, y); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest, SearchMvtResponse, SearchMvtRequestParameters>(descriptor); } /// /// - /// Check a document. - /// Checks if a specified document exists. + /// Search a vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(ExistsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Check a document. - /// Checks if a specified document exists. + /// Search a vector tile for geospatial values. + /// Before using this API, you should be familiar with the Mapbox vector tile specification. + /// The API returns results as a binary mapbox vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Check a document. - /// Checks if a specified document exists. + /// Internally, Elasticsearch translates a vector tile search API request into a search containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(TDocument document, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// GET my-index/_search + /// { + /// "size": 10000, + /// "query": { + /// "geo_bounding_box": { + /// "my-geo-field": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "aggregations": { + /// "grid": { + /// "geotile_grid": { + /// "field": "my-geo-field", + /// "precision": 11, + /// "size": 65536, + /// "bounds": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "bounds": { + /// "geo_bounds": { + /// "field": "my-geo-field", + /// "wrap_longitude": false + /// } + /// } + /// } + /// } + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// The API returns results as a binary Mapbox vector tile. + /// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsResponse, ExistsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// A meta layer containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(ExistsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// A feature containing a bounding box. By default, this is the bounding box of the tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Check a document. - /// Checks if a specified document exists. + /// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// Metadata for the search. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsSourceResponse ExistsSource(ExistsSourceRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// + /// + /// + /// + /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// The API only returns features that can display at its zoom level. + /// For example, if a polygon feature has no area at its zoom level, the API omits it. + /// The API returns errors as UTF-8 encoded JSON. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(ExistsSourceRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. + /// If you specify both parameters, the query parameter takes precedence. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsSourceResponse ExistsSource(ExistsSourceRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); - } - - /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// Grid precision for geotile /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsSourceResponse ExistsSource(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new ExistsSourceRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); - } - - /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. + /// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. + /// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. + /// The maximum final precision is 29. + /// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). + /// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. + /// The aggs layer only contains features for cells with matching data. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsSourceResponse ExistsSource(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) - { - var descriptor = new ExistsSourceRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); - } - - /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// Grid precision for geohex /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsSourceResponse ExistsSource(TDocument document) - { - var descriptor = new ExistsSourceRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); - } - - /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsSourceResponse ExistsSource(TDocument document, Action> configureRequest) - { - var descriptor = new ExistsSourceRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); - } - - /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. + /// The following table maps the H3 resolution for each precision. + /// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. + /// At a precision of 6, hexagonal cells have an H3 resolution of 2. + /// If <zoom> is 3 and grid_precision is 4, the precision is 7. + /// At a precision of 7, hexagonal cells have an H3 resolution of 3. + /// + /// + /// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | + /// | --------- | ---------------- | ------------- | ----------------| ----- | + /// | 1 | 4 | 0 | 122 | 30.5 | + /// | 2 | 16 | 0 | 122 | 7.625 | + /// | 3 | 64 | 1 | 842 | 13.15625 | + /// | 4 | 256 | 1 | 842 | 3.2890625 | + /// | 5 | 1024 | 2 | 5882 | 5.744140625 | + /// | 6 | 4096 | 2 | 5882 | 1.436035156 | + /// | 7 | 16384 | 3 | 41162 | 2.512329102 | + /// | 8 | 65536 | 3 | 41162 | 0.6280822754 | + /// | 9 | 262144 | 4 | 288122 | 1.099098206 | + /// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | + /// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | + /// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | + /// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | + /// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | + /// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | + /// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | + /// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | + /// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | + /// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | + /// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | + /// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | + /// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | + /// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | + /// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | + /// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | + /// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | + /// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | + /// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | + /// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsSourceResponse ExistsSource(TDocument document, Elastic.Clients.Elasticsearch.IndexName index) - { - var descriptor = new ExistsSourceRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); - } - - /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// Hexagonal cells don't align perfectly on a vector tile. + /// Some cells may intersect more than one vector tile. + /// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. + /// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsSourceResponse ExistsSource(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) + public virtual SearchMvtResponse SearchMvt(Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y, Action> configureRequest) { - var descriptor = new ExistsSourceRequestDescriptor(document, index); + var descriptor = new SearchMvtRequestDescriptor(field, zoom, x, y); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); + return DoRequest, SearchMvtResponse, SearchMvtRequestParameters>(descriptor); } /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// Search a vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsSourceResponse ExistsSource(TDocument document, Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new ExistsSourceRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); - } - - /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// Search a vector tile for geospatial values. + /// Before using this API, you should be familiar with the Mapbox vector tile specification. + /// The API returns results as a binary mapbox vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsSourceResponse ExistsSource(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) - { - var descriptor = new ExistsSourceRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); - } - - /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// Internally, Elasticsearch translates a vector tile search API request into a search containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsSourceResponse ExistsSource(Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new ExistsSourceRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsSourceResponse ExistsSource(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) - { - var descriptor = new ExistsSourceRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsSourceResponse ExistsSource(ExistsSourceRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsSourceResponse ExistsSource(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new ExistsSourceRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. + /// + /// + /// + /// + /// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search + /// + /// + /// GET my-index/_search + /// { + /// "size": 10000, + /// "query": { + /// "geo_bounding_box": { + /// "my-geo-field": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "aggregations": { + /// "grid": { + /// "geotile_grid": { + /// "field": "my-geo-field", + /// "precision": 11, + /// "size": 65536, + /// "bounds": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "bounds": { + /// "geo_bounds": { + /// "field": "my-geo-field", + /// "wrap_longitude": false + /// } + /// } + /// } + /// } + /// + /// + /// The API returns results as a binary Mapbox vector tile. + /// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: + /// + /// + /// + /// + /// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. + /// + /// + /// + /// + /// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. + /// + /// + /// + /// + /// A meta layer containing: + /// + /// + /// + /// + /// A feature containing a bounding box. By default, this is the bounding box of the tile. + /// + /// + /// + /// + /// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. + /// + /// + /// + /// + /// Metadata for the search. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// + /// + /// + /// + /// The API only returns features that can display at its zoom level. + /// For example, if a polygon feature has no area at its zoom level, the API omits it. + /// The API returns errors as UTF-8 encoded JSON. + /// + /// + /// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. + /// If you specify both parameters, the query parameter takes precedence. + /// + /// + /// Grid precision for geotile + /// + /// + /// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. + /// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. + /// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. + /// The maximum final precision is 29. + /// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). + /// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. + /// The aggs layer only contains features for cells with matching data. + /// + /// + /// Grid precision for geohex + /// + /// + /// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. + /// + /// + /// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. + /// The following table maps the H3 resolution for each precision. + /// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. + /// At a precision of 6, hexagonal cells have an H3 resolution of 2. + /// If <zoom> is 3 and grid_precision is 4, the precision is 7. + /// At a precision of 7, hexagonal cells have an H3 resolution of 3. + /// + /// + /// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | + /// | --------- | ---------------- | ------------- | ----------------| ----- | + /// | 1 | 4 | 0 | 122 | 30.5 | + /// | 2 | 16 | 0 | 122 | 7.625 | + /// | 3 | 64 | 1 | 842 | 13.15625 | + /// | 4 | 256 | 1 | 842 | 3.2890625 | + /// | 5 | 1024 | 2 | 5882 | 5.744140625 | + /// | 6 | 4096 | 2 | 5882 | 1.436035156 | + /// | 7 | 16384 | 3 | 41162 | 2.512329102 | + /// | 8 | 65536 | 3 | 41162 | 0.6280822754 | + /// | 9 | 262144 | 4 | 288122 | 1.099098206 | + /// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | + /// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | + /// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | + /// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | + /// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | + /// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | + /// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | + /// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | + /// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | + /// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | + /// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | + /// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | + /// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | + /// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | + /// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | + /// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | + /// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | + /// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | + /// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | + /// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | + /// + /// + /// Hexagonal cells don't align perfectly on a vector tile. + /// Some cells may intersect more than one vector tile. + /// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. + /// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExistsSourceResponse ExistsSource(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action configureRequest) + public virtual SearchMvtResponse SearchMvt(SearchMvtRequestDescriptor descriptor) { - var descriptor = new ExistsSourceRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// Search a vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(ExistsSourceRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// Search a vector tile for geospatial values. + /// Before using this API, you should be familiar with the Mapbox vector tile specification. + /// The API returns results as a binary mapbox vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// Internally, Elasticsearch translates a vector tile search API request into a search containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(TDocument document, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// GET my-index/_search + /// { + /// "size": 10000, + /// "query": { + /// "geo_bounding_box": { + /// "my-geo-field": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "aggregations": { + /// "grid": { + /// "geotile_grid": { + /// "field": "my-geo-field", + /// "precision": 11, + /// "size": 65536, + /// "bounds": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "bounds": { + /// "geo_bounds": { + /// "field": "my-geo-field", + /// "wrap_longitude": false + /// } + /// } + /// } + /// } + /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// The API returns results as a binary Mapbox vector tile. + /// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExistsSourceResponse, ExistsSourceRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// A meta layer containing: + /// + /// + /// + /// + /// A feature containing a bounding box. By default, this is the bounding box of the tile. + /// + /// + /// + /// + /// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. + /// + /// + /// + /// + /// Metadata for the search. + /// + /// + /// + /// + /// + /// + /// The API only returns features that can display at its zoom level. + /// For example, if a polygon feature has no area at its zoom level, the API omits it. + /// The API returns errors as UTF-8 encoded JSON. + /// + /// + /// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. + /// If you specify both parameters, the query parameter takes precedence. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(ExistsSourceRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// Grid precision for geotile /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Check for a document source. - /// Checks if a document's _source is stored. + /// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. + /// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. + /// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. + /// The maximum final precision is 29. + /// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). + /// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. + /// The aggs layer only contains features for cells with matching data. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ExistsSourceAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExistsSourceRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// Grid precision for geohex /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExplainResponse Explain(ExplainRequest request) - { - request.BeforeRequest(); - return DoRequest, ExplainRequestParameters>(request); - } - - /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(ExplainRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, ExplainRequestParameters>(request, cancellationToken); - } - - /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. + /// The following table maps the H3 resolution for each precision. + /// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. + /// At a precision of 6, hexagonal cells have an H3 resolution of 2. + /// If <zoom> is 3 and grid_precision is 4, the precision is 7. + /// At a precision of 7, hexagonal cells have an H3 resolution of 3. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExplainResponse Explain(ExplainRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); - } - - /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | + /// | --------- | ---------------- | ------------- | ----------------| ----- | + /// | 1 | 4 | 0 | 122 | 30.5 | + /// | 2 | 16 | 0 | 122 | 7.625 | + /// | 3 | 64 | 1 | 842 | 13.15625 | + /// | 4 | 256 | 1 | 842 | 3.2890625 | + /// | 5 | 1024 | 2 | 5882 | 5.744140625 | + /// | 6 | 4096 | 2 | 5882 | 1.436035156 | + /// | 7 | 16384 | 3 | 41162 | 2.512329102 | + /// | 8 | 65536 | 3 | 41162 | 0.6280822754 | + /// | 9 | 262144 | 4 | 288122 | 1.099098206 | + /// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | + /// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | + /// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | + /// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | + /// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | + /// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | + /// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | + /// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | + /// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | + /// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | + /// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | + /// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | + /// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | + /// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | + /// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | + /// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | + /// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | + /// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | + /// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | + /// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExplainResponse Explain(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new ExplainRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); - } - - /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// Hexagonal cells don't align perfectly on a vector tile. + /// Some cells may intersect more than one vector tile. + /// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. + /// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExplainResponse Explain(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + public virtual SearchMvtResponse SearchMvt(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y) { - var descriptor = new ExplainRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); + var descriptor = new SearchMvtRequestDescriptor(indices, field, zoom, x, y); descriptor.BeforeRequest(); - return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); + return DoRequest(descriptor); } /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// Search a vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExplainResponse Explain(TDocument document) - { - var descriptor = new ExplainRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); - } - - /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// Search a vector tile for geospatial values. + /// Before using this API, you should be familiar with the Mapbox vector tile specification. + /// The API returns results as a binary mapbox vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExplainResponse Explain(TDocument document, Action> configureRequest) - { - var descriptor = new ExplainRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); - } - - /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// Internally, Elasticsearch translates a vector tile search API request into a search containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExplainResponse Explain(TDocument document, Elastic.Clients.Elasticsearch.IndexName index) - { - var descriptor = new ExplainRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExplainResponse Explain(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) - { - var descriptor = new ExplainRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExplainResponse Explain(TDocument document, Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new ExplainRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExplainResponse Explain(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) - { - var descriptor = new ExplainRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExplainResponse Explain(Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new ExplainRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ExplainResponse Explain(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) - { - var descriptor = new ExplainRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, ExplainResponse, ExplainRequestParameters>(descriptor); - } - - /// + /// + /// GET my-index/_search + /// { + /// "size": 10000, + /// "query": { + /// "geo_bounding_box": { + /// "my-geo-field": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "aggregations": { + /// "grid": { + /// "geotile_grid": { + /// "field": "my-geo-field", + /// "precision": 11, + /// "size": 65536, + /// "bounds": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "bounds": { + /// "geo_bounds": { + /// "field": "my-geo-field", + /// "wrap_longitude": false + /// } + /// } + /// } + /// } + /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// The API returns results as a binary Mapbox vector tile. + /// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(ExplainRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// A meta layer containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(TDocument document, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// A feature containing a bounding box. By default, this is the bounding box of the tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// Metadata for the search. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// + /// + /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// The API only returns features that can display at its zoom level. + /// For example, if a polygon feature has no area at its zoom level, the API omits it. + /// The API returns errors as UTF-8 encoded JSON. + /// + /// + /// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. + /// If you specify both parameters, the query parameter takes precedence. + /// + /// + /// Grid precision for geotile + /// + /// + /// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. + /// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. + /// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. + /// The maximum final precision is 29. + /// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). + /// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. + /// The aggs layer only contains features for cells with matching data. + /// + /// + /// Grid precision for geohex /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. + /// The following table maps the H3 resolution for each precision. + /// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. + /// At a precision of 6, hexagonal cells have an H3 resolution of 2. + /// If <zoom> is 3 and grid_precision is 4, the precision is 7. + /// At a precision of 7, hexagonal cells have an H3 resolution of 3. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ExplainAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new ExplainRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Explain a document match result. - /// Returns information about why a specific document matches, or doesn’t match, a query. + /// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | + /// | --------- | ---------------- | ------------- | ----------------| ----- | + /// | 1 | 4 | 0 | 122 | 30.5 | + /// | 2 | 16 | 0 | 122 | 7.625 | + /// | 3 | 64 | 1 | 842 | 13.15625 | + /// | 4 | 256 | 1 | 842 | 3.2890625 | + /// | 5 | 1024 | 2 | 5882 | 5.744140625 | + /// | 6 | 4096 | 2 | 5882 | 1.436035156 | + /// | 7 | 16384 | 3 | 41162 | 2.512329102 | + /// | 8 | 65536 | 3 | 41162 | 0.6280822754 | + /// | 9 | 262144 | 4 | 288122 | 1.099098206 | + /// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | + /// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | + /// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | + /// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | + /// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | + /// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | + /// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | + /// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | + /// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | + /// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | + /// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | + /// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | + /// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | + /// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | + /// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | + /// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | + /// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | + /// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | + /// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | + /// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | + /// + /// + /// Hexagonal cells don't align perfectly on a vector tile. + /// Some cells may intersect more than one vector tile. + /// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. + /// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task> ExplainAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual SearchMvtResponse SearchMvt(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y, Action configureRequest) { - var descriptor = new ExplainRequestDescriptor(id); + var descriptor = new SearchMvtRequestDescriptor(indices, field, zoom, x, y); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, ExplainResponse, ExplainRequestParameters>(descriptor, cancellationToken); + return DoRequest(descriptor); } /// /// - /// Get the field capabilities. + /// Search a vector tile. /// /// - /// Get information about the capabilities of fields among multiple indices. + /// Search a vector tile for geospatial values. + /// Before using this API, you should be familiar with the Mapbox vector tile specification. + /// The API returns results as a binary mapbox vector tile. /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// Internally, Elasticsearch translates a vector tile search API request into a search containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual FieldCapsResponse FieldCaps(FieldCapsRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// + /// + /// /// - /// Get the field capabilities. + /// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. /// + /// + /// /// - /// Get information about the capabilities of fields among multiple indices. + /// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. /// + /// + /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(FieldCapsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// + /// + /// /// - /// Get the field capabilities. + /// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. /// + /// + /// /// - /// Get information about the capabilities of fields among multiple indices. + /// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search /// + /// + /// GET my-index/_search + /// { + /// "size": 10000, + /// "query": { + /// "geo_bounding_box": { + /// "my-geo-field": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "aggregations": { + /// "grid": { + /// "geotile_grid": { + /// "field": "my-geo-field", + /// "precision": 11, + /// "size": 65536, + /// "bounds": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "bounds": { + /// "geo_bounds": { + /// "field": "my-geo-field", + /// "wrap_longitude": false + /// } + /// } + /// } + /// } + /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// The API returns results as a binary Mapbox vector tile. + /// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual FieldCapsResponse FieldCaps(FieldCapsRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, FieldCapsResponse, FieldCapsRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get the field capabilities. + /// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. /// + /// + /// /// - /// Get information about the capabilities of fields among multiple indices. + /// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. /// + /// + /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// A meta layer containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual FieldCapsResponse FieldCaps(Elastic.Clients.Elasticsearch.Indices? indices) - { - var descriptor = new FieldCapsRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequest, FieldCapsResponse, FieldCapsRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get the field capabilities. + /// A feature containing a bounding box. By default, this is the bounding box of the tile. /// + /// + /// /// - /// Get information about the capabilities of fields among multiple indices. + /// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. /// + /// + /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// Metadata for the search. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual FieldCapsResponse FieldCaps(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) - { - var descriptor = new FieldCapsRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, FieldCapsResponse, FieldCapsRequestParameters>(descriptor); - } - - /// + /// + /// + /// + /// /// - /// Get the field capabilities. + /// The API only returns features that can display at its zoom level. + /// For example, if a polygon feature has no area at its zoom level, the API omits it. + /// The API returns errors as UTF-8 encoded JSON. /// /// - /// Get information about the capabilities of fields among multiple indices. + /// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. + /// If you specify both parameters, the query parameter takes precedence. /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// Grid precision for geotile /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual FieldCapsResponse FieldCaps() - { - var descriptor = new FieldCapsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest, FieldCapsResponse, FieldCapsRequestParameters>(descriptor); - } - - /// /// - /// Get the field capabilities. + /// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. + /// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. + /// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. + /// The maximum final precision is 29. + /// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). + /// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. + /// The aggs layer only contains features for cells with matching data. /// /// - /// Get information about the capabilities of fields among multiple indices. + /// Grid precision for geohex /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual FieldCapsResponse FieldCaps(Action> configureRequest) - { - var descriptor = new FieldCapsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, FieldCapsResponse, FieldCapsRequestParameters>(descriptor); - } - - /// /// - /// Get the field capabilities. + /// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. + /// The following table maps the H3 resolution for each precision. + /// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. + /// At a precision of 6, hexagonal cells have an H3 resolution of 2. + /// If <zoom> is 3 and grid_precision is 4, the precision is 7. + /// At a precision of 7, hexagonal cells have an H3 resolution of 3. /// /// - /// Get information about the capabilities of fields among multiple indices. + /// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | + /// | --------- | ---------------- | ------------- | ----------------| ----- | + /// | 1 | 4 | 0 | 122 | 30.5 | + /// | 2 | 16 | 0 | 122 | 7.625 | + /// | 3 | 64 | 1 | 842 | 13.15625 | + /// | 4 | 256 | 1 | 842 | 3.2890625 | + /// | 5 | 1024 | 2 | 5882 | 5.744140625 | + /// | 6 | 4096 | 2 | 5882 | 1.436035156 | + /// | 7 | 16384 | 3 | 41162 | 2.512329102 | + /// | 8 | 65536 | 3 | 41162 | 0.6280822754 | + /// | 9 | 262144 | 4 | 288122 | 1.099098206 | + /// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | + /// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | + /// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | + /// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | + /// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | + /// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | + /// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | + /// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | + /// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | + /// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | + /// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | + /// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | + /// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | + /// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | + /// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | + /// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | + /// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | + /// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | + /// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | + /// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// Hexagonal cells don't align perfectly on a vector tile. + /// Some cells may intersect more than one vector tile. + /// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. + /// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual FieldCapsResponse FieldCaps(FieldCapsRequestDescriptor descriptor) + public virtual Task SearchMvtAsync(SearchMvtRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequestAsync, SearchMvtResponse, SearchMvtRequestParameters>(descriptor, cancellationToken); } /// /// - /// Get the field capabilities. + /// Search a vector tile. /// /// - /// Get information about the capabilities of fields among multiple indices. + /// Search a vector tile for geospatial values. + /// Before using this API, you should be familiar with the Mapbox vector tile specification. + /// The API returns results as a binary mapbox vector tile. /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// Internally, Elasticsearch translates a vector tile search API request into a search containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual FieldCapsResponse FieldCaps(Elastic.Clients.Elasticsearch.Indices? indices) - { - var descriptor = new FieldCapsRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Get the field capabilities. + /// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. /// + /// + /// /// - /// Get information about the capabilities of fields among multiple indices. + /// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. /// + /// + /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual FieldCapsResponse FieldCaps(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest) - { - var descriptor = new FieldCapsRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Get the field capabilities. + /// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. /// + /// + /// /// - /// Get information about the capabilities of fields among multiple indices. + /// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search /// + /// + /// GET my-index/_search + /// { + /// "size": 10000, + /// "query": { + /// "geo_bounding_box": { + /// "my-geo-field": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "aggregations": { + /// "grid": { + /// "geotile_grid": { + /// "field": "my-geo-field", + /// "precision": 11, + /// "size": 65536, + /// "bounds": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "bounds": { + /// "geo_bounds": { + /// "field": "my-geo-field", + /// "wrap_longitude": false + /// } + /// } + /// } + /// } + /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// The API returns results as a binary Mapbox vector tile. + /// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual FieldCapsResponse FieldCaps() - { - var descriptor = new FieldCapsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Get the field capabilities. + /// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. /// + /// + /// /// - /// Get information about the capabilities of fields among multiple indices. + /// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. /// + /// + /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// A meta layer containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual FieldCapsResponse FieldCaps(Action configureRequest) - { - var descriptor = new FieldCapsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Get the field capabilities. + /// A feature containing a bounding box. By default, this is the bounding box of the tile. /// + /// + /// /// - /// Get information about the capabilities of fields among multiple indices. + /// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. /// + /// + /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// Metadata for the search. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(FieldCapsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, FieldCapsResponse, FieldCapsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// + /// + /// /// - /// Get the field capabilities. + /// The API only returns features that can display at its zoom level. + /// For example, if a polygon feature has no area at its zoom level, the API omits it. + /// The API returns errors as UTF-8 encoded JSON. /// /// - /// Get information about the capabilities of fields among multiple indices. + /// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. + /// If you specify both parameters, the query parameter takes precedence. /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// Grid precision for geotile /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new FieldCapsRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, FieldCapsResponse, FieldCapsRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get the field capabilities. + /// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. + /// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. + /// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. + /// The maximum final precision is 29. + /// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). + /// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. + /// The aggs layer only contains features for cells with matching data. /// /// - /// Get information about the capabilities of fields among multiple indices. + /// Grid precision for geohex /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new FieldCapsRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, FieldCapsResponse, FieldCapsRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get the field capabilities. + /// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. + /// The following table maps the H3 resolution for each precision. + /// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. + /// At a precision of 6, hexagonal cells have an H3 resolution of 2. + /// If <zoom> is 3 and grid_precision is 4, the precision is 7. + /// At a precision of 7, hexagonal cells have an H3 resolution of 3. /// /// - /// Get information about the capabilities of fields among multiple indices. + /// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | + /// | --------- | ---------------- | ------------- | ----------------| ----- | + /// | 1 | 4 | 0 | 122 | 30.5 | + /// | 2 | 16 | 0 | 122 | 7.625 | + /// | 3 | 64 | 1 | 842 | 13.15625 | + /// | 4 | 256 | 1 | 842 | 3.2890625 | + /// | 5 | 1024 | 2 | 5882 | 5.744140625 | + /// | 6 | 4096 | 2 | 5882 | 1.436035156 | + /// | 7 | 16384 | 3 | 41162 | 2.512329102 | + /// | 8 | 65536 | 3 | 41162 | 0.6280822754 | + /// | 9 | 262144 | 4 | 288122 | 1.099098206 | + /// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | + /// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | + /// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | + /// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | + /// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | + /// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | + /// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | + /// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | + /// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | + /// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | + /// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | + /// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | + /// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | + /// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | + /// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | + /// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | + /// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | + /// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | + /// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | + /// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// Hexagonal cells don't align perfectly on a vector tile. + /// Some cells may intersect more than one vector tile. + /// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. + /// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task FieldCapsAsync(CancellationToken cancellationToken = default) + public virtual Task SearchMvtAsync(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y, CancellationToken cancellationToken = default) { - var descriptor = new FieldCapsRequestDescriptor(); + var descriptor = new SearchMvtRequestDescriptor(indices, field, zoom, x, y); descriptor.BeforeRequest(); - return DoRequestAsync, FieldCapsResponse, FieldCapsRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, SearchMvtResponse, SearchMvtRequestParameters>(descriptor, cancellationToken); } /// /// - /// Get the field capabilities. + /// Search a vector tile. /// /// - /// Get information about the capabilities of fields among multiple indices. + /// Search a vector tile for geospatial values. + /// Before using this API, you should be familiar with the Mapbox vector tile specification. + /// The API returns results as a binary mapbox vector tile. /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// Internally, Elasticsearch translates a vector tile search API request into a search containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new FieldCapsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, FieldCapsResponse, FieldCapsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get the field capabilities. + /// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. /// + /// + /// /// - /// Get information about the capabilities of fields among multiple indices. + /// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. /// + /// + /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(FieldCapsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get the field capabilities. + /// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. /// + /// + /// /// - /// Get information about the capabilities of fields among multiple indices. + /// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search /// + /// + /// GET my-index/_search + /// { + /// "size": 10000, + /// "query": { + /// "geo_bounding_box": { + /// "my-geo-field": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "aggregations": { + /// "grid": { + /// "geotile_grid": { + /// "field": "my-geo-field", + /// "precision": 11, + /// "size": 65536, + /// "bounds": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "bounds": { + /// "geo_bounds": { + /// "field": "my-geo-field", + /// "wrap_longitude": false + /// } + /// } + /// } + /// } + /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// The API returns results as a binary Mapbox vector tile. + /// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new FieldCapsRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get the field capabilities. + /// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. /// + /// + /// /// - /// Get information about the capabilities of fields among multiple indices. + /// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. /// + /// + /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// A meta layer containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new FieldCapsRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get the field capabilities. + /// A feature containing a bounding box. By default, this is the bounding box of the tile. /// + /// + /// /// - /// Get information about the capabilities of fields among multiple indices. + /// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. /// + /// + /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// Metadata for the search. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new FieldCapsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// + /// + /// /// - /// Get the field capabilities. + /// The API only returns features that can display at its zoom level. + /// For example, if a polygon feature has no area at its zoom level, the API omits it. + /// The API returns errors as UTF-8 encoded JSON. /// /// - /// Get information about the capabilities of fields among multiple indices. + /// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. + /// If you specify both parameters, the query parameter takes precedence. /// /// - /// For data streams, the API returns field capabilities among the stream’s backing indices. - /// It returns runtime fields like any other field. - /// For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the keyword family. + /// Grid precision for geotile /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task FieldCapsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new FieldCapsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. + /// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. + /// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. + /// The maximum final precision is 29. + /// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). + /// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. + /// The aggs layer only contains features for cells with matching data. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetResponse Get(GetRequest request) - { - request.BeforeRequest(); - return DoRequest, GetRequestParameters>(request); - } - - /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// Grid precision for geohex /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(GetRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, GetRequestParameters>(request, cancellationToken); - } - - /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetResponse Get(GetRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, GetResponse, GetRequestParameters>(descriptor); - } - - /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. + /// The following table maps the H3 resolution for each precision. + /// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. + /// At a precision of 6, hexagonal cells have an H3 resolution of 2. + /// If <zoom> is 3 and grid_precision is 4, the precision is 7. + /// At a precision of 7, hexagonal cells have an H3 resolution of 3. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetResponse Get(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new GetRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequest, GetResponse, GetRequestParameters>(descriptor); - } - - /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | + /// | --------- | ---------------- | ------------- | ----------------| ----- | + /// | 1 | 4 | 0 | 122 | 30.5 | + /// | 2 | 16 | 0 | 122 | 7.625 | + /// | 3 | 64 | 1 | 842 | 13.15625 | + /// | 4 | 256 | 1 | 842 | 3.2890625 | + /// | 5 | 1024 | 2 | 5882 | 5.744140625 | + /// | 6 | 4096 | 2 | 5882 | 1.436035156 | + /// | 7 | 16384 | 3 | 41162 | 2.512329102 | + /// | 8 | 65536 | 3 | 41162 | 0.6280822754 | + /// | 9 | 262144 | 4 | 288122 | 1.099098206 | + /// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | + /// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | + /// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | + /// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | + /// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | + /// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | + /// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | + /// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | + /// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | + /// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | + /// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | + /// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | + /// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | + /// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | + /// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | + /// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | + /// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | + /// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | + /// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | + /// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | + /// + /// + /// Hexagonal cells don't align perfectly on a vector tile. + /// Some cells may intersect more than one vector tile. + /// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. + /// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetResponse Get(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + public virtual Task SearchMvtAsync(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y, Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new GetRequestDescriptor(index, id); + var descriptor = new SearchMvtRequestDescriptor(indices, field, zoom, x, y); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, GetResponse, GetRequestParameters>(descriptor); + return DoRequestAsync, SearchMvtResponse, SearchMvtRequestParameters>(descriptor, cancellationToken); } /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// Search a vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetResponse Get(TDocument document) - { - var descriptor = new GetRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequest, GetResponse, GetRequestParameters>(descriptor); - } - - /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// Search a vector tile for geospatial values. + /// Before using this API, you should be familiar with the Mapbox vector tile specification. + /// The API returns results as a binary mapbox vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetResponse Get(TDocument document, Action> configureRequest) - { - var descriptor = new GetRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, GetResponse, GetRequestParameters>(descriptor); - } - - /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// Internally, Elasticsearch translates a vector tile search API request into a search containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetResponse Get(TDocument document, Elastic.Clients.Elasticsearch.IndexName index) - { - var descriptor = new GetRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequest, GetResponse, GetRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetResponse Get(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) - { - var descriptor = new GetRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, GetResponse, GetRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetResponse Get(TDocument document, Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new GetRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequest, GetResponse, GetRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetResponse Get(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) - { - var descriptor = new GetRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, GetResponse, GetRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. + /// + /// + /// + /// + /// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search + /// + /// + /// GET my-index/_search + /// { + /// "size": 10000, + /// "query": { + /// "geo_bounding_box": { + /// "my-geo-field": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "aggregations": { + /// "grid": { + /// "geotile_grid": { + /// "field": "my-geo-field", + /// "precision": 11, + /// "size": 65536, + /// "bounds": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "bounds": { + /// "geo_bounds": { + /// "field": "my-geo-field", + /// "wrap_longitude": false + /// } + /// } + /// } + /// } + /// + /// + /// The API returns results as a binary Mapbox vector tile. + /// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: + /// + /// + /// + /// + /// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. + /// + /// + /// + /// + /// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. + /// + /// + /// + /// + /// A meta layer containing: + /// + /// + /// + /// + /// A feature containing a bounding box. By default, this is the bounding box of the tile. + /// + /// + /// + /// + /// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. + /// + /// + /// + /// + /// Metadata for the search. + /// + /// + /// + /// + /// + /// + /// The API only returns features that can display at its zoom level. + /// For example, if a polygon feature has no area at its zoom level, the API omits it. + /// The API returns errors as UTF-8 encoded JSON. + /// + /// + /// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. + /// If you specify both parameters, the query parameter takes precedence. + /// + /// + /// Grid precision for geotile /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetResponse Get(Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new GetRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequest, GetResponse, GetRequestParameters>(descriptor); - } - - /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. + /// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. + /// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. + /// The maximum final precision is 29. + /// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). + /// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. + /// The aggs layer only contains features for cells with matching data. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetResponse Get(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) - { - var descriptor = new GetRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, GetResponse, GetRequestParameters>(descriptor); - } - - /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// Grid precision for geohex /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(GetRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. + /// The following table maps the H3 resolution for each precision. + /// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. + /// At a precision of 6, hexagonal cells have an H3 resolution of 2. + /// If <zoom> is 3 and grid_precision is 4, the precision is 7. + /// At a precision of 7, hexagonal cells have an H3 resolution of 3. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | + /// | --------- | ---------------- | ------------- | ----------------| ----- | + /// | 1 | 4 | 0 | 122 | 30.5 | + /// | 2 | 16 | 0 | 122 | 7.625 | + /// | 3 | 64 | 1 | 842 | 13.15625 | + /// | 4 | 256 | 1 | 842 | 3.2890625 | + /// | 5 | 1024 | 2 | 5882 | 5.744140625 | + /// | 6 | 4096 | 2 | 5882 | 1.436035156 | + /// | 7 | 16384 | 3 | 41162 | 2.512329102 | + /// | 8 | 65536 | 3 | 41162 | 0.6280822754 | + /// | 9 | 262144 | 4 | 288122 | 1.099098206 | + /// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | + /// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | + /// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | + /// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | + /// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | + /// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | + /// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | + /// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | + /// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | + /// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | + /// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | + /// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | + /// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | + /// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | + /// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | + /// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | + /// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | + /// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | + /// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | + /// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(TDocument document, CancellationToken cancellationToken = default) - { - var descriptor = new GetRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// Hexagonal cells don't align perfectly on a vector tile. + /// Some cells may intersect more than one vector tile. + /// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. + /// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task> GetAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) + public virtual Task SearchMvtAsync(Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y, CancellationToken cancellationToken = default) { - var descriptor = new GetRequestDescriptor(document); - configureRequest?.Invoke(descriptor); + var descriptor = new SearchMvtRequestDescriptor(field, zoom, x, y); descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, SearchMvtResponse, SearchMvtRequestParameters>(descriptor, cancellationToken); } /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// Search a vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new GetRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// Search a vector tile for geospatial values. + /// Before using this API, you should be familiar with the Mapbox vector tile specification. + /// The API returns results as a binary mapbox vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// Internally, Elasticsearch translates a vector tile search API request into a search containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get a document by its ID. - /// Retrieves the document with the specified ID from an index. + /// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetResponse, GetRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get a script or search template. - /// Retrieves a stored script or search template. + /// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetScriptResponse GetScript(GetScriptRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// + /// + /// /// - /// Get a script or search template. - /// Retrieves a stored script or search template. + /// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptAsync(GetScriptRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// + /// + /// GET my-index/_search + /// { + /// "size": 10000, + /// "query": { + /// "geo_bounding_box": { + /// "my-geo-field": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "aggregations": { + /// "grid": { + /// "geotile_grid": { + /// "field": "my-geo-field", + /// "precision": 11, + /// "size": 65536, + /// "bounds": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "bounds": { + /// "geo_bounds": { + /// "field": "my-geo-field", + /// "wrap_longitude": false + /// } + /// } + /// } + /// } + /// /// - /// Get a script or search template. - /// Retrieves a stored script or search template. + /// The API returns results as a binary Mapbox vector tile. + /// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetScriptResponse GetScript(GetScriptRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, GetScriptResponse, GetScriptRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get a script or search template. - /// Retrieves a stored script or search template. + /// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetScriptResponse GetScript(Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new GetScriptRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequest, GetScriptResponse, GetScriptRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get a script or search template. - /// Retrieves a stored script or search template. + /// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetScriptResponse GetScript(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) - { - var descriptor = new GetScriptRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, GetScriptResponse, GetScriptRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get a script or search template. - /// Retrieves a stored script or search template. + /// A meta layer containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetScriptResponse GetScript(GetScriptRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Get a script or search template. - /// Retrieves a stored script or search template. + /// A feature containing a bounding box. By default, this is the bounding box of the tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetScriptResponse GetScript(Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new GetScriptRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Get a script or search template. - /// Retrieves a stored script or search template. + /// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetScriptResponse GetScript(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) - { - var descriptor = new GetScriptRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Get a script or search template. - /// Retrieves a stored script or search template. + /// Metadata for the search. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptAsync(GetScriptRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetScriptResponse, GetScriptRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// + /// + /// /// - /// Get a script or search template. - /// Retrieves a stored script or search template. + /// The API only returns features that can display at its zoom level. + /// For example, if a polygon feature has no area at its zoom level, the API omits it. + /// The API returns errors as UTF-8 encoded JSON. + /// + /// + /// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. + /// If you specify both parameters, the query parameter takes precedence. + /// + /// + /// Grid precision for geotile /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetScriptRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetScriptResponse, GetScriptRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get a script or search template. - /// Retrieves a stored script or search template. + /// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. + /// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. + /// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. + /// The maximum final precision is 29. + /// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). + /// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. + /// The aggs layer only contains features for cells with matching data. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetScriptRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetScriptResponse, GetScriptRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get a script or search template. - /// Retrieves a stored script or search template. + /// Grid precision for geohex /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptAsync(GetScriptRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Get a script or search template. - /// Retrieves a stored script or search template. + /// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetScriptRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Get a script or search template. - /// Retrieves a stored script or search template. + /// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. + /// The following table maps the H3 resolution for each precision. + /// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. + /// At a precision of 6, hexagonal cells have an H3 resolution of 2. + /// If <zoom> is 3 and grid_precision is 4, the precision is 7. + /// At a precision of 7, hexagonal cells have an H3 resolution of 3. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | + /// | --------- | ---------------- | ------------- | ----------------| ----- | + /// | 1 | 4 | 0 | 122 | 30.5 | + /// | 2 | 16 | 0 | 122 | 7.625 | + /// | 3 | 64 | 1 | 842 | 13.15625 | + /// | 4 | 256 | 1 | 842 | 3.2890625 | + /// | 5 | 1024 | 2 | 5882 | 5.744140625 | + /// | 6 | 4096 | 2 | 5882 | 1.436035156 | + /// | 7 | 16384 | 3 | 41162 | 2.512329102 | + /// | 8 | 65536 | 3 | 41162 | 0.6280822754 | + /// | 9 | 262144 | 4 | 288122 | 1.099098206 | + /// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | + /// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | + /// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | + /// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | + /// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | + /// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | + /// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | + /// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | + /// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | + /// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | + /// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | + /// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | + /// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | + /// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | + /// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | + /// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | + /// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | + /// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | + /// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | + /// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | + /// + /// + /// Hexagonal cells don't align perfectly on a vector tile. + /// Some cells may intersect more than one vector tile. + /// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. + /// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task GetScriptAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task SearchMvtAsync(Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y, Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new GetScriptRequestDescriptor(id); + var descriptor = new SearchMvtRequestDescriptor(field, zoom, x, y); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync, SearchMvtResponse, SearchMvtRequestParameters>(descriptor, cancellationToken); } /// /// - /// Get script contexts. + /// Search a vector tile. /// /// - /// Get a list of supported script contexts and their methods. + /// Search a vector tile for geospatial values. + /// Before using this API, you should be familiar with the Mapbox vector tile specification. + /// The API returns results as a binary mapbox vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetScriptContextResponse GetScriptContext(GetScriptContextRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// /// - /// Get script contexts. + /// Internally, Elasticsearch translates a vector tile search API request into a search containing: /// + /// + /// /// - /// Get a list of supported script contexts and their methods. + /// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptContextAsync(GetScriptContextRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// + /// + /// /// - /// Get script contexts. + /// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. /// + /// + /// /// - /// Get a list of supported script contexts and their methods. + /// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetScriptContextResponse GetScriptContext(GetScriptContextRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Get script contexts. + /// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. /// + /// + /// /// - /// Get a list of supported script contexts and their methods. + /// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetScriptContextResponse GetScriptContext() - { - var descriptor = new GetScriptContextRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// GET my-index/_search + /// { + /// "size": 10000, + /// "query": { + /// "geo_bounding_box": { + /// "my-geo-field": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "aggregations": { + /// "grid": { + /// "geotile_grid": { + /// "field": "my-geo-field", + /// "precision": 11, + /// "size": 65536, + /// "bounds": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "bounds": { + /// "geo_bounds": { + /// "field": "my-geo-field", + /// "wrap_longitude": false + /// } + /// } + /// } + /// } + /// /// - /// Get script contexts. + /// The API returns results as a binary Mapbox vector tile. + /// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: /// + /// + /// /// - /// Get a list of supported script contexts and their methods. + /// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetScriptContextResponse GetScriptContext(Action configureRequest) - { - var descriptor = new GetScriptContextRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Get script contexts. + /// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. /// + /// + /// /// - /// Get a list of supported script contexts and their methods. + /// A meta layer containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptContextAsync(GetScriptContextRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get script contexts. + /// A feature containing a bounding box. By default, this is the bounding box of the tile. /// + /// + /// /// - /// Get a list of supported script contexts and their methods. + /// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptContextAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetScriptContextRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get script contexts. + /// Metadata for the search. /// + /// + /// + /// + /// /// - /// Get a list of supported script contexts and their methods. + /// The API only returns features that can display at its zoom level. + /// For example, if a polygon feature has no area at its zoom level, the API omits it. + /// The API returns errors as UTF-8 encoded JSON. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptContextAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetScriptContextRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Get script languages. + /// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. + /// If you specify both parameters, the query parameter takes precedence. /// /// - /// Get a list of available script types, languages, and contexts. + /// Grid precision for geotile /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetScriptLanguagesResponse GetScriptLanguages(GetScriptLanguagesRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// /// - /// Get script languages. + /// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. + /// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. + /// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. + /// The maximum final precision is 29. + /// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). + /// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. + /// The aggs layer only contains features for cells with matching data. /// /// - /// Get a list of available script types, languages, and contexts. + /// Grid precision for geohex /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptLanguagesAsync(GetScriptLanguagesRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// /// - /// Get script languages. + /// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. /// /// - /// Get a list of available script types, languages, and contexts. + /// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. + /// The following table maps the H3 resolution for each precision. + /// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. + /// At a precision of 6, hexagonal cells have an H3 resolution of 2. + /// If <zoom> is 3 and grid_precision is 4, the precision is 7. + /// At a precision of 7, hexagonal cells have an H3 resolution of 3. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetScriptLanguagesResponse GetScriptLanguages(GetScriptLanguagesRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Get script languages. + /// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | + /// | --------- | ---------------- | ------------- | ----------------| ----- | + /// | 1 | 4 | 0 | 122 | 30.5 | + /// | 2 | 16 | 0 | 122 | 7.625 | + /// | 3 | 64 | 1 | 842 | 13.15625 | + /// | 4 | 256 | 1 | 842 | 3.2890625 | + /// | 5 | 1024 | 2 | 5882 | 5.744140625 | + /// | 6 | 4096 | 2 | 5882 | 1.436035156 | + /// | 7 | 16384 | 3 | 41162 | 2.512329102 | + /// | 8 | 65536 | 3 | 41162 | 0.6280822754 | + /// | 9 | 262144 | 4 | 288122 | 1.099098206 | + /// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | + /// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | + /// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | + /// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | + /// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | + /// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | + /// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | + /// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | + /// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | + /// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | + /// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | + /// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | + /// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | + /// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | + /// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | + /// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | + /// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | + /// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | + /// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | + /// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | /// /// - /// Get a list of available script types, languages, and contexts. + /// Hexagonal cells don't align perfectly on a vector tile. + /// Some cells may intersect more than one vector tile. + /// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. + /// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetScriptLanguagesResponse GetScriptLanguages() + public virtual Task SearchMvtAsync(SearchMvtRequestDescriptor descriptor, CancellationToken cancellationToken = default) { - var descriptor = new GetScriptLanguagesRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Get script languages. + /// Search a vector tile. /// /// - /// Get a list of available script types, languages, and contexts. + /// Search a vector tile for geospatial values. + /// Before using this API, you should be familiar with the Mapbox vector tile specification. + /// The API returns results as a binary mapbox vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetScriptLanguagesResponse GetScriptLanguages(Action configureRequest) - { - var descriptor = new GetScriptLanguagesRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Get script languages. + /// Internally, Elasticsearch translates a vector tile search API request into a search containing: /// + /// + /// /// - /// Get a list of available script types, languages, and contexts. + /// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptLanguagesAsync(GetScriptLanguagesRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get script languages. + /// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. /// + /// + /// /// - /// Get a list of available script types, languages, and contexts. + /// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptLanguagesAsync(CancellationToken cancellationToken = default) - { - var descriptor = new GetScriptLanguagesRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get script languages. + /// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. /// + /// + /// /// - /// Get a list of available script types, languages, and contexts. + /// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task GetScriptLanguagesAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetScriptLanguagesRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// GET my-index/_search + /// { + /// "size": 10000, + /// "query": { + /// "geo_bounding_box": { + /// "my-geo-field": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "aggregations": { + /// "grid": { + /// "geotile_grid": { + /// "field": "my-geo-field", + /// "precision": 11, + /// "size": 65536, + /// "bounds": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "bounds": { + /// "geo_bounds": { + /// "field": "my-geo-field", + /// "wrap_longitude": false + /// } + /// } + /// } + /// } + /// /// - /// Get a document's source. - /// Returns the source of a document. + /// The API returns results as a binary Mapbox vector tile. + /// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetSourceResponse GetSource(GetSourceRequest request) - { - request.BeforeRequest(); - return DoRequest, GetSourceRequestParameters>(request); - } - - /// + /// + /// + /// + /// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. + /// + /// + /// + /// + /// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. + /// + /// + /// + /// + /// A meta layer containing: + /// + /// + /// /// - /// Get a document's source. - /// Returns the source of a document. + /// A feature containing a bounding box. By default, this is the bounding box of the tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(GetSourceRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, GetSourceRequestParameters>(request, cancellationToken); - } - - /// + /// + /// /// - /// Get a document's source. - /// Returns the source of a document. + /// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetSourceResponse GetSource(GetSourceRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get a document's source. - /// Returns the source of a document. + /// Metadata for the search. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetSourceResponse GetSource(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new GetSourceRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); - } - - /// + /// + /// + /// + /// /// - /// Get a document's source. - /// Returns the source of a document. + /// The API only returns features that can display at its zoom level. + /// For example, if a polygon feature has no area at its zoom level, the API omits it. + /// The API returns errors as UTF-8 encoded JSON. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetSourceResponse GetSource(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) - { - var descriptor = new GetSourceRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); - } - - /// /// - /// Get a document's source. - /// Returns the source of a document. + /// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. + /// If you specify both parameters, the query parameter takes precedence. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetSourceResponse GetSource(TDocument document) - { - var descriptor = new GetSourceRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); - } - - /// /// - /// Get a document's source. - /// Returns the source of a document. + /// Grid precision for geotile /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetSourceResponse GetSource(TDocument document, Action> configureRequest) - { - var descriptor = new GetSourceRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); - } - - /// /// - /// Get a document's source. - /// Returns the source of a document. + /// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. + /// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. + /// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. + /// The maximum final precision is 29. + /// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). + /// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. + /// The aggs layer only contains features for cells with matching data. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetSourceResponse GetSource(TDocument document, Elastic.Clients.Elasticsearch.IndexName index) - { - var descriptor = new GetSourceRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); - } - - /// /// - /// Get a document's source. - /// Returns the source of a document. + /// Grid precision for geohex /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetSourceResponse GetSource(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) - { - var descriptor = new GetSourceRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); - } - - /// /// - /// Get a document's source. - /// Returns the source of a document. + /// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetSourceResponse GetSource(TDocument document, Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new GetSourceRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); - } - - /// /// - /// Get a document's source. - /// Returns the source of a document. + /// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. + /// The following table maps the H3 resolution for each precision. + /// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. + /// At a precision of 6, hexagonal cells have an H3 resolution of 2. + /// If <zoom> is 3 and grid_precision is 4, the precision is 7. + /// At a precision of 7, hexagonal cells have an H3 resolution of 3. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetSourceResponse GetSource(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) - { - var descriptor = new GetSourceRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); - } - - /// /// - /// Get a document's source. - /// Returns the source of a document. + /// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | + /// | --------- | ---------------- | ------------- | ----------------| ----- | + /// | 1 | 4 | 0 | 122 | 30.5 | + /// | 2 | 16 | 0 | 122 | 7.625 | + /// | 3 | 64 | 1 | 842 | 13.15625 | + /// | 4 | 256 | 1 | 842 | 3.2890625 | + /// | 5 | 1024 | 2 | 5882 | 5.744140625 | + /// | 6 | 4096 | 2 | 5882 | 1.436035156 | + /// | 7 | 16384 | 3 | 41162 | 2.512329102 | + /// | 8 | 65536 | 3 | 41162 | 0.6280822754 | + /// | 9 | 262144 | 4 | 288122 | 1.099098206 | + /// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | + /// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | + /// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | + /// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | + /// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | + /// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | + /// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | + /// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | + /// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | + /// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | + /// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | + /// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | + /// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | + /// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | + /// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | + /// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | + /// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | + /// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | + /// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | + /// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetSourceResponse GetSource(Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new GetSourceRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); - } - - /// /// - /// Get a document's source. - /// Returns the source of a document. + /// Hexagonal cells don't align perfectly on a vector tile. + /// Some cells may intersect more than one vector tile. + /// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. + /// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual GetSourceResponse GetSource(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + public virtual Task SearchMvtAsync(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y, CancellationToken cancellationToken = default) { - var descriptor = new GetSourceRequestDescriptor(id); - configureRequest?.Invoke(descriptor); + var descriptor = new SearchMvtRequestDescriptor(indices, field, zoom, x, y); descriptor.BeforeRequest(); - return DoRequest, GetSourceResponse, GetSourceRequestParameters>(descriptor); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Get a document's source. - /// Returns the source of a document. + /// Search a vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(GetSourceRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get a document's source. - /// Returns the source of a document. + /// Search a vector tile for geospatial values. + /// Before using this API, you should be familiar with the Mapbox vector tile specification. + /// The API returns results as a binary mapbox vector tile. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetSourceRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get a document's source. - /// Returns the source of a document. + /// Internally, Elasticsearch translates a vector tile search API request into a search containing: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetSourceRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get a document's source. - /// Returns the source of a document. + /// A geo_bounding_box query on the <field>. The query uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(TDocument document, CancellationToken cancellationToken = default) - { - var descriptor = new GetSourceRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get a document's source. - /// Returns the source of a document. + /// A geotile_grid or geohex_grid aggregation on the <field>. The grid_agg parameter determines the aggregation type. The aggregation uses the <zoom>/<x>/<y> tile as a bounding box. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetSourceRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get a document's source. - /// Returns the source of a document. + /// Optionally, a geo_bounds aggregation on the <field>. The search only includes this aggregation if the exact_bounds parameter is true. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new GetSourceRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get a document's source. - /// Returns the source of a document. + /// If the optional parameter with_labels is true, the internal search will include a dynamic runtime field that calls the getLabelPosition function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetSourceRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get a document's source. - /// Returns the source of a document. + /// For example, Elasticsearch may translate a vector tile search API request with a grid_agg argument of geotile and an exact_bounds argument of true into the following search /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetSourceRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// GET my-index/_search + /// { + /// "size": 10000, + /// "query": { + /// "geo_bounding_box": { + /// "my-geo-field": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "aggregations": { + /// "grid": { + /// "geotile_grid": { + /// "field": "my-geo-field", + /// "precision": 11, + /// "size": 65536, + /// "bounds": { + /// "top_left": { + /// "lat": -40.979898069620134, + /// "lon": -45 + /// }, + /// "bottom_right": { + /// "lat": -66.51326044311186, + /// "lon": 0 + /// } + /// } + /// } + /// }, + /// "bounds": { + /// "geo_bounds": { + /// "field": "my-geo-field", + /// "wrap_longitude": false + /// } + /// } + /// } + /// } + /// /// - /// Get a document's source. - /// Returns the source of a document. + /// The API returns results as a binary Mapbox vector tile. + /// Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetSourceRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get a document's source. - /// Returns the source of a document. + /// A hits layer containing a feature for each <field> value matching the geo_bounding_box query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new GetSourceRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get a document's source. - /// Returns the source of a document. + /// An aggs layer containing a feature for each cell of the geotile_grid or geohex_grid. The layer only contains features for cells with matching data. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> GetSourceAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new GetSourceRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, GetSourceResponse, GetSourceRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get the cluster health. - /// Get a report with the health status of an Elasticsearch cluster. - /// The report contains a list of indicators that compose Elasticsearch functionality. + /// A meta layer containing: /// + /// + /// /// - /// Each indicator has a health status of: green, unknown, yellow or red. - /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// A feature containing a bounding box. By default, this is the bounding box of the tile. + /// + /// + /// + /// + /// Value ranges for any sub-aggregations on the geotile_grid or geohex_grid. /// + /// + /// /// - /// The cluster’s status is controlled by the worst indicator status. + /// Metadata for the search. /// + /// + /// + /// + /// /// - /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. - /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// The API only returns features that can display at its zoom level. + /// For example, if a polygon feature has no area at its zoom level, the API omits it. + /// The API returns errors as UTF-8 encoded JSON. /// /// - /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. - /// The root cause and remediation steps are encapsulated in a diagnosis. - /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. + /// If you specify both parameters, the query parameter takes precedence. /// /// - /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. - /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// Grid precision for geotile /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual HealthReportResponse HealthReport(HealthReportRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// /// - /// Get the cluster health. - /// Get a report with the health status of an Elasticsearch cluster. - /// The report contains a list of indicators that compose Elasticsearch functionality. + /// For a grid_agg of geotile, you can use cells in the aggs layer as tiles for lower zoom levels. + /// grid_precision represents the additional zoom levels available through these cells. The final precision is computed by as follows: <zoom> + grid_precision. + /// For example, if <zoom> is 7 and grid_precision is 8, then the geotile_grid aggregation will use a precision of 15. + /// The maximum final precision is 29. + /// The grid_precision also determines the number of cells for the grid as follows: (2^grid_precision) x (2^grid_precision). + /// For example, a value of 8 divides the tile into a grid of 256 x 256 cells. + /// The aggs layer only contains features for cells with matching data. /// /// - /// Each indicator has a health status of: green, unknown, yellow or red. - /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// Grid precision for geohex /// /// - /// The cluster’s status is controlled by the worst indicator status. + /// For a grid_agg of geohex, Elasticsearch uses <zoom> and grid_precision to calculate a final precision as follows: <zoom> + grid_precision. /// /// - /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. - /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// This precision determines the H3 resolution of the hexagonal cells produced by the geohex aggregation. + /// The following table maps the H3 resolution for each precision. + /// For example, if <zoom> is 3 and grid_precision is 3, the precision is 6. + /// At a precision of 6, hexagonal cells have an H3 resolution of 2. + /// If <zoom> is 3 and grid_precision is 4, the precision is 7. + /// At a precision of 7, hexagonal cells have an H3 resolution of 3. /// /// - /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. - /// The root cause and remediation steps are encapsulated in a diagnosis. - /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | + /// | --------- | ---------------- | ------------- | ----------------| ----- | + /// | 1 | 4 | 0 | 122 | 30.5 | + /// | 2 | 16 | 0 | 122 | 7.625 | + /// | 3 | 64 | 1 | 842 | 13.15625 | + /// | 4 | 256 | 1 | 842 | 3.2890625 | + /// | 5 | 1024 | 2 | 5882 | 5.744140625 | + /// | 6 | 4096 | 2 | 5882 | 1.436035156 | + /// | 7 | 16384 | 3 | 41162 | 2.512329102 | + /// | 8 | 65536 | 3 | 41162 | 0.6280822754 | + /// | 9 | 262144 | 4 | 288122 | 1.099098206 | + /// | 10 | 1048576 | 4 | 288122 | 0.2747745514 | + /// | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | + /// | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | + /// | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | + /// | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | + /// | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | + /// | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | + /// | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | + /// | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | + /// | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | + /// | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | + /// | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | + /// | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | + /// | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | + /// | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | + /// | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | + /// | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | + /// | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | + /// | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | + /// | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | /// /// - /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. - /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// Hexagonal cells don't align perfectly on a vector tile. + /// Some cells may intersect more than one vector tile. + /// To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. + /// Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task HealthReportAsync(HealthReportRequest request, CancellationToken cancellationToken = default) + public virtual Task SearchMvtAsync(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y, Action configureRequest, CancellationToken cancellationToken = default) { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + var descriptor = new SearchMvtRequestDescriptor(indices, field, zoom, x, y); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Get the cluster health. - /// Get a report with the health status of an Elasticsearch cluster. - /// The report contains a list of indicators that compose Elasticsearch functionality. + /// Get the search shards. /// /// - /// Each indicator has a health status of: green, unknown, yellow or red. - /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// /// - /// The cluster’s status is controlled by the worst indicator status. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual SearchShardsResponse SearchShards(SearchShardsRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + /// /// - /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. - /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// Get the search shards. /// /// - /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. - /// The root cause and remediation steps are encapsulated in a diagnosis. - /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// /// - /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. - /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual HealthReportResponse HealthReport(HealthReportRequestDescriptor descriptor) + public virtual Task SearchShardsAsync(SearchShardsRequest request, CancellationToken cancellationToken = default) { - descriptor.BeforeRequest(); - return DoRequest(descriptor); + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Get the cluster health. - /// Get a report with the health status of an Elasticsearch cluster. - /// The report contains a list of indicators that compose Elasticsearch functionality. + /// Get the search shards. /// /// - /// Each indicator has a health status of: green, unknown, yellow or red. - /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// /// - /// The cluster’s status is controlled by the worst indicator status. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual SearchShardsResponse SearchShards(SearchShardsRequestDescriptor descriptor) + { + descriptor.BeforeRequest(); + return DoRequest, SearchShardsResponse, SearchShardsRequestParameters>(descriptor); + } + + /// /// - /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. - /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// Get the search shards. /// /// - /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. - /// The root cause and remediation steps are encapsulated in a diagnosis. - /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// /// - /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. - /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual HealthReportResponse HealthReport(IReadOnlyCollection? feature) + public virtual SearchShardsResponse SearchShards(Elastic.Clients.Elasticsearch.Indices? indices) { - var descriptor = new HealthReportRequestDescriptor(feature); + var descriptor = new SearchShardsRequestDescriptor(indices); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest, SearchShardsResponse, SearchShardsRequestParameters>(descriptor); } /// /// - /// Get the cluster health. - /// Get a report with the health status of an Elasticsearch cluster. - /// The report contains a list of indicators that compose Elasticsearch functionality. + /// Get the search shards. /// /// - /// Each indicator has a health status of: green, unknown, yellow or red. - /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// /// - /// The cluster’s status is controlled by the worst indicator status. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual SearchShardsResponse SearchShards(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) + { + var descriptor = new SearchShardsRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, SearchShardsResponse, SearchShardsRequestParameters>(descriptor); + } + + /// /// - /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. - /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// Get the search shards. /// /// - /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. - /// The root cause and remediation steps are encapsulated in a diagnosis. - /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// /// - /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. - /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual HealthReportResponse HealthReport(IReadOnlyCollection? feature, Action configureRequest) + public virtual SearchShardsResponse SearchShards() { - var descriptor = new HealthReportRequestDescriptor(feature); - configureRequest?.Invoke(descriptor); + var descriptor = new SearchShardsRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest, SearchShardsResponse, SearchShardsRequestParameters>(descriptor); } /// /// - /// Get the cluster health. - /// Get a report with the health status of an Elasticsearch cluster. - /// The report contains a list of indicators that compose Elasticsearch functionality. + /// Get the search shards. /// /// - /// Each indicator has a health status of: green, unknown, yellow or red. - /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// /// - /// The cluster’s status is controlled by the worst indicator status. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual SearchShardsResponse SearchShards(Action> configureRequest) + { + var descriptor = new SearchShardsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, SearchShardsResponse, SearchShardsRequestParameters>(descriptor); + } + + /// /// - /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. - /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// Get the search shards. /// /// - /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. - /// The root cause and remediation steps are encapsulated in a diagnosis. - /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// /// - /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. - /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual HealthReportResponse HealthReport() + public virtual SearchShardsResponse SearchShards(SearchShardsRequestDescriptor descriptor) { - var descriptor = new HealthReportRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Get the cluster health. - /// Get a report with the health status of an Elasticsearch cluster. - /// The report contains a list of indicators that compose Elasticsearch functionality. + /// Get the search shards. /// /// - /// Each indicator has a health status of: green, unknown, yellow or red. - /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// /// - /// The cluster’s status is controlled by the worst indicator status. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual SearchShardsResponse SearchShards(Elastic.Clients.Elasticsearch.Indices? indices) + { + var descriptor = new SearchShardsRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// /// - /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. - /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// Get the search shards. /// /// - /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. - /// The root cause and remediation steps are encapsulated in a diagnosis. - /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// /// - /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. - /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual HealthReportResponse HealthReport(Action configureRequest) + public virtual SearchShardsResponse SearchShards(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest) { - var descriptor = new HealthReportRequestDescriptor(); + var descriptor = new SearchShardsRequestDescriptor(indices); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Get the cluster health. - /// Get a report with the health status of an Elasticsearch cluster. - /// The report contains a list of indicators that compose Elasticsearch functionality. + /// Get the search shards. /// /// - /// Each indicator has a health status of: green, unknown, yellow or red. - /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// /// - /// The cluster’s status is controlled by the worst indicator status. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// + /// Learn more about this API in the Elasticsearch documentation. + /// + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual SearchShardsResponse SearchShards() + { + var descriptor = new SearchShardsRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + /// /// - /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. - /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// Get the search shards. /// /// - /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. - /// The root cause and remediation steps are encapsulated in a diagnosis. - /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// /// - /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. - /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task HealthReportAsync(HealthReportRequestDescriptor descriptor, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual SearchShardsResponse SearchShards(Action configureRequest) { + var descriptor = new SearchShardsRequestDescriptor(); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequest(descriptor); } /// /// - /// Get the cluster health. - /// Get a report with the health status of an Elasticsearch cluster. - /// The report contains a list of indicators that compose Elasticsearch functionality. + /// Get the search shards. /// /// - /// Each indicator has a health status of: green, unknown, yellow or red. - /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// /// - /// The cluster’s status is controlled by the worst indicator status. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task SearchShardsAsync(SearchShardsRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync, SearchShardsResponse, SearchShardsRequestParameters>(descriptor, cancellationToken); + } + + /// /// - /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. - /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// Get the search shards. /// /// - /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. - /// The root cause and remediation steps are encapsulated in a diagnosis. - /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// /// - /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. - /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task HealthReportAsync(IReadOnlyCollection? feature, CancellationToken cancellationToken = default) + public virtual Task SearchShardsAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { - var descriptor = new HealthReportRequestDescriptor(feature); + var descriptor = new SearchShardsRequestDescriptor(indices); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync, SearchShardsResponse, SearchShardsRequestParameters>(descriptor, cancellationToken); } /// /// - /// Get the cluster health. - /// Get a report with the health status of an Elasticsearch cluster. - /// The report contains a list of indicators that compose Elasticsearch functionality. + /// Get the search shards. /// /// - /// Each indicator has a health status of: green, unknown, yellow or red. - /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// /// - /// The cluster’s status is controlled by the worst indicator status. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task SearchShardsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new SearchShardsRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, SearchShardsResponse, SearchShardsRequestParameters>(descriptor, cancellationToken); + } + + /// /// - /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. - /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// Get the search shards. /// /// - /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. - /// The root cause and remediation steps are encapsulated in a diagnosis. - /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// /// - /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. - /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task HealthReportAsync(IReadOnlyCollection? feature, Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task SearchShardsAsync(CancellationToken cancellationToken = default) { - var descriptor = new HealthReportRequestDescriptor(feature); - configureRequest?.Invoke(descriptor); + var descriptor = new SearchShardsRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync, SearchShardsResponse, SearchShardsRequestParameters>(descriptor, cancellationToken); } /// /// - /// Get the cluster health. - /// Get a report with the health status of an Elasticsearch cluster. - /// The report contains a list of indicators that compose Elasticsearch functionality. + /// Get the search shards. /// /// - /// Each indicator has a health status of: green, unknown, yellow or red. - /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// /// - /// The cluster’s status is controlled by the worst indicator status. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task SearchShardsAsync(Action> configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new SearchShardsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, SearchShardsResponse, SearchShardsRequestParameters>(descriptor, cancellationToken); + } + + /// /// - /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. - /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// Get the search shards. /// /// - /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. - /// The root cause and remediation steps are encapsulated in a diagnosis. - /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// /// - /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. - /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task HealthReportAsync(CancellationToken cancellationToken = default) + public virtual Task SearchShardsAsync(SearchShardsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { - var descriptor = new HealthReportRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Get the cluster health. - /// Get a report with the health status of an Elasticsearch cluster. - /// The report contains a list of indicators that compose Elasticsearch functionality. + /// Get the search shards. /// /// - /// Each indicator has a health status of: green, unknown, yellow or red. - /// The indicator will provide an explanation and metadata describing the reason for its current health status. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// /// - /// The cluster’s status is controlled by the worst indicator status. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task SearchShardsAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) + { + var descriptor = new SearchShardsRequestDescriptor(indices); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// /// - /// In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. - /// Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + /// Get the search shards. /// /// - /// Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. - /// The root cause and remediation steps are encapsulated in a diagnosis. - /// A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// /// - /// NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. - /// When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task HealthReportAsync(Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task SearchShardsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new HealthReportRequestDescriptor(); + var descriptor = new SearchShardsRequestDescriptor(indices); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// 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. + /// Get the search shards. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual IndexResponse Index(IndexRequest request) - { - request.BeforeRequest(); - return DoRequest, IndexResponse, IndexRequestParameters>(request); - } - - /// /// - /// 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. + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task IndexAsync(IndexRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, IndexResponse, IndexRequestParameters>(request, cancellationToken); - } - - /// /// - /// 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. + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual IndexResponse Index(IndexRequestDescriptor descriptor) + public virtual Task SearchShardsAsync(CancellationToken cancellationToken = default) { + var descriptor = new SearchShardsRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest, IndexResponse, IndexRequestParameters>(descriptor); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// 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. + /// Get the search shards. + /// + /// + /// Get the indices and shards that a search request would be run against. + /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. + /// When filtered aliases are used, the filter is returned as part of the indices section. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual IndexResponse Index(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id? id) + public virtual Task SearchShardsAsync(Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new IndexRequestDescriptor(document, index, id); + var descriptor = new SearchShardsRequestDescriptor(); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, IndexResponse, IndexRequestParameters>(descriptor); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// 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. + /// Run a search with a search template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual IndexResponse Index(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest) + public virtual SearchTemplateResponse SearchTemplate(SearchTemplateRequest request) { - var descriptor = new IndexRequestDescriptor(document, index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, IndexResponse, IndexRequestParameters>(descriptor); + request.BeforeRequest(); + return DoRequest, SearchTemplateRequestParameters>(request); } /// /// - /// 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. + /// Run a search with a search template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual IndexResponse Index(TDocument document) + public virtual Task> SearchTemplateAsync(SearchTemplateRequest request, CancellationToken cancellationToken = default) { - var descriptor = new IndexRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequest, IndexResponse, IndexRequestParameters>(descriptor); + request.BeforeRequest(); + return DoRequestAsync, SearchTemplateRequestParameters>(request, cancellationToken); } /// /// - /// 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. + /// Run a search with a search template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual IndexResponse Index(TDocument document, Action> configureRequest) + public virtual SearchTemplateResponse SearchTemplate(SearchTemplateRequestDescriptor descriptor) { - var descriptor = new IndexRequestDescriptor(document); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, IndexResponse, IndexRequestParameters>(descriptor); + return DoRequest, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor); } /// /// - /// 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. + /// Run a search with a search template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual IndexResponse Index(TDocument document, Elastic.Clients.Elasticsearch.IndexName index) + public virtual SearchTemplateResponse SearchTemplate(Elastic.Clients.Elasticsearch.Indices? indices) { - var descriptor = new IndexRequestDescriptor(document, index); + var descriptor = new SearchTemplateRequestDescriptor(indices); descriptor.BeforeRequest(); - return DoRequest, IndexResponse, IndexRequestParameters>(descriptor); + return DoRequest, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor); } /// /// - /// 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. + /// Run a search with a search template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual IndexResponse Index(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) + public virtual SearchTemplateResponse SearchTemplate(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) { - var descriptor = new IndexRequestDescriptor(document, index); + var descriptor = new SearchTemplateRequestDescriptor(indices); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, IndexResponse, IndexRequestParameters>(descriptor); + return DoRequest, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor); } /// /// - /// 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. + /// Run a search with a search template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual IndexResponse Index(TDocument document, Elastic.Clients.Elasticsearch.Id? id) + public virtual SearchTemplateResponse SearchTemplate() { - var descriptor = new IndexRequestDescriptor(document, id); + var descriptor = new SearchTemplateRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest, IndexResponse, IndexRequestParameters>(descriptor); + return DoRequest, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor); } /// /// - /// 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. + /// Run a search with a search template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual IndexResponse Index(TDocument document, Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest) + public virtual SearchTemplateResponse SearchTemplate(Action> configureRequest) { - var descriptor = new IndexRequestDescriptor(document, id); + var descriptor = new SearchTemplateRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, IndexResponse, IndexRequestParameters>(descriptor); + return DoRequest, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor); } /// /// - /// 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. + /// Run a search with a search template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task IndexAsync(IndexRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task> SearchTemplateAsync(SearchTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { descriptor.BeforeRequest(); - return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor, cancellationToken); } /// /// - /// 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. + /// Run a search with a search template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task IndexAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id? id, CancellationToken cancellationToken = default) + public virtual Task> SearchTemplateAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) { - var descriptor = new IndexRequestDescriptor(document, index, id); + var descriptor = new SearchTemplateRequestDescriptor(indices); descriptor.BeforeRequest(); - return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor, cancellationToken); } /// /// - /// 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. + /// Run a search with a search template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task IndexAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) + public virtual Task> SearchTemplateAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new IndexRequestDescriptor(document, index, id); + var descriptor = new SearchTemplateRequestDescriptor(indices); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor, cancellationToken); } /// /// - /// 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. + /// Run a search with a search template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task IndexAsync(TDocument document, CancellationToken cancellationToken = default) + public virtual Task> SearchTemplateAsync(CancellationToken cancellationToken = default) { - var descriptor = new IndexRequestDescriptor(document); + var descriptor = new SearchTemplateRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor, cancellationToken); } /// /// - /// 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. + /// Run a search with a search template. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task IndexAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) + public virtual Task> SearchTemplateAsync(Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new IndexRequestDescriptor(document); + var descriptor = new SearchTemplateRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor, cancellationToken); } /// /// - /// 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. + /// Get terms in an index. + /// + /// + /// Discover terms that match a partial string in an index. + /// This API is designed for low-latency look-ups used in auto-complete scenarios. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// info + /// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task IndexAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual TermsEnumResponse TermsEnum(TermsEnumRequest request) { - var descriptor = new IndexRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); + request.BeforeRequest(); + return DoRequest(request); } /// /// - /// 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. + /// Get terms in an index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Discover terms that match a partial string in an index. + /// This API is designed for low-latency look-ups used in auto-complete scenarios. + /// + /// + /// info + /// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task IndexAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) + public virtual Task TermsEnumAsync(TermsEnumRequest request, CancellationToken cancellationToken = default) { - var descriptor = new IndexRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); } /// /// - /// 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. + /// Get terms in an index. + /// + /// + /// Discover terms that match a partial string in an index. + /// This API is designed for low-latency look-ups used in auto-complete scenarios. + /// + /// + /// info + /// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task IndexAsync(TDocument document, Elastic.Clients.Elasticsearch.Id? id, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual TermsEnumResponse TermsEnum(TermsEnumRequestDescriptor descriptor) { - var descriptor = new IndexRequestDescriptor(document, id); descriptor.BeforeRequest(); - return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); + return DoRequest, TermsEnumResponse, TermsEnumRequestParameters>(descriptor); } /// /// - /// 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. + /// Get terms in an index. + /// + /// + /// Discover terms that match a partial string in an index. + /// This API is designed for low-latency look-ups used in auto-complete scenarios. + /// + /// + /// info + /// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task IndexAsync(TDocument document, Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual TermsEnumResponse TermsEnum(Elastic.Clients.Elasticsearch.IndexName index) { - var descriptor = new IndexRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); + var descriptor = new TermsEnumRequestDescriptor(index); descriptor.BeforeRequest(); - return DoRequestAsync, IndexResponse, IndexRequestParameters>(descriptor, cancellationToken); + return DoRequest, TermsEnumResponse, TermsEnumRequestParameters>(descriptor); } /// /// - /// Get cluster info. - /// Returns basic information about the cluster. + /// Get terms in an index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Discover terms that match a partial string in an index. + /// This API is designed for low-latency look-ups used in auto-complete scenarios. + /// + /// + /// info + /// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual InfoResponse Info(InfoRequest request) + public virtual TermsEnumResponse TermsEnum(Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) { - request.BeforeRequest(); - return DoRequest(request); + var descriptor = new TermsEnumRequestDescriptor(index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest, TermsEnumResponse, TermsEnumRequestParameters>(descriptor); } /// /// - /// Get cluster info. - /// Returns basic information about the cluster. + /// Get terms in an index. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task InfoAsync(InfoRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// /// - /// Get cluster info. - /// Returns basic information about the cluster. + /// Discover terms that match a partial string in an index. + /// This API is designed for low-latency look-ups used in auto-complete scenarios. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// info + /// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual InfoResponse Info(InfoRequestDescriptor descriptor) + public virtual TermsEnumResponse TermsEnum() { + var descriptor = new TermsEnumRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest, TermsEnumResponse, TermsEnumRequestParameters>(descriptor); } /// /// - /// Get cluster info. - /// Returns basic information about the cluster. + /// Get terms in an index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Discover terms that match a partial string in an index. + /// This API is designed for low-latency look-ups used in auto-complete scenarios. + /// + /// + /// info + /// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual InfoResponse Info() + public virtual TermsEnumResponse TermsEnum(Action> configureRequest) { - var descriptor = new InfoRequestDescriptor(); + var descriptor = new TermsEnumRequestDescriptor(); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest, TermsEnumResponse, TermsEnumRequestParameters>(descriptor); } /// /// - /// Get cluster info. - /// Returns basic information about the cluster. + /// Get terms in an index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Discover terms that match a partial string in an index. + /// This API is designed for low-latency look-ups used in auto-complete scenarios. + /// + /// + /// info + /// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual InfoResponse Info(Action configureRequest) + public virtual TermsEnumResponse TermsEnum(TermsEnumRequestDescriptor descriptor) { - var descriptor = new InfoRequestDescriptor(); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Get cluster info. - /// Returns basic information about the cluster. + /// Get terms in an index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Discover terms that match a partial string in an index. + /// This API is designed for low-latency look-ups used in auto-complete scenarios. + /// + /// + /// info + /// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task InfoAsync(InfoRequestDescriptor descriptor, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual TermsEnumResponse TermsEnum(Elastic.Clients.Elasticsearch.IndexName index) { + var descriptor = new TermsEnumRequestDescriptor(index); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequest(descriptor); } /// /// - /// Get cluster info. - /// Returns basic information about the cluster. + /// Get terms in an index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Discover terms that match a partial string in an index. + /// This API is designed for low-latency look-ups used in auto-complete scenarios. + /// + /// + /// info + /// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task InfoAsync(CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual TermsEnumResponse TermsEnum(Elastic.Clients.Elasticsearch.IndexName index, Action configureRequest) { - var descriptor = new InfoRequestDescriptor(); + var descriptor = new TermsEnumRequestDescriptor(index); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequest(descriptor); } /// /// - /// Get cluster info. - /// Returns basic information about the cluster. + /// Get terms in an index. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Discover terms that match a partial string in an index. + /// This API is designed for low-latency look-ups used in auto-complete scenarios. + /// + /// + /// info + /// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task InfoAsync(Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task TermsEnumAsync(TermsEnumRequestDescriptor descriptor, CancellationToken cancellationToken = default) { - var descriptor = new InfoRequestDescriptor(); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync, TermsEnumResponse, TermsEnumRequestParameters>(descriptor, cancellationToken); } /// /// - /// Get multiple term vectors. + /// Get terms in an index. /// /// - /// 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. + /// Discover terms that match a partial string in an index. + /// This API is designed for low-latency look-ups used in auto-complete scenarios. + /// + /// + /// info + /// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiTermVectorsResponse Mtermvectors(MultiTermVectorsRequest request) + public virtual Task TermsEnumAsync(Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) { - request.BeforeRequest(); - return DoRequest(request); + var descriptor = new TermsEnumRequestDescriptor(index); + descriptor.BeforeRequest(); + return DoRequestAsync, TermsEnumResponse, TermsEnumRequestParameters>(descriptor, cancellationToken); } /// /// - /// Get multiple term vectors. + /// Get terms in an index. /// /// - /// 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. + /// Discover terms that match a partial string in an index. + /// This API is designed for low-latency look-ups used in auto-complete scenarios. + /// + /// + /// info + /// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task MtermvectorsAsync(MultiTermVectorsRequest request, CancellationToken cancellationToken = default) + public virtual Task TermsEnumAsync(Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); + var descriptor = new TermsEnumRequestDescriptor(index); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync, TermsEnumResponse, TermsEnumRequestParameters>(descriptor, cancellationToken); } /// /// - /// Get multiple term vectors. + /// Get terms in an index. /// /// - /// 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. + /// Discover terms that match a partial string in an index. + /// This API is designed for low-latency look-ups used in auto-complete scenarios. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// info + /// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiTermVectorsResponse Mtermvectors(MultiTermVectorsRequestDescriptor descriptor) + public virtual Task TermsEnumAsync(CancellationToken cancellationToken = default) { + var descriptor = new TermsEnumRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor); + return DoRequestAsync, TermsEnumResponse, TermsEnumRequestParameters>(descriptor, cancellationToken); } /// /// - /// Get multiple term vectors. + /// Get terms in an index. /// /// - /// 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. + /// Discover terms that match a partial string in an index. + /// This API is designed for low-latency look-ups used in auto-complete scenarios. + /// + /// + /// info + /// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiTermVectorsResponse Mtermvectors(Elastic.Clients.Elasticsearch.IndexName? index) + public virtual Task TermsEnumAsync(Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new MultiTermVectorsRequestDescriptor(index); + var descriptor = new TermsEnumRequestDescriptor(); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor); + return DoRequestAsync, TermsEnumResponse, TermsEnumRequestParameters>(descriptor, cancellationToken); } /// /// - /// Get multiple term vectors. + /// Get terms in an index. /// /// - /// 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. + /// Discover terms that match a partial string in an index. + /// This API is designed for low-latency look-ups used in auto-complete scenarios. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// info + /// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiTermVectorsResponse Mtermvectors(Elastic.Clients.Elasticsearch.IndexName? index, Action> configureRequest) + public virtual Task TermsEnumAsync(TermsEnumRequestDescriptor descriptor, CancellationToken cancellationToken = default) { - var descriptor = new MultiTermVectorsRequestDescriptor(index); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Get multiple term vectors. + /// Get terms in an index. /// /// - /// 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. + /// Discover terms that match a partial string in an index. + /// This API is designed for low-latency look-ups used in auto-complete scenarios. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// info + /// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiTermVectorsResponse Mtermvectors() + public virtual Task TermsEnumAsync(Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) { - var descriptor = new MultiTermVectorsRequestDescriptor(); + var descriptor = new TermsEnumRequestDescriptor(index); descriptor.BeforeRequest(); - return DoRequest, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Get multiple term vectors. + /// Get terms in an index. /// /// - /// 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. + /// Discover terms that match a partial string in an index. + /// This API is designed for low-latency look-ups used in auto-complete scenarios. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// info + /// The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiTermVectorsResponse Mtermvectors(Action> configureRequest) + public virtual Task TermsEnumAsync(Elastic.Clients.Elasticsearch.IndexName index, Action configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new MultiTermVectorsRequestDescriptor(); + var descriptor = new TermsEnumRequestDescriptor(index); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor); + return DoRequestAsync(descriptor, cancellationToken); } /// /// - /// Get multiple term vectors. + /// Get term vector information. /// /// - /// 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. + /// Get information and statistics about terms in the fields of a particular document. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: + /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// + /// + /// Fields can be specified using wildcards, similar to the multi match query. + /// + /// + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. + /// + /// + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. + /// + /// + /// Term information + /// + /// + /// + /// + /// term frequency in the field (always returned) + /// + /// + /// + /// + /// term positions (positions: true) + /// + /// + /// + /// + /// start and end offsets (offsets: true) + /// + /// + /// + /// + /// term payloads (payloads: true), as base64 encoded bytes + /// + /// + /// + /// + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. + /// + /// + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. + /// + /// + /// Behaviour + /// + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiTermVectorsResponse Mtermvectors(MultiTermVectorsRequestDescriptor descriptor) + public virtual TermVectorsResponse Termvectors(TermVectorsRequest request) { - descriptor.BeforeRequest(); - return DoRequest(descriptor); + request.BeforeRequest(); + return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(request); } /// /// - /// Get multiple term vectors. + /// Get term vector information. /// /// - /// 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. + /// Get information and statistics about terms in the fields of a particular document. + /// + /// + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: + /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// + /// + /// Fields can be specified using wildcards, similar to the multi match query. + /// + /// + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. + /// + /// + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. + /// + /// + /// Term information + /// + /// + /// + /// + /// term frequency in the field (always returned) + /// + /// + /// + /// + /// term positions (positions: true) + /// + /// + /// + /// + /// start and end offsets (offsets: true) + /// + /// + /// + /// + /// term payloads (payloads: true), as base64 encoded bytes + /// + /// + /// + /// + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. + /// + /// + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. + /// + /// + /// Behaviour + /// + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiTermVectorsResponse Mtermvectors(Elastic.Clients.Elasticsearch.IndexName? index) + public virtual Task TermvectorsAsync(TermVectorsRequest request, CancellationToken cancellationToken = default) { - var descriptor = new MultiTermVectorsRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequest(descriptor); + request.BeforeRequest(); + return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(request, cancellationToken); } /// /// - /// Get multiple term vectors. + /// Get term vector information. /// /// - /// 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. + /// Get information and statistics about terms in the fields of a particular document. + /// + /// + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: + /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// + /// + /// Fields can be specified using wildcards, similar to the multi match query. + /// + /// + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. + /// + /// + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. + /// + /// + /// Term information /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// + /// + /// term frequency in the field (always returned) + /// + /// + /// + /// + /// term positions (positions: true) + /// + /// + /// + /// + /// start and end offsets (offsets: true) + /// + /// + /// + /// + /// term payloads (payloads: true), as base64 encoded bytes + /// + /// + /// + /// + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. + /// + /// + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. + /// + /// + /// Behaviour + /// + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiTermVectorsResponse Mtermvectors(Elastic.Clients.Elasticsearch.IndexName? index, Action configureRequest) + public virtual TermVectorsResponse Termvectors(TermVectorsRequestDescriptor descriptor) { - var descriptor = new MultiTermVectorsRequestDescriptor(index); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); } /// /// - /// Get multiple term vectors. + /// Get term vector information. /// /// - /// 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. + /// Get information and statistics about terms in the fields of a particular document. + /// + /// + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: + /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// + /// + /// Fields can be specified using wildcards, similar to the multi match query. + /// + /// + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. + /// + /// + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. + /// + /// + /// Term information + /// + /// + /// + /// + /// term frequency in the field (always returned) + /// + /// + /// + /// + /// term positions (positions: true) + /// + /// + /// + /// + /// start and end offsets (offsets: true) + /// + /// + /// + /// + /// term payloads (payloads: true), as base64 encoded bytes + /// + /// + /// + /// + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. + /// + /// + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. + /// + /// + /// Behaviour + /// + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiTermVectorsResponse Mtermvectors() + public virtual TermVectorsResponse Termvectors(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id? id) { - var descriptor = new MultiTermVectorsRequestDescriptor(); + var descriptor = new TermVectorsRequestDescriptor(index, id); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); } /// /// - /// Get multiple term vectors. + /// Get term vector information. /// /// - /// 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. + /// Get information and statistics about terms in the fields of a particular document. + /// + /// + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: + /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// + /// + /// Fields can be specified using wildcards, similar to the multi match query. + /// + /// + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. + /// + /// + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. + /// + /// + /// Term information + /// + /// + /// + /// + /// term frequency in the field (always returned) + /// + /// + /// + /// + /// term positions (positions: true) + /// + /// + /// + /// + /// start and end offsets (offsets: true) + /// + /// + /// + /// + /// term payloads (payloads: true), as base64 encoded bytes + /// + /// + /// + /// + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. + /// + /// + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. + /// + /// + /// Behaviour /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiTermVectorsResponse Mtermvectors(Action configureRequest) + public virtual TermVectorsResponse Termvectors(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest) { - var descriptor = new MultiTermVectorsRequestDescriptor(); + var descriptor = new TermVectorsRequestDescriptor(index, id); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); } /// /// - /// Get multiple term vectors. + /// Get term vector information. /// /// - /// 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. + /// Get information and statistics about terms in the fields of a particular document. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MtermvectorsAsync(MultiTermVectorsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get multiple term vectors. + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// /// - /// 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. + /// Fields can be specified using wildcards, similar to the multi match query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MtermvectorsAsync(Elastic.Clients.Elasticsearch.IndexName? index, CancellationToken cancellationToken = default) - { - var descriptor = new MultiTermVectorsRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get multiple term vectors. + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. /// /// - /// 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. + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MtermvectorsAsync(Elastic.Clients.Elasticsearch.IndexName? index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new MultiTermVectorsRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get multiple term vectors. + /// Term information /// + /// + /// /// - /// 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. + /// term frequency in the field (always returned) /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MtermvectorsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new MultiTermVectorsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get multiple term vectors. + /// term positions (positions: true) /// + /// + /// /// - /// 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. + /// start and end offsets (offsets: true) /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MtermvectorsAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new MultiTermVectorsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiTermVectorsResponse, MultiTermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get multiple term vectors. + /// term payloads (payloads: true), as base64 encoded bytes /// + /// + /// /// - /// 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. + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MtermvectorsAsync(MultiTermVectorsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Get multiple term vectors. + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. /// /// - /// 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. + /// Behaviour + /// + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task MtermvectorsAsync(Elastic.Clients.Elasticsearch.IndexName? index, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual TermVectorsResponse Termvectors(Elastic.Clients.Elasticsearch.IndexName index) { - var descriptor = new MultiTermVectorsRequestDescriptor(index); + var descriptor = new TermVectorsRequestDescriptor(index); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); } /// /// - /// Get multiple term vectors. + /// Get term vector information. /// /// - /// 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. + /// Get information and statistics about terms in the fields of a particular document. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MtermvectorsAsync(Elastic.Clients.Elasticsearch.IndexName? index, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new MultiTermVectorsRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Get multiple term vectors. + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// /// - /// 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. + /// Fields can be specified using wildcards, similar to the multi match query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MtermvectorsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new MultiTermVectorsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Get multiple term vectors. + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. /// /// - /// 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. + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task MtermvectorsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new MultiTermVectorsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Get multiple documents. + /// Term information /// + /// + /// /// - /// Get multiple JSON documents by ID from one or more indices. - /// 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. + /// term frequency in the field (always returned) /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiGetResponse MultiGet(MultiGetRequest request) - { - request.BeforeRequest(); - return DoRequest, MultiGetRequestParameters>(request); - } - - /// + /// + /// /// - /// Get multiple documents. + /// term positions (positions: true) /// + /// + /// /// - /// Get multiple JSON documents by ID from one or more indices. - /// 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. + /// start and end offsets (offsets: true) /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiGetAsync(MultiGetRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, MultiGetRequestParameters>(request, cancellationToken); - } - - /// + /// + /// /// - /// Get multiple documents. + /// term payloads (payloads: true), as base64 encoded bytes /// + /// + /// /// - /// Get multiple JSON documents by ID from one or more indices. - /// 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. + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiGetResponse MultiGet(MultiGetRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, MultiGetResponse, MultiGetRequestParameters>(descriptor); - } - - /// /// - /// Get multiple documents. + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. /// /// - /// Get multiple JSON documents by ID from one or more indices. - /// 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. + /// Behaviour /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiGetResponse MultiGet(Elastic.Clients.Elasticsearch.IndexName? index) + public virtual TermVectorsResponse Termvectors(Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) { - var descriptor = new MultiGetRequestDescriptor(index); + var descriptor = new TermVectorsRequestDescriptor(index); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, MultiGetResponse, MultiGetRequestParameters>(descriptor); + return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); } /// /// - /// Get multiple documents. + /// Get term vector information. /// /// - /// Get multiple JSON documents by ID from one or more indices. - /// 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. + /// Get information and statistics about terms in the fields of a particular document. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiGetResponse MultiGet(Elastic.Clients.Elasticsearch.IndexName? index, Action> configureRequest) - { - var descriptor = new MultiGetRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, MultiGetResponse, MultiGetRequestParameters>(descriptor); - } - - /// /// - /// Get multiple documents. + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// /// - /// Get multiple JSON documents by ID from one or more indices. - /// 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. + /// Fields can be specified using wildcards, similar to the multi match query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiGetResponse MultiGet() - { - var descriptor = new MultiGetRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest, MultiGetResponse, MultiGetRequestParameters>(descriptor); - } - - /// /// - /// Get multiple documents. + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. + /// + /// + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. + /// + /// + /// Term information + /// + /// + /// + /// + /// term frequency in the field (always returned) + /// + /// + /// + /// + /// term positions (positions: true) + /// + /// + /// + /// + /// start and end offsets (offsets: true) + /// + /// + /// + /// + /// term payloads (payloads: true), as base64 encoded bytes + /// + /// + /// + /// + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. /// /// - /// Get multiple JSON documents by ID from one or more indices. - /// 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. + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. + /// + /// + /// Behaviour + /// + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiGetResponse MultiGet(Action> configureRequest) + public virtual TermVectorsResponse Termvectors(TDocument document) { - var descriptor = new MultiGetRequestDescriptor(); - configureRequest?.Invoke(descriptor); + var descriptor = new TermVectorsRequestDescriptor(document); descriptor.BeforeRequest(); - return DoRequest, MultiGetResponse, MultiGetRequestParameters>(descriptor); + return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); } /// /// - /// Get multiple documents. + /// Get term vector information. /// /// - /// Get multiple JSON documents by ID from one or more indices. - /// 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. + /// Get information and statistics about terms in the fields of a particular document. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiGetAsync(MultiGetRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, MultiGetResponse, MultiGetRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get multiple documents. + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// /// - /// Get multiple JSON documents by ID from one or more indices. - /// 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. + /// Fields can be specified using wildcards, similar to the multi match query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiGetAsync(Elastic.Clients.Elasticsearch.IndexName? index, CancellationToken cancellationToken = default) - { - var descriptor = new MultiGetRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiGetResponse, MultiGetRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get multiple documents. + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. /// /// - /// Get multiple JSON documents by ID from one or more indices. - /// 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. + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiGetAsync(Elastic.Clients.Elasticsearch.IndexName? index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new MultiGetRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiGetResponse, MultiGetRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get multiple documents. + /// Term information /// + /// + /// /// - /// Get multiple JSON documents by ID from one or more indices. - /// 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. + /// term frequency in the field (always returned) /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiGetAsync(CancellationToken cancellationToken = default) - { - var descriptor = new MultiGetRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiGetResponse, MultiGetRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get multiple documents. + /// term positions (positions: true) /// + /// + /// /// - /// Get multiple JSON documents by ID from one or more indices. - /// 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. + /// start and end offsets (offsets: true) + /// + /// + /// + /// + /// term payloads (payloads: true), as base64 encoded bytes + /// + /// + /// + /// + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. + /// + /// + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. + /// + /// + /// Behaviour + /// + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task> MultiGetAsync(Action> configureRequest, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual TermVectorsResponse Termvectors(TDocument document, Action> configureRequest) { - var descriptor = new MultiGetRequestDescriptor(); + var descriptor = new TermVectorsRequestDescriptor(document); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, MultiGetResponse, MultiGetRequestParameters>(descriptor, cancellationToken); + return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); } /// /// - /// Run multiple searches. + /// Get term vector information. /// /// - /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. - /// The structure is as follows: + /// Get information and statistics about terms in the fields of a particular document. + /// + /// + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: /// /// - /// header\n - /// body\n - /// header\n - /// body\n + /// GET /my-index-000001/_termvectors/1?fields=message /// /// - /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// Fields can be specified using wildcards, similar to the multi match query. /// /// - /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiSearchResponse MultiSearch(MultiSearchRequest request) - { - request.BeforeRequest(); - return DoRequest, MultiSearchRequestParameters>(request); - } - - /// /// - /// Run multiple searches. + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. /// /// - /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. - /// The structure is as follows: + /// Term information /// - /// - /// header\n - /// body\n - /// header\n - /// body\n - /// + /// + /// /// - /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// term frequency in the field (always returned) /// + /// + /// /// - /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// term positions (positions: true) /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchAsync(MultiSearchRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, MultiSearchRequestParameters>(request, cancellationToken); - } - - /// + /// + /// /// - /// Run multiple searches. + /// start and end offsets (offsets: true) /// + /// + /// /// - /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. - /// The structure is as follows: + /// term payloads (payloads: true), as base64 encoded bytes /// - /// - /// header\n - /// body\n - /// header\n - /// body\n - /// + /// + /// /// - /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. /// /// - /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Behaviour + /// + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiSearchResponse MultiSearch(MultiSearchRequestDescriptor descriptor) + public virtual TermVectorsResponse Termvectors(TDocument document, Elastic.Clients.Elasticsearch.IndexName index) { + var descriptor = new TermVectorsRequestDescriptor(document, index); descriptor.BeforeRequest(); - return DoRequest, MultiSearchResponse, MultiSearchRequestParameters>(descriptor); + return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); } /// /// - /// Run multiple searches. + /// Get term vector information. /// /// - /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. - /// The structure is as follows: + /// Get information and statistics about terms in the fields of a particular document. + /// + /// + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: /// /// - /// header\n - /// body\n - /// header\n - /// body\n + /// GET /my-index-000001/_termvectors/1?fields=message /// /// - /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// Fields can be specified using wildcards, similar to the multi match query. /// /// - /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiSearchResponse MultiSearch(Elastic.Clients.Elasticsearch.Indices? indices) - { - var descriptor = new MultiSearchRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequest, MultiSearchResponse, MultiSearchRequestParameters>(descriptor); - } - - /// /// - /// Run multiple searches. + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. /// /// - /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. - /// The structure is as follows: + /// Term information /// - /// - /// header\n - /// body\n - /// header\n - /// body\n - /// + /// + /// /// - /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// term frequency in the field (always returned) /// + /// + /// /// - /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// term positions (positions: true) /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// + /// + /// start and end offsets (offsets: true) + /// + /// + /// + /// + /// term payloads (payloads: true), as base64 encoded bytes + /// + /// + /// + /// + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. + /// + /// + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. + /// + /// + /// Behaviour + /// + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiSearchResponse MultiSearch(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) + public virtual TermVectorsResponse Termvectors(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) { - var descriptor = new MultiSearchRequestDescriptor(indices); + var descriptor = new TermVectorsRequestDescriptor(document, index); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, MultiSearchResponse, MultiSearchRequestParameters>(descriptor); + return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); } /// /// - /// Run multiple searches. + /// Get term vector information. /// /// - /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. - /// The structure is as follows: + /// Get information and statistics about terms in the fields of a particular document. + /// + /// + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: /// /// - /// header\n - /// body\n - /// header\n - /// body\n + /// GET /my-index-000001/_termvectors/1?fields=message /// /// - /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// Fields can be specified using wildcards, similar to the multi match query. /// /// - /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiSearchResponse MultiSearch() - { - var descriptor = new MultiSearchRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest, MultiSearchResponse, MultiSearchRequestParameters>(descriptor); - } - - /// /// - /// Run multiple searches. + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. + /// + /// + /// Term information + /// + /// + /// + /// + /// term frequency in the field (always returned) + /// + /// + /// + /// + /// term positions (positions: true) + /// + /// + /// + /// + /// start and end offsets (offsets: true) + /// + /// + /// + /// + /// term payloads (payloads: true), as base64 encoded bytes /// + /// + /// /// - /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. - /// The structure is as follows: + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. /// - /// - /// header\n - /// body\n - /// header\n - /// body\n - /// /// - /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. /// /// - /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// Behaviour /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiSearchResponse MultiSearch(Action> configureRequest) + public virtual TermVectorsResponse Termvectors(TDocument document, Elastic.Clients.Elasticsearch.Id? id) { - var descriptor = new MultiSearchRequestDescriptor(); - configureRequest?.Invoke(descriptor); + var descriptor = new TermVectorsRequestDescriptor(document, id); descriptor.BeforeRequest(); - return DoRequest, MultiSearchResponse, MultiSearchRequestParameters>(descriptor); + return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); } /// /// - /// Run multiple searches. + /// Get term vector information. /// /// - /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. - /// The structure is as follows: + /// Get information and statistics about terms in the fields of a particular document. + /// + /// + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: /// /// - /// header\n - /// body\n - /// header\n - /// body\n + /// GET /my-index-000001/_termvectors/1?fields=message /// /// - /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// Fields can be specified using wildcards, similar to the multi match query. /// /// - /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchAsync(MultiSearchRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, MultiSearchResponse, MultiSearchRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Run multiple searches. + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. /// /// - /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. - /// The structure is as follows: + /// Term information /// - /// - /// header\n - /// body\n - /// header\n - /// body\n - /// + /// + /// /// - /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// term frequency in the field (always returned) /// + /// + /// /// - /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// term positions (positions: true) /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new MultiSearchRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiSearchResponse, MultiSearchRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Run multiple searches. + /// start and end offsets (offsets: true) /// + /// + /// /// - /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. - /// The structure is as follows: + /// term payloads (payloads: true), as base64 encoded bytes /// - /// - /// header\n - /// body\n - /// header\n - /// body\n - /// + /// + /// /// - /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. /// /// - /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Behaviour + /// + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task> MultiSearchAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual TermVectorsResponse Termvectors(TDocument document, Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest) { - var descriptor = new MultiSearchRequestDescriptor(indices); + var descriptor = new TermVectorsRequestDescriptor(document, id); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, MultiSearchResponse, MultiSearchRequestParameters>(descriptor, cancellationToken); + return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); } /// /// - /// Run multiple searches. + /// Get term vector information. /// /// - /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. - /// The structure is as follows: + /// Get information and statistics about terms in the fields of a particular document. + /// + /// + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: /// /// - /// header\n - /// body\n - /// header\n - /// body\n + /// GET /my-index-000001/_termvectors/1?fields=message /// /// - /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// Fields can be specified using wildcards, similar to the multi match query. /// /// - /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchAsync(CancellationToken cancellationToken = default) - { - var descriptor = new MultiSearchRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiSearchResponse, MultiSearchRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Run multiple searches. + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. /// /// - /// The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. - /// The structure is as follows: + /// Term information /// - /// - /// header\n - /// body\n - /// header\n - /// body\n - /// + /// + /// /// - /// This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + /// term frequency in the field (always returned) /// + /// + /// /// - /// IMPORTANT: 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 requests to this endpoint the Content-Type header should be set to application/x-ndjson. + /// term positions (positions: true) /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new MultiSearchRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiSearchResponse, MultiSearchRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Run multiple templated searches. + /// start and end offsets (offsets: true) /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiSearchTemplateResponse MultiSearchTemplate(MultiSearchTemplateRequest request) - { - request.BeforeRequest(); - return DoRequest, MultiSearchTemplateRequestParameters>(request); - } - - /// + /// + /// /// - /// Run multiple templated searches. + /// term payloads (payloads: true), as base64 encoded bytes /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchTemplateAsync(MultiSearchTemplateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, MultiSearchTemplateRequestParameters>(request, cancellationToken); - } - - /// + /// + /// /// - /// Run multiple templated searches. + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiSearchTemplateResponse MultiSearchTemplate(MultiSearchTemplateRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor); - } - - /// /// - /// Run multiple templated searches. + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiSearchTemplateResponse MultiSearchTemplate(Elastic.Clients.Elasticsearch.Indices? indices) - { - var descriptor = new MultiSearchTemplateRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequest, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor); - } - - /// /// - /// Run multiple templated searches. + /// Behaviour /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiSearchTemplateResponse MultiSearchTemplate(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) - { - var descriptor = new MultiSearchTemplateRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor); - } - - /// /// - /// Run multiple templated searches. + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiSearchTemplateResponse MultiSearchTemplate() + public virtual TermVectorsResponse Termvectors(Elastic.Clients.Elasticsearch.Id? id) { - var descriptor = new MultiSearchTemplateRequestDescriptor(); + var descriptor = new TermVectorsRequestDescriptor(id); descriptor.BeforeRequest(); - return DoRequest, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor); + return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); } /// /// - /// Run multiple templated searches. + /// Get term vector information. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual MultiSearchTemplateResponse MultiSearchTemplate(Action> configureRequest) - { - var descriptor = new MultiSearchTemplateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor); - } - - /// /// - /// Run multiple templated searches. + /// Get information and statistics about terms in the fields of a particular document. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchTemplateAsync(MultiSearchTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Run multiple templated searches. + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: + /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// + /// + /// Fields can be specified using wildcards, similar to the multi match query. + /// + /// + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. + /// + /// + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. + /// + /// + /// Term information + /// + /// + /// + /// + /// term frequency in the field (always returned) + /// + /// + /// + /// + /// term positions (positions: true) + /// + /// + /// + /// + /// start and end offsets (offsets: true) + /// + /// + /// + /// + /// term payloads (payloads: true), as base64 encoded bytes + /// + /// + /// + /// + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchTemplateAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new MultiSearchTemplateRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Run multiple templated searches. + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchTemplateAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new MultiSearchTemplateRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Run multiple templated searches. + /// Behaviour /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> MultiSearchTemplateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new MultiSearchTemplateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Run multiple templated searches. + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task> MultiSearchTemplateAsync(Action> configureRequest, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual TermVectorsResponse Termvectors(Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest) { - var descriptor = new MultiSearchTemplateRequestDescriptor(); + var descriptor = new TermVectorsRequestDescriptor(id); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, MultiSearchTemplateResponse, MultiSearchTemplateRequestParameters>(descriptor, cancellationToken); + return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); } /// /// - /// Open a point in time. + /// Get term vector information. /// /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. + /// Get information and statistics about terms in the fields of a particular document. /// /// - /// 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. + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual OpenPointInTimeResponse OpenPointInTime(OpenPointInTimeRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// /// - /// Open a point in time. + /// Fields can be specified using wildcards, similar to the multi match query. /// /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. /// /// - /// 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. + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenPointInTimeAsync(OpenPointInTimeRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// /// - /// Open a point in time. + /// Term information /// + /// + /// /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. + /// term frequency in the field (always returned) /// + /// + /// /// - /// 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. + /// term positions (positions: true) /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual OpenPointInTimeResponse OpenPointInTime(OpenPointInTimeRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Open a point in time. + /// start and end offsets (offsets: true) /// + /// + /// /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. + /// term payloads (payloads: true), as base64 encoded bytes /// + /// + /// /// - /// 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. + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual OpenPointInTimeResponse OpenPointInTime(Elastic.Clients.Elasticsearch.Indices indices) - { - var descriptor = new OpenPointInTimeRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequest, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor); - } - - /// /// - /// Open a point in time. + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. /// /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. + /// Behaviour /// /// - /// 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. + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual OpenPointInTimeResponse OpenPointInTime(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest) + public virtual Task TermvectorsAsync(TermVectorsRequestDescriptor descriptor, CancellationToken cancellationToken = default) { - var descriptor = new OpenPointInTimeRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor); + return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); } /// /// - /// Open a point in time. + /// Get term vector information. /// /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. + /// Get information and statistics about terms in the fields of a particular document. /// /// - /// 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. + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual OpenPointInTimeResponse OpenPointInTime() - { - var descriptor = new OpenPointInTimeRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor); - } - - /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// /// - /// Open a point in time. + /// Fields can be specified using wildcards, similar to the multi match query. /// /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. /// /// - /// 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. + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual OpenPointInTimeResponse OpenPointInTime(Action> configureRequest) - { - var descriptor = new OpenPointInTimeRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor); - } - - /// /// - /// Open a point in time. + /// Term information /// + /// + /// /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. + /// term frequency in the field (always returned) /// + /// + /// /// - /// 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. + /// term positions (positions: true) /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual OpenPointInTimeResponse OpenPointInTime(OpenPointInTimeRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Open a point in time. + /// start and end offsets (offsets: true) /// + /// + /// /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. + /// term payloads (payloads: true), as base64 encoded bytes /// + /// + /// /// - /// 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. + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual OpenPointInTimeResponse OpenPointInTime(Elastic.Clients.Elasticsearch.Indices indices) - { - var descriptor = new OpenPointInTimeRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Open a point in time. + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. /// /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. + /// Behaviour /// /// - /// 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. + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual OpenPointInTimeResponse OpenPointInTime(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest) + public virtual Task TermvectorsAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id? id, CancellationToken cancellationToken = default) { - var descriptor = new OpenPointInTimeRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); + var descriptor = new TermVectorsRequestDescriptor(index, id); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); } /// /// - /// Open a point in time. + /// Get term vector information. /// /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. + /// Get information and statistics about terms in the fields of a particular document. /// /// - /// 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. + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: + /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// + /// + /// Fields can be specified using wildcards, similar to the multi match query. + /// + /// + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. + /// + /// + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenPointInTimeAsync(OpenPointInTimeRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Open a point in time. + /// Term information /// + /// + /// /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. + /// term frequency in the field (always returned) /// + /// + /// /// - /// 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. + /// term positions (positions: true) /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenPointInTimeAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new OpenPointInTimeRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Open a point in time. + /// start and end offsets (offsets: true) /// + /// + /// /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. + /// term payloads (payloads: true), as base64 encoded bytes /// + /// + /// /// - /// 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. + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. + /// + /// + /// Behaviour + /// + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task OpenPointInTimeAsync(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) + public virtual Task TermvectorsAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new OpenPointInTimeRequestDescriptor(indices); + var descriptor = new TermVectorsRequestDescriptor(index, id); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); } /// /// - /// Open a point in time. + /// Get term vector information. /// /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. + /// Get information and statistics about terms in the fields of a particular document. /// /// - /// 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. + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenPointInTimeAsync(CancellationToken cancellationToken = default) - { - var descriptor = new OpenPointInTimeRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// /// - /// Open a point in time. + /// Fields can be specified using wildcards, similar to the multi match query. /// /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. /// /// - /// 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. + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenPointInTimeAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new OpenPointInTimeRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, OpenPointInTimeResponse, OpenPointInTimeRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Open a point in time. + /// Term information /// + /// + /// /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. + /// term frequency in the field (always returned) /// + /// + /// /// - /// 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. + /// term positions (positions: true) /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenPointInTimeAsync(OpenPointInTimeRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Open a point in time. + /// start and end offsets (offsets: true) /// + /// + /// /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. + /// term payloads (payloads: true), as base64 encoded bytes /// + /// + /// /// - /// 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. + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task OpenPointInTimeAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new OpenPointInTimeRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Open a point in time. + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. /// /// - /// A search request by default runs against the most recent visible data of the target indices, - /// which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the - /// state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple - /// search requests using the same point in time. For example, if refreshes happen between - /// search_after requests, then the results of those requests might not be consistent as changes happening - /// between searches are only visible to the more recent point in time. + /// Behaviour /// /// - /// 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. + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task OpenPointInTimeAsync(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task TermvectorsAsync(Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) { - var descriptor = new OpenPointInTimeRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); + var descriptor = new TermVectorsRequestDescriptor(index); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); } /// /// - /// Ping the cluster. - /// Get information about whether the cluster is running. + /// Get term vector information. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PingResponse Ping(PingRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// /// - /// Ping the cluster. - /// Get information about whether the cluster is running. + /// Get information and statistics about terms in the fields of a particular document. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PingAsync(PingRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// /// - /// Ping the cluster. - /// Get information about whether the cluster is running. + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PingResponse Ping(PingRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// /// - /// Ping the cluster. - /// Get information about whether the cluster is running. + /// Fields can be specified using wildcards, similar to the multi match query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PingResponse Ping() - { - var descriptor = new PingRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Ping the cluster. - /// Get information about whether the cluster is running. + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PingResponse Ping(Action configureRequest) - { - var descriptor = new PingRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Ping the cluster. - /// Get information about whether the cluster is running. + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PingAsync(PingRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Ping the cluster. - /// Get information about whether the cluster is running. + /// Term information /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PingAsync(CancellationToken cancellationToken = default) - { - var descriptor = new PingRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Ping the cluster. - /// Get information about whether the cluster is running. + /// term frequency in the field (always returned) /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PingAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new PingRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// term positions (positions: true) /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutScriptResponse PutScript(PutScriptRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// + /// + /// + /// + /// start and end offsets (offsets: true) + /// + /// + /// + /// + /// term payloads (payloads: true), as base64 encoded bytes + /// + /// + /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutScriptAsync(PutScriptRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutScriptResponse PutScript(PutScriptRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, PutScriptResponse, PutScriptRequestParameters>(descriptor); - } - - /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// Behaviour /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutScriptResponse PutScript(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Elasticsearch.Name? context) - { - var descriptor = new PutScriptRequestDescriptor(id, context); - descriptor.BeforeRequest(); - return DoRequest, PutScriptResponse, PutScriptRequestParameters>(descriptor); - } - - /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutScriptResponse PutScript(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Elasticsearch.Name? context, Action> configureRequest) + public virtual Task TermvectorsAsync(Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new PutScriptRequestDescriptor(id, context); + var descriptor = new TermVectorsRequestDescriptor(index); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, PutScriptResponse, PutScriptRequestParameters>(descriptor); + return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); } /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// Get term vector information. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Get information and statistics about terms in the fields of a particular document. + /// + /// + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: + /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// + /// + /// Fields can be specified using wildcards, similar to the multi match query. + /// + /// + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. + /// + /// + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. + /// + /// + /// Term information + /// + /// + /// + /// + /// term frequency in the field (always returned) + /// + /// + /// + /// + /// term positions (positions: true) + /// + /// + /// + /// + /// start and end offsets (offsets: true) + /// + /// + /// + /// + /// term payloads (payloads: true), as base64 encoded bytes + /// + /// + /// + /// + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. + /// + /// + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. + /// + /// + /// Behaviour + /// + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutScriptResponse PutScript(Elastic.Clients.Elasticsearch.Id id) + public virtual Task TermvectorsAsync(TDocument document, CancellationToken cancellationToken = default) { - var descriptor = new PutScriptRequestDescriptor(id); + var descriptor = new TermVectorsRequestDescriptor(document); descriptor.BeforeRequest(); - return DoRequest, PutScriptResponse, PutScriptRequestParameters>(descriptor); + return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); } /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// Get term vector information. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Get information and statistics about terms in the fields of a particular document. + /// + /// + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: + /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// + /// + /// Fields can be specified using wildcards, similar to the multi match query. + /// + /// + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. + /// + /// + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. + /// + /// + /// Term information + /// + /// + /// + /// + /// term frequency in the field (always returned) + /// + /// + /// + /// + /// term positions (positions: true) + /// + /// + /// + /// + /// start and end offsets (offsets: true) + /// + /// + /// + /// + /// term payloads (payloads: true), as base64 encoded bytes + /// + /// + /// + /// + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. + /// + /// + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. + /// + /// + /// Behaviour + /// + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutScriptResponse PutScript(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) + public virtual Task TermvectorsAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new PutScriptRequestDescriptor(id); + var descriptor = new TermVectorsRequestDescriptor(document); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, PutScriptResponse, PutScriptRequestParameters>(descriptor); + return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); } /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// Get term vector information. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutScriptResponse PutScript(PutScriptRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// Get information and statistics about terms in the fields of a particular document. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: + /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// + /// + /// Fields can be specified using wildcards, similar to the multi match query. + /// + /// + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. + /// + /// + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. + /// + /// + /// Term information + /// + /// + /// + /// + /// term frequency in the field (always returned) + /// + /// + /// + /// + /// term positions (positions: true) + /// + /// + /// + /// + /// start and end offsets (offsets: true) + /// + /// + /// + /// + /// term payloads (payloads: true), as base64 encoded bytes + /// + /// + /// + /// + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. + /// + /// + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. + /// + /// + /// Behaviour + /// + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutScriptResponse PutScript(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Elasticsearch.Name? context) + public virtual Task TermvectorsAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) { - var descriptor = new PutScriptRequestDescriptor(id, context); + var descriptor = new TermVectorsRequestDescriptor(document, index); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); } /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// Get term vector information. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Get information and statistics about terms in the fields of a particular document. + /// + /// + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: + /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// + /// + /// Fields can be specified using wildcards, similar to the multi match query. + /// + /// + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. + /// + /// + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. + /// + /// + /// Term information + /// + /// + /// + /// + /// term frequency in the field (always returned) + /// + /// + /// + /// + /// term positions (positions: true) + /// + /// + /// + /// + /// start and end offsets (offsets: true) + /// + /// + /// + /// + /// term payloads (payloads: true), as base64 encoded bytes + /// + /// + /// + /// + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. + /// + /// + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. + /// + /// + /// Behaviour + /// + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutScriptResponse PutScript(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Elasticsearch.Name? context, Action configureRequest) + public virtual Task TermvectorsAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new PutScriptRequestDescriptor(id, context); + var descriptor = new TermVectorsRequestDescriptor(document, index); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); } /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// Get term vector information. + /// + /// + /// Get information and statistics about terms in the fields of a particular document. + /// + /// + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: + /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// + /// + /// Fields can be specified using wildcards, similar to the multi match query. + /// + /// + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. + /// + /// + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. + /// + /// + /// Term information + /// + /// + /// + /// + /// term frequency in the field (always returned) + /// + /// + /// + /// + /// term positions (positions: true) + /// + /// + /// + /// + /// start and end offsets (offsets: true) + /// + /// + /// + /// + /// term payloads (payloads: true), as base64 encoded bytes + /// + /// + /// + /// + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. + /// + /// + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. + /// + /// + /// Behaviour + /// + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutScriptResponse PutScript(Elastic.Clients.Elasticsearch.Id id) + public virtual Task TermvectorsAsync(TDocument document, Elastic.Clients.Elasticsearch.Id? id, CancellationToken cancellationToken = default) { - var descriptor = new PutScriptRequestDescriptor(id); + var descriptor = new TermVectorsRequestDescriptor(document, id); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); } /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// Get term vector information. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual PutScriptResponse PutScript(Elastic.Clients.Elasticsearch.Id id, Action configureRequest) - { - var descriptor = new PutScriptRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// Get information and statistics about terms in the fields of a particular document. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutScriptAsync(PutScriptRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, PutScriptResponse, PutScriptRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Elasticsearch.Name? context, CancellationToken cancellationToken = default) - { - var descriptor = new PutScriptRequestDescriptor(id, context); - descriptor.BeforeRequest(); - return DoRequestAsync, PutScriptResponse, PutScriptRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// Fields can be specified using wildcards, similar to the multi match query. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. + /// + /// + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. + /// + /// + /// Term information + /// + /// + /// + /// + /// term frequency in the field (always returned) + /// + /// + /// + /// + /// term positions (positions: true) + /// + /// + /// + /// + /// start and end offsets (offsets: true) + /// + /// + /// + /// + /// term payloads (payloads: true), as base64 encoded bytes + /// + /// + /// + /// + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. + /// + /// + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. + /// + /// + /// Behaviour + /// + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Elasticsearch.Name? context, Action> configureRequest, CancellationToken cancellationToken = default) + public virtual Task TermvectorsAsync(TDocument document, Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new PutScriptRequestDescriptor(id, context); + var descriptor = new TermVectorsRequestDescriptor(document, id); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, PutScriptResponse, PutScriptRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); } /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// Get term vector information. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Get information and statistics about terms in the fields of a particular document. + /// + /// + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: + /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// + /// + /// Fields can be specified using wildcards, similar to the multi match query. + /// + /// + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. + /// + /// + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. + /// + /// + /// Term information + /// + /// + /// + /// + /// term frequency in the field (always returned) + /// + /// + /// + /// + /// term positions (positions: true) + /// + /// + /// + /// + /// start and end offsets (offsets: true) + /// + /// + /// + /// + /// term payloads (payloads: true), as base64 encoded bytes + /// + /// + /// + /// + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. + /// + /// + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. + /// + /// + /// Behaviour + /// + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + public virtual Task TermvectorsAsync(Elastic.Clients.Elasticsearch.Id? id, CancellationToken cancellationToken = default) { - var descriptor = new PutScriptRequestDescriptor(id); + var descriptor = new TermVectorsRequestDescriptor(id); descriptor.BeforeRequest(); - return DoRequestAsync, PutScriptResponse, PutScriptRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); } /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// Get term vector information. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Get information and statistics about terms in the fields of a particular document. + /// + /// + /// You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + /// You can specify the fields you are interested in through the fields parameter or by adding the fields to the request body. + /// For example: + /// + /// + /// GET /my-index-000001/_termvectors/1?fields=message + /// + /// + /// Fields can be specified using wildcards, similar to the multi match query. + /// + /// + /// Term vectors are real-time by default, not near real-time. + /// This can be changed by setting realtime parameter to false. + /// + /// + /// You can request three types of values: term information, term statistics, and field statistics. + /// By default, all term information and field statistics are returned for all fields but term statistics are excluded. + /// + /// + /// Term information + /// + /// + /// + /// + /// term frequency in the field (always returned) + /// + /// + /// + /// + /// term positions (positions: true) + /// + /// + /// + /// + /// start and end offsets (offsets: true) + /// + /// + /// + /// + /// term payloads (payloads: true), as base64 encoded bytes + /// + /// + /// + /// + /// If the requested information wasn't stored in the index, it will be computed on the fly if possible. + /// Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. + /// + /// + /// warn + /// Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. + /// + /// + /// Behaviour + /// + /// + /// The term and field statistics are not accurate. + /// Deleted documents are not taken into account. + /// The information is only retrieved for the shard the requested document resides in. + /// The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. + /// By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. + /// Use routing only to hit a particular shard. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + public virtual Task TermvectorsAsync(Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new PutScriptRequestDescriptor(id); + var descriptor = new TermVectorsRequestDescriptor(id); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, PutScriptResponse, PutScriptRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); } /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// Update a document. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutScriptAsync(PutScriptRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// Update a document by running a script or passing a partial document. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Elasticsearch.Name? context, CancellationToken cancellationToken = default) - { - var descriptor = new PutScriptRequestDescriptor(id, context); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: + /// + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + /// + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Elasticsearch.Name? context, Action configureRequest, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual UpdateResponse Update(UpdateRequest request) { - var descriptor = new PutScriptRequestDescriptor(id, context); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + request.BeforeRequest(); + return DoRequest, UpdateResponse, UpdateRequestParameters>(request); } /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// Update a document. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Update a document by running a script or passing a partial document. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. + /// + /// + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: + /// + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + /// + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) + public virtual Task> UpdateAsync(UpdateRequest request, CancellationToken cancellationToken = default) { - var descriptor = new PutScriptRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + request.BeforeRequest(); + return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(request, cancellationToken); } /// /// - /// Create or update a script or search template. - /// Creates or updates a stored script or search template. + /// Update a document. + /// + /// + /// Update a document by running a script or passing a partial document. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. + /// + /// + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: + /// + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + /// + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task PutScriptAsync(Elastic.Clients.Elasticsearch.Id id, Action configureRequest, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual UpdateResponse Update(UpdateRequestDescriptor descriptor) { - var descriptor = new PutScriptRequestDescriptor(id); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); } /// /// - /// Evaluate ranked search results. + /// Update a document. /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// Update a document by running a script or passing a partial document. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. + /// + /// + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: + /// + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + /// + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RankEvalResponse RankEval(RankEvalRequest request) + public virtual UpdateResponse Update(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) { - request.BeforeRequest(); - return DoRequest(request); + var descriptor = new UpdateRequestDescriptor(index, id); + descriptor.BeforeRequest(); + return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); } /// /// - /// Evaluate ranked search results. + /// Update a document. /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// Update a document by running a script or passing a partial document. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RankEvalAsync(RankEvalRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// /// - /// Evaluate ranked search results. + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + /// + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RankEvalResponse RankEval(RankEvalRequestDescriptor descriptor) + public virtual UpdateResponse Update(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) { + var descriptor = new UpdateRequestDescriptor(index, id); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, RankEvalResponse, RankEvalRequestParameters>(descriptor); + return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); } /// /// - /// Evaluate ranked search results. + /// Update a document. /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// Update a document by running a script or passing a partial document. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. + /// + /// + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: + /// + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + /// + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RankEvalResponse RankEval(Elastic.Clients.Elasticsearch.Indices? indices) + public virtual UpdateResponse Update(TDocument document) { - var descriptor = new RankEvalRequestDescriptor(indices); + var descriptor = new UpdateRequestDescriptor(document); descriptor.BeforeRequest(); - return DoRequest, RankEvalResponse, RankEvalRequestParameters>(descriptor); + return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); } /// /// - /// Evaluate ranked search results. + /// Update a document. /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// Update a document by running a script or passing a partial document. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. + /// + /// + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: + /// + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + /// + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RankEvalResponse RankEval(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) + public virtual UpdateResponse Update(TDocument document, Action> configureRequest) { - var descriptor = new RankEvalRequestDescriptor(indices); + var descriptor = new UpdateRequestDescriptor(document); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, RankEvalResponse, RankEvalRequestParameters>(descriptor); + return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); } /// /// - /// Evaluate ranked search results. + /// Update a document. /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// Update a document by running a script or passing a partial document. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. + /// + /// + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: + /// + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + /// + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RankEvalResponse RankEval() + public virtual UpdateResponse Update(TDocument document, Elastic.Clients.Elasticsearch.IndexName index) { - var descriptor = new RankEvalRequestDescriptor(); + var descriptor = new UpdateRequestDescriptor(document, index); descriptor.BeforeRequest(); - return DoRequest, RankEvalResponse, RankEvalRequestParameters>(descriptor); + return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); } /// /// - /// Evaluate ranked search results. + /// Update a document. /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// Update a document by running a script or passing a partial document. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. + /// + /// + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: + /// + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + /// + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RankEvalResponse RankEval(Action> configureRequest) + public virtual UpdateResponse Update(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) { - var descriptor = new RankEvalRequestDescriptor(); + var descriptor = new UpdateRequestDescriptor(document, index); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, RankEvalResponse, RankEvalRequestParameters>(descriptor); + return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); } /// /// - /// Evaluate ranked search results. + /// Update a document. /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// Update a document by running a script or passing a partial document. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RankEvalResponse RankEval(RankEvalRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Evaluate ranked search results. + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + /// + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RankEvalResponse RankEval(Elastic.Clients.Elasticsearch.Indices? indices) + public virtual UpdateResponse Update(TDocument document, Elastic.Clients.Elasticsearch.Id id) { - var descriptor = new RankEvalRequestDescriptor(indices); + var descriptor = new UpdateRequestDescriptor(document, id); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); } /// /// - /// Evaluate ranked search results. + /// Update a document. /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// Update a document by running a script or passing a partial document. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. + /// + /// + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: + /// + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + /// + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RankEvalResponse RankEval(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest) + public virtual UpdateResponse Update(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) { - var descriptor = new RankEvalRequestDescriptor(indices); + var descriptor = new UpdateRequestDescriptor(document, id); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); } /// /// - /// Evaluate ranked search results. + /// Update a document. /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// Update a document by running a script or passing a partial document. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. + /// + /// + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: + /// + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + /// + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RankEvalResponse RankEval() + public virtual UpdateResponse Update(Elastic.Clients.Elasticsearch.Id id) { - var descriptor = new RankEvalRequestDescriptor(); + var descriptor = new UpdateRequestDescriptor(id); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); } /// /// - /// Evaluate ranked search results. + /// Update a document. + /// + /// + /// Update a document by running a script or passing a partial document. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. + /// + /// + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: + /// + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RankEvalResponse RankEval(Action configureRequest) + public virtual UpdateResponse Update(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) { - var descriptor = new RankEvalRequestDescriptor(); + var descriptor = new UpdateRequestDescriptor(id); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); } /// /// - /// Evaluate ranked search results. + /// Update a document. /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// Update a document by running a script or passing a partial document. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RankEvalAsync(RankEvalRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, RankEvalResponse, RankEvalRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Evaluate ranked search results. + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RankEvalAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new RankEvalRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, RankEvalResponse, RankEvalRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Evaluate ranked search results. + /// Gets the document (collocated with the shard) from the index. /// + /// + /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// Runs the specified script. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RankEvalAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RankEvalRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, RankEvalResponse, RankEvalRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Evaluate ranked search results. + /// Indexes the result. /// + /// + /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task RankEvalAsync(CancellationToken cancellationToken = default) + public virtual Task> UpdateAsync(UpdateRequestDescriptor descriptor, CancellationToken cancellationToken = default) { - var descriptor = new RankEvalRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequestAsync, RankEvalResponse, RankEvalRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); } /// /// - /// Evaluate ranked search results. + /// Update a document. /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// Update a document by running a script or passing a partial document. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RankEvalAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RankEvalRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, RankEvalResponse, RankEvalRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Evaluate ranked search results. + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RankEvalAsync(RankEvalRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Evaluate ranked search results. + /// Gets the document (collocated with the shard) from the index. /// + /// + /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// Runs the specified script. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RankEvalAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new RankEvalRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Evaluate ranked search results. + /// Indexes the result. /// + /// + /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task RankEvalAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task> UpdateAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { - var descriptor = new RankEvalRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); + var descriptor = new UpdateRequestDescriptor(index, id); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); } /// /// - /// Evaluate ranked search results. + /// Update a document. /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// Update a document by running a script or passing a partial document. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RankEvalAsync(CancellationToken cancellationToken = default) - { - var descriptor = new RankEvalRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Evaluate ranked search results. + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. /// /// - /// Evaluate the quality of ranked search results over a set of typical search queries. + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RankEvalAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RankEvalRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// 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. + /// Gets the document (collocated with the shard) from the index. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ReindexResponse Reindex(ReindexRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// + /// + /// /// - /// 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. + /// Runs the specified script. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ReindexAsync(ReindexRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// + /// + /// /// - /// 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. + /// Indexes the result. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ReindexResponse Reindex(ReindexRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, ReindexResponse, ReindexRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// 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. + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ReindexResponse Reindex() - { - var descriptor = new ReindexRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest, ReindexResponse, ReindexRequestParameters>(descriptor); - } - - /// /// - /// 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. + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ReindexResponse Reindex(Action> configureRequest) + public virtual Task> UpdateAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new ReindexRequestDescriptor(); + var descriptor = new UpdateRequestDescriptor(index, id); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, ReindexResponse, ReindexRequestParameters>(descriptor); + return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); } /// /// - /// 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. + /// Update a document. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ReindexResponse Reindex(ReindexRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// 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. + /// Update a document by running a script or passing a partial document. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. + /// + /// + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: + /// + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + /// + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). + /// + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ReindexResponse Reindex() + public virtual Task> UpdateAsync(TDocument document, CancellationToken cancellationToken = default) { - var descriptor = new ReindexRequestDescriptor(); + var descriptor = new UpdateRequestDescriptor(document); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); } /// /// - /// 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. + /// Update a document. + /// + /// + /// Update a document by running a script or passing a partial document. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. + /// + /// + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: + /// + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + /// + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ReindexResponse Reindex(Action configureRequest) + public virtual Task> UpdateAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new ReindexRequestDescriptor(); + var descriptor = new UpdateRequestDescriptor(document); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); } /// /// - /// 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. + /// Update a document. + /// + /// + /// Update a document by running a script or passing a partial document. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. + /// + /// + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: + /// + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + /// + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ReindexAsync(ReindexRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task> UpdateAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) { + var descriptor = new UpdateRequestDescriptor(document, index); descriptor.BeforeRequest(); - return DoRequestAsync, ReindexResponse, ReindexRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); } /// /// - /// 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. + /// Update a document. + /// + /// + /// Update a document by running a script or passing a partial document. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. + /// + /// + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: + /// + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + /// + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ReindexAsync(CancellationToken cancellationToken = default) + public virtual Task> UpdateAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new ReindexRequestDescriptor(); + var descriptor = new UpdateRequestDescriptor(document, index); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, ReindexResponse, ReindexRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); } /// /// - /// 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. + /// Update a document. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Update a document by running a script or passing a partial document. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. + /// + /// + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: + /// + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + /// + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ReindexAsync(Action> configureRequest, CancellationToken cancellationToken = default) + public virtual Task> UpdateAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { - var descriptor = new ReindexRequestDescriptor(); - configureRequest?.Invoke(descriptor); + var descriptor = new UpdateRequestDescriptor(document, id); descriptor.BeforeRequest(); - return DoRequestAsync, ReindexResponse, ReindexRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); } /// /// - /// 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. + /// Update a document. + /// + /// + /// Update a document by running a script or passing a partial document. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. + /// + /// + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: + /// + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + /// + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ReindexAsync(ReindexRequestDescriptor descriptor, CancellationToken cancellationToken = default) + public virtual Task> UpdateAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { + var descriptor = new UpdateRequestDescriptor(document, id); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); } /// /// - /// 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. + /// Update a document. + /// + /// + /// Update a document by running a script or passing a partial document. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. + /// + /// + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: + /// + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + /// + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ReindexAsync(CancellationToken cancellationToken = default) + public virtual Task> UpdateAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) { - var descriptor = new ReindexRequestDescriptor(); + var descriptor = new UpdateRequestDescriptor(id); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); } /// /// - /// 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. + /// Update a document. + /// + /// + /// Update a document by running a script or passing a partial document. + /// + /// + /// If the Elasticsearch security features are enabled, you must have the index or write index privilege for the target index or index alias. + /// + /// + /// The script can update, delete, or skip modifying the document. + /// The API also supports passing a partial document, which is merged into the existing document. + /// To fully replace an existing document, use the index API. + /// This operation: + /// + /// + /// + /// + /// Gets the document (collocated with the shard) from the index. + /// + /// + /// + /// + /// Runs the specified script. + /// + /// + /// + /// + /// Indexes the result. + /// + /// + /// + /// + /// The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + /// + /// + /// The _source field must be enabled to use this API. + /// In addition to _source, you can access the following variables through the ctx map: _index, _type, _id, _version, _routing, and _now (the current timestamp). /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task ReindexAsync(Action configureRequest, CancellationToken cancellationToken = default) + public virtual Task> UpdateAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new ReindexRequestDescriptor(); + var descriptor = new UpdateRequestDescriptor(id); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); } /// /// - /// Throttle a reindex operation. + /// Update documents. + /// Updates documents that match the specified query. + /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. /// /// - /// Change the number of requests per second for a particular reindex operation. + /// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: + /// + /// + /// + /// + /// read + /// + /// + /// + /// + /// index 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 an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. + /// When the versions match, the document is updated and the version number is incremented. + /// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. + /// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. + /// + /// + /// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. + /// + /// + /// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. + /// A bulk update request is performed for each batch of matching documents. + /// Any query or update failures cause the update by query request to fail and the failures are shown in the response. + /// Any update requests that completed successfully still stick, they are not rolled back. + /// + /// + /// Throttling update requests + /// + /// + /// To control the rate at which update by query issues batches of update 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 turn off 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 + /// + /// + /// Update by query supports sliced scroll to parallelize the update process. + /// This can improve efficiency and provide a convenient way to break the request down into smaller parts. + /// + /// + /// Setting slices to auto chooses a reasonable number for most data streams and indices. + /// 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 _update_by_query just automates the manual process of creating 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 point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. + /// + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// Update performance scales linearly across available resources with the number of slices. + /// + /// + /// + /// + /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. + /// + /// + /// Update the document source + /// + /// + /// Update by query supports scripts to update the document source. + /// As with the update API, you can set ctx.op to change the operation that is performed. + /// + /// + /// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. + /// The update by query operation skips updating the document and increments the noop counter. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Set ctx.op = "delete" if your script decides that the document should be deleted. + /// The update by query operation deletes the document and increments the deleted counter. + /// + /// + /// Update by query supports only index, noop, and delete. + /// Setting ctx.op to anything else is an error. + /// Setting any other field in ctx is an error. + /// This API enables you to only modify the source of matching documents; you cannot move them. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ReindexRethrottleResponse ReindexRethrottle(ReindexRethrottleRequest request) + public virtual UpdateByQueryResponse UpdateByQuery(UpdateByQueryRequest request) { request.BeforeRequest(); - return DoRequest(request); + return DoRequest(request); } /// /// - /// Throttle a reindex operation. + /// Update documents. + /// Updates documents that match the specified query. + /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. /// /// - /// Change the number of requests per second for a particular reindex operation. + /// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ReindexRethrottleAsync(ReindexRethrottleRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// + /// + /// /// - /// Throttle a reindex operation. + /// read /// + /// + /// /// - /// Change the number of requests per second for a particular reindex operation. + /// index or write /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ReindexRethrottleResponse ReindexRethrottle(ReindexRethrottleRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Throttle a reindex operation. + /// You can specify the query criteria in the request URI or the request body using the same syntax as the search API. /// /// - /// Change the number of requests per second for a particular reindex operation. + /// When you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. + /// When the versions match, the document is updated and the version number is incremented. + /// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. + /// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. + /// + /// + /// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. + /// + /// + /// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. + /// A bulk update request is performed for each batch of matching documents. + /// Any query or update failures cause the update by query request to fail and the failures are shown in the response. + /// Any update requests that completed successfully still stick, they are not rolled back. + /// + /// + /// Throttling update requests + /// + /// + /// To control the rate at which update by query issues batches of update 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 turn off 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 + /// + /// + /// Update by query supports sliced scroll to parallelize the update process. + /// This can improve efficiency and provide a convenient way to break the request down into smaller parts. + /// + /// + /// Setting slices to auto chooses a reasonable number for most data streams and indices. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ReindexRethrottleResponse ReindexRethrottle(Elastic.Clients.Elasticsearch.Id taskId) - { - var descriptor = new ReindexRethrottleRequestDescriptor(taskId); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Throttle a reindex operation. + /// Adding slices to _update_by_query just automates the manual process of creating sub-requests, which means it has some quirks: /// + /// + /// /// - /// Change the number of requests per second for a particular reindex operation. + /// You can see these requests in the tasks APIs. These sub-requests are "child" tasks of the task for the request with slices. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ReindexRethrottleResponse ReindexRethrottle(Elastic.Clients.Elasticsearch.Id taskId, Action configureRequest) - { - var descriptor = new ReindexRethrottleRequestDescriptor(taskId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Throttle a reindex operation. + /// Fetching the status of the task for the request with slices only contains the status of completed slices. /// + /// + /// /// - /// Change the number of requests per second for a particular reindex operation. + /// These sub-requests are individually addressable for things like cancellation and rethrottling. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ReindexRethrottleAsync(ReindexRethrottleRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Throttle a reindex operation. + /// Rethrottling the request with slices will rethrottle the unfinished sub-request proportionally. /// + /// + /// /// - /// Change the number of requests per second for a particular reindex operation. + /// Canceling the request with slices will cancel each sub-request. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ReindexRethrottleAsync(Elastic.Clients.Elasticsearch.Id taskId, CancellationToken cancellationToken = default) - { - var descriptor = new ReindexRethrottleRequestDescriptor(taskId); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Throttle a reindex operation. + /// 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. /// + /// + /// /// - /// Change the number of requests per second for a particular reindex operation. + /// Parameters like requests_per_second and max_docs on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task ReindexRethrottleAsync(Elastic.Clients.Elasticsearch.Id taskId, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ReindexRethrottleRequestDescriptor(taskId); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Render a search template. + /// 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. /// + /// + /// /// - /// Render a search template as a search request body. + /// If you're slicing manually or otherwise tuning automatic slicing, keep in mind that: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RenderSearchTemplateResponse RenderSearchTemplate(RenderSearchTemplateRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// + /// + /// /// - /// Render a search template. + /// 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. /// + /// + /// /// - /// Render a search template as a search request body. + /// Update performance scales linearly across available resources with the number of slices. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(RenderSearchTemplateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// + /// + /// /// - /// Render a search template. + /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. /// /// - /// Render a search template as a search request body. + /// Update the document source /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RenderSearchTemplateResponse RenderSearchTemplate(RenderSearchTemplateRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor); - } - - /// /// - /// Render a search template. + /// Update by query supports scripts to update the document source. + /// As with the update API, you can set ctx.op to change the operation that is performed. /// /// - /// Render a search template as a search request body. + /// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. + /// The update by query operation skips updating the document and increments the noop counter. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RenderSearchTemplateResponse RenderSearchTemplate(Elastic.Clients.Elasticsearch.Id? id) - { - var descriptor = new RenderSearchTemplateRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequest, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor); - } - - /// /// - /// Render a search template. + /// Set ctx.op = "delete" if your script decides that the document should be deleted. + /// The update by query operation deletes the document and increments the deleted counter. /// /// - /// Render a search template as a search request body. + /// Update by query supports only index, noop, and delete. + /// Setting ctx.op to anything else is an error. + /// Setting any other field in ctx is an error. + /// This API enables you to only modify the source of matching documents; you cannot move them. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RenderSearchTemplateResponse RenderSearchTemplate(Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest) + public virtual Task UpdateByQueryAsync(UpdateByQueryRequest request, CancellationToken cancellationToken = default) { - var descriptor = new RenderSearchTemplateRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor); + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); } /// /// - /// Render a search template. + /// Update documents. + /// Updates documents that match the specified query. + /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. /// /// - /// Render a search template as a search request body. + /// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RenderSearchTemplateResponse RenderSearchTemplate() - { - var descriptor = new RenderSearchTemplateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Render a search template. + /// read /// + /// + /// /// - /// Render a search template as a search request body. + /// index or write /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RenderSearchTemplateResponse RenderSearchTemplate(Action> configureRequest) - { - var descriptor = new RenderSearchTemplateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Render a search template. + /// You can specify the query criteria in the request URI or the request body using the same syntax as the search API. /// /// - /// Render a search template as a search request body. + /// When you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. + /// When the versions match, the document is updated and the version number is incremented. + /// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. + /// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RenderSearchTemplateResponse RenderSearchTemplate(RenderSearchTemplateRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Render a search template. + /// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. /// /// - /// Render a search template as a search request body. + /// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. + /// A bulk update request is performed for each batch of matching documents. + /// Any query or update failures cause the update by query request to fail and the failures are shown in the response. + /// Any update requests that completed successfully still stick, they are not rolled back. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RenderSearchTemplateResponse RenderSearchTemplate(Elastic.Clients.Elasticsearch.Id? id) - { - var descriptor = new RenderSearchTemplateRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Render a search template. + /// Throttling update requests /// /// - /// Render a search template as a search request body. + /// To control the rate at which update by query issues batches of update 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 turn off throttling. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RenderSearchTemplateResponse RenderSearchTemplate(Elastic.Clients.Elasticsearch.Id? id, Action configureRequest) - { - var descriptor = new RenderSearchTemplateRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Render a search template. + /// 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 + /// /// - /// Render a search template as a search request body. + /// 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". /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RenderSearchTemplateResponse RenderSearchTemplate() - { - var descriptor = new RenderSearchTemplateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Render a search template. + /// Slicing /// /// - /// Render a search template as a search request body. + /// Update by query supports sliced scroll to parallelize the update process. + /// This can improve efficiency and provide a convenient way to break the request down into smaller parts. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual RenderSearchTemplateResponse RenderSearchTemplate(Action configureRequest) - { - var descriptor = new RenderSearchTemplateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Render a search template. + /// Setting slices to auto chooses a reasonable number for most data streams and indices. + /// 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. /// /// - /// Render a search template as a search request body. + /// Adding slices to _update_by_query just automates the manual process of creating sub-requests, which means it has some quirks: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(RenderSearchTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Render a search template. + /// You can see these requests in the tasks APIs. These sub-requests are "child" tasks of the task for the request with slices. /// + /// + /// /// - /// Render a search template as a search request body. + /// Fetching the status of the task for the request with slices only contains the status of completed slices. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(Elastic.Clients.Elasticsearch.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new RenderSearchTemplateRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Render a search template. + /// These sub-requests are individually addressable for things like cancellation and rethrottling. /// + /// + /// /// - /// Render a search template as a search request body. + /// Rethrottling the request with slices will rethrottle the unfinished sub-request proportionally. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RenderSearchTemplateRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Render a search template. + /// Canceling the request with slices will cancel each sub-request. /// + /// + /// /// - /// Render a search template as a search request body. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new RenderSearchTemplateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Render a search template. + /// Parameters like requests_per_second and max_docs on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. /// + /// + /// /// - /// Render a search template as a search request body. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RenderSearchTemplateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, RenderSearchTemplateResponse, RenderSearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Render a search template. + /// If you're slicing manually or otherwise tuning automatic slicing, keep in mind that: /// + /// + /// /// - /// Render a search template as a search request body. + /// 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. + /// + /// + /// + /// + /// Update performance scales linearly across available resources with the number of slices. + /// + /// + /// + /// + /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. + /// + /// + /// Update the document source + /// + /// + /// Update by query supports scripts to update the document source. + /// As with the update API, you can set ctx.op to change the operation that is performed. + /// + /// + /// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. + /// The update by query operation skips updating the document and increments the noop counter. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(RenderSearchTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Render a search template. + /// Set ctx.op = "delete" if your script decides that the document should be deleted. + /// The update by query operation deletes the document and increments the deleted counter. /// /// - /// Render a search template as a search request body. + /// Update by query supports only index, noop, and delete. + /// Setting ctx.op to anything else is an error. + /// Setting any other field in ctx is an error. + /// This API enables you to only modify the source of matching documents; you cannot move them. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task RenderSearchTemplateAsync(Elastic.Clients.Elasticsearch.Id? id, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual UpdateByQueryResponse UpdateByQuery(UpdateByQueryRequestDescriptor descriptor) { - var descriptor = new RenderSearchTemplateRequestDescriptor(id); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequest, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor); } /// /// - /// Render a search template. + /// Update documents. + /// Updates documents that match the specified query. + /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. /// /// - /// Render a search template as a search request body. + /// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(Elastic.Clients.Elasticsearch.Id? id, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RenderSearchTemplateRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Render a search template. + /// read /// + /// + /// /// - /// Render a search template as a search request body. + /// index or write /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new RenderSearchTemplateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Render a search template. + /// You can specify the query criteria in the request URI or the request body using the same syntax as the search API. /// /// - /// Render a search template as a search request body. + /// When you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. + /// When the versions match, the document is updated and the version number is incremented. + /// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. + /// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task RenderSearchTemplateAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new RenderSearchTemplateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Run a script. - /// Runs a script and returns a result. + /// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ScriptsPainlessExecuteResponse ScriptsPainlessExecute(ScriptsPainlessExecuteRequest request) - { - request.BeforeRequest(); - return DoRequest, ScriptsPainlessExecuteRequestParameters>(request); - } - - /// /// - /// Run a script. - /// Runs a script and returns a result. + /// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. + /// A bulk update request is performed for each batch of matching documents. + /// Any query or update failures cause the update by query request to fail and the failures are shown in the response. + /// Any update requests that completed successfully still stick, they are not rolled back. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ScriptsPainlessExecuteAsync(ScriptsPainlessExecuteRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, ScriptsPainlessExecuteRequestParameters>(request, cancellationToken); - } - - /// /// - /// Run a script. - /// Runs a script and returns a result. + /// Throttling update requests /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ScriptsPainlessExecuteResponse ScriptsPainlessExecute(ScriptsPainlessExecuteRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, ScriptsPainlessExecuteResponse, ScriptsPainlessExecuteRequestParameters>(descriptor); - } - - /// /// - /// Run a script. - /// Runs a script and returns a result. + /// To control the rate at which update by query issues batches of update 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 turn off throttling. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ScriptsPainlessExecuteResponse ScriptsPainlessExecute() - { - var descriptor = new ScriptsPainlessExecuteRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest, ScriptsPainlessExecuteResponse, ScriptsPainlessExecuteRequestParameters>(descriptor); - } - - /// /// - /// Run a script. - /// Runs a script and returns a result. + /// 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: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ScriptsPainlessExecuteResponse ScriptsPainlessExecute(Action> configureRequest) - { - var descriptor = new ScriptsPainlessExecuteRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, ScriptsPainlessExecuteResponse, ScriptsPainlessExecuteRequestParameters>(descriptor); - } - - /// + /// + /// target_time = 1000 / 500 per second = 2 seconds + /// wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds + /// /// - /// Run a script. - /// Runs a script and returns a result. + /// 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". /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ScriptsPainlessExecuteAsync(ScriptsPainlessExecuteRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, ScriptsPainlessExecuteResponse, ScriptsPainlessExecuteRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Run a script. - /// Runs a script and returns a result. + /// Slicing /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ScriptsPainlessExecuteAsync(CancellationToken cancellationToken = default) - { - var descriptor = new ScriptsPainlessExecuteRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, ScriptsPainlessExecuteResponse, ScriptsPainlessExecuteRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Run a script. - /// Runs a script and returns a result. + /// Update by query supports sliced scroll to parallelize the update process. + /// This can improve efficiency and provide a convenient way to break the request down into smaller parts. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ScriptsPainlessExecuteAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new ScriptsPainlessExecuteRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, ScriptsPainlessExecuteResponse, ScriptsPainlessExecuteRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Run a scrolling search. + /// Setting slices to auto chooses a reasonable number for most data streams and indices. + /// 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. /// /// - /// IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the search_after parameter with a point in time (PIT). + /// Adding slices to _update_by_query just automates the manual process of creating sub-requests, which means it has some quirks: /// + /// + /// /// - /// The scroll API gets large sets of results from a single scrolling search request. - /// To get the necessary scroll ID, submit a search API request that includes an argument for the scroll query parameter. - /// The scroll parameter indicates how long Elasticsearch should retain the search context for the request. - /// The search response returns a scroll ID in the _scroll_id response body parameter. - /// You can then use the scroll ID with the scroll API to retrieve the next batch of results for the request. - /// If the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search. + /// You can see these requests in the tasks APIs. These sub-requests are "child" tasks of the task for the request with slices. /// + /// + /// /// - /// You can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context. + /// Fetching the status of the task for the request with slices only contains the status of completed slices. /// + /// + /// /// - /// IMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests. + /// These sub-requests are individually addressable for things like cancellation and rethrottling. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual ScrollResponse Scroll(ScrollRequest request) - { - request.BeforeRequest(); - return DoRequest, ScrollRequestParameters>(request); - } - - /// + /// + /// /// - /// Run a scrolling search. + /// Rethrottling the request with slices will rethrottle the unfinished sub-request proportionally. /// + /// + /// /// - /// IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the search_after parameter with a point in time (PIT). + /// Canceling the request with slices will cancel each sub-request. /// + /// + /// /// - /// The scroll API gets large sets of results from a single scrolling search request. - /// To get the necessary scroll ID, submit a search API request that includes an argument for the scroll query parameter. - /// The scroll parameter indicates how long Elasticsearch should retain the search context for the request. - /// The search response returns a scroll ID in the _scroll_id response body parameter. - /// You can then use the scroll ID with the scroll API to retrieve the next batch of results for the request. - /// If the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search. + /// 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. /// + /// + /// /// - /// You can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context. + /// Parameters like requests_per_second and max_docs on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. /// + /// + /// /// - /// IMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> ScrollAsync(ScrollRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, ScrollRequestParameters>(request, cancellationToken); - } - - /// + /// + /// /// - /// Run a search. + /// If you're slicing manually or otherwise tuning automatic slicing, keep in mind that: /// + /// + /// /// - /// Get search hits that match the query defined in the request. - /// You can provide search queries using the q query string parameter or the request body. - /// If both are specified, only the query parameter is used. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchResponse Search(SearchRequest request) - { - request.BeforeRequest(); - return DoRequest, SearchRequestParameters>(request); - } - - /// + /// + /// /// - /// Run a search. + /// Update performance scales linearly across available resources with the number of slices. /// + /// + /// /// - /// Get search hits that match the query defined in the request. - /// You can provide search queries using the q query string parameter or the request body. - /// If both are specified, only the query parameter is used. + /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchAsync(SearchRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, SearchRequestParameters>(request, cancellationToken); - } - - /// /// - /// Run a search. + /// Update the document source /// /// - /// Get search hits that match the query defined in the request. - /// You can provide search queries using the q query string parameter or the request body. - /// If both are specified, only the query parameter is used. + /// Update by query supports scripts to update the document source. + /// As with the update API, you can set ctx.op to change the operation that is performed. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchResponse Search(SearchRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, SearchResponse, SearchRequestParameters>(descriptor); - } - - /// /// - /// Run a search. + /// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. + /// The update by query operation skips updating the document and increments the noop counter. /// /// - /// Get search hits that match the query defined in the request. - /// You can provide search queries using the q query string parameter or the request body. - /// If both are specified, only the query parameter is used. + /// Set ctx.op = "delete" if your script decides that the document should be deleted. + /// The update by query operation deletes the document and increments the deleted counter. + /// + /// + /// Update by query supports only index, noop, and delete. + /// Setting ctx.op to anything else is an error. + /// Setting any other field in ctx is an error. + /// This API enables you to only modify the source of matching documents; you cannot move them. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchResponse Search(Elastic.Clients.Elasticsearch.Indices? indices) + public virtual UpdateByQueryResponse UpdateByQuery(Elastic.Clients.Elasticsearch.Indices indices) { - var descriptor = new SearchRequestDescriptor(indices); + var descriptor = new UpdateByQueryRequestDescriptor(indices); descriptor.BeforeRequest(); - return DoRequest, SearchResponse, SearchRequestParameters>(descriptor); + return DoRequest, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor); } /// /// - /// Run a search. + /// Update documents. + /// Updates documents that match the specified query. + /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. /// /// - /// Get search hits that match the query defined in the request. - /// You can provide search queries using the q query string parameter or the request body. - /// If both are specified, only the query parameter is used. + /// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: + /// + /// + /// + /// + /// read + /// + /// + /// + /// + /// index 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 an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. + /// When the versions match, the document is updated and the version number is incremented. + /// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. + /// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. + /// + /// + /// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchResponse Search(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) - { - var descriptor = new SearchRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, SearchResponse, SearchRequestParameters>(descriptor); - } - - /// /// - /// Run a search. + /// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. + /// A bulk update request is performed for each batch of matching documents. + /// Any query or update failures cause the update by query request to fail and the failures are shown in the response. + /// Any update requests that completed successfully still stick, they are not rolled back. /// /// - /// Get search hits that match the query defined in the request. - /// You can provide search queries using the q query string parameter or the request body. - /// If both are specified, only the query parameter is used. + /// Throttling update requests /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchResponse Search() - { - var descriptor = new SearchRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest, SearchResponse, SearchRequestParameters>(descriptor); - } - - /// /// - /// Run a search. + /// To control the rate at which update by query issues batches of update 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 turn off throttling. /// /// - /// Get search hits that match the query defined in the request. - /// You can provide search queries using the q query string parameter or the request body. - /// If both are specified, only the query parameter is used. + /// 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: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchResponse Search(Action> configureRequest) - { - var descriptor = new SearchRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, SearchResponse, SearchRequestParameters>(descriptor); - } - - /// + /// + /// target_time = 1000 / 500 per second = 2 seconds + /// wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds + /// /// - /// Run a search. + /// 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". /// /// - /// Get search hits that match the query defined in the request. - /// You can provide search queries using the q query string parameter or the request body. - /// If both are specified, only the query parameter is used. + /// Slicing /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchAsync(SearchRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, SearchResponse, SearchRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Run a search. + /// Update by query supports sliced scroll to parallelize the update process. + /// This can improve efficiency and provide a convenient way to break the request down into smaller parts. /// /// - /// Get search hits that match the query defined in the request. - /// You can provide search queries using the q query string parameter or the request body. - /// If both are specified, only the query parameter is used. + /// Setting slices to auto chooses a reasonable number for most data streams and indices. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new SearchRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchResponse, SearchRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Run a search. + /// Adding slices to _update_by_query just automates the manual process of creating sub-requests, which means it has some quirks: /// + /// + /// /// - /// Get search hits that match the query defined in the request. - /// You can provide search queries using the q query string parameter or the request body. - /// If both are specified, only the query parameter is used. + /// You can see these requests in the tasks APIs. These sub-requests are "child" tasks of the task for the request with slices. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SearchRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchResponse, SearchRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Run a search. + /// Fetching the status of the task for the request with slices only contains the status of completed slices. /// + /// + /// /// - /// Get search hits that match the query defined in the request. - /// You can provide search queries using the q query string parameter or the request body. - /// If both are specified, only the query parameter is used. + /// These sub-requests are individually addressable for things like cancellation and rethrottling. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SearchRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchResponse, SearchRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Run a search. + /// Rethrottling the request with slices will rethrottle the unfinished sub-request proportionally. /// + /// + /// /// - /// Get search hits that match the query defined in the request. - /// You can provide search queries using the q query string parameter or the request body. - /// If both are specified, only the query parameter is used. + /// Canceling the request with slices will cancel each sub-request. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SearchRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchResponse, SearchRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Search a vector tile. + /// 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. /// + /// + /// /// - /// Search a vector tile for geospatial values. + /// Parameters like requests_per_second and max_docs on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchMvtResponse SearchMvt(SearchMvtRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// + /// + /// /// - /// Search a vector tile. + /// 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. /// + /// + /// /// - /// Search a vector tile for geospatial values. + /// If you're slicing manually or otherwise tuning automatic slicing, keep in mind that: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchMvtAsync(SearchMvtRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// + /// + /// /// - /// Search a vector tile. + /// 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. /// + /// + /// /// - /// Search a vector tile for geospatial values. + /// Update performance scales linearly across available resources with the number of slices. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchMvtResponse SearchMvt(SearchMvtRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, SearchMvtResponse, SearchMvtRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Search a vector tile. + /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. /// /// - /// Search a vector tile for geospatial values. + /// Update the document source /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchMvtResponse SearchMvt(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y) - { - var descriptor = new SearchMvtRequestDescriptor(indices, field, zoom, x, y); - descriptor.BeforeRequest(); - return DoRequest, SearchMvtResponse, SearchMvtRequestParameters>(descriptor); - } - - /// /// - /// Search a vector tile. + /// Update by query supports scripts to update the document source. + /// As with the update API, you can set ctx.op to change the operation that is performed. /// /// - /// Search a vector tile for geospatial values. + /// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. + /// The update by query operation skips updating the document and increments the noop counter. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Set ctx.op = "delete" if your script decides that the document should be deleted. + /// The update by query operation deletes the document and increments the deleted counter. + /// + /// + /// Update by query supports only index, noop, and delete. + /// Setting ctx.op to anything else is an error. + /// Setting any other field in ctx is an error. + /// This API enables you to only modify the source of matching documents; you cannot move them. + /// + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchMvtResponse SearchMvt(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y, Action> configureRequest) + public virtual UpdateByQueryResponse UpdateByQuery(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest) { - var descriptor = new SearchMvtRequestDescriptor(indices, field, zoom, x, y); + var descriptor = new UpdateByQueryRequestDescriptor(indices); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, SearchMvtResponse, SearchMvtRequestParameters>(descriptor); + return DoRequest, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor); } /// /// - /// Search a vector tile. + /// Update documents. + /// Updates documents that match the specified query. + /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. /// /// - /// Search a vector tile for geospatial values. + /// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchMvtResponse SearchMvt(Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y) - { - var descriptor = new SearchMvtRequestDescriptor(field, zoom, x, y); - descriptor.BeforeRequest(); - return DoRequest, SearchMvtResponse, SearchMvtRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Search a vector tile. + /// read /// + /// + /// /// - /// Search a vector tile for geospatial values. + /// index or write /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchMvtResponse SearchMvt(Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y, Action> configureRequest) - { - var descriptor = new SearchMvtRequestDescriptor(field, zoom, x, y); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, SearchMvtResponse, SearchMvtRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Search a vector tile. + /// You can specify the query criteria in the request URI or the request body using the same syntax as the search API. /// /// - /// Search a vector tile for geospatial values. + /// When you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. + /// When the versions match, the document is updated and the version number is incremented. + /// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. + /// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchMvtResponse SearchMvt(SearchMvtRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Search a vector tile. + /// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. /// /// - /// Search a vector tile for geospatial values. + /// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. + /// A bulk update request is performed for each batch of matching documents. + /// Any query or update failures cause the update by query request to fail and the failures are shown in the response. + /// Any update requests that completed successfully still stick, they are not rolled back. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchMvtResponse SearchMvt(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y) - { - var descriptor = new SearchMvtRequestDescriptor(indices, field, zoom, x, y); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Search a vector tile. + /// Throttling update requests /// /// - /// Search a vector tile for geospatial values. + /// To control the rate at which update by query issues batches of update 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 turn off throttling. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchMvtResponse SearchMvt(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y, Action configureRequest) - { - var descriptor = new SearchMvtRequestDescriptor(indices, field, zoom, x, y); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Search a vector tile. + /// 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 + /// /// - /// Search a vector tile for geospatial values. + /// 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". /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchMvtAsync(SearchMvtRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, SearchMvtResponse, SearchMvtRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Search a vector tile. + /// Slicing /// /// - /// Search a vector tile for geospatial values. + /// Update by query supports sliced scroll to parallelize the update process. + /// This can improve efficiency and provide a convenient way to break the request down into smaller parts. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchMvtAsync(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y, CancellationToken cancellationToken = default) - { - var descriptor = new SearchMvtRequestDescriptor(indices, field, zoom, x, y); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchMvtResponse, SearchMvtRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Search a vector tile. + /// Setting slices to auto chooses a reasonable number for most data streams and indices. + /// 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. /// /// - /// Search a vector tile for geospatial values. + /// Adding slices to _update_by_query just automates the manual process of creating sub-requests, which means it has some quirks: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchMvtAsync(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SearchMvtRequestDescriptor(indices, field, zoom, x, y); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchMvtResponse, SearchMvtRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Search a vector tile. + /// 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. /// + /// + /// /// - /// Search a vector tile for geospatial values. + /// These sub-requests are individually addressable for things like cancellation and rethrottling. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchMvtAsync(Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y, CancellationToken cancellationToken = default) - { - var descriptor = new SearchMvtRequestDescriptor(field, zoom, x, y); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchMvtResponse, SearchMvtRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Search a vector tile. + /// Rethrottling the request with slices will rethrottle the unfinished sub-request proportionally. /// + /// + /// /// - /// Search a vector tile for geospatial values. + /// Canceling the request with slices will cancel each sub-request. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchMvtAsync(Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SearchMvtRequestDescriptor(field, zoom, x, y); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchMvtResponse, SearchMvtRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Search a vector tile. + /// 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. /// + /// + /// /// - /// Search a vector tile for geospatial values. + /// Parameters like requests_per_second and max_docs on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchMvtAsync(SearchMvtRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Search a vector tile. + /// 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. /// + /// + /// /// - /// Search a vector tile for geospatial values. + /// If you're slicing manually or otherwise tuning automatic slicing, keep in mind that: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchMvtAsync(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y, CancellationToken cancellationToken = default) - { - var descriptor = new SearchMvtRequestDescriptor(indices, field, zoom, x, y); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Search a vector tile. + /// 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. /// + /// + /// /// - /// Search a vector tile for geospatial values. + /// Update performance scales linearly across available resources with the number of slices. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchMvtAsync(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Field field, int zoom, int x, int y, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SearchMvtRequestDescriptor(indices, field, zoom, x, y); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get the search shards. + /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// Update the document source /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchShardsResponse SearchShards(SearchShardsRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// /// - /// Get the search shards. + /// Update by query supports scripts to update the document source. + /// As with the update API, you can set ctx.op to change the operation that is performed. /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. + /// The update by query operation skips updating the document and increments the noop counter. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchShardsAsync(SearchShardsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// /// - /// Get the search shards. + /// Set ctx.op = "delete" if your script decides that the document should be deleted. + /// The update by query operation deletes the document and increments the deleted counter. /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// Update by query supports only index, noop, and delete. + /// Setting ctx.op to anything else is an error. + /// Setting any other field in ctx is an error. + /// This API enables you to only modify the source of matching documents; you cannot move them. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchShardsResponse SearchShards(SearchShardsRequestDescriptor descriptor) + public virtual UpdateByQueryResponse UpdateByQuery() { + var descriptor = new UpdateByQueryRequestDescriptor(); descriptor.BeforeRequest(); - return DoRequest, SearchShardsResponse, SearchShardsRequestParameters>(descriptor); + return DoRequest, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor); } /// /// - /// Get the search shards. + /// Update documents. + /// Updates documents that match the specified query. + /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchShardsResponse SearchShards(Elastic.Clients.Elasticsearch.Indices? indices) - { - var descriptor = new SearchShardsRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequest, SearchShardsResponse, SearchShardsRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get the search shards. + /// read /// + /// + /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// index or write /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchShardsResponse SearchShards(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) - { - var descriptor = new SearchShardsRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, SearchShardsResponse, SearchShardsRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get the search shards. + /// You can specify the query criteria in the request URI or the request body using the same syntax as the search API. /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// When you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. + /// When the versions match, the document is updated and the version number is incremented. + /// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. + /// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchShardsResponse SearchShards() - { - var descriptor = new SearchShardsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest, SearchShardsResponse, SearchShardsRequestParameters>(descriptor); - } - - /// /// - /// Get the search shards. + /// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. + /// A bulk update request is performed for each batch of matching documents. + /// Any query or update failures cause the update by query request to fail and the failures are shown in the response. + /// Any update requests that completed successfully still stick, they are not rolled back. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchShardsResponse SearchShards(Action> configureRequest) - { - var descriptor = new SearchShardsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, SearchShardsResponse, SearchShardsRequestParameters>(descriptor); - } - - /// /// - /// Get the search shards. + /// Throttling update requests /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// To control the rate at which update by query issues batches of update 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 turn off throttling. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchShardsResponse SearchShards(SearchShardsRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Get the search shards. + /// 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 + /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// 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". /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchShardsResponse SearchShards(Elastic.Clients.Elasticsearch.Indices? indices) - { - var descriptor = new SearchShardsRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Get the search shards. + /// Slicing /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// Update by query supports sliced scroll to parallelize the update process. + /// This can improve efficiency and provide a convenient way to break the request down into smaller parts. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchShardsResponse SearchShards(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest) - { - var descriptor = new SearchShardsRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Get the search shards. + /// Setting slices to auto chooses a reasonable number for most data streams and indices. + /// 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. /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// Adding slices to _update_by_query just automates the manual process of creating sub-requests, which means it has some quirks: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchShardsResponse SearchShards() - { - var descriptor = new SearchShardsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Get the search shards. + /// You can see these requests in the tasks APIs. These sub-requests are "child" tasks of the task for the request with slices. /// + /// + /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// Fetching the status of the task for the request with slices only contains the status of completed slices. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchShardsResponse SearchShards(Action configureRequest) - { - var descriptor = new SearchShardsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Get the search shards. + /// These sub-requests are individually addressable for things like cancellation and rethrottling. /// + /// + /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// Rethrottling the request with slices will rethrottle the unfinished sub-request proportionally. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchShardsAsync(SearchShardsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, SearchShardsResponse, SearchShardsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get the search shards. + /// Canceling the request with slices will cancel each sub-request. /// + /// + /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchShardsAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new SearchShardsRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchShardsResponse, SearchShardsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get the search shards. + /// Parameters like requests_per_second and max_docs on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. /// + /// + /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// 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. + /// + /// + /// + /// + /// Update performance scales linearly across available resources with the number of slices. + /// + /// + /// + /// + /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. + /// + /// + /// Update the document source /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchShardsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SearchShardsRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchShardsResponse, SearchShardsRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get the search shards. + /// Update by query supports scripts to update the document source. + /// As with the update API, you can set ctx.op to change the operation that is performed. /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. + /// The update by query operation skips updating the document and increments the noop counter. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchShardsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SearchShardsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchShardsResponse, SearchShardsRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get the search shards. + /// Set ctx.op = "delete" if your script decides that the document should be deleted. + /// The update by query operation deletes the document and increments the deleted counter. /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// Update by query supports only index, noop, and delete. + /// Setting ctx.op to anything else is an error. + /// Setting any other field in ctx is an error. + /// This API enables you to only modify the source of matching documents; you cannot move them. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task SearchShardsAsync(Action> configureRequest, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual UpdateByQueryResponse UpdateByQuery(Action> configureRequest) { - var descriptor = new SearchShardsRequestDescriptor(); + var descriptor = new UpdateByQueryRequestDescriptor(); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, SearchShardsResponse, SearchShardsRequestParameters>(descriptor, cancellationToken); + return DoRequest, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor); } /// /// - /// Get the search shards. + /// Update documents. + /// Updates documents that match the specified query. + /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchShardsAsync(SearchShardsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get the search shards. + /// read /// + /// + /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// index or write /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchShardsAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new SearchShardsRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get the search shards. + /// You can specify the query criteria in the request URI or the request body using the same syntax as the search API. /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// When you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. + /// When the versions match, the document is updated and the version number is incremented. + /// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. + /// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchShardsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SearchShardsRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Get the search shards. + /// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. + /// A bulk update request is performed for each batch of matching documents. + /// Any query or update failures cause the update by query request to fail and the failures are shown in the response. + /// Any update requests that completed successfully still stick, they are not rolled back. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchShardsAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SearchShardsRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Get the search shards. + /// Throttling update requests /// /// - /// Get the indices and shards that a search request would be run against. - /// This information can be useful for working out issues or planning optimizations with routing and shard preferences. - /// When filtered aliases are used, the filter is returned as part of the indices section. + /// To control the rate at which update by query issues batches of update 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 turn off throttling. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SearchShardsAsync(Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SearchShardsRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Run a search with a search template. + /// 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: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchTemplateResponse SearchTemplate(SearchTemplateRequest request) - { - request.BeforeRequest(); - return DoRequest, SearchTemplateRequestParameters>(request); - } - - /// + /// + /// target_time = 1000 / 500 per second = 2 seconds + /// wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds + /// /// - /// Run a search with a search template. + /// 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". /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchTemplateAsync(SearchTemplateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, SearchTemplateRequestParameters>(request, cancellationToken); - } - - /// /// - /// Run a search with a search template. + /// Slicing /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchTemplateResponse SearchTemplate(SearchTemplateRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor); - } - - /// /// - /// Run a search with a search template. + /// Update by query supports sliced scroll to parallelize the update process. + /// This can improve efficiency and provide a convenient way to break the request down into smaller parts. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchTemplateResponse SearchTemplate(Elastic.Clients.Elasticsearch.Indices? indices) - { - var descriptor = new SearchTemplateRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequest, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor); - } - - /// /// - /// Run a search with a search template. + /// Setting slices to auto chooses a reasonable number for most data streams and indices. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchTemplateResponse SearchTemplate(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest) - { - var descriptor = new SearchTemplateRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor); - } - - /// /// - /// Run a search with a search template. + /// Adding slices to _update_by_query just automates the manual process of creating sub-requests, which means it has some quirks: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchTemplateResponse SearchTemplate() - { - var descriptor = new SearchTemplateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Run a search with a search template. + /// You can see these requests in the tasks APIs. These sub-requests are "child" tasks of the task for the request with slices. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SearchTemplateResponse SearchTemplate(Action> configureRequest) - { - var descriptor = new SearchTemplateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Run a search with a search template. + /// Fetching the status of the task for the request with slices only contains the status of completed slices. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchTemplateAsync(SearchTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Run a search with a search template. + /// These sub-requests are individually addressable for things like cancellation and rethrottling. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchTemplateAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default) - { - var descriptor = new SearchTemplateRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Run a search with a search template. + /// Rethrottling the request with slices will rethrottle the unfinished sub-request proportionally. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchTemplateAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SearchTemplateRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Run a search with a search template. + /// Canceling the request with slices will cancel each sub-request. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchTemplateAsync(CancellationToken cancellationToken = default) - { - var descriptor = new SearchTemplateRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Run a search with a search template. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> SearchTemplateAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SearchTemplateRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SearchTemplateResponse, SearchTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get terms in an index. + /// Parameters like requests_per_second and max_docs on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. /// + /// + /// /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. + /// 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. + /// + /// + /// + /// + /// Update performance scales linearly across available resources with the number of slices. + /// + /// + /// + /// + /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. + /// + /// + /// Update the document source + /// + /// + /// Update by query supports scripts to update the document source. + /// As with the update API, you can set ctx.op to change the operation that is performed. + /// + /// + /// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. + /// The update by query operation skips updating the document and increments the noop counter. /// /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. + /// Set ctx.op = "delete" if your script decides that the document should be deleted. + /// The update by query operation deletes the document and increments the deleted counter. /// /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// Update by query supports only index, noop, and delete. + /// Setting ctx.op to anything else is an error. + /// Setting any other field in ctx is an error. + /// This API enables you to only modify the source of matching documents; you cannot move them. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermsEnumResponse TermsEnum(TermsEnumRequest request) + public virtual UpdateByQueryResponse UpdateByQuery(UpdateByQueryRequestDescriptor descriptor) { - request.BeforeRequest(); - return DoRequest(request); + descriptor.BeforeRequest(); + return DoRequest(descriptor); } /// /// - /// Get terms in an index. + /// Update documents. + /// Updates documents that match the specified query. + /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. /// /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. + /// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: /// + /// + /// /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. + /// read /// + /// + /// /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// index 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 an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. + /// When the versions match, the document is updated and the version number is incremented. + /// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. + /// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. + /// + /// + /// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermsEnumAsync(TermsEnumRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// /// - /// Get terms in an index. + /// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. + /// A bulk update request is performed for each batch of matching documents. + /// Any query or update failures cause the update by query request to fail and the failures are shown in the response. + /// Any update requests that completed successfully still stick, they are not rolled back. /// /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. + /// Throttling update requests /// /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. + /// To control the rate at which update by query issues batches of update 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 turn off throttling. /// /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// 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: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermsEnumResponse TermsEnum(TermsEnumRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, TermsEnumResponse, TermsEnumRequestParameters>(descriptor); - } - - /// + /// + /// target_time = 1000 / 500 per second = 2 seconds + /// wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds + /// /// - /// Get terms in an index. + /// 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". /// /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. + /// Slicing /// /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. + /// Update by query supports sliced scroll to parallelize the update process. + /// This can improve efficiency and provide a convenient way to break the request down into smaller parts. /// /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// Setting slices to auto chooses a reasonable number for most data streams and indices. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermsEnumResponse TermsEnum(Elastic.Clients.Elasticsearch.IndexName index) - { - var descriptor = new TermsEnumRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequest, TermsEnumResponse, TermsEnumRequestParameters>(descriptor); - } - - /// /// - /// Get terms in an index. + /// Adding slices to _update_by_query just automates the manual process of creating sub-requests, which means it has some quirks: /// + /// + /// /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. + /// You can see these requests in the tasks APIs. These sub-requests are "child" tasks of the task for the request with slices. /// + /// + /// /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. + /// Fetching the status of the task for the request with slices only contains the status of completed slices. /// + /// + /// /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// These sub-requests are individually addressable for things like cancellation and rethrottling. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermsEnumResponse TermsEnum(Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) - { - var descriptor = new TermsEnumRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, TermsEnumResponse, TermsEnumRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get terms in an index. + /// Rethrottling the request with slices will rethrottle the unfinished sub-request proportionally. /// + /// + /// /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. + /// Canceling the request with slices will cancel each sub-request. /// + /// + /// /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. + /// 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. /// + /// + /// /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// Parameters like requests_per_second and max_docs on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermsEnumResponse TermsEnum() - { - var descriptor = new TermsEnumRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest, TermsEnumResponse, TermsEnumRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get terms in an index. + /// 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. /// + /// + /// /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. + /// If you're slicing manually or otherwise tuning automatic slicing, keep in mind that: /// + /// + /// /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. + /// 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. /// + /// + /// /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// Update performance scales linearly across available resources with the number of slices. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermsEnumResponse TermsEnum(Action> configureRequest) - { - var descriptor = new TermsEnumRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, TermsEnumResponse, TermsEnumRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get terms in an index. + /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. /// /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. + /// Update the document source + /// + /// + /// Update by query supports scripts to update the document source. + /// As with the update API, you can set ctx.op to change the operation that is performed. + /// + /// + /// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. + /// The update by query operation skips updating the document and increments the noop counter. /// /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. + /// Set ctx.op = "delete" if your script decides that the document should be deleted. + /// The update by query operation deletes the document and increments the deleted counter. /// /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// Update by query supports only index, noop, and delete. + /// Setting ctx.op to anything else is an error. + /// Setting any other field in ctx is an error. + /// This API enables you to only modify the source of matching documents; you cannot move them. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermsEnumResponse TermsEnum(TermsEnumRequestDescriptor descriptor) + public virtual UpdateByQueryResponse UpdateByQuery(Elastic.Clients.Elasticsearch.Indices indices) { + var descriptor = new UpdateByQueryRequestDescriptor(indices); descriptor.BeforeRequest(); - return DoRequest(descriptor); + return DoRequest(descriptor); } /// /// - /// Get terms in an index. + /// Update documents. + /// Updates documents that match the specified query. + /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. /// /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. + /// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: /// + /// + /// /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. + /// read /// + /// + /// /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// index or write /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermsEnumResponse TermsEnum(Elastic.Clients.Elasticsearch.IndexName index) - { - var descriptor = new TermsEnumRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Get terms in an index. + /// You can specify the query criteria in the request URI or the request body using the same syntax as the search API. /// /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. + /// When you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. + /// When the versions match, the document is updated and the version number is incremented. + /// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. + /// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. /// /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. + /// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. /// /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. + /// A bulk update request is performed for each batch of matching documents. + /// Any query or update failures cause the update by query request to fail and the failures are shown in the response. + /// Any update requests that completed successfully still stick, they are not rolled back. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermsEnumResponse TermsEnum(Elastic.Clients.Elasticsearch.IndexName index, Action configureRequest) - { - var descriptor = new TermsEnumRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Get terms in an index. + /// Throttling update requests /// /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. + /// To control the rate at which update by query issues batches of update 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 turn off throttling. /// /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. + /// 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 + /// /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// 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". /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermsEnumAsync(TermsEnumRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, TermsEnumResponse, TermsEnumRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get terms in an index. + /// Slicing /// /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. + /// Update by query supports sliced scroll to parallelize the update process. + /// This can improve efficiency and provide a convenient way to break the request down into smaller parts. /// /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. + /// Setting slices to auto chooses a reasonable number for most data streams and indices. + /// 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. /// /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// Adding slices to _update_by_query just automates the manual process of creating sub-requests, which means it has some quirks: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermsEnumAsync(Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new TermsEnumRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequestAsync, TermsEnumResponse, TermsEnumRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get terms in an index. + /// You can see these requests in the tasks APIs. These sub-requests are "child" tasks of the task for the request with slices. /// + /// + /// /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. + /// Fetching the status of the task for the request with slices only contains the status of completed slices. /// + /// + /// /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. + /// These sub-requests are individually addressable for things like cancellation and rethrottling. /// + /// + /// /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// Rethrottling the request with slices will rethrottle the unfinished sub-request proportionally. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermsEnumAsync(Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TermsEnumRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, TermsEnumResponse, TermsEnumRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get terms in an index. + /// Canceling the request with slices will cancel each sub-request. /// + /// + /// /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. + /// 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. /// + /// + /// /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. + /// Parameters like requests_per_second and max_docs on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. /// + /// + /// /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermsEnumAsync(CancellationToken cancellationToken = default) - { - var descriptor = new TermsEnumRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, TermsEnumResponse, TermsEnumRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get terms in an index. + /// If you're slicing manually or otherwise tuning automatic slicing, keep in mind that: /// + /// + /// /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. + /// 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. /// + /// + /// /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. + /// Update performance scales linearly across available resources with the number of slices. /// + /// + /// /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermsEnumAsync(Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TermsEnumRequestDescriptor(); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, TermsEnumResponse, TermsEnumRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get terms in an index. + /// Update the document source /// /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. + /// Update by query supports scripts to update the document source. + /// As with the update API, you can set ctx.op to change the operation that is performed. + /// + /// + /// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. + /// The update by query operation skips updating the document and increments the noop counter. /// /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. + /// Set ctx.op = "delete" if your script decides that the document should be deleted. + /// The update by query operation deletes the document and increments the deleted counter. /// /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// Update by query supports only index, noop, and delete. + /// Setting ctx.op to anything else is an error. + /// Setting any other field in ctx is an error. + /// This API enables you to only modify the source of matching documents; you cannot move them. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task TermsEnumAsync(TermsEnumRequestDescriptor descriptor, CancellationToken cancellationToken = default) + [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] + public virtual UpdateByQueryResponse UpdateByQuery(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest) { + var descriptor = new UpdateByQueryRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); + return DoRequest(descriptor); } /// /// - /// Get terms in an index. + /// Update documents. + /// Updates documents that match the specified query. + /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. /// /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. + /// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: /// + /// + /// /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. + /// read /// + /// + /// /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// index or write /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermsEnumAsync(Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new TermsEnumRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get terms in an index. + /// You can specify the query criteria in the request URI or the request body using the same syntax as the search API. /// /// - /// Discover terms that match a partial string in an index. - /// This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. + /// When you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. + /// When the versions match, the document is updated and the version number is incremented. + /// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. + /// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. /// /// - /// If the complete property in the response is false, the returned terms set may be incomplete and should be treated as approximate. - /// This can occur due to a few reasons, such as a request timeout or a node error. + /// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. /// /// - /// NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. + /// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. + /// A bulk update request is performed for each batch of matching documents. + /// Any query or update failures cause the update by query request to fail and the failures are shown in the response. + /// Any update requests that completed successfully still stick, they are not rolled back. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermsEnumAsync(Elastic.Clients.Elasticsearch.IndexName index, Action configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TermsEnumRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync(descriptor, cancellationToken); - } - - /// /// - /// Get term vector information. + /// Throttling update requests /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// To control the rate at which update by query issues batches of update 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 turn off throttling. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermVectorsResponse Termvectors(TermVectorsRequest request) - { - request.BeforeRequest(); - return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(request); - } - - /// /// - /// Get term vector information. + /// 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 + /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// 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". /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(TermVectorsRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(request, cancellationToken); - } - - /// /// - /// Get term vector information. + /// Slicing /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// Update by query supports sliced scroll to parallelize the update process. + /// This can improve efficiency and provide a convenient way to break the request down into smaller parts. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermVectorsResponse Termvectors(TermVectorsRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); - } - - /// /// - /// Get term vector information. + /// Setting slices to auto chooses a reasonable number for most data streams and indices. + /// 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. /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// Adding slices to _update_by_query just automates the manual process of creating sub-requests, which means it has some quirks: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermVectorsResponse Termvectors(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id? id) - { - var descriptor = new TermVectorsRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get term vector information. + /// You can see these requests in the tasks APIs. These sub-requests are "child" tasks of the task for the request with slices. /// + /// + /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// Fetching the status of the task for the request with slices only contains the status of completed slices. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermVectorsResponse Termvectors(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest) - { - var descriptor = new TermVectorsRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get term vector information. + /// These sub-requests are individually addressable for things like cancellation and rethrottling. /// + /// + /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// Rethrottling the request with slices will rethrottle the unfinished sub-request proportionally. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermVectorsResponse Termvectors(Elastic.Clients.Elasticsearch.IndexName index) - { - var descriptor = new TermVectorsRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get term vector information. + /// Canceling the request with slices will cancel each sub-request. /// + /// + /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermVectorsResponse Termvectors(Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) - { - var descriptor = new TermVectorsRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get term vector information. + /// Parameters like requests_per_second and max_docs on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. /// + /// + /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermVectorsResponse Termvectors(TDocument document) - { - var descriptor = new TermVectorsRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get term vector information. + /// If you're slicing manually or otherwise tuning automatic slicing, keep in mind that: /// + /// + /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermVectorsResponse Termvectors(TDocument document, Action> configureRequest) - { - var descriptor = new TermVectorsRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get term vector information. + /// Update performance scales linearly across available resources with the number of slices. /// + /// + /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermVectorsResponse Termvectors(TDocument document, Elastic.Clients.Elasticsearch.IndexName index) - { - var descriptor = new TermVectorsRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); - } - - /// /// - /// Get term vector information. + /// Update the document source /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// Update by query supports scripts to update the document source. + /// As with the update API, you can set ctx.op to change the operation that is performed. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermVectorsResponse Termvectors(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) - { - var descriptor = new TermVectorsRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); - } - - /// /// - /// Get term vector information. + /// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. + /// The update by query operation skips updating the document and increments the noop counter. /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// Set ctx.op = "delete" if your script decides that the document should be deleted. + /// The update by query operation deletes the document and increments the deleted counter. + /// + /// + /// Update by query supports only index, noop, and delete. + /// Setting ctx.op to anything else is an error. + /// Setting any other field in ctx is an error. + /// This API enables you to only modify the source of matching documents; you cannot move them. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermVectorsResponse Termvectors(TDocument document, Elastic.Clients.Elasticsearch.Id? id) + public virtual Task UpdateByQueryAsync(UpdateByQueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) { - var descriptor = new TermVectorsRequestDescriptor(document, id); descriptor.BeforeRequest(); - return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); + return DoRequestAsync, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor, cancellationToken); } /// /// - /// Get term vector information. + /// Update documents. + /// Updates documents that match the specified query. + /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermVectorsResponse Termvectors(TDocument document, Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest) - { - var descriptor = new TermVectorsRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get term vector information. + /// read /// + /// + /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// index or write /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermVectorsResponse Termvectors(Elastic.Clients.Elasticsearch.Id? id) - { - var descriptor = new TermVectorsRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Get term vector information. + /// You can specify the query criteria in the request URI or the request body using the same syntax as the search API. /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// When you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. + /// When the versions match, the document is updated and the version number is incremented. + /// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. + /// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual TermVectorsResponse Termvectors(Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest) - { - var descriptor = new TermVectorsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, TermVectorsResponse, TermVectorsRequestParameters>(descriptor); - } - - /// /// - /// Get term vector information. + /// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. + /// A bulk update request is performed for each batch of matching documents. + /// Any query or update failures cause the update by query request to fail and the failures are shown in the response. + /// Any update requests that completed successfully still stick, they are not rolled back. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(TermVectorsRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get term vector information. + /// Throttling update requests /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// To control the rate at which update by query issues batches of update 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 turn off throttling. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get term vector information. + /// 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 + /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// 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". /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get term vector information. + /// Slicing /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// Update by query supports sliced scroll to parallelize the update process. + /// This can improve efficiency and provide a convenient way to break the request down into smaller parts. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(index); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get term vector information. + /// Setting slices to auto chooses a reasonable number for most data streams and indices. + /// 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. /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// Adding slices to _update_by_query just automates the manual process of creating sub-requests, which means it has some quirks: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get term vector information. + /// You can see these requests in the tasks APIs. These sub-requests are "child" tasks of the task for the request with slices. /// + /// + /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// Fetching the status of the task for the request with slices only contains the status of completed slices. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(TDocument document, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get term vector information. + /// These sub-requests are individually addressable for things like cancellation and rethrottling. /// + /// + /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// Rethrottling the request with slices will rethrottle the unfinished sub-request proportionally. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get term vector information. + /// Canceling the request with slices will cancel each sub-request. /// + /// + /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get term vector information. + /// Parameters like requests_per_second and max_docs on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. /// + /// + /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get term vector information. + /// If you're slicing manually or otherwise tuning automatic slicing, keep in mind that: /// + /// + /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(TDocument document, Elastic.Clients.Elasticsearch.Id? id, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Get term vector information. + /// Update performance scales linearly across available resources with the number of slices. /// + /// + /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. + /// + /// + /// Update the document source + /// + /// + /// Update by query supports scripts to update the document source. + /// As with the update API, you can set ctx.op to change the operation that is performed. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(TDocument document, Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Get term vector information. + /// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. + /// The update by query operation skips updating the document and increments the noop counter. /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// Set ctx.op = "delete" if your script decides that the document should be deleted. + /// The update by query operation deletes the document and increments the deleted counter. + /// + /// + /// Update by query supports only index, noop, and delete. + /// Setting ctx.op to anything else is an error. + /// Setting any other field in ctx is an error. + /// This API enables you to only modify the source of matching documents; you cannot move them. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task TermvectorsAsync(Elastic.Clients.Elasticsearch.Id? id, CancellationToken cancellationToken = default) + public virtual Task UpdateByQueryAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) { - var descriptor = new TermVectorsRequestDescriptor(id); + var descriptor = new UpdateByQueryRequestDescriptor(indices); descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor, cancellationToken); } /// /// - /// Get term vector information. + /// Update documents. + /// Updates documents that match the specified query. + /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. /// /// - /// Get information and statistics about terms in the fields of a particular document. + /// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task TermvectorsAsync(Elastic.Clients.Elasticsearch.Id? id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new TermVectorsRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, TermVectorsResponse, TermVectorsRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// read /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateResponse Update(UpdateRequest request) - { - request.BeforeRequest(); - return DoRequest, UpdateResponse, UpdateRequestParameters>(request); - } - - /// + /// + /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// index or write /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(UpdateRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(request, cancellationToken); - } - - /// + /// + /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// You can specify the query criteria in the request URI or the request body using the same syntax as the search API. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateResponse Update(UpdateRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); - } - - /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// When you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. + /// When the versions match, the document is updated and the version number is incremented. + /// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. + /// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateResponse Update(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new UpdateRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); - } - - /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateResponse Update(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) - { - var descriptor = new UpdateRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); - } - - /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. + /// A bulk update request is performed for each batch of matching documents. + /// Any query or update failures cause the update by query request to fail and the failures are shown in the response. + /// Any update requests that completed successfully still stick, they are not rolled back. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateResponse Update(TDocument document) - { - var descriptor = new UpdateRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); - } - - /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// Throttling update requests /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateResponse Update(TDocument document, Action> configureRequest) - { - var descriptor = new UpdateRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); - } - - /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// To control the rate at which update by query issues batches of update 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 turn off throttling. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateResponse Update(TDocument document, Elastic.Clients.Elasticsearch.IndexName index) - { - var descriptor = new UpdateRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); - } - - /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// 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: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateResponse Update(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest) - { - var descriptor = new UpdateRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); - } - - /// + /// + /// target_time = 1000 / 500 per second = 2 seconds + /// wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds + /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// 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". /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateResponse Update(TDocument document, Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new UpdateRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); - } - - /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// Slicing /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateResponse Update(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) - { - var descriptor = new UpdateRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); - } - - /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// Update by query supports sliced scroll to parallelize the update process. + /// This can improve efficiency and provide a convenient way to break the request down into smaller parts. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateResponse Update(Elastic.Clients.Elasticsearch.Id id) - { - var descriptor = new UpdateRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); - } - - /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// Setting slices to auto chooses a reasonable number for most data streams and indices. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateResponse Update(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest) - { - var descriptor = new UpdateRequestDescriptor(id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, UpdateResponse, UpdateRequestParameters>(descriptor); - } - - /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// Adding slices to _update_by_query just automates the manual process of creating sub-requests, which means it has some quirks: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(UpdateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// You can see these requests in the tasks APIs. These sub-requests are "child" tasks of the task for the request with slices. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateRequestDescriptor(index, id); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// Fetching the status of the task for the request with slices only contains the status of completed slices. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateRequestDescriptor(index, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// These sub-requests are individually addressable for things like cancellation and rethrottling. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(TDocument document, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateRequestDescriptor(document); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// Rethrottling the request with slices will rethrottle the unfinished sub-request proportionally. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(TDocument document, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateRequestDescriptor(document); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// Canceling the request with slices will cancel each sub-request. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateRequestDescriptor(document, index); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// 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 point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. + /// + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// Update performance scales linearly across available resources with the number of slices. + /// + /// + /// + /// + /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(TDocument document, Elastic.Clients.Elasticsearch.IndexName index, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateRequestDescriptor(document, index); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// Update the document source /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateRequestDescriptor(document, id); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// Update by query supports scripts to update the document source. + /// As with the update API, you can set ctx.op to change the operation that is performed. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(TDocument document, Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateRequestDescriptor(document, id); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. + /// The update by query operation skips updating the document and increments the noop counter. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task> UpdateAsync(Elastic.Clients.Elasticsearch.Id id, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateRequestDescriptor(id); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Update a document. - /// Updates a document by running a script or passing a partial document. + /// Set ctx.op = "delete" if your script decides that the document should be deleted. + /// The update by query operation deletes the document and increments the deleted counter. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Update by query supports only index, noop, and delete. + /// Setting ctx.op to anything else is an error. + /// Setting any other field in ctx is an error. + /// This API enables you to only modify the source of matching documents; you cannot move them. + /// + /// Learn more about this API in the Elasticsearch documentation. /// - public virtual Task> UpdateAsync(Elastic.Clients.Elasticsearch.Id id, Action> configureRequest, CancellationToken cancellationToken = default) + public virtual Task UpdateByQueryAsync(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) { - var descriptor = new UpdateRequestDescriptor(id); + var descriptor = new UpdateByQueryRequestDescriptor(indices); configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); + return DoRequestAsync, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor, cancellationToken); } /// @@ -11837,108 +41780,164 @@ public virtual Task> UpdateAsync - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateByQueryResponse UpdateByQuery(UpdateByQueryRequest request) - { - request.BeforeRequest(); - return DoRequest(request); - } - - /// /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. + /// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateByQueryAsync(UpdateByQueryRequest request, CancellationToken cancellationToken = default) - { - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - - /// + /// + /// /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. + /// read /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateByQueryResponse UpdateByQuery(UpdateByQueryRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. + /// index or write /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateByQueryResponse UpdateByQuery(Elastic.Clients.Elasticsearch.Indices indices) - { - var descriptor = new UpdateByQueryRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequest, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor); - } - - /// + /// + /// /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. + /// You can specify the query criteria in the request URI or the request body using the same syntax as the search API. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateByQueryResponse UpdateByQuery(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest) - { - var descriptor = new UpdateByQueryRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor); - } - - /// /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. + /// When you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. + /// When the versions match, the document is updated and the version number is incremented. + /// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. + /// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateByQueryResponse UpdateByQuery() - { - var descriptor = new UpdateByQueryRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequest, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor); - } - - /// /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. + /// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. + /// + /// + /// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. + /// A bulk update request is performed for each batch of matching documents. + /// Any query or update failures cause the update by query request to fail and the failures are shown in the response. + /// Any update requests that completed successfully still stick, they are not rolled back. + /// + /// + /// Throttling update requests + /// + /// + /// To control the rate at which update by query issues batches of update 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 turn off 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 + /// + /// + /// Update by query supports sliced scroll to parallelize the update process. + /// This can improve efficiency and provide a convenient way to break the request down into smaller parts. + /// + /// + /// Setting slices to auto chooses a reasonable number for most data streams and indices. + /// 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 _update_by_query just automates the manual process of creating 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 point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. + /// + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// Update performance scales linearly across available resources with the number of slices. + /// + /// + /// + /// + /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. + /// + /// + /// Update the document source + /// + /// + /// Update by query supports scripts to update the document source. + /// As with the update API, you can set ctx.op to change the operation that is performed. + /// + /// + /// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. + /// The update by query operation skips updating the document and increments the noop counter. + /// + /// + /// Set ctx.op = "delete" if your script decides that the document should be deleted. + /// The update by query operation deletes the document and increments the deleted counter. + /// + /// + /// Update by query supports only index, noop, and delete. + /// Setting ctx.op to anything else is an error. + /// Setting any other field in ctx is an error. + /// This API enables you to only modify the source of matching documents; you cannot move them. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateByQueryResponse UpdateByQuery(Action> configureRequest) + public virtual Task UpdateByQueryAsync(CancellationToken cancellationToken = default) { var descriptor = new UpdateByQueryRequestDescriptor(); - configureRequest?.Invoke(descriptor); descriptor.BeforeRequest(); - return DoRequest, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor); + return DoRequestAsync, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor, cancellationToken); } /// @@ -11947,115 +41946,158 @@ public virtual UpdateByQueryResponse UpdateByQuery(Action - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateByQueryResponse UpdateByQuery(UpdateByQueryRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. + /// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateByQueryResponse UpdateByQuery(Elastic.Clients.Elasticsearch.Indices indices) - { - var descriptor = new UpdateByQueryRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. + /// read /// - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual UpdateByQueryResponse UpdateByQuery(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest) - { - var descriptor = new UpdateByQueryRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest(descriptor); - } - - /// + /// + /// + /// + /// index 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 an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. + /// When the versions match, the document is updated and the version number is incremented. + /// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. + /// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. + /// + /// + /// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. + /// + /// + /// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. + /// A bulk update request is performed for each batch of matching documents. + /// Any query or update failures cause the update by query request to fail and the failures are shown in the response. + /// Any update requests that completed successfully still stick, they are not rolled back. + /// + /// + /// Throttling update requests + /// + /// + /// To control the rate at which update by query issues batches of update 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 turn off 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 + /// + /// + /// Update by query supports sliced scroll to parallelize the update process. + /// This can improve efficiency and provide a convenient way to break the request down into smaller parts. + /// + /// + /// Setting slices to auto chooses a reasonable number for most data streams and indices. + /// 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 _update_by_query just automates the manual process of creating 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 point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. + /// + /// + /// + /// + /// 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: + /// + /// + /// /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. + /// 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. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateByQueryAsync(UpdateByQueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. + /// Update performance scales linearly across available resources with the number of slices. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateByQueryAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateByQueryRequestDescriptor(indices); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor, cancellationToken); - } - - /// + /// + /// /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. + /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateByQueryAsync(Elastic.Clients.Elasticsearch.Indices indices, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new UpdateByQueryRequestDescriptor(indices); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. + /// Update the document source /// - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task UpdateByQueryAsync(CancellationToken cancellationToken = default) - { - var descriptor = new UpdateByQueryRequestDescriptor(); - descriptor.BeforeRequest(); - return DoRequestAsync, UpdateByQueryResponse, UpdateByQueryRequestParameters>(descriptor, cancellationToken); - } - - /// /// - /// Update documents. - /// Updates documents that match the specified query. - /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. + /// Update by query supports scripts to update the document source. + /// As with the update API, you can set ctx.op to change the operation that is performed. + /// + /// + /// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. + /// The update by query operation skips updating the document and increments the noop counter. + /// + /// + /// Set ctx.op = "delete" if your script decides that the document should be deleted. + /// The update by query operation deletes the document and increments the deleted counter. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// Update by query supports only index, noop, and delete. + /// Setting ctx.op to anything else is an error. + /// Setting any other field in ctx is an error. + /// This API enables you to only modify the source of matching documents; you cannot move them. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task UpdateByQueryAsync(Action> configureRequest, CancellationToken cancellationToken = default) { @@ -12071,7 +42113,158 @@ public virtual Task UpdateByQueryAsync(Action< /// Updates documents that match the specified query. /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: + /// + /// + /// + /// + /// read + /// + /// + /// + /// + /// index 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 an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. + /// When the versions match, the document is updated and the version number is incremented. + /// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. + /// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. + /// + /// + /// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. + /// + /// + /// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. + /// A bulk update request is performed for each batch of matching documents. + /// Any query or update failures cause the update by query request to fail and the failures are shown in the response. + /// Any update requests that completed successfully still stick, they are not rolled back. + /// + /// + /// Throttling update requests + /// + /// + /// To control the rate at which update by query issues batches of update 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 turn off 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 + /// + /// + /// Update by query supports sliced scroll to parallelize the update process. + /// This can improve efficiency and provide a convenient way to break the request down into smaller parts. + /// + /// + /// Setting slices to auto chooses a reasonable number for most data streams and indices. + /// 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 _update_by_query just automates the manual process of creating 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 point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. + /// + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// Update performance scales linearly across available resources with the number of slices. + /// + /// + /// + /// + /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. + /// + /// + /// Update the document source + /// + /// + /// Update by query supports scripts to update the document source. + /// As with the update API, you can set ctx.op to change the operation that is performed. + /// + /// + /// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. + /// The update by query operation skips updating the document and increments the noop counter. + /// + /// + /// Set ctx.op = "delete" if your script decides that the document should be deleted. + /// The update by query operation deletes the document and increments the deleted counter. + /// + /// + /// Update by query supports only index, noop, and delete. + /// Setting ctx.op to anything else is an error. + /// Setting any other field in ctx is an error. + /// This API enables you to only modify the source of matching documents; you cannot move them. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task UpdateByQueryAsync(UpdateByQueryRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -12085,7 +42278,158 @@ public virtual Task UpdateByQueryAsync(UpdateByQueryReque /// Updates documents that match the specified query. /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: + /// + /// + /// + /// + /// read + /// + /// + /// + /// + /// index 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 an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. + /// When the versions match, the document is updated and the version number is incremented. + /// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. + /// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. + /// + /// + /// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. + /// + /// + /// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. + /// A bulk update request is performed for each batch of matching documents. + /// Any query or update failures cause the update by query request to fail and the failures are shown in the response. + /// Any update requests that completed successfully still stick, they are not rolled back. + /// + /// + /// Throttling update requests + /// + /// + /// To control the rate at which update by query issues batches of update 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 turn off 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 + /// + /// + /// Update by query supports sliced scroll to parallelize the update process. + /// This can improve efficiency and provide a convenient way to break the request down into smaller parts. + /// + /// + /// Setting slices to auto chooses a reasonable number for most data streams and indices. + /// 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 _update_by_query just automates the manual process of creating 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 point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. + /// + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// Update performance scales linearly across available resources with the number of slices. + /// + /// + /// + /// + /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. + /// + /// + /// Update the document source + /// + /// + /// Update by query supports scripts to update the document source. + /// As with the update API, you can set ctx.op to change the operation that is performed. + /// + /// + /// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. + /// The update by query operation skips updating the document and increments the noop counter. + /// + /// + /// Set ctx.op = "delete" if your script decides that the document should be deleted. + /// The update by query operation deletes the document and increments the deleted counter. + /// + /// + /// Update by query supports only index, noop, and delete. + /// Setting ctx.op to anything else is an error. + /// Setting any other field in ctx is an error. + /// This API enables you to only modify the source of matching documents; you cannot move them. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task UpdateByQueryAsync(Elastic.Clients.Elasticsearch.Indices indices, CancellationToken cancellationToken = default) { @@ -12100,7 +42444,158 @@ public virtual Task UpdateByQueryAsync(Elastic.Clients.El /// Updates documents that match the specified query. /// If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. /// - /// Learn more about this API in the Elasticsearch documentation. + /// + /// If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: + /// + /// + /// + /// + /// read + /// + /// + /// + /// + /// index 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 an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. + /// When the versions match, the document is updated and the version number is incremented. + /// If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. + /// 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 update more documents from the source than max_docs until it has successfully updated max_docs documents or it has gone through every document in the source query. + /// + /// + /// NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. + /// + /// + /// While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. + /// A bulk update request is performed for each batch of matching documents. + /// Any query or update failures cause the update by query request to fail and the failures are shown in the response. + /// Any update requests that completed successfully still stick, they are not rolled back. + /// + /// + /// Throttling update requests + /// + /// + /// To control the rate at which update by query issues batches of update 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 turn off 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 + /// + /// + /// Update by query supports sliced scroll to parallelize the update process. + /// This can improve efficiency and provide a convenient way to break the request down into smaller parts. + /// + /// + /// Setting slices to auto chooses a reasonable number for most data streams and indices. + /// 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 _update_by_query just automates the manual process of creating 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 point above about distribution being uneven and you should conclude that using max_docs with slices might not result in exactly max_docs documents being updated. + /// + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// Update performance scales linearly across available resources with the number of slices. + /// + /// + /// + /// + /// Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. + /// + /// + /// Update the document source + /// + /// + /// Update by query supports scripts to update the document source. + /// As with the update API, you can set ctx.op to change the operation that is performed. + /// + /// + /// Set ctx.op = "noop" if your script decides that it doesn't have to make any changes. + /// The update by query operation skips updating the document and increments the noop counter. + /// + /// + /// Set ctx.op = "delete" if your script decides that the document should be deleted. + /// The update by query operation deletes the document and increments the deleted counter. + /// + /// + /// Update by query supports only index, noop, and delete. + /// Setting ctx.op to anything else is an error. + /// Setting any other field in ctx is an error. + /// This API enables you to only modify the source of matching documents; you cannot move them. + /// + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task UpdateByQueryAsync(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest, CancellationToken cancellationToken = default) { @@ -12118,7 +42613,7 @@ public virtual Task UpdateByQueryAsync(Elastic.Clients.El /// Change the number of requests per second for a particular update by query operation. /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual UpdateByQueryRethrottleResponse UpdateByQueryRethrottle(UpdateByQueryRethrottleRequest request) @@ -12135,7 +42630,7 @@ public virtual UpdateByQueryRethrottleResponse UpdateByQueryRethrottle(UpdateByQ /// Change the number of requests per second for a particular update by query operation. /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task UpdateByQueryRethrottleAsync(UpdateByQueryRethrottleRequest request, CancellationToken cancellationToken = default) { @@ -12151,7 +42646,7 @@ public virtual Task UpdateByQueryRethrottleAsyn /// Change the number of requests per second for a particular update by query operation. /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual UpdateByQueryRethrottleResponse UpdateByQueryRethrottle(UpdateByQueryRethrottleRequestDescriptor descriptor) @@ -12168,7 +42663,7 @@ public virtual UpdateByQueryRethrottleResponse UpdateByQueryRethrottle(UpdateByQ /// Change the number of requests per second for a particular update by query operation. /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual UpdateByQueryRethrottleResponse UpdateByQueryRethrottle(Elastic.Clients.Elasticsearch.Id taskId) @@ -12186,7 +42681,7 @@ public virtual UpdateByQueryRethrottleResponse UpdateByQueryRethrottle(Elastic.C /// Change the number of requests per second for a particular update by query operation. /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] public virtual UpdateByQueryRethrottleResponse UpdateByQueryRethrottle(Elastic.Clients.Elasticsearch.Id taskId, Action configureRequest) @@ -12205,7 +42700,7 @@ public virtual UpdateByQueryRethrottleResponse UpdateByQueryRethrottle(Elastic.C /// Change the number of requests per second for a particular update by query operation. /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task UpdateByQueryRethrottleAsync(UpdateByQueryRethrottleRequestDescriptor descriptor, CancellationToken cancellationToken = default) { @@ -12221,7 +42716,7 @@ public virtual Task UpdateByQueryRethrottleAsyn /// Change the number of requests per second for a particular update by query operation. /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task UpdateByQueryRethrottleAsync(Elastic.Clients.Elasticsearch.Id taskId, CancellationToken cancellationToken = default) { @@ -12238,7 +42733,7 @@ public virtual Task UpdateByQueryRethrottleAsyn /// Change the number of requests per second for a particular update by query operation. /// Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. /// - /// Learn more about this API in the Elasticsearch documentation. + /// Learn more about this API in the Elasticsearch documentation. /// public virtual Task UpdateByQueryRethrottleAsync(Elastic.Clients.Elasticsearch.Id taskId, Action configureRequest, CancellationToken cancellationToken = default) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/BulkIndexByScrollFailure.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/BulkIndexByScrollFailure.g.cs index 2008b28414e..f964fa55cd5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/BulkIndexByScrollFailure.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/BulkIndexByScrollFailure.g.cs @@ -37,6 +37,4 @@ public sealed partial class BulkIndexByScrollFailure public string Index { get; init; } [JsonInclude, JsonPropertyName("status")] public int Status { get; init; } - [JsonInclude, JsonPropertyName("type")] - public string Type { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateNode.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateNode.g.cs index c59818c659b..ab9a407b846 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateNode.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateNode.g.cs @@ -29,10 +29,208 @@ namespace Elastic.Clients.Elasticsearch.Cluster; public sealed partial class ComponentTemplateNode { + [JsonInclude, JsonPropertyName("deprecated")] + public bool? Deprecated { get; set; } [JsonInclude, JsonPropertyName("_meta")] - public IReadOnlyDictionary? Meta { get; init; } + public IDictionary? Meta { get; set; } [JsonInclude, JsonPropertyName("template")] - public Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateSummary Template { get; init; } + public Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateSummary Template { get; set; } [JsonInclude, JsonPropertyName("version")] - public long? Version { get; init; } + public long? Version { get; set; } +} + +public sealed partial class ComponentTemplateNodeDescriptor : SerializableDescriptor> +{ + internal ComponentTemplateNodeDescriptor(Action> configure) => configure.Invoke(this); + + public ComponentTemplateNodeDescriptor() : base() + { + } + + private bool? DeprecatedValue { get; set; } + private IDictionary? MetaValue { get; set; } + private Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateSummary TemplateValue { get; set; } + private Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateSummaryDescriptor TemplateDescriptor { get; set; } + private Action> TemplateDescriptorAction { get; set; } + private long? VersionValue { get; set; } + + public ComponentTemplateNodeDescriptor Deprecated(bool? deprecated = true) + { + DeprecatedValue = deprecated; + return Self; + } + + public ComponentTemplateNodeDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public ComponentTemplateNodeDescriptor Template(Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateSummary template) + { + TemplateDescriptor = null; + TemplateDescriptorAction = null; + TemplateValue = template; + return Self; + } + + public ComponentTemplateNodeDescriptor Template(Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateSummaryDescriptor descriptor) + { + TemplateValue = null; + TemplateDescriptorAction = null; + TemplateDescriptor = descriptor; + return Self; + } + + public ComponentTemplateNodeDescriptor Template(Action> configure) + { + TemplateValue = null; + TemplateDescriptor = null; + TemplateDescriptorAction = configure; + return Self; + } + + public ComponentTemplateNodeDescriptor Version(long? version) + { + VersionValue = version; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (DeprecatedValue.HasValue) + { + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + + if (TemplateDescriptor is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateDescriptor, options); + } + else if (TemplateDescriptorAction is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateSummaryDescriptor(TemplateDescriptorAction), options); + } + else + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateValue, options); + } + + if (VersionValue.HasValue) + { + writer.WritePropertyName("version"); + writer.WriteNumberValue(VersionValue.Value); + } + + writer.WriteEndObject(); + } +} + +public sealed partial class ComponentTemplateNodeDescriptor : SerializableDescriptor +{ + internal ComponentTemplateNodeDescriptor(Action configure) => configure.Invoke(this); + + public ComponentTemplateNodeDescriptor() : base() + { + } + + private bool? DeprecatedValue { get; set; } + private IDictionary? MetaValue { get; set; } + private Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateSummary TemplateValue { get; set; } + private Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateSummaryDescriptor TemplateDescriptor { get; set; } + private Action TemplateDescriptorAction { get; set; } + private long? VersionValue { get; set; } + + public ComponentTemplateNodeDescriptor Deprecated(bool? deprecated = true) + { + DeprecatedValue = deprecated; + return Self; + } + + public ComponentTemplateNodeDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public ComponentTemplateNodeDescriptor Template(Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateSummary template) + { + TemplateDescriptor = null; + TemplateDescriptorAction = null; + TemplateValue = template; + return Self; + } + + public ComponentTemplateNodeDescriptor Template(Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateSummaryDescriptor descriptor) + { + TemplateValue = null; + TemplateDescriptorAction = null; + TemplateDescriptor = descriptor; + return Self; + } + + public ComponentTemplateNodeDescriptor Template(Action configure) + { + TemplateValue = null; + TemplateDescriptor = null; + TemplateDescriptorAction = configure; + return Self; + } + + public ComponentTemplateNodeDescriptor Version(long? version) + { + VersionValue = version; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (DeprecatedValue.HasValue) + { + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + + if (TemplateDescriptor is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateDescriptor, options); + } + else if (TemplateDescriptorAction is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateSummaryDescriptor(TemplateDescriptorAction), options); + } + else + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateValue, options); + } + + if (VersionValue.HasValue) + { + writer.WritePropertyName("version"); + writer.WriteNumberValue(VersionValue.Value); + } + + writer.WriteEndObject(); + } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateSummary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateSummary.g.cs index 62b3163daa1..7e6398e09e5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateSummary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateSummary.g.cs @@ -30,16 +30,323 @@ namespace Elastic.Clients.Elasticsearch.Cluster; public sealed partial class ComponentTemplateSummary { [JsonInclude, JsonPropertyName("aliases")] - public IReadOnlyDictionary? Aliases { get; init; } + public IDictionary? Aliases { get; set; } [JsonInclude, JsonPropertyName("lifecycle")] - public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRollover? Lifecycle { get; init; } + public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRollover? Lifecycle { get; set; } [JsonInclude, JsonPropertyName("mappings")] - public Elastic.Clients.Elasticsearch.Mapping.TypeMapping? Mappings { get; init; } + public Elastic.Clients.Elasticsearch.Mapping.TypeMapping? Mappings { get; set; } [JsonInclude, JsonPropertyName("_meta")] - public IReadOnlyDictionary? Meta { get; init; } + public IDictionary? Meta { get; set; } [JsonInclude, JsonPropertyName("settings")] - [ReadOnlyIndexNameDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings))] - public IReadOnlyDictionary? Settings { get; init; } + public IDictionary? Settings { get; set; } [JsonInclude, JsonPropertyName("version")] - public long? Version { get; init; } + public long? Version { get; set; } +} + +public sealed partial class ComponentTemplateSummaryDescriptor : SerializableDescriptor> +{ + internal ComponentTemplateSummaryDescriptor(Action> configure) => configure.Invoke(this); + + public ComponentTemplateSummaryDescriptor() : base() + { + } + + private IDictionary> AliasesValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRollover? LifecycleValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRolloverDescriptor LifecycleDescriptor { get; set; } + private Action LifecycleDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.TypeMapping? MappingsValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } + private Action> MappingsDescriptorAction { get; set; } + private IDictionary? MetaValue { get; set; } + private IDictionary> SettingsValue { get; set; } + private long? VersionValue { get; set; } + + public ComponentTemplateSummaryDescriptor Aliases(Func>, FluentDescriptorDictionary>> selector) + { + AliasesValue = selector?.Invoke(new FluentDescriptorDictionary>()); + return Self; + } + + public ComponentTemplateSummaryDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRollover? lifecycle) + { + LifecycleDescriptor = null; + LifecycleDescriptorAction = null; + LifecycleValue = lifecycle; + return Self; + } + + public ComponentTemplateSummaryDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRolloverDescriptor descriptor) + { + LifecycleValue = null; + LifecycleDescriptorAction = null; + LifecycleDescriptor = descriptor; + return Self; + } + + public ComponentTemplateSummaryDescriptor Lifecycle(Action configure) + { + LifecycleValue = null; + LifecycleDescriptor = null; + LifecycleDescriptorAction = configure; + return Self; + } + + public ComponentTemplateSummaryDescriptor Mappings(Elastic.Clients.Elasticsearch.Mapping.TypeMapping? mappings) + { + MappingsDescriptor = null; + MappingsDescriptorAction = null; + MappingsValue = mappings; + return Self; + } + + public ComponentTemplateSummaryDescriptor Mappings(Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor descriptor) + { + MappingsValue = null; + MappingsDescriptorAction = null; + MappingsDescriptor = descriptor; + return Self; + } + + public ComponentTemplateSummaryDescriptor Mappings(Action> configure) + { + MappingsValue = null; + MappingsDescriptor = null; + MappingsDescriptorAction = configure; + return Self; + } + + public ComponentTemplateSummaryDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public ComponentTemplateSummaryDescriptor Settings(Func>, FluentDescriptorDictionary>> selector) + { + SettingsValue = selector?.Invoke(new FluentDescriptorDictionary>()); + return Self; + } + + public ComponentTemplateSummaryDescriptor Version(long? version) + { + VersionValue = version; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + + if (LifecycleDescriptor is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleDescriptor, options); + } + else if (LifecycleDescriptorAction is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRolloverDescriptor(LifecycleDescriptorAction), options); + } + else if (LifecycleValue is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleValue, options); + } + + if (MappingsDescriptor is not null) + { + writer.WritePropertyName("mappings"); + JsonSerializer.Serialize(writer, MappingsDescriptor, options); + } + else if (MappingsDescriptorAction is not null) + { + writer.WritePropertyName("mappings"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor(MappingsDescriptorAction), options); + } + else if (MappingsValue is not null) + { + writer.WritePropertyName("mappings"); + JsonSerializer.Serialize(writer, MappingsValue, options); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + + if (SettingsValue is not null) + { + writer.WritePropertyName("settings"); + JsonSerializer.Serialize(writer, SettingsValue, options); + } + + if (VersionValue.HasValue) + { + writer.WritePropertyName("version"); + writer.WriteNumberValue(VersionValue.Value); + } + + writer.WriteEndObject(); + } +} + +public sealed partial class ComponentTemplateSummaryDescriptor : SerializableDescriptor +{ + internal ComponentTemplateSummaryDescriptor(Action configure) => configure.Invoke(this); + + public ComponentTemplateSummaryDescriptor() : base() + { + } + + private IDictionary AliasesValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRollover? LifecycleValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRolloverDescriptor LifecycleDescriptor { get; set; } + private Action LifecycleDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.TypeMapping? MappingsValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } + private Action MappingsDescriptorAction { get; set; } + private IDictionary? MetaValue { get; set; } + private IDictionary SettingsValue { get; set; } + private long? VersionValue { get; set; } + + public ComponentTemplateSummaryDescriptor Aliases(Func, FluentDescriptorDictionary> selector) + { + AliasesValue = selector?.Invoke(new FluentDescriptorDictionary()); + return Self; + } + + public ComponentTemplateSummaryDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRollover? lifecycle) + { + LifecycleDescriptor = null; + LifecycleDescriptorAction = null; + LifecycleValue = lifecycle; + return Self; + } + + public ComponentTemplateSummaryDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRolloverDescriptor descriptor) + { + LifecycleValue = null; + LifecycleDescriptorAction = null; + LifecycleDescriptor = descriptor; + return Self; + } + + public ComponentTemplateSummaryDescriptor Lifecycle(Action configure) + { + LifecycleValue = null; + LifecycleDescriptor = null; + LifecycleDescriptorAction = configure; + return Self; + } + + public ComponentTemplateSummaryDescriptor Mappings(Elastic.Clients.Elasticsearch.Mapping.TypeMapping? mappings) + { + MappingsDescriptor = null; + MappingsDescriptorAction = null; + MappingsValue = mappings; + return Self; + } + + public ComponentTemplateSummaryDescriptor Mappings(Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor descriptor) + { + MappingsValue = null; + MappingsDescriptorAction = null; + MappingsDescriptor = descriptor; + return Self; + } + + public ComponentTemplateSummaryDescriptor Mappings(Action configure) + { + MappingsValue = null; + MappingsDescriptor = null; + MappingsDescriptorAction = configure; + return Self; + } + + public ComponentTemplateSummaryDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public ComponentTemplateSummaryDescriptor Settings(Func, FluentDescriptorDictionary> selector) + { + SettingsValue = selector?.Invoke(new FluentDescriptorDictionary()); + return Self; + } + + public ComponentTemplateSummaryDescriptor Version(long? version) + { + VersionValue = version; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + + if (LifecycleDescriptor is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleDescriptor, options); + } + else if (LifecycleDescriptorAction is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRolloverDescriptor(LifecycleDescriptorAction), options); + } + else if (LifecycleValue is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleValue, options); + } + + if (MappingsDescriptor is not null) + { + writer.WritePropertyName("mappings"); + JsonSerializer.Serialize(writer, MappingsDescriptor, options); + } + else if (MappingsDescriptorAction is not null) + { + writer.WritePropertyName("mappings"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor(MappingsDescriptorAction), options); + } + else if (MappingsValue is not null) + { + writer.WritePropertyName("mappings"); + JsonSerializer.Serialize(writer, MappingsValue, options); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + + if (SettingsValue is not null) + { + writer.WritePropertyName("settings"); + JsonSerializer.Serialize(writer, SettingsValue, options); + } + + if (VersionValue.HasValue) + { + writer.WritePropertyName("version"); + writer.WriteNumberValue(VersionValue.Value); + } + + writer.WriteEndObject(); + } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Bulk/ResponseItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Bulk/ResponseItem.g.cs index fa67e544390..61f1188da67 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Bulk/ResponseItem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Bulk/ResponseItem.g.cs @@ -31,12 +31,14 @@ public partial class ResponseItem { /// /// - /// Contains additional information about the failed operation. - /// The parameter is only returned for failed operations. + /// Additional information about the failed operation. + /// The property is returned only for failed operations. /// /// [JsonInclude, JsonPropertyName("error")] public Elastic.Clients.Elasticsearch.ErrorCause? Error { get; init; } + [JsonInclude, JsonPropertyName("failure_store")] + public Elastic.Clients.Elasticsearch.Core.Bulk.FailureStoreStatus? FailureStore { get; init; } [JsonInclude, JsonPropertyName("forced_refresh")] public bool? ForcedRefresh { get; init; } [JsonInclude, JsonPropertyName("get")] @@ -52,7 +54,7 @@ public partial class ResponseItem /// /// - /// Name of the index associated with the operation. + /// The name of the index associated with the operation. /// If the operation targeted a data stream, this is the backing index into which the document was written. /// /// @@ -62,6 +64,7 @@ public partial class ResponseItem /// /// /// The primary term assigned to the document for the operation. + /// This property is returned only for successful operations. /// /// [JsonInclude, JsonPropertyName("_primary_term")] @@ -69,7 +72,7 @@ public partial class ResponseItem /// /// - /// Result of the operation. + /// The result of the operation. /// Successful values are created, deleted, and updated. /// /// @@ -79,7 +82,7 @@ public partial class ResponseItem /// /// /// The sequence number assigned to the document for the operation. - /// Sequence numbers are used to ensure an older version of a document doesn’t overwrite a newer version. + /// Sequence numbers are used to ensure an older version of a document doesn't overwrite a newer version. /// /// [JsonInclude, JsonPropertyName("_seq_no")] @@ -87,7 +90,7 @@ public partial class ResponseItem /// /// - /// Contains shard information for the operation. + /// Shard information for the operation. /// /// [JsonInclude, JsonPropertyName("_shards")] @@ -95,7 +98,7 @@ public partial class ResponseItem /// /// - /// HTTP status code returned for the operation. + /// The HTTP status code returned for the operation. /// /// [JsonInclude, JsonPropertyName("status")] @@ -105,6 +108,7 @@ public partial class ResponseItem /// /// The document version associated with the operation. /// The document version is incremented each time the document is updated. + /// This property is returned only for successful actions. /// /// [JsonInclude, JsonPropertyName("_version")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Get/GetResult.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Get/GetResult.g.cs index 07624ca28ed..74c1fb23d0c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Get/GetResult.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Get/GetResult.g.cs @@ -29,25 +29,80 @@ namespace Elastic.Clients.Elasticsearch.Core.Get; public sealed partial class GetResult { + /// + /// + /// 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/Types/Core/HealthReport/Indicators.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/Indicators.g.cs index 05f5aa6f061..6cc347b2606 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/Indicators.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/Indicators.g.cs @@ -33,8 +33,6 @@ public sealed partial class Indicators public Elastic.Clients.Elasticsearch.Core.HealthReport.DataStreamLifecycleIndicator? DataStreamLifecycle { get; init; } [JsonInclude, JsonPropertyName("disk")] public Elastic.Clients.Elasticsearch.Core.HealthReport.DiskIndicator? Disk { get; init; } - [JsonInclude, JsonPropertyName("file_settings")] - public Elastic.Clients.Elasticsearch.Core.HealthReport.FileSettingsIndicator? FileSettings { get; init; } [JsonInclude, JsonPropertyName("ilm")] public Elastic.Clients.Elasticsearch.Core.HealthReport.IlmIndicator? Ilm { get; init; } [JsonInclude, JsonPropertyName("master_is_stable")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultiSearchItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultiSearchItem.g.cs index 48bf0448faf..129bb9dcdd5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultiSearchItem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultiSearchItem.g.cs @@ -35,6 +35,12 @@ public sealed partial class MultiSearchItem 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")] @@ -45,8 +51,22 @@ public sealed partial class MultiSearchItem 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("status")] @@ -55,8 +75,59 @@ public sealed partial class MultiSearchItem 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/Types/Core/MSearchTemplate/TemplateConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearchTemplate/TemplateConfig.g.cs index c9586c9b995..9b4e2b6bcb4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearchTemplate/TemplateConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearchTemplate/TemplateConfig.g.cs @@ -39,7 +39,7 @@ public sealed partial class TemplateConfig /// /// - /// ID of the search template to use. If no source is specified, + /// The ID of the search template to use. If no source is specified, /// this parameter is required. /// /// @@ -67,7 +67,7 @@ public sealed partial class TemplateConfig /// /// /// An inline search template. Supports the same parameters as the search API's - /// request body. Also supports Mustache variables. If no id is specified, this + /// request body. It also supports Mustache variables. If no id is specified, this /// parameter is required. /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Destination.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Destination.g.cs index c2cec5cccf6..06c0ba69fef 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Destination.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Destination.g.cs @@ -39,8 +39,10 @@ public sealed partial class Destination /// /// - /// Set to create to only index documents that do not already exist. - /// Important: To reindex to a data stream destination, this argument must be create. + /// If it is create, the operation will only index documents that do not already exist (also known as "put if absent"). + /// + /// + /// IMPORTANT: To reindex to a data stream destination, this argument must be create. /// /// [JsonInclude, JsonPropertyName("op_type")] @@ -56,8 +58,10 @@ public sealed partial class Destination /// /// - /// By default, a document's routing is preserved unless it’s changed by the script. - /// Set to discard to set routing to null, or =value to route using the specified value. + /// By default, a document's routing is preserved unless it's changed by the script. + /// If it is keep, the routing on the bulk request sent for each match is set to the routing on the match. + /// If it is discard, the routing on the bulk request sent for each match is set to null. + /// If it is =value, the routing on the bulk request sent for each match is set to all value specified after the equals sign (=). /// /// [JsonInclude, JsonPropertyName("routing")] @@ -99,8 +103,10 @@ public DestinationDescriptor Index(Elastic.Clients.Elasticsearch.IndexName index /// /// - /// Set to create to only index documents that do not already exist. - /// Important: To reindex to a data stream destination, this argument must be create. + /// If it is create, the operation will only index documents that do not already exist (also known as "put if absent"). + /// + /// + /// IMPORTANT: To reindex to a data stream destination, this argument must be create. /// /// public DestinationDescriptor OpType(Elastic.Clients.Elasticsearch.OpType? opType) @@ -122,8 +128,10 @@ public DestinationDescriptor Pipeline(string? pipeline) /// /// - /// By default, a document's routing is preserved unless it’s changed by the script. - /// Set to discard to set routing to null, or =value to route using the specified value. + /// By default, a document's routing is preserved unless it's changed by the script. + /// If it is keep, the routing on the bulk request sent for each match is set to the routing on the match. + /// If it is discard, the routing on the bulk request sent for each match is set to null. + /// If it is =value, the routing on the bulk request sent for each match is set to all value specified after the equals sign (=). /// /// public DestinationDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/RemoteSource.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/RemoteSource.g.cs index db2b38bbd22..33d553f98b2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/RemoteSource.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/RemoteSource.g.cs @@ -32,7 +32,6 @@ public sealed partial class RemoteSource /// /// /// The remote connection timeout. - /// Defaults to 30 seconds. /// /// [JsonInclude, JsonPropertyName("connect_timeout")] @@ -49,6 +48,7 @@ public sealed partial class RemoteSource /// /// /// The URL for the remote instance of Elasticsearch that you want to index from. + /// This information is required when you're indexing from remote. /// /// [JsonInclude, JsonPropertyName("host")] @@ -64,7 +64,7 @@ public sealed partial class RemoteSource /// /// - /// The remote socket read timeout. Defaults to 30 seconds. + /// The remote socket read timeout. /// /// [JsonInclude, JsonPropertyName("socket_timeout")] @@ -97,7 +97,6 @@ public RemoteSourceDescriptor() : base() /// /// /// The remote connection timeout. - /// Defaults to 30 seconds. /// /// public RemoteSourceDescriptor ConnectTimeout(Elastic.Clients.Elasticsearch.Duration? connectTimeout) @@ -120,6 +119,7 @@ public RemoteSourceDescriptor Headers(Func, Flu /// /// /// The URL for the remote instance of Elasticsearch that you want to index from. + /// This information is required when you're indexing from remote. /// /// public RemoteSourceDescriptor Host(string host) @@ -141,7 +141,7 @@ public RemoteSourceDescriptor Password(string? password) /// /// - /// The remote socket read timeout. Defaults to 30 seconds. + /// The remote socket read timeout. /// /// public RemoteSourceDescriptor SocketTimeout(Elastic.Clients.Elasticsearch.Duration? socketTimeout) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Source.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Source.g.cs index 0c75aa06abf..a00ef4dace2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Source.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Source.g.cs @@ -32,7 +32,7 @@ public sealed partial class Source /// /// /// The name of the data stream, index, or alias you are copying from. - /// Accepts a comma-separated list to reindex from multiple sources. + /// It accepts a comma-separated list to reindex from multiple sources. /// /// [JsonInclude, JsonPropertyName("index")] @@ -40,7 +40,7 @@ public sealed partial class Source /// /// - /// Specifies the documents to reindex using the Query DSL. + /// The documents to reindex, which is defined with Query DSL. /// /// [JsonInclude, JsonPropertyName("query")] @@ -59,7 +59,7 @@ public sealed partial class Source /// /// /// The number of documents to index per batch. - /// Use when indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB. + /// Use it when you are indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB. /// /// [JsonInclude, JsonPropertyName("size")] @@ -72,14 +72,11 @@ public sealed partial class Source /// [JsonInclude, JsonPropertyName("slice")] public Elastic.Clients.Elasticsearch.SlicedScroll? Slice { get; set; } - [JsonInclude, JsonPropertyName("sort")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.SortOptions))] - public ICollection? Sort { get; set; } /// /// - /// If true reindexes all source fields. - /// Set to a list to reindex select fields. + /// If true, reindex all source fields. + /// Set it to a list to reindex select fields. /// /// [JsonInclude, JsonPropertyName("_source")] @@ -107,16 +104,12 @@ public SourceDescriptor() : base() private Elastic.Clients.Elasticsearch.SlicedScroll? SliceValue { get; set; } private Elastic.Clients.Elasticsearch.SlicedScrollDescriptor SliceDescriptor { get; set; } private Action> SliceDescriptorAction { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.SortOptionsDescriptor SortDescriptor { get; set; } - private Action> SortDescriptorAction { get; set; } - private Action>[] SortDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Fields? SourceFieldsValue { get; set; } /// /// /// The name of the data stream, index, or alias you are copying from. - /// Accepts a comma-separated list to reindex from multiple sources. + /// It accepts a comma-separated list to reindex from multiple sources. /// /// public SourceDescriptor Indices(Elastic.Clients.Elasticsearch.Indices indices) @@ -127,7 +120,7 @@ public SourceDescriptor Indices(Elastic.Clients.Elasticsearch.Indices /// /// - /// Specifies the documents to reindex using the Query DSL. + /// The documents to reindex, which is defined with Query DSL. /// /// public SourceDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? query) @@ -192,7 +185,7 @@ public SourceDescriptor RuntimeMappings(Func /// /// The number of documents to index per batch. - /// Use when indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB. + /// Use it when you are indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB. /// /// public SourceDescriptor Size(int? size) @@ -230,46 +223,10 @@ public SourceDescriptor Slice(Action Sort(ICollection? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public SourceDescriptor Sort(Elastic.Clients.Elasticsearch.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public SourceDescriptor Sort(Action> configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public SourceDescriptor Sort(params Action>[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - /// /// - /// If true reindexes all source fields. - /// Set to a list to reindex select fields. + /// If true, reindex all source fields. + /// Set it to a list to reindex select fields. /// /// public SourceDescriptor SourceFields(Elastic.Clients.Elasticsearch.Fields? sourceFields) @@ -343,35 +300,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SliceValue, options); } - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - if (SourceFieldsValue is not null) { writer.WritePropertyName("_source"); @@ -402,16 +330,12 @@ public SourceDescriptor() : base() private Elastic.Clients.Elasticsearch.SlicedScroll? SliceValue { get; set; } private Elastic.Clients.Elasticsearch.SlicedScrollDescriptor SliceDescriptor { get; set; } private Action SliceDescriptorAction { get; set; } - private ICollection? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.SortOptionsDescriptor SortDescriptor { get; set; } - private Action SortDescriptorAction { get; set; } - private Action[] SortDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Fields? SourceFieldsValue { get; set; } /// /// /// The name of the data stream, index, or alias you are copying from. - /// Accepts a comma-separated list to reindex from multiple sources. + /// It accepts a comma-separated list to reindex from multiple sources. /// /// public SourceDescriptor Indices(Elastic.Clients.Elasticsearch.Indices indices) @@ -422,7 +346,7 @@ public SourceDescriptor Indices(Elastic.Clients.Elasticsearch.Indices indices) /// /// - /// Specifies the documents to reindex using the Query DSL. + /// The documents to reindex, which is defined with Query DSL. /// /// public SourceDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? query) @@ -487,7 +411,7 @@ public SourceDescriptor RuntimeMappings(Func /// /// The number of documents to index per batch. - /// Use when indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB. + /// Use it when you are indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB. /// /// public SourceDescriptor Size(int? size) @@ -525,46 +449,10 @@ public SourceDescriptor Slice(Action? sort) - { - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortValue = sort; - return Self; - } - - public SourceDescriptor Sort(Elastic.Clients.Elasticsearch.SortOptionsDescriptor descriptor) - { - SortValue = null; - SortDescriptorAction = null; - SortDescriptorActions = null; - SortDescriptor = descriptor; - return Self; - } - - public SourceDescriptor Sort(Action configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorActions = null; - SortDescriptorAction = configure; - return Self; - } - - public SourceDescriptor Sort(params Action[] configure) - { - SortValue = null; - SortDescriptor = null; - SortDescriptorAction = null; - SortDescriptorActions = configure; - return Self; - } - /// /// - /// If true reindexes all source fields. - /// Set to a list to reindex select fields. + /// If true, reindex all source fields. + /// Set it to a list to reindex select fields. /// /// public SourceDescriptor SourceFields(Elastic.Clients.Elasticsearch.Fields? sourceFields) @@ -638,35 +526,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, SliceValue, options); } - if (SortDescriptor is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, SortDescriptor, options); - } - else if (SortDescriptorAction is not null) - { - writer.WritePropertyName("sort"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.SortOptionsDescriptor(SortDescriptorAction), options); - } - else if (SortDescriptorActions is not null) - { - writer.WritePropertyName("sort"); - if (SortDescriptorActions.Length != 1) - writer.WriteStartArray(); - foreach (var action in SortDescriptorActions) - { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.SortOptionsDescriptor(action), options); - } - - if (SortDescriptorActions.Length != 1) - writer.WriteEndArray(); - } - else if (SortValue is not null) - { - writer.WritePropertyName("sort"); - SingleOrManySerializationHelper.Serialize(SortValue, writer, options); - } - if (SourceFieldsValue is not null) { writer.WritePropertyName("_source"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Filter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Filter.g.cs index 6b5fbf32507..53294e06c2d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Filter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Filter.g.cs @@ -40,7 +40,7 @@ public sealed partial class Filter /// /// - /// Maximum number of terms that must be returned per field. + /// The maximum number of terms that must be returned per field. /// /// [JsonInclude, JsonPropertyName("max_num_terms")] @@ -49,7 +49,7 @@ public sealed partial class Filter /// /// /// Ignore words with more than this frequency in the source doc. - /// Defaults to unbounded. + /// It defaults to unbounded. /// /// [JsonInclude, JsonPropertyName("max_term_freq")] @@ -119,7 +119,7 @@ public FilterDescriptor MaxDocFreq(int? maxDocFreq) /// /// - /// Maximum number of terms that must be returned per field. + /// The maximum number of terms that must be returned per field. /// /// public FilterDescriptor MaxNumTerms(int? maxNumTerms) @@ -131,7 +131,7 @@ public FilterDescriptor MaxNumTerms(int? maxNumTerms) /// /// /// Ignore words with more than this frequency in the source doc. - /// Defaults to unbounded. + /// It defaults to unbounded. /// /// public FilterDescriptor MaxTermFreq(int? maxTermFreq) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/CrossClusterReplication/FollowerIndexParameters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/CrossClusterReplication/FollowerIndexParameters.g.cs index 95d202cef15..06ff51f8ada 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/CrossClusterReplication/FollowerIndexParameters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/CrossClusterReplication/FollowerIndexParameters.g.cs @@ -29,88 +29,24 @@ namespace Elastic.Clients.Elasticsearch.CrossClusterReplication; public sealed partial class FollowerIndexParameters { - /// - /// - /// The maximum number of outstanding reads requests from the remote cluster. - /// - /// [JsonInclude, JsonPropertyName("max_outstanding_read_requests")] - public long? MaxOutstandingReadRequests { get; init; } - - /// - /// - /// The maximum number of outstanding write requests on the follower. - /// - /// + public int MaxOutstandingReadRequests { get; init; } [JsonInclude, JsonPropertyName("max_outstanding_write_requests")] - public int? MaxOutstandingWriteRequests { get; init; } - - /// - /// - /// The maximum number of operations to pull per read from the remote cluster. - /// - /// + public int MaxOutstandingWriteRequests { get; init; } [JsonInclude, JsonPropertyName("max_read_request_operation_count")] - public int? MaxReadRequestOperationCount { get; init; } - - /// - /// - /// The maximum size in bytes of per read of a batch of operations pulled from the remote cluster. - /// - /// + public int MaxReadRequestOperationCount { get; init; } [JsonInclude, JsonPropertyName("max_read_request_size")] - public Elastic.Clients.Elasticsearch.ByteSize? MaxReadRequestSize { get; init; } - - /// - /// - /// The maximum time to wait before retrying an operation that failed exceptionally. An exponential backoff strategy is employed when - /// retrying. - /// - /// + public string MaxReadRequestSize { get; init; } [JsonInclude, JsonPropertyName("max_retry_delay")] - public Elastic.Clients.Elasticsearch.Duration? MaxRetryDelay { get; init; } - - /// - /// - /// 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 Elastic.Clients.Elasticsearch.Duration MaxRetryDelay { get; init; } [JsonInclude, JsonPropertyName("max_write_buffer_count")] - public int? MaxWriteBufferCount { get; init; } - - /// - /// - /// 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 int MaxWriteBufferCount { get; init; } [JsonInclude, JsonPropertyName("max_write_buffer_size")] - public Elastic.Clients.Elasticsearch.ByteSize? MaxWriteBufferSize { get; init; } - - /// - /// - /// The maximum number of operations per bulk write request executed on the follower. - /// - /// + public string MaxWriteBufferSize { get; init; } [JsonInclude, JsonPropertyName("max_write_request_operation_count")] - public int? MaxWriteRequestOperationCount { get; init; } - - /// - /// - /// The maximum total bytes of operations per bulk write request executed on the follower. - /// - /// + public int MaxWriteRequestOperationCount { get; init; } [JsonInclude, JsonPropertyName("max_write_request_size")] - public Elastic.Clients.Elasticsearch.ByteSize? MaxWriteRequestSize { get; init; } - - /// - /// - /// 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; init; } [JsonInclude, JsonPropertyName("read_poll_timeout")] - public Elastic.Clients.Elasticsearch.Duration? ReadPollTimeout { get; init; } + public Elastic.Clients.Elasticsearch.Duration ReadPollTimeout { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ElasticsearchVersionInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ElasticsearchVersionInfo.g.cs index 96417d2236e..5d9a9a38b09 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ElasticsearchVersionInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ElasticsearchVersionInfo.g.cs @@ -29,22 +29,77 @@ namespace Elastic.Clients.Elasticsearch; public sealed partial class ElasticsearchVersionInfo { + /// + /// + /// The Elasticsearch Git commit's date. + /// + /// [JsonInclude, JsonPropertyName("build_date")] public DateTimeOffset BuildDate { get; init; } + + /// + /// + /// The build flavor. For example, default. + /// + /// [JsonInclude, JsonPropertyName("build_flavor")] public string BuildFlavor { get; init; } + + /// + /// + /// The Elasticsearch Git commit's SHA hash. + /// + /// [JsonInclude, JsonPropertyName("build_hash")] public string BuildHash { get; init; } + + /// + /// + /// Indicates whether the Elasticsearch build was a snapshot. + /// + /// [JsonInclude, JsonPropertyName("build_snapshot")] public bool BuildSnapshot { get; init; } + + /// + /// + /// The build type that corresponds to how Elasticsearch was installed. + /// For example, docker, rpm, or tar. + /// + /// [JsonInclude, JsonPropertyName("build_type")] public string BuildType { get; init; } + + /// + /// + /// The version number of Elasticsearch's underlying Lucene software. + /// + /// [JsonInclude, JsonPropertyName("lucene_version")] public string LuceneVersion { get; init; } + + /// + /// + /// The minimum index version with which the responding node can read from disk. + /// + /// [JsonInclude, JsonPropertyName("minimum_index_compatibility_version")] public string MinimumIndexCompatibilityVersion { get; init; } + + /// + /// + /// The minimum node version with which the responding node can communicate. + /// Also the minimum version from which you can perform a rolling upgrade. + /// + /// [JsonInclude, JsonPropertyName("minimum_wire_compatibility_version")] public string MinimumWireCompatibilityVersion { get; init; } + + /// + /// + /// The Elasticsearch version number. + /// + /// [JsonInclude, JsonPropertyName("number")] public string Number { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Core.Bulk.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Core.Bulk.g.cs new file mode 100644 index 00000000000..1adc3ce767e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Core.Bulk.g.cs @@ -0,0 +1,85 @@ +// 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.Core; +using Elastic.Clients.Elasticsearch.Serialization; +using Elastic.Transport; +using System; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +[JsonConverter(typeof(FailureStoreStatusConverter))] +public enum FailureStoreStatus +{ + [EnumMember(Value = "used")] + Used, + [EnumMember(Value = "not_enabled")] + NotEnabled, + [EnumMember(Value = "not_applicable_or_unknown")] + NotApplicableOrUnknown, + [EnumMember(Value = "failed")] + Failed +} + +internal sealed class FailureStoreStatusConverter : JsonConverter +{ + public override FailureStoreStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "used": + return FailureStoreStatus.Used; + case "not_enabled": + return FailureStoreStatus.NotEnabled; + case "not_applicable_or_unknown": + return FailureStoreStatus.NotApplicableOrUnknown; + case "failed": + return FailureStoreStatus.Failed; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, FailureStoreStatus value, JsonSerializerOptions options) + { + switch (value) + { + case FailureStoreStatus.Used: + writer.WriteStringValue("used"); + return; + case FailureStoreStatus.NotEnabled: + writer.WriteStringValue("not_enabled"); + return; + case FailureStoreStatus.NotApplicableOrUnknown: + writer.WriteStringValue("not_applicable_or_unknown"); + return; + case FailureStoreStatus.Failed: + writer.WriteStringValue("failed"); + return; + } + + writer.WriteNullValue(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.IndexManagement.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.IndexManagement.g.cs index a5fbdb62bbf..26f7df4182d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.IndexManagement.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.IndexManagement.g.cs @@ -682,6 +682,55 @@ public override void Write(Utf8JsonWriter writer, ShardStoreStatus value, JsonSe } } +[JsonConverter(typeof(SourceModeConverter))] +public enum SourceMode +{ + [EnumMember(Value = "synthetic")] + Synthetic, + [EnumMember(Value = "stored")] + Stored, + [EnumMember(Value = "disabled")] + Disabled +} + +internal sealed class SourceModeConverter : JsonConverter +{ + public override SourceMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "synthetic": + return SourceMode.Synthetic; + case "stored": + return SourceMode.Stored; + case "disabled": + return SourceMode.Disabled; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, SourceMode value, JsonSerializerOptions options) + { + switch (value) + { + case SourceMode.Synthetic: + writer.WriteStringValue("synthetic"); + return; + case SourceMode.Stored: + writer.WriteStringValue("stored"); + return; + case SourceMode.Disabled: + writer.WriteStringValue("disabled"); + return; + } + + writer.WriteNullValue(); + } +} + [JsonConverter(typeof(EnumStructConverter))] public readonly partial struct StorageType : IEnumStruct { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Mapping.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Mapping.g.cs index af9e0d808bf..3cde2b5248d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Mapping.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Mapping.g.cs @@ -28,298 +28,6 @@ namespace Elastic.Clients.Elasticsearch.Mapping; -[JsonConverter(typeof(DenseVectorElementTypeConverter))] -public enum DenseVectorElementType -{ - /// - /// - /// Indexes a 4-byte floating-point value per dimension. - /// - /// - [EnumMember(Value = "float")] - Float, - /// - /// - /// Indexes a 1-byte integer value per dimension. - /// - /// - [EnumMember(Value = "byte")] - Byte, - /// - /// - /// Indexes a single bit per dimension. Useful for very high-dimensional vectors or models that specifically support - /// bit vectors. - /// - /// - /// NOTE: when using bit, the number of dimensions must be a multiple of 8 and must represent the number of bits. - /// - /// - [EnumMember(Value = "bit")] - Bit -} - -internal sealed class DenseVectorElementTypeConverter : JsonConverter -{ - public override DenseVectorElementType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "float": - return DenseVectorElementType.Float; - case "byte": - return DenseVectorElementType.Byte; - case "bit": - return DenseVectorElementType.Bit; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, DenseVectorElementType value, JsonSerializerOptions options) - { - switch (value) - { - case DenseVectorElementType.Float: - writer.WriteStringValue("float"); - return; - case DenseVectorElementType.Byte: - writer.WriteStringValue("byte"); - return; - case DenseVectorElementType.Bit: - writer.WriteStringValue("bit"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(DenseVectorIndexOptionsTypeConverter))] -public enum DenseVectorIndexOptionsType -{ - /// - /// - /// The default index type for float vectors. This utilizes the HNSW algorithm in addition to automatically scalar - /// quantization for scalable approximate kNN search with element_type of float. - /// - /// - /// This can reduce the memory footprint by 4x at the cost of some accuracy. - /// - /// - [EnumMember(Value = "int8_hnsw")] - Int8Hnsw, - /// - /// - /// This utilizes a brute-force search algorithm in addition to automatically scalar quantization. Only supports - /// element_type of float. - /// - /// - [EnumMember(Value = "int8_flat")] - Int8Flat, - /// - /// - /// This utilizes the HNSW algorithm in addition to automatically scalar quantization for scalable approximate kNN - /// search with element_type of float. - /// - /// - /// This can reduce the memory footprint by 8x at the cost of some accuracy. - /// - /// - [EnumMember(Value = "int4_hnsw")] - Int4Hnsw, - /// - /// - /// This utilizes a brute-force search algorithm in addition to automatically half-byte scalar quantization. - /// Only supports element_type of float. - /// - /// - [EnumMember(Value = "int4_flat")] - Int4Flat, - /// - /// - /// This utilizes the HNSW algorithm for scalable approximate kNN search. This supports all element_type values. - /// - /// - [EnumMember(Value = "hnsw")] - Hnsw, - /// - /// - /// This utilizes a brute-force search algorithm for exact kNN search. This supports all element_type values. - /// - /// - [EnumMember(Value = "flat")] - Flat -} - -internal sealed class DenseVectorIndexOptionsTypeConverter : JsonConverter -{ - public override DenseVectorIndexOptionsType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "int8_hnsw": - return DenseVectorIndexOptionsType.Int8Hnsw; - case "int8_flat": - return DenseVectorIndexOptionsType.Int8Flat; - case "int4_hnsw": - return DenseVectorIndexOptionsType.Int4Hnsw; - case "int4_flat": - return DenseVectorIndexOptionsType.Int4Flat; - case "hnsw": - return DenseVectorIndexOptionsType.Hnsw; - case "flat": - return DenseVectorIndexOptionsType.Flat; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, DenseVectorIndexOptionsType value, JsonSerializerOptions options) - { - switch (value) - { - case DenseVectorIndexOptionsType.Int8Hnsw: - writer.WriteStringValue("int8_hnsw"); - return; - case DenseVectorIndexOptionsType.Int8Flat: - writer.WriteStringValue("int8_flat"); - return; - case DenseVectorIndexOptionsType.Int4Hnsw: - writer.WriteStringValue("int4_hnsw"); - return; - case DenseVectorIndexOptionsType.Int4Flat: - writer.WriteStringValue("int4_flat"); - return; - case DenseVectorIndexOptionsType.Hnsw: - writer.WriteStringValue("hnsw"); - return; - case DenseVectorIndexOptionsType.Flat: - writer.WriteStringValue("flat"); - return; - } - - writer.WriteNullValue(); - } -} - -[JsonConverter(typeof(DenseVectorSimilarityConverter))] -public enum DenseVectorSimilarity -{ - /// - /// - /// Computes the maximum inner product of two vectors. This is similar to dot_product, but doesn't require vectors - /// to be normalized. This means that each vector’s magnitude can significantly effect the score. - /// - /// - /// The document _score is adjusted to prevent negative values. For max_inner_product values < 0, the _score - /// is 1 / (1 + -1 * max_inner_product(query, vector)). For non-negative max_inner_product results the _score - /// is calculated max_inner_product(query, vector) + 1. - /// - /// - [EnumMember(Value = "max_inner_product")] - MaxInnerProduct, - /// - /// - /// Computes similarity based on the L2 distance (also known as Euclidean distance) between the vectors. - /// - /// - /// The document _score is computed as 1 / (1 + l2_norm(query, vector)^2). - /// - /// - /// For bit vectors, instead of using l2_norm, the hamming distance between the vectors is used. - /// - /// - /// The _score transformation is (numBits - hamming(a, b)) / numBits. - /// - /// - [EnumMember(Value = "l2_norm")] - L2Norm, - /// - /// - /// Computes the dot product of two unit vectors. This option provides an optimized way to perform cosine similarity. - /// The constraints and computed score are defined by element_type. - /// - /// - /// When element_type is float, all vectors must be unit length, including both document and query vectors. - /// - /// - /// The document _score is computed as (1 + dot_product(query, vector)) / 2. - /// - /// - /// When element_type is byte, all vectors must have the same length including both document and query vectors or - /// results will be inaccurate. - /// - /// - /// The document _score is computed as 0.5 + (dot_product(query, vector) / (32768 * dims)) where dims is the - /// number of dimensions per vector. - /// - /// - [EnumMember(Value = "dot_product")] - DotProduct, - /// - /// - /// Computes the cosine similarity. During indexing Elasticsearch automatically normalizes vectors with cosine - /// similarity to unit length. This allows to internally use dot_product for computing similarity, which is more - /// efficient. Original un-normalized vectors can be still accessed through scripts. - /// - /// - /// The document _score is computed as (1 + cosine(query, vector)) / 2. - /// - /// - /// The cosine similarity does not allow vectors with zero magnitude, since cosine is not defined in this case. - /// - /// - [EnumMember(Value = "cosine")] - Cosine -} - -internal sealed class DenseVectorSimilarityConverter : JsonConverter -{ - public override DenseVectorSimilarity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "max_inner_product": - return DenseVectorSimilarity.MaxInnerProduct; - case "l2_norm": - return DenseVectorSimilarity.L2Norm; - case "dot_product": - return DenseVectorSimilarity.DotProduct; - case "cosine": - return DenseVectorSimilarity.Cosine; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, DenseVectorSimilarity value, JsonSerializerOptions options) - { - switch (value) - { - case DenseVectorSimilarity.MaxInnerProduct: - writer.WriteStringValue("max_inner_product"); - return; - case DenseVectorSimilarity.L2Norm: - writer.WriteStringValue("l2_norm"); - return; - case DenseVectorSimilarity.DotProduct: - writer.WriteStringValue("dot_product"); - return; - case DenseVectorSimilarity.Cosine: - writer.WriteStringValue("cosine"); - return; - } - - writer.WriteNullValue(); - } -} - [JsonConverter(typeof(DynamicMappingConverter))] public enum DynamicMapping { @@ -403,8 +111,6 @@ public enum FieldType RankFeature, [EnumMember(Value = "percolator")] Percolator, - [EnumMember(Value = "passthrough")] - Passthrough, [EnumMember(Value = "object")] Object, [EnumMember(Value = "none")] @@ -506,8 +212,6 @@ public override FieldType Read(ref Utf8JsonReader reader, Type typeToConvert, Js return FieldType.RankFeature; case "percolator": return FieldType.Percolator; - case "passthrough": - return FieldType.Passthrough; case "object": return FieldType.Object; case "none": @@ -622,9 +326,6 @@ public override void Write(Utf8JsonWriter writer, FieldType value, JsonSerialize case FieldType.Percolator: writer.WriteStringValue("percolator"); return; - case FieldType.Passthrough: - writer.WriteStringValue("passthrough"); - return; case FieldType.Object: writer.WriteStringValue("object"); return; @@ -1109,6 +810,75 @@ public override void Write(Utf8JsonWriter writer, SourceFieldMode value, JsonSer } } +[JsonConverter(typeof(SyntheticSourceKeepEnumConverter))] +public enum SyntheticSourceKeepEnum +{ + /// + /// + /// Synthetic source diverges from the original source (default) + /// + /// + [EnumMember(Value = "none")] + None, + /// + /// + /// Arrays of the corresponding field or object preserve the original element ordering and duplicate elements. + /// The synthetic source fragment for such arrays is not guaranteed to match the original source exactly, + /// e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5]. + /// The exact format may change in the future, in an effort to reduce the storage overhead of this option. + /// + /// + [EnumMember(Value = "arrays")] + Arrays, + /// + /// + /// The source for both singleton instances and arrays of the corresponding field or object gets recorded. + /// When applied to objects, the source of all sub-objects and sub-fields gets captured. + /// Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications. + /// + /// + [EnumMember(Value = "all")] + All +} + +internal sealed class SyntheticSourceKeepEnumConverter : JsonConverter +{ + public override SyntheticSourceKeepEnum Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "none": + return SyntheticSourceKeepEnum.None; + case "arrays": + return SyntheticSourceKeepEnum.Arrays; + case "all": + return SyntheticSourceKeepEnum.All; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, SyntheticSourceKeepEnum value, JsonSerializerOptions options) + { + switch (value) + { + case SyntheticSourceKeepEnum.None: + writer.WriteStringValue("none"); + return; + case SyntheticSourceKeepEnum.Arrays: + writer.WriteStringValue("arrays"); + return; + case SyntheticSourceKeepEnum.All: + writer.WriteStringValue("all"); + return; + } + + writer.WriteNullValue(); + } +} + [JsonConverter(typeof(TermVectorOptionConverter))] public enum TermVectorOption { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs index f2c5c6202bc..c590e11665a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs @@ -491,7 +491,7 @@ public enum ExpandWildcard None, /// /// - /// Match hidden data streams and hidden indices. Must be combined with open, closed, or both. + /// Match hidden data streams and hidden indices. Must be combined with open, closed, or both. /// /// [EnumMember(Value = "hidden")] @@ -1766,12 +1766,17 @@ public enum VersionType /// [EnumMember(Value = "internal")] Internal, + /// + /// + /// This option is deprecated because it can cause primary and replica shards to diverge. + /// + /// [EnumMember(Value = "force")] Force, /// /// - /// Only index the document if the given version is equal or higher than the version of the stored document or if there is no existing document. - /// Note: the external_gte version type is meant for special use cases and should be used with care. + /// Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document. + /// NOTE: The external_gte version type is meant for special use cases and should be used with care. /// If used incorrectly, it can result in loss of data. /// /// @@ -1779,7 +1784,7 @@ public enum VersionType ExternalGte, /// /// - /// Only index the document if the given version is strictly higher than the version of the stored document or if there is no existing document. + /// Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document. /// /// [EnumMember(Value = "external")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.SearchApplication.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.SearchApplication.g.cs new file mode 100644 index 00000000000..0b57910379c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.SearchApplication.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.Core; +using Elastic.Clients.Elasticsearch.Serialization; +using Elastic.Transport; +using System; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.SearchApplication; + +[JsonConverter(typeof(EventTypeConverter))] +public enum EventType +{ + [EnumMember(Value = "search_click")] + Searchclick, + [EnumMember(Value = "search")] + Search, + [EnumMember(Value = "page_view")] + Pageview +} + +internal sealed class EventTypeConverter : JsonConverter +{ + public override EventType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "search_click": + return EventType.Searchclick; + case "search": + return EventType.Search; + case "page_view": + return EventType.Pageview; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, EventType value, JsonSerializerOptions options) + { + switch (value) + { + case EventType.Searchclick: + writer.WriteStringValue("search_click"); + return; + case EventType.Search: + writer.WriteStringValue("search"); + return; + case EventType.Pageview: + writer.WriteStringValue("page_view"); + return; + } + + writer.WriteNullValue(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Security.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Security.g.cs index a73a00e061d..d2100d3b8df 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Security.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Security.g.cs @@ -31,12 +31,40 @@ namespace Elastic.Clients.Elasticsearch.Security; [JsonConverter(typeof(AccessTokenGrantTypeConverter))] public enum AccessTokenGrantType { + /// + /// + /// This grant type implements the Refresh Token Grant of OAuth2. + /// In this grant a user exchanges a previously issued refresh token for a new access token and a new refresh token. + /// + /// [EnumMember(Value = "refresh_token")] RefreshToken, + /// + /// + /// This grant type implements the Resource Owner Password Credentials Grant of OAuth2. + /// In this grant, a trusted client exchanges the end user's credentials for an access token and (possibly) a refresh token. + /// The request needs to be made by an authenticated user but happens on behalf of another authenticated user (the one whose credentials are passed as request parameters). + /// This grant type is not suitable or designed for the self-service user creation of tokens. + /// + /// [EnumMember(Value = "password")] Password, + /// + /// + /// This grant type is supported internally and implements SPNEGO based Kerberos support. + /// The _kerberos grant type may change from version to version. + /// + /// [EnumMember(Value = "_kerberos")] Kerberos, + /// + /// + /// This grant type implements the Client Credentials Grant of OAuth2. + /// It is geared for machine to machine communication and is not suitable or designed for the self-service user creation of tokens. + /// It generates only access tokens that cannot be refreshed. + /// The premise is that the entity that uses client_credentials has constant access to a set of (client, not end-user) credentials and can authenticate itself at will. + /// + /// [EnumMember(Value = "client_credentials")] ClientCredentials } @@ -262,6 +290,7 @@ public enum GrantType /// /// /// In this type of grant, you must supply an access token that was created by the Elasticsearch token service. + /// If you are activating a user profile, you can alternatively supply a JWT (either a JWT access_token or a JWT id_token). /// /// [EnumMember(Value = "access_token")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Tasks.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Tasks.g.cs index 23950271dfa..8dd4b7e1bd6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Tasks.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Tasks.g.cs @@ -33,7 +33,7 @@ public enum GroupBy { /// /// - /// Parent task ID + /// Group tasks by parent task ID. /// /// [EnumMember(Value = "parents")] @@ -47,7 +47,7 @@ public enum GroupBy None, /// /// - /// Node ID + /// Group tasks by node ID. /// /// [EnumMember(Value = "nodes")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ErrorCause.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ErrorCause.g.cs index 55ae6e38d10..e35a05a388e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ErrorCause.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ErrorCause.g.cs @@ -116,7 +116,7 @@ public sealed partial class ErrorCause /// /// - /// A human-readable explanation of the error, in english + /// A human-readable explanation of the error, in English. /// /// public string? Reason { get; init; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/IlmPolicy.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/IlmPolicy.g.cs index e1676136b51..16e5f4cdfe0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/IlmPolicy.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/IlmPolicy.g.cs @@ -29,6 +29,11 @@ namespace Elastic.Clients.Elasticsearch.IndexLifecycleManagement; public sealed partial class IlmPolicy { + /// + /// + /// Arbitrary metadata that is not automatically generated or used by Elasticsearch. + /// + /// [JsonInclude, JsonPropertyName("_meta")] public IDictionary? Meta { get; set; } [JsonInclude, JsonPropertyName("phases")] @@ -48,6 +53,11 @@ public IlmPolicyDescriptor() : base() private Elastic.Clients.Elasticsearch.IndexLifecycleManagement.PhasesDescriptor PhasesDescriptor { get; set; } private Action PhasesDescriptorAction { get; set; } + /// + /// + /// Arbitrary metadata that is not automatically generated or used by Elasticsearch. + /// + /// public IlmPolicyDescriptor Meta(Func, FluentDictionary> selector) { MetaValue = selector?.Invoke(new FluentDictionary()); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/Phase.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/Phase.g.cs index 86d494d0faf..6c34675689a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/Phase.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/Phase.g.cs @@ -32,7 +32,7 @@ public sealed partial class Phase [JsonInclude, JsonPropertyName("actions")] public Elastic.Clients.Elasticsearch.IndexLifecycleManagement.Actions? Actions { get; set; } [JsonInclude, JsonPropertyName("min_age")] - public Union? MinAge { get; set; } + public Elastic.Clients.Elasticsearch.Duration? MinAge { get; set; } } public sealed partial class PhaseDescriptor : SerializableDescriptor @@ -46,7 +46,7 @@ public PhaseDescriptor() : base() private Elastic.Clients.Elasticsearch.IndexLifecycleManagement.Actions? ActionsValue { get; set; } private Elastic.Clients.Elasticsearch.IndexLifecycleManagement.ActionsDescriptor ActionsDescriptor { get; set; } private Action ActionsDescriptorAction { get; set; } - private Union? MinAgeValue { get; set; } + private Elastic.Clients.Elasticsearch.Duration? MinAgeValue { get; set; } public PhaseDescriptor Actions(Elastic.Clients.Elasticsearch.IndexLifecycleManagement.Actions? actions) { @@ -72,7 +72,7 @@ public PhaseDescriptor Actions(Action? minAge) + public PhaseDescriptor MinAge(Elastic.Clients.Elasticsearch.Duration? minAge) { MinAgeValue = minAge; return Self; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/StepKey.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/StepKey.g.cs index 30fc8645cd8..0da782d1db3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/StepKey.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/StepKey.g.cs @@ -29,8 +29,19 @@ namespace Elastic.Clients.Elasticsearch.IndexLifecycleManagement; public sealed partial class StepKey { + /// + /// + /// The optional action to which the index will be moved. + /// + /// [JsonInclude, JsonPropertyName("action")] public string? Action { get; set; } + + /// + /// + /// The optional step name to which the index will be moved. + /// + /// [JsonInclude, JsonPropertyName("name")] public string? Name { get; set; } [JsonInclude, JsonPropertyName("phase")] @@ -49,12 +60,22 @@ public StepKeyDescriptor() : base() private string? NameValue { get; set; } private string PhaseValue { get; set; } + /// + /// + /// The optional action to which the index will be moved. + /// + /// public StepKeyDescriptor Action(string? action) { ActionValue = action; return Self; } + /// + /// + /// The optional step name to which the index will be moved. + /// + /// public StepKeyDescriptor Name(string? name) { NameValue = name; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AliasDefinition.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AliasDefinition.g.cs index e777aab041b..72c98d5beba 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AliasDefinition.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AliasDefinition.g.cs @@ -35,7 +35,7 @@ public sealed partial class AliasDefinition /// /// [JsonInclude, JsonPropertyName("filter")] - public Elastic.Clients.Elasticsearch.QueryDsl.Query? Filter { get; init; } + public Elastic.Clients.Elasticsearch.QueryDsl.Query? Filter { get; set; } /// /// @@ -44,7 +44,7 @@ public sealed partial class AliasDefinition /// /// [JsonInclude, JsonPropertyName("index_routing")] - public string? IndexRouting { get; init; } + public string? IndexRouting { get; set; } /// /// @@ -53,7 +53,7 @@ public sealed partial class AliasDefinition /// /// [JsonInclude, JsonPropertyName("is_hidden")] - public bool? IsHidden { get; init; } + public bool? IsHidden { get; set; } /// /// @@ -61,7 +61,7 @@ public sealed partial class AliasDefinition /// /// [JsonInclude, JsonPropertyName("is_write_index")] - public bool? IsWriteIndex { get; init; } + public bool? IsWriteIndex { get; set; } /// /// @@ -69,7 +69,7 @@ public sealed partial class AliasDefinition /// /// [JsonInclude, JsonPropertyName("routing")] - public string? Routing { get; init; } + public string? Routing { get; set; } /// /// @@ -78,5 +78,319 @@ public sealed partial class AliasDefinition /// /// [JsonInclude, JsonPropertyName("search_routing")] - public string? SearchRouting { get; init; } + public string? SearchRouting { get; set; } +} + +public sealed partial class AliasDefinitionDescriptor : SerializableDescriptor> +{ + internal AliasDefinitionDescriptor(Action> configure) => configure.Invoke(this); + + public AliasDefinitionDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; } + private Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } + private Action> FilterDescriptorAction { get; set; } + private string? IndexRoutingValue { get; set; } + private bool? IsHiddenValue { get; set; } + private bool? IsWriteIndexValue { get; set; } + private string? RoutingValue { get; set; } + private string? SearchRoutingValue { get; set; } + + /// + /// + /// Query used to limit documents the alias can access. + /// + /// + public AliasDefinitionDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public AliasDefinitionDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public AliasDefinitionDescriptor Filter(Action> configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = configure; + return Self; + } + + /// + /// + /// Value used to route indexing operations to a specific shard. + /// If specified, this overwrites the routing value for indexing operations. + /// + /// + public AliasDefinitionDescriptor IndexRouting(string? indexRouting) + { + IndexRoutingValue = indexRouting; + return Self; + } + + /// + /// + /// If true, the alias is hidden. + /// All indices for the alias must have the same is_hidden value. + /// + /// + public AliasDefinitionDescriptor IsHidden(bool? isHidden = true) + { + IsHiddenValue = isHidden; + return Self; + } + + /// + /// + /// If true, the index is the write index for the alias. + /// + /// + public AliasDefinitionDescriptor IsWriteIndex(bool? isWriteIndex = true) + { + IsWriteIndexValue = isWriteIndex; + return Self; + } + + /// + /// + /// Value used to route indexing and search operations to a specific shard. + /// + /// + public AliasDefinitionDescriptor Routing(string? routing) + { + RoutingValue = routing; + return Self; + } + + /// + /// + /// Value used to route search operations to a specific shard. + /// If specified, this overwrites the routing value for search operations. + /// + /// + public AliasDefinitionDescriptor SearchRouting(string? searchRouting) + { + SearchRoutingValue = searchRouting; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + 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 (!string.IsNullOrEmpty(IndexRoutingValue)) + { + writer.WritePropertyName("index_routing"); + writer.WriteStringValue(IndexRoutingValue); + } + + if (IsHiddenValue.HasValue) + { + writer.WritePropertyName("is_hidden"); + writer.WriteBooleanValue(IsHiddenValue.Value); + } + + if (IsWriteIndexValue.HasValue) + { + writer.WritePropertyName("is_write_index"); + writer.WriteBooleanValue(IsWriteIndexValue.Value); + } + + if (!string.IsNullOrEmpty(RoutingValue)) + { + writer.WritePropertyName("routing"); + writer.WriteStringValue(RoutingValue); + } + + if (!string.IsNullOrEmpty(SearchRoutingValue)) + { + writer.WritePropertyName("search_routing"); + writer.WriteStringValue(SearchRoutingValue); + } + + writer.WriteEndObject(); + } +} + +public sealed partial class AliasDefinitionDescriptor : SerializableDescriptor +{ + internal AliasDefinitionDescriptor(Action configure) => configure.Invoke(this); + + public AliasDefinitionDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.QueryDsl.Query? FilterValue { get; set; } + private Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } + private Action FilterDescriptorAction { get; set; } + private string? IndexRoutingValue { get; set; } + private bool? IsHiddenValue { get; set; } + private bool? IsWriteIndexValue { get; set; } + private string? RoutingValue { get; set; } + private string? SearchRoutingValue { get; set; } + + /// + /// + /// Query used to limit documents the alias can access. + /// + /// + public AliasDefinitionDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public AliasDefinitionDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public AliasDefinitionDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = configure; + return Self; + } + + /// + /// + /// Value used to route indexing operations to a specific shard. + /// If specified, this overwrites the routing value for indexing operations. + /// + /// + public AliasDefinitionDescriptor IndexRouting(string? indexRouting) + { + IndexRoutingValue = indexRouting; + return Self; + } + + /// + /// + /// If true, the alias is hidden. + /// All indices for the alias must have the same is_hidden value. + /// + /// + public AliasDefinitionDescriptor IsHidden(bool? isHidden = true) + { + IsHiddenValue = isHidden; + return Self; + } + + /// + /// + /// If true, the index is the write index for the alias. + /// + /// + public AliasDefinitionDescriptor IsWriteIndex(bool? isWriteIndex = true) + { + IsWriteIndexValue = isWriteIndex; + return Self; + } + + /// + /// + /// Value used to route indexing and search operations to a specific shard. + /// + /// + public AliasDefinitionDescriptor Routing(string? routing) + { + RoutingValue = routing; + return Self; + } + + /// + /// + /// Value used to route search operations to a specific shard. + /// If specified, this overwrites the routing value for search operations. + /// + /// + public AliasDefinitionDescriptor SearchRouting(string? searchRouting) + { + SearchRoutingValue = searchRouting; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + 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 (!string.IsNullOrEmpty(IndexRoutingValue)) + { + writer.WritePropertyName("index_routing"); + writer.WriteStringValue(IndexRoutingValue); + } + + if (IsHiddenValue.HasValue) + { + writer.WritePropertyName("is_hidden"); + writer.WriteBooleanValue(IsHiddenValue.Value); + } + + if (IsWriteIndexValue.HasValue) + { + writer.WritePropertyName("is_write_index"); + writer.WriteBooleanValue(IsWriteIndexValue.Value); + } + + if (!string.IsNullOrEmpty(RoutingValue)) + { + writer.WritePropertyName("routing"); + writer.WriteStringValue(RoutingValue); + } + + if (!string.IsNullOrEmpty(SearchRoutingValue)) + { + writer.WritePropertyName("search_routing"); + writer.WriteStringValue(SearchRoutingValue); + } + + writer.WriteEndObject(); + } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycle.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycle.g.cs index af6ef53abc5..bde86c5aa76 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycle.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycle.g.cs @@ -34,32 +34,10 @@ namespace Elastic.Clients.Elasticsearch.IndexManagement; /// public sealed partial class DataStreamLifecycle { - /// - /// - /// 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; } - - /// - /// - /// The downsampling configuration to execute for the managed backing index after rollover. - /// - /// [JsonInclude, JsonPropertyName("downsampling")] public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsampling? Downsampling { get; set; } - - /// - /// - /// If defined, it turns data stream lifecycle on/off (true/false) for this data stream. A data stream lifecycle - /// that's disabled (enabled: false) will have no effect on the data stream. - /// - /// - [JsonInclude, JsonPropertyName("enabled")] - public bool? Enabled { get; set; } } /// @@ -79,26 +57,13 @@ public DataStreamLifecycleDescriptor() : base() private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsampling? DownsamplingValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsamplingDescriptor DownsamplingDescriptor { get; set; } private Action DownsamplingDescriptorAction { get; set; } - private bool? EnabledValue { get; set; } - /// - /// - /// 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 DataStreamLifecycleDescriptor DataRetention(Elastic.Clients.Elasticsearch.Duration? dataRetention) { DataRetentionValue = dataRetention; return Self; } - /// - /// - /// The downsampling configuration to execute for the managed backing index after rollover. - /// - /// public DataStreamLifecycleDescriptor Downsampling(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsampling? downsampling) { DownsamplingDescriptor = null; @@ -123,18 +88,6 @@ public DataStreamLifecycleDescriptor Downsampling(Action - /// - /// If defined, it turns data stream lifecycle on/off (true/false) for this data stream. A data stream lifecycle - /// that's disabled (enabled: false) will have no effect on the data stream. - /// - /// - public DataStreamLifecycleDescriptor Enabled(bool? enabled = true) - { - EnabledValue = enabled; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -160,12 +113,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DownsamplingValue, options); } - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs index 41fef444c36..8b858e71b2a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs @@ -30,23 +30,169 @@ namespace Elastic.Clients.Elasticsearch.IndexManagement; public sealed partial class DataStreamLifecycleRolloverConditions { [JsonInclude, JsonPropertyName("max_age")] - public string? MaxAge { get; init; } + public string? MaxAge { get; set; } [JsonInclude, JsonPropertyName("max_docs")] - public long? MaxDocs { get; init; } + public long? MaxDocs { get; set; } [JsonInclude, JsonPropertyName("max_primary_shard_docs")] - public long? MaxPrimaryShardDocs { get; init; } + public long? MaxPrimaryShardDocs { get; set; } [JsonInclude, JsonPropertyName("max_primary_shard_size")] - public Elastic.Clients.Elasticsearch.ByteSize? MaxPrimaryShardSize { get; init; } + public Elastic.Clients.Elasticsearch.ByteSize? MaxPrimaryShardSize { get; set; } [JsonInclude, JsonPropertyName("max_size")] - public Elastic.Clients.Elasticsearch.ByteSize? MaxSize { get; init; } + public Elastic.Clients.Elasticsearch.ByteSize? MaxSize { get; set; } [JsonInclude, JsonPropertyName("min_age")] - public Elastic.Clients.Elasticsearch.Duration? MinAge { get; init; } + public Elastic.Clients.Elasticsearch.Duration? MinAge { get; set; } [JsonInclude, JsonPropertyName("min_docs")] - public long? MinDocs { get; init; } + public long? MinDocs { get; set; } [JsonInclude, JsonPropertyName("min_primary_shard_docs")] - public long? MinPrimaryShardDocs { get; init; } + public long? MinPrimaryShardDocs { get; set; } [JsonInclude, JsonPropertyName("min_primary_shard_size")] - public Elastic.Clients.Elasticsearch.ByteSize? MinPrimaryShardSize { get; init; } + public Elastic.Clients.Elasticsearch.ByteSize? MinPrimaryShardSize { get; set; } [JsonInclude, JsonPropertyName("min_size")] - public Elastic.Clients.Elasticsearch.ByteSize? MinSize { get; init; } + public Elastic.Clients.Elasticsearch.ByteSize? MinSize { get; set; } +} + +public sealed partial class DataStreamLifecycleRolloverConditionsDescriptor : SerializableDescriptor +{ + internal DataStreamLifecycleRolloverConditionsDescriptor(Action configure) => configure.Invoke(this); + + public DataStreamLifecycleRolloverConditionsDescriptor() : base() + { + } + + private string? MaxAgeValue { get; set; } + private long? MaxDocsValue { get; set; } + private long? MaxPrimaryShardDocsValue { get; set; } + private Elastic.Clients.Elasticsearch.ByteSize? MaxPrimaryShardSizeValue { get; set; } + private Elastic.Clients.Elasticsearch.ByteSize? MaxSizeValue { get; set; } + private Elastic.Clients.Elasticsearch.Duration? MinAgeValue { get; set; } + private long? MinDocsValue { get; set; } + private long? MinPrimaryShardDocsValue { get; set; } + private Elastic.Clients.Elasticsearch.ByteSize? MinPrimaryShardSizeValue { get; set; } + private Elastic.Clients.Elasticsearch.ByteSize? MinSizeValue { get; set; } + + public DataStreamLifecycleRolloverConditionsDescriptor MaxAge(string? maxAge) + { + MaxAgeValue = maxAge; + return Self; + } + + public DataStreamLifecycleRolloverConditionsDescriptor MaxDocs(long? maxDocs) + { + MaxDocsValue = maxDocs; + return Self; + } + + public DataStreamLifecycleRolloverConditionsDescriptor MaxPrimaryShardDocs(long? maxPrimaryShardDocs) + { + MaxPrimaryShardDocsValue = maxPrimaryShardDocs; + return Self; + } + + public DataStreamLifecycleRolloverConditionsDescriptor MaxPrimaryShardSize(Elastic.Clients.Elasticsearch.ByteSize? maxPrimaryShardSize) + { + MaxPrimaryShardSizeValue = maxPrimaryShardSize; + return Self; + } + + public DataStreamLifecycleRolloverConditionsDescriptor MaxSize(Elastic.Clients.Elasticsearch.ByteSize? maxSize) + { + MaxSizeValue = maxSize; + return Self; + } + + public DataStreamLifecycleRolloverConditionsDescriptor MinAge(Elastic.Clients.Elasticsearch.Duration? minAge) + { + MinAgeValue = minAge; + return Self; + } + + public DataStreamLifecycleRolloverConditionsDescriptor MinDocs(long? minDocs) + { + MinDocsValue = minDocs; + return Self; + } + + public DataStreamLifecycleRolloverConditionsDescriptor MinPrimaryShardDocs(long? minPrimaryShardDocs) + { + MinPrimaryShardDocsValue = minPrimaryShardDocs; + return Self; + } + + public DataStreamLifecycleRolloverConditionsDescriptor MinPrimaryShardSize(Elastic.Clients.Elasticsearch.ByteSize? minPrimaryShardSize) + { + MinPrimaryShardSizeValue = minPrimaryShardSize; + return Self; + } + + public DataStreamLifecycleRolloverConditionsDescriptor MinSize(Elastic.Clients.Elasticsearch.ByteSize? minSize) + { + MinSizeValue = minSize; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (!string.IsNullOrEmpty(MaxAgeValue)) + { + writer.WritePropertyName("max_age"); + writer.WriteStringValue(MaxAgeValue); + } + + if (MaxDocsValue.HasValue) + { + writer.WritePropertyName("max_docs"); + writer.WriteNumberValue(MaxDocsValue.Value); + } + + if (MaxPrimaryShardDocsValue.HasValue) + { + writer.WritePropertyName("max_primary_shard_docs"); + writer.WriteNumberValue(MaxPrimaryShardDocsValue.Value); + } + + if (MaxPrimaryShardSizeValue is not null) + { + writer.WritePropertyName("max_primary_shard_size"); + JsonSerializer.Serialize(writer, MaxPrimaryShardSizeValue, options); + } + + if (MaxSizeValue is not null) + { + writer.WritePropertyName("max_size"); + JsonSerializer.Serialize(writer, MaxSizeValue, options); + } + + if (MinAgeValue is not null) + { + writer.WritePropertyName("min_age"); + JsonSerializer.Serialize(writer, MinAgeValue, options); + } + + if (MinDocsValue.HasValue) + { + writer.WritePropertyName("min_docs"); + writer.WriteNumberValue(MinDocsValue.Value); + } + + if (MinPrimaryShardDocsValue.HasValue) + { + writer.WritePropertyName("min_primary_shard_docs"); + writer.WriteNumberValue(MinPrimaryShardDocsValue.Value); + } + + if (MinPrimaryShardSizeValue is not null) + { + writer.WritePropertyName("min_primary_shard_size"); + JsonSerializer.Serialize(writer, MinPrimaryShardSizeValue, options); + } + + if (MinSizeValue is not null) + { + writer.WritePropertyName("min_size"); + JsonSerializer.Serialize(writer, MinSizeValue, options); + } + + writer.WriteEndObject(); + } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs index 974bb01a049..faa19347cfc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs @@ -43,7 +43,7 @@ public sealed partial class DataStreamLifecycleWithRollover /// /// [JsonInclude, JsonPropertyName("data_retention")] - public Elastic.Clients.Elasticsearch.Duration? DataRetention { get; init; } + public Elastic.Clients.Elasticsearch.Duration? DataRetention { get; set; } /// /// @@ -51,16 +51,82 @@ public sealed partial class DataStreamLifecycleWithRollover /// /// [JsonInclude, JsonPropertyName("downsampling")] - public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsampling? Downsampling { get; init; } + public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsampling? Downsampling { get; set; } /// /// - /// If defined, it turns data stream lifecycle on/off (true/false) for this data stream. A data stream lifecycle - /// that's disabled (enabled: false) will have no effect on the data stream. + /// The conditions which will trigger the rollover of a backing index as configured by the cluster setting cluster.lifecycle.default.rollover. + /// This property is an implementation detail and it will only be retrieved when the query param include_defaults is set to true. + /// The contents of this field are subject to change. /// /// - [JsonInclude, JsonPropertyName("enabled")] - public bool? Enabled { get; init; } + [JsonInclude, JsonPropertyName("rollover")] + public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleRolloverConditions? Rollover { get; set; } +} + +/// +/// +/// Data stream lifecycle with rollover can be used to display the configuration including the default rollover conditions, +/// if asked. +/// +/// +public sealed partial class DataStreamLifecycleWithRolloverDescriptor : SerializableDescriptor +{ + internal DataStreamLifecycleWithRolloverDescriptor(Action configure) => configure.Invoke(this); + + public DataStreamLifecycleWithRolloverDescriptor() : base() + { + } + + 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; } + private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleRolloverConditions? RolloverValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleRolloverConditionsDescriptor RolloverDescriptor { get; set; } + private Action RolloverDescriptorAction { get; set; } + + /// + /// + /// 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 DataStreamLifecycleWithRolloverDescriptor DataRetention(Elastic.Clients.Elasticsearch.Duration? dataRetention) + { + DataRetentionValue = dataRetention; + return Self; + } + + /// + /// + /// The downsampling configuration to execute for the managed backing index after rollover. + /// + /// + public DataStreamLifecycleWithRolloverDescriptor Downsampling(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsampling? downsampling) + { + DownsamplingDescriptor = null; + DownsamplingDescriptorAction = null; + DownsamplingValue = downsampling; + return Self; + } + + public DataStreamLifecycleWithRolloverDescriptor Downsampling(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsamplingDescriptor descriptor) + { + DownsamplingValue = null; + DownsamplingDescriptorAction = null; + DownsamplingDescriptor = descriptor; + return Self; + } + + public DataStreamLifecycleWithRolloverDescriptor Downsampling(Action configure) + { + DownsamplingValue = null; + DownsamplingDescriptor = null; + DownsamplingDescriptorAction = configure; + return Self; + } /// /// @@ -69,6 +135,71 @@ public sealed partial class DataStreamLifecycleWithRollover /// The contents of this field are subject to change. /// /// - [JsonInclude, JsonPropertyName("rollover")] - public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleRolloverConditions? Rollover { get; init; } + public DataStreamLifecycleWithRolloverDescriptor Rollover(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleRolloverConditions? rollover) + { + RolloverDescriptor = null; + RolloverDescriptorAction = null; + RolloverValue = rollover; + return Self; + } + + public DataStreamLifecycleWithRolloverDescriptor Rollover(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleRolloverConditionsDescriptor descriptor) + { + RolloverValue = null; + RolloverDescriptorAction = null; + RolloverDescriptor = descriptor; + return Self; + } + + public DataStreamLifecycleWithRolloverDescriptor Rollover(Action configure) + { + RolloverValue = null; + RolloverDescriptor = null; + RolloverDescriptorAction = configure; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + 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); + } + + if (RolloverDescriptor is not null) + { + writer.WritePropertyName("rollover"); + JsonSerializer.Serialize(writer, RolloverDescriptor, options); + } + else if (RolloverDescriptorAction is not null) + { + writer.WritePropertyName("rollover"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleRolloverConditionsDescriptor(RolloverDescriptorAction), options); + } + else if (RolloverValue is not null) + { + writer.WritePropertyName("rollover"); + JsonSerializer.Serialize(writer, RolloverValue, options); + } + + writer.WriteEndObject(); + } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/FileSettingsIndicator.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamStats.g.cs similarity index 61% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/FileSettingsIndicator.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamStats.g.cs index ffbababfc4a..a814c24f3cd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/FileSettingsIndicator.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamStats.g.cs @@ -25,23 +25,31 @@ using System.Text.Json; using System.Text.Json.Serialization; -namespace Elastic.Clients.Elasticsearch.Core.HealthReport; +namespace Elastic.Clients.Elasticsearch.IndexManagement; -/// -/// -/// FILE_SETTINGS -/// -/// -public sealed partial class FileSettingsIndicator +public sealed partial class DataStreamStats { - [JsonInclude, JsonPropertyName("details")] - public Elastic.Clients.Elasticsearch.Core.HealthReport.FileSettingsIndicatorDetails? Details { get; init; } - [JsonInclude, JsonPropertyName("diagnosis")] - public IReadOnlyCollection? Diagnosis { get; init; } - [JsonInclude, JsonPropertyName("impacts")] - public IReadOnlyCollection? Impacts { get; init; } - [JsonInclude, JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.Core.HealthReport.IndicatorHealthStatus Status { get; init; } - [JsonInclude, JsonPropertyName("symptom")] - public string Symptom { get; init; } + /// + /// + /// The count of the backing indices for the data stream. + /// + /// + [JsonInclude, JsonPropertyName("backing_indices_in_error")] + public int BackingIndicesInError { get; init; } + + /// + /// + /// The count of the backing indices for the data stream that have encountered an error. + /// + /// + [JsonInclude, JsonPropertyName("backing_indices_in_total")] + public int BackingIndicesInTotal { get; init; } + + /// + /// + /// The name of the data stream. + /// + /// + [JsonInclude, JsonPropertyName("name")] + public string Name { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamWithLifecycle.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamWithLifecycle.g.cs index 68c2b4ced4b..f1f55abf69b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamWithLifecycle.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamWithLifecycle.g.cs @@ -30,7 +30,7 @@ namespace Elastic.Clients.Elasticsearch.IndexManagement; public sealed partial class DataStreamWithLifecycle { [JsonInclude, JsonPropertyName("lifecycle")] - public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRollover? Lifecycle { get; init; } + public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycle? Lifecycle { get; init; } [JsonInclude, JsonPropertyName("name")] public string Name { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs index 74651d5ea79..b0ffbd8ba5c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs @@ -67,6 +67,15 @@ public sealed partial class IndexSettingsLifecycle [JsonInclude, JsonPropertyName("parse_origination_date")] public bool? ParseOriginationDate { get; set; } + /// + /// + /// Preference for the system that manages a data stream backing index (preferring ILM when both ILM and DLM are + /// applicable for an index). + /// + /// + [JsonInclude, JsonPropertyName("prefer_ilm")] + public object? PreferIlm { get; set; } + /// /// /// The index alias to update when the index rolls over. Specify when using a policy that contains a rollover action. @@ -92,6 +101,7 @@ public IndexSettingsLifecycleDescriptor() : base() private Elastic.Clients.Elasticsearch.Name? NameValue { get; set; } private long? OriginationDateValue { get; set; } private bool? ParseOriginationDateValue { get; set; } + private object? PreferIlmValue { get; set; } private string? RolloverAliasValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsLifecycleStep? StepValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsLifecycleStepDescriptor StepDescriptor { get; set; } @@ -147,6 +157,18 @@ public IndexSettingsLifecycleDescriptor ParseOriginationDate(bool? parseOriginat return Self; } + /// + /// + /// Preference for the system that manages a data stream backing index (preferring ILM when both ILM and DLM are + /// applicable for an index). + /// + /// + public IndexSettingsLifecycleDescriptor PreferIlm(object? preferIlm) + { + PreferIlmValue = preferIlm; + return Self; + } + /// /// /// The index alias to update when the index rolls over. Specify when using a policy that contains a rollover action. @@ -211,6 +233,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(ParseOriginationDateValue.Value); } + if (PreferIlmValue is not null) + { + writer.WritePropertyName("prefer_ilm"); + JsonSerializer.Serialize(writer, PreferIlmValue, options); + } + if (!string.IsNullOrEmpty(RolloverAliasValue)) { writer.WritePropertyName("rollover_alias"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplate.g.cs index f66dc302ac4..97869c59b97 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplate.g.cs @@ -30,7 +30,7 @@ namespace Elastic.Clients.Elasticsearch.IndexManagement; public sealed partial class IndexTemplate { [JsonInclude, JsonPropertyName("allow_auto_create")] - public bool? AllowAutoCreate { get; init; } + public bool? AllowAutoCreate { get; set; } /// /// @@ -39,7 +39,7 @@ public sealed partial class IndexTemplate /// /// [JsonInclude, JsonPropertyName("composed_of")] - public IReadOnlyCollection ComposedOf { get; init; } + public ICollection ComposedOf { get; set; } /// /// @@ -49,7 +49,7 @@ public sealed partial class IndexTemplate /// /// [JsonInclude, JsonPropertyName("data_stream")] - public Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfiguration? DataStream { get; init; } + public Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfiguration? DataStream { get; set; } /// /// @@ -59,7 +59,7 @@ public sealed partial class IndexTemplate /// /// [JsonInclude, JsonPropertyName("deprecated")] - public bool? Deprecated { get; init; } + public bool? Deprecated { get; set; } /// /// @@ -67,8 +67,7 @@ public sealed partial class IndexTemplate /// /// [JsonInclude, JsonPropertyName("ignore_missing_component_templates")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection? IgnoreMissingComponentTemplates { get; init; } + public Elastic.Clients.Elasticsearch.Names? IgnoreMissingComponentTemplates { get; set; } /// /// @@ -76,8 +75,7 @@ public sealed partial class IndexTemplate /// /// [JsonInclude, JsonPropertyName("index_patterns")] - [SingleOrManyCollectionConverter(typeof(string))] - public IReadOnlyCollection IndexPatterns { get; init; } + public Elastic.Clients.Elasticsearch.Names IndexPatterns { get; set; } /// /// @@ -86,7 +84,7 @@ public sealed partial class IndexTemplate /// /// [JsonInclude, JsonPropertyName("_meta")] - public IReadOnlyDictionary? Meta { get; init; } + public IDictionary? Meta { get; set; } /// /// @@ -97,7 +95,7 @@ public sealed partial class IndexTemplate /// /// [JsonInclude, JsonPropertyName("priority")] - public long? Priority { get; init; } + public long? Priority { get; set; } /// /// @@ -106,7 +104,7 @@ public sealed partial class IndexTemplate /// /// [JsonInclude, JsonPropertyName("template")] - public Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummary? Template { get; init; } + public Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummary? Template { get; set; } /// /// @@ -115,5 +113,513 @@ public sealed partial class IndexTemplate /// /// [JsonInclude, JsonPropertyName("version")] - public long? Version { get; init; } + public long? Version { get; set; } +} + +public sealed partial class IndexTemplateDescriptor : SerializableDescriptor> +{ + internal IndexTemplateDescriptor(Action> configure) => configure.Invoke(this); + + public IndexTemplateDescriptor() : base() + { + } + + private bool? AllowAutoCreateValue { get; set; } + private ICollection ComposedOfValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfiguration? DataStreamValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfigurationDescriptor DataStreamDescriptor { get; set; } + private Action DataStreamDescriptorAction { get; set; } + private bool? DeprecatedValue { get; set; } + private Elastic.Clients.Elasticsearch.Names? IgnoreMissingComponentTemplatesValue { get; set; } + private Elastic.Clients.Elasticsearch.Names IndexPatternsValue { get; set; } + private IDictionary? MetaValue { get; set; } + private long? PriorityValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummary? TemplateValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummaryDescriptor TemplateDescriptor { get; set; } + private Action> TemplateDescriptorAction { get; set; } + private long? VersionValue { get; set; } + + public IndexTemplateDescriptor AllowAutoCreate(bool? allowAutoCreate = true) + { + AllowAutoCreateValue = allowAutoCreate; + return Self; + } + + /// + /// + /// An ordered list of component template names. + /// Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence. + /// + /// + public IndexTemplateDescriptor ComposedOf(ICollection composedOf) + { + ComposedOfValue = composedOf; + return Self; + } + + /// + /// + /// If this object is included, the template is used to create data streams and their backing indices. + /// Supports an empty object. + /// Data streams require a matching index template with a data_stream object. + /// + /// + public IndexTemplateDescriptor DataStream(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfiguration? dataStream) + { + DataStreamDescriptor = null; + DataStreamDescriptorAction = null; + DataStreamValue = dataStream; + return Self; + } + + public IndexTemplateDescriptor DataStream(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfigurationDescriptor descriptor) + { + DataStreamValue = null; + DataStreamDescriptorAction = null; + DataStreamDescriptor = descriptor; + return Self; + } + + public IndexTemplateDescriptor DataStream(Action configure) + { + DataStreamValue = null; + DataStreamDescriptor = null; + DataStreamDescriptorAction = configure; + return Self; + } + + /// + /// + /// Marks this index template as deprecated. + /// When creating or updating a non-deprecated index template that uses deprecated components, + /// Elasticsearch will emit a deprecation warning. + /// + /// + public IndexTemplateDescriptor Deprecated(bool? deprecated = true) + { + DeprecatedValue = deprecated; + return Self; + } + + /// + /// + /// A list of component template names that are allowed to be absent. + /// + /// + public IndexTemplateDescriptor IgnoreMissingComponentTemplates(Elastic.Clients.Elasticsearch.Names? ignoreMissingComponentTemplates) + { + IgnoreMissingComponentTemplatesValue = ignoreMissingComponentTemplates; + return Self; + } + + /// + /// + /// Name of the index template. + /// + /// + public IndexTemplateDescriptor IndexPatterns(Elastic.Clients.Elasticsearch.Names indexPatterns) + { + IndexPatternsValue = indexPatterns; + return Self; + } + + /// + /// + /// Optional user metadata about the index template. May have any contents. + /// This map is not automatically generated by Elasticsearch. + /// + /// + public IndexTemplateDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// + /// Priority to determine index template precedence when a new data stream or index is created. + /// The index template with the highest priority is chosen. + /// If no priority is specified the template is treated as though it is of priority 0 (lowest priority). + /// This number is not automatically generated by Elasticsearch. + /// + /// + public IndexTemplateDescriptor Priority(long? priority) + { + PriorityValue = priority; + return Self; + } + + /// + /// + /// Template to be applied. + /// It may optionally include an aliases, mappings, or settings configuration. + /// + /// + public IndexTemplateDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummary? template) + { + TemplateDescriptor = null; + TemplateDescriptorAction = null; + TemplateValue = template; + return Self; + } + + public IndexTemplateDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummaryDescriptor descriptor) + { + TemplateValue = null; + TemplateDescriptorAction = null; + TemplateDescriptor = descriptor; + return Self; + } + + public IndexTemplateDescriptor Template(Action> configure) + { + TemplateValue = null; + TemplateDescriptor = null; + TemplateDescriptorAction = configure; + return Self; + } + + /// + /// + /// Version number used to manage index templates externally. + /// This number is not automatically generated by Elasticsearch. + /// + /// + public IndexTemplateDescriptor Version(long? version) + { + VersionValue = version; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (AllowAutoCreateValue.HasValue) + { + writer.WritePropertyName("allow_auto_create"); + writer.WriteBooleanValue(AllowAutoCreateValue.Value); + } + + writer.WritePropertyName("composed_of"); + JsonSerializer.Serialize(writer, ComposedOfValue, options); + if (DataStreamDescriptor is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, DataStreamDescriptor, options); + } + else if (DataStreamDescriptorAction is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfigurationDescriptor(DataStreamDescriptorAction), options); + } + else if (DataStreamValue is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, DataStreamValue, options); + } + + if (DeprecatedValue.HasValue) + { + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); + } + + if (IgnoreMissingComponentTemplatesValue is not null) + { + writer.WritePropertyName("ignore_missing_component_templates"); + JsonSerializer.Serialize(writer, IgnoreMissingComponentTemplatesValue, options); + } + + writer.WritePropertyName("index_patterns"); + JsonSerializer.Serialize(writer, IndexPatternsValue, options); + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + + if (PriorityValue.HasValue) + { + writer.WritePropertyName("priority"); + writer.WriteNumberValue(PriorityValue.Value); + } + + if (TemplateDescriptor is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateDescriptor, options); + } + else if (TemplateDescriptorAction is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummaryDescriptor(TemplateDescriptorAction), options); + } + else if (TemplateValue is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateValue, options); + } + + if (VersionValue.HasValue) + { + writer.WritePropertyName("version"); + writer.WriteNumberValue(VersionValue.Value); + } + + writer.WriteEndObject(); + } +} + +public sealed partial class IndexTemplateDescriptor : SerializableDescriptor +{ + internal IndexTemplateDescriptor(Action configure) => configure.Invoke(this); + + public IndexTemplateDescriptor() : base() + { + } + + private bool? AllowAutoCreateValue { get; set; } + private ICollection ComposedOfValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfiguration? DataStreamValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfigurationDescriptor DataStreamDescriptor { get; set; } + private Action DataStreamDescriptorAction { get; set; } + private bool? DeprecatedValue { get; set; } + private Elastic.Clients.Elasticsearch.Names? IgnoreMissingComponentTemplatesValue { get; set; } + private Elastic.Clients.Elasticsearch.Names IndexPatternsValue { get; set; } + private IDictionary? MetaValue { get; set; } + private long? PriorityValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummary? TemplateValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummaryDescriptor TemplateDescriptor { get; set; } + private Action TemplateDescriptorAction { get; set; } + private long? VersionValue { get; set; } + + public IndexTemplateDescriptor AllowAutoCreate(bool? allowAutoCreate = true) + { + AllowAutoCreateValue = allowAutoCreate; + return Self; + } + + /// + /// + /// An ordered list of component template names. + /// Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence. + /// + /// + public IndexTemplateDescriptor ComposedOf(ICollection composedOf) + { + ComposedOfValue = composedOf; + return Self; + } + + /// + /// + /// If this object is included, the template is used to create data streams and their backing indices. + /// Supports an empty object. + /// Data streams require a matching index template with a data_stream object. + /// + /// + public IndexTemplateDescriptor DataStream(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfiguration? dataStream) + { + DataStreamDescriptor = null; + DataStreamDescriptorAction = null; + DataStreamValue = dataStream; + return Self; + } + + public IndexTemplateDescriptor DataStream(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfigurationDescriptor descriptor) + { + DataStreamValue = null; + DataStreamDescriptorAction = null; + DataStreamDescriptor = descriptor; + return Self; + } + + public IndexTemplateDescriptor DataStream(Action configure) + { + DataStreamValue = null; + DataStreamDescriptor = null; + DataStreamDescriptorAction = configure; + return Self; + } + + /// + /// + /// Marks this index template as deprecated. + /// When creating or updating a non-deprecated index template that uses deprecated components, + /// Elasticsearch will emit a deprecation warning. + /// + /// + public IndexTemplateDescriptor Deprecated(bool? deprecated = true) + { + DeprecatedValue = deprecated; + return Self; + } + + /// + /// + /// A list of component template names that are allowed to be absent. + /// + /// + public IndexTemplateDescriptor IgnoreMissingComponentTemplates(Elastic.Clients.Elasticsearch.Names? ignoreMissingComponentTemplates) + { + IgnoreMissingComponentTemplatesValue = ignoreMissingComponentTemplates; + return Self; + } + + /// + /// + /// Name of the index template. + /// + /// + public IndexTemplateDescriptor IndexPatterns(Elastic.Clients.Elasticsearch.Names indexPatterns) + { + IndexPatternsValue = indexPatterns; + return Self; + } + + /// + /// + /// Optional user metadata about the index template. May have any contents. + /// This map is not automatically generated by Elasticsearch. + /// + /// + public IndexTemplateDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// + /// Priority to determine index template precedence when a new data stream or index is created. + /// The index template with the highest priority is chosen. + /// If no priority is specified the template is treated as though it is of priority 0 (lowest priority). + /// This number is not automatically generated by Elasticsearch. + /// + /// + public IndexTemplateDescriptor Priority(long? priority) + { + PriorityValue = priority; + return Self; + } + + /// + /// + /// Template to be applied. + /// It may optionally include an aliases, mappings, or settings configuration. + /// + /// + public IndexTemplateDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummary? template) + { + TemplateDescriptor = null; + TemplateDescriptorAction = null; + TemplateValue = template; + return Self; + } + + public IndexTemplateDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummaryDescriptor descriptor) + { + TemplateValue = null; + TemplateDescriptorAction = null; + TemplateDescriptor = descriptor; + return Self; + } + + public IndexTemplateDescriptor Template(Action configure) + { + TemplateValue = null; + TemplateDescriptor = null; + TemplateDescriptorAction = configure; + return Self; + } + + /// + /// + /// Version number used to manage index templates externally. + /// This number is not automatically generated by Elasticsearch. + /// + /// + public IndexTemplateDescriptor Version(long? version) + { + VersionValue = version; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (AllowAutoCreateValue.HasValue) + { + writer.WritePropertyName("allow_auto_create"); + writer.WriteBooleanValue(AllowAutoCreateValue.Value); + } + + writer.WritePropertyName("composed_of"); + JsonSerializer.Serialize(writer, ComposedOfValue, options); + if (DataStreamDescriptor is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, DataStreamDescriptor, options); + } + else if (DataStreamDescriptorAction is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfigurationDescriptor(DataStreamDescriptorAction), options); + } + else if (DataStreamValue is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, DataStreamValue, options); + } + + if (DeprecatedValue.HasValue) + { + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); + } + + if (IgnoreMissingComponentTemplatesValue is not null) + { + writer.WritePropertyName("ignore_missing_component_templates"); + JsonSerializer.Serialize(writer, IgnoreMissingComponentTemplatesValue, options); + } + + writer.WritePropertyName("index_patterns"); + JsonSerializer.Serialize(writer, IndexPatternsValue, options); + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + + if (PriorityValue.HasValue) + { + writer.WritePropertyName("priority"); + writer.WriteNumberValue(PriorityValue.Value); + } + + if (TemplateDescriptor is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateDescriptor, options); + } + else if (TemplateDescriptorAction is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummaryDescriptor(TemplateDescriptorAction), options); + } + else if (TemplateValue is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateValue, options); + } + + if (VersionValue.HasValue) + { + writer.WritePropertyName("version"); + writer.WriteNumberValue(VersionValue.Value); + } + + writer.WriteEndObject(); + } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs index c8d05104c87..aef9bcd6101 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs @@ -35,7 +35,7 @@ public sealed partial class IndexTemplateDataStreamConfiguration /// /// [JsonInclude, JsonPropertyName("allow_custom_routing")] - public bool? AllowCustomRouting { get; init; } + public bool? AllowCustomRouting { get; set; } /// /// @@ -43,5 +43,57 @@ public sealed partial class IndexTemplateDataStreamConfiguration /// /// [JsonInclude, JsonPropertyName("hidden")] - public bool? Hidden { get; init; } + public bool? Hidden { get; set; } +} + +public sealed partial class IndexTemplateDataStreamConfigurationDescriptor : SerializableDescriptor +{ + internal IndexTemplateDataStreamConfigurationDescriptor(Action configure) => configure.Invoke(this); + + public IndexTemplateDataStreamConfigurationDescriptor() : base() + { + } + + private bool? AllowCustomRoutingValue { get; set; } + private bool? HiddenValue { get; set; } + + /// + /// + /// If true, the data stream supports custom routing. + /// + /// + public IndexTemplateDataStreamConfigurationDescriptor AllowCustomRouting(bool? allowCustomRouting = true) + { + AllowCustomRoutingValue = allowCustomRouting; + return Self; + } + + /// + /// + /// If true, the data stream is hidden. + /// + /// + public IndexTemplateDataStreamConfigurationDescriptor Hidden(bool? hidden = true) + { + HiddenValue = hidden; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (AllowCustomRoutingValue.HasValue) + { + writer.WritePropertyName("allow_custom_routing"); + writer.WriteBooleanValue(AllowCustomRoutingValue.Value); + } + + if (HiddenValue.HasValue) + { + writer.WritePropertyName("hidden"); + writer.WriteBooleanValue(HiddenValue.Value); + } + + writer.WriteEndObject(); + } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateSummary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateSummary.g.cs index be455d697cb..15fdb68c53c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateSummary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateSummary.g.cs @@ -38,10 +38,9 @@ public sealed partial class IndexTemplateSummary /// /// [JsonInclude, JsonPropertyName("aliases")] - [ReadOnlyIndexNameDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.Alias))] - public IReadOnlyDictionary? Aliases { get; init; } + public IDictionary? Aliases { get; set; } [JsonInclude, JsonPropertyName("lifecycle")] - public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRollover? Lifecycle { get; init; } + public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRollover? Lifecycle { get; set; } /// /// @@ -50,7 +49,7 @@ public sealed partial class IndexTemplateSummary /// /// [JsonInclude, JsonPropertyName("mappings")] - public Elastic.Clients.Elasticsearch.Mapping.TypeMapping? Mappings { get; init; } + public Elastic.Clients.Elasticsearch.Mapping.TypeMapping? Mappings { get; set; } /// /// @@ -58,5 +57,359 @@ public sealed partial class IndexTemplateSummary /// /// [JsonInclude, JsonPropertyName("settings")] - public Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? Settings { get; init; } + public Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? Settings { get; set; } +} + +public sealed partial class IndexTemplateSummaryDescriptor : SerializableDescriptor> +{ + internal IndexTemplateSummaryDescriptor(Action> configure) => configure.Invoke(this); + + public IndexTemplateSummaryDescriptor() : base() + { + } + + private IDictionary> AliasesValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRollover? LifecycleValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRolloverDescriptor LifecycleDescriptor { get; set; } + private Action LifecycleDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.TypeMapping? MappingsValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } + private Action> MappingsDescriptorAction { 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; } + + /// + /// + /// Aliases to add. + /// If the index template includes a data_stream object, these are data stream aliases. + /// Otherwise, these are index aliases. + /// Data stream aliases ignore the index_routing, routing, and search_routing options. + /// + /// + public IndexTemplateSummaryDescriptor Aliases(Func>, FluentDescriptorDictionary>> selector) + { + AliasesValue = selector?.Invoke(new FluentDescriptorDictionary>()); + return Self; + } + + public IndexTemplateSummaryDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRollover? lifecycle) + { + LifecycleDescriptor = null; + LifecycleDescriptorAction = null; + LifecycleValue = lifecycle; + return Self; + } + + public IndexTemplateSummaryDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRolloverDescriptor descriptor) + { + LifecycleValue = null; + LifecycleDescriptorAction = null; + LifecycleDescriptor = descriptor; + return Self; + } + + public IndexTemplateSummaryDescriptor Lifecycle(Action configure) + { + LifecycleValue = null; + LifecycleDescriptor = null; + LifecycleDescriptorAction = configure; + return Self; + } + + /// + /// + /// Mapping for fields in the index. + /// If specified, this mapping can include field names, field data types, and mapping parameters. + /// + /// + public IndexTemplateSummaryDescriptor Mappings(Elastic.Clients.Elasticsearch.Mapping.TypeMapping? mappings) + { + MappingsDescriptor = null; + MappingsDescriptorAction = null; + MappingsValue = mappings; + return Self; + } + + public IndexTemplateSummaryDescriptor Mappings(Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor descriptor) + { + MappingsValue = null; + MappingsDescriptorAction = null; + MappingsDescriptor = descriptor; + return Self; + } + + public IndexTemplateSummaryDescriptor Mappings(Action> configure) + { + MappingsValue = null; + MappingsDescriptor = null; + MappingsDescriptorAction = configure; + return Self; + } + + /// + /// + /// Configuration options for the index. + /// + /// + public IndexTemplateSummaryDescriptor Settings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? settings) + { + SettingsDescriptor = null; + SettingsDescriptorAction = null; + SettingsValue = settings; + return Self; + } + + public IndexTemplateSummaryDescriptor Settings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor descriptor) + { + SettingsValue = null; + SettingsDescriptorAction = null; + SettingsDescriptor = descriptor; + return Self; + } + + public IndexTemplateSummaryDescriptor Settings(Action> configure) + { + SettingsValue = null; + SettingsDescriptor = null; + SettingsDescriptorAction = configure; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + + if (LifecycleDescriptor is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleDescriptor, options); + } + else if (LifecycleDescriptorAction is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRolloverDescriptor(LifecycleDescriptorAction), options); + } + else if (LifecycleValue is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleValue, options); + } + + if (MappingsDescriptor is not null) + { + writer.WritePropertyName("mappings"); + JsonSerializer.Serialize(writer, MappingsDescriptor, options); + } + else if (MappingsDescriptorAction is not null) + { + writer.WritePropertyName("mappings"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor(MappingsDescriptorAction), options); + } + else if (MappingsValue is not null) + { + writer.WritePropertyName("mappings"); + JsonSerializer.Serialize(writer, MappingsValue, options); + } + + 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) + { + writer.WritePropertyName("settings"); + JsonSerializer.Serialize(writer, SettingsValue, options); + } + + writer.WriteEndObject(); + } +} + +public sealed partial class IndexTemplateSummaryDescriptor : SerializableDescriptor +{ + internal IndexTemplateSummaryDescriptor(Action configure) => configure.Invoke(this); + + public IndexTemplateSummaryDescriptor() : base() + { + } + + private IDictionary AliasesValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRollover? LifecycleValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRolloverDescriptor LifecycleDescriptor { get; set; } + private Action LifecycleDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.TypeMapping? MappingsValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } + private Action MappingsDescriptorAction { 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; } + + /// + /// + /// Aliases to add. + /// If the index template includes a data_stream object, these are data stream aliases. + /// Otherwise, these are index aliases. + /// Data stream aliases ignore the index_routing, routing, and search_routing options. + /// + /// + public IndexTemplateSummaryDescriptor Aliases(Func, FluentDescriptorDictionary> selector) + { + AliasesValue = selector?.Invoke(new FluentDescriptorDictionary()); + return Self; + } + + public IndexTemplateSummaryDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRollover? lifecycle) + { + LifecycleDescriptor = null; + LifecycleDescriptorAction = null; + LifecycleValue = lifecycle; + return Self; + } + + public IndexTemplateSummaryDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRolloverDescriptor descriptor) + { + LifecycleValue = null; + LifecycleDescriptorAction = null; + LifecycleDescriptor = descriptor; + return Self; + } + + public IndexTemplateSummaryDescriptor Lifecycle(Action configure) + { + LifecycleValue = null; + LifecycleDescriptor = null; + LifecycleDescriptorAction = configure; + return Self; + } + + /// + /// + /// Mapping for fields in the index. + /// If specified, this mapping can include field names, field data types, and mapping parameters. + /// + /// + public IndexTemplateSummaryDescriptor Mappings(Elastic.Clients.Elasticsearch.Mapping.TypeMapping? mappings) + { + MappingsDescriptor = null; + MappingsDescriptorAction = null; + MappingsValue = mappings; + return Self; + } + + public IndexTemplateSummaryDescriptor Mappings(Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor descriptor) + { + MappingsValue = null; + MappingsDescriptorAction = null; + MappingsDescriptor = descriptor; + return Self; + } + + public IndexTemplateSummaryDescriptor Mappings(Action configure) + { + MappingsValue = null; + MappingsDescriptor = null; + MappingsDescriptorAction = configure; + return Self; + } + + /// + /// + /// Configuration options for the index. + /// + /// + public IndexTemplateSummaryDescriptor Settings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? settings) + { + SettingsDescriptor = null; + SettingsDescriptorAction = null; + SettingsValue = settings; + return Self; + } + + public IndexTemplateSummaryDescriptor Settings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor descriptor) + { + SettingsValue = null; + SettingsDescriptorAction = null; + SettingsDescriptor = descriptor; + return Self; + } + + public IndexTemplateSummaryDescriptor Settings(Action configure) + { + SettingsValue = null; + SettingsDescriptor = null; + SettingsDescriptorAction = configure; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + + if (LifecycleDescriptor is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleDescriptor, options); + } + else if (LifecycleDescriptorAction is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRolloverDescriptor(LifecycleDescriptorAction), options); + } + else if (LifecycleValue is not null) + { + writer.WritePropertyName("lifecycle"); + JsonSerializer.Serialize(writer, LifecycleValue, options); + } + + if (MappingsDescriptor is not null) + { + writer.WritePropertyName("mappings"); + JsonSerializer.Serialize(writer, MappingsDescriptor, options); + } + else if (MappingsDescriptorAction is not null) + { + writer.WritePropertyName("mappings"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor(MappingsDescriptorAction), options); + } + else if (MappingsValue is not null) + { + writer.WritePropertyName("mappings"); + JsonSerializer.Serialize(writer, MappingsValue, options); + } + + 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) + { + writer.WritePropertyName("settings"); + JsonSerializer.Serialize(writer, SettingsValue, options); + } + + writer.WriteEndObject(); + } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs index a0fb8572f81..98ed5d32891 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs @@ -44,11 +44,13 @@ public sealed partial class MappingLimitSettings [JsonInclude, JsonPropertyName("field_name_length")] public Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsFieldNameLength? FieldNameLength { get; set; } [JsonInclude, JsonPropertyName("ignore_malformed")] - public bool? IgnoreMalformed { get; set; } + public object? IgnoreMalformed { get; set; } [JsonInclude, JsonPropertyName("nested_fields")] public Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsNestedFields? NestedFields { get; set; } [JsonInclude, JsonPropertyName("nested_objects")] public Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsNestedObjects? NestedObjects { get; set; } + [JsonInclude, JsonPropertyName("source")] + public Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsSourceFields? Source { get; set; } [JsonInclude, JsonPropertyName("total_fields")] public Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsTotalFields? TotalFields { get; set; } } @@ -77,13 +79,16 @@ public MappingLimitSettingsDescriptor() : base() private Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsFieldNameLength? FieldNameLengthValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsFieldNameLengthDescriptor FieldNameLengthDescriptor { get; set; } private Action FieldNameLengthDescriptorAction { get; set; } - private bool? IgnoreMalformedValue { get; set; } + private object? IgnoreMalformedValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsNestedFields? NestedFieldsValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsNestedFieldsDescriptor NestedFieldsDescriptor { get; set; } private Action NestedFieldsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsNestedObjects? NestedObjectsValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsNestedObjectsDescriptor NestedObjectsDescriptor { get; set; } private Action NestedObjectsDescriptorAction { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsSourceFields? SourceValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsSourceFieldsDescriptor SourceDescriptor { get; set; } + private Action SourceDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsTotalFields? TotalFieldsValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsTotalFieldsDescriptor TotalFieldsDescriptor { get; set; } private Action TotalFieldsDescriptorAction { get; set; } @@ -166,7 +171,7 @@ public MappingLimitSettingsDescriptor FieldNameLength(Action configure) + { + SourceValue = null; + SourceDescriptor = null; + SourceDescriptorAction = configure; + return Self; + } + public MappingLimitSettingsDescriptor TotalFields(Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsTotalFields? totalFields) { TotalFieldsDescriptor = null; @@ -301,10 +330,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldNameLengthValue, options); } - if (IgnoreMalformedValue.HasValue) + if (IgnoreMalformedValue is not null) { writer.WritePropertyName("ignore_malformed"); - writer.WriteBooleanValue(IgnoreMalformedValue.Value); + JsonSerializer.Serialize(writer, IgnoreMalformedValue, options); } if (NestedFieldsDescriptor is not null) @@ -339,6 +368,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, NestedObjectsValue, options); } + if (SourceDescriptor is not null) + { + writer.WritePropertyName("source"); + JsonSerializer.Serialize(writer, SourceDescriptor, options); + } + else if (SourceDescriptorAction is not null) + { + writer.WritePropertyName("source"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsSourceFieldsDescriptor(SourceDescriptorAction), options); + } + else if (SourceValue is not null) + { + writer.WritePropertyName("source"); + JsonSerializer.Serialize(writer, SourceValue, options); + } + if (TotalFieldsDescriptor is not null) { writer.WritePropertyName("total_fields"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsSourceFields.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsSourceFields.g.cs new file mode 100644 index 00000000000..cd91e0cc57e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsSourceFields.g.cs @@ -0,0 +1,59 @@ +// 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 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 MappingLimitSettingsSourceFields +{ + [JsonInclude, JsonPropertyName("mode")] + public Elastic.Clients.Elasticsearch.IndexManagement.SourceMode Mode { get; set; } +} + +public sealed partial class MappingLimitSettingsSourceFieldsDescriptor : SerializableDescriptor +{ + internal MappingLimitSettingsSourceFieldsDescriptor(Action configure) => configure.Invoke(this); + + public MappingLimitSettingsSourceFieldsDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.IndexManagement.SourceMode ModeValue { get; set; } + + public MappingLimitSettingsSourceFieldsDescriptor Mode(Elastic.Clients.Elasticsearch.IndexManagement.SourceMode mode) + { + ModeValue = mode; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("mode"); + JsonSerializer.Serialize(writer, ModeValue, options); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ResolveClusterInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ResolveClusterInfo.g.cs index 80a4821a300..6870149f308 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ResolveClusterInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ResolveClusterInfo.g.cs @@ -45,7 +45,7 @@ public sealed partial class ResolveClusterInfo /// /// /// Provides error messages that are likely to occur if you do a search with this index expression - /// on the specified cluster (e.g., lack of security privileges to query an index). + /// on the specified cluster (for example, lack of security privileges to query an index). /// /// [JsonInclude, JsonPropertyName("error")] @@ -62,7 +62,7 @@ public sealed partial class ResolveClusterInfo /// /// - /// The skip_unavailable setting for a remote cluster. + /// The skip_unavailable setting for a remote cluster. /// /// [JsonInclude, JsonPropertyName("skip_unavailable")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceChunkingSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceChunkingSettings.g.cs new file mode 100644 index 00000000000..4e6406fc6aa --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceChunkingSettings.g.cs @@ -0,0 +1,299 @@ +// 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 System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Inference; + +/// +/// +/// Chunking configuration object +/// +/// +public sealed partial class InferenceChunkingSettings +{ + /// + /// + /// Chunking configuration object + /// + /// + [JsonInclude, JsonPropertyName("chunking_settings")] + public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } + + /// + /// + /// Specifies the maximum size of a chunk in words + /// This value cannot be higher than 300 or lower than 20 (for sentence strategy) or 10 (for word strategy) + /// + /// + [JsonInclude, JsonPropertyName("max_chunk_size")] + public int? MaxChunkSize { get; set; } + + /// + /// + /// Specifies the number of overlapping words for chunks + /// Only for word chunking strategy + /// This value cannot be higher than the half of max_chunk_size + /// + /// + [JsonInclude, JsonPropertyName("overlap")] + public int? Overlap { get; set; } + + /// + /// + /// Specifies the number of overlapping sentences for chunks + /// Only for sentence chunking strategy + /// It can be either 1 or 0 + /// + /// + [JsonInclude, JsonPropertyName("sentence_overlap")] + public int? SentenceOverlap { get; set; } + + /// + /// + /// The service type + /// + /// + [JsonInclude, JsonPropertyName("service")] + public string Service { get; set; } + + /// + /// + /// Settings specific to the service + /// + /// + [JsonInclude, JsonPropertyName("service_settings")] + public object ServiceSettings { get; set; } + + /// + /// + /// Specifies the chunking strategy + /// It could be either sentence or word + /// + /// + [JsonInclude, JsonPropertyName("strategy")] + public string? Strategy { get; set; } + + /// + /// + /// Task settings specific to the service and task type + /// + /// + [JsonInclude, JsonPropertyName("task_settings")] + public object? TaskSettings { get; set; } +} + +/// +/// +/// Chunking configuration object +/// +/// +public sealed partial class InferenceChunkingSettingsDescriptor : SerializableDescriptor +{ + internal InferenceChunkingSettingsDescriptor(Action configure) => configure.Invoke(this); + + public InferenceChunkingSettingsDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettingsValue { get; set; } + private Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor ChunkingSettingsDescriptor { get; set; } + private Action ChunkingSettingsDescriptorAction { get; set; } + private int? MaxChunkSizeValue { get; set; } + private int? OverlapValue { get; set; } + private int? SentenceOverlapValue { get; set; } + private string ServiceValue { get; set; } + private object ServiceSettingsValue { get; set; } + private string? StrategyValue { get; set; } + private object? TaskSettingsValue { get; set; } + + /// + /// + /// Chunking configuration object + /// + /// + public InferenceChunkingSettingsDescriptor ChunkingSettings(Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? chunkingSettings) + { + ChunkingSettingsDescriptor = null; + ChunkingSettingsDescriptorAction = null; + ChunkingSettingsValue = chunkingSettings; + return Self; + } + + public InferenceChunkingSettingsDescriptor ChunkingSettings(Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor descriptor) + { + ChunkingSettingsValue = null; + ChunkingSettingsDescriptorAction = null; + ChunkingSettingsDescriptor = descriptor; + return Self; + } + + public InferenceChunkingSettingsDescriptor ChunkingSettings(Action configure) + { + ChunkingSettingsValue = null; + ChunkingSettingsDescriptor = null; + ChunkingSettingsDescriptorAction = configure; + return Self; + } + + /// + /// + /// Specifies the maximum size of a chunk in words + /// This value cannot be higher than 300 or lower than 20 (for sentence strategy) or 10 (for word strategy) + /// + /// + public InferenceChunkingSettingsDescriptor MaxChunkSize(int? maxChunkSize) + { + MaxChunkSizeValue = maxChunkSize; + return Self; + } + + /// + /// + /// Specifies the number of overlapping words for chunks + /// Only for word chunking strategy + /// This value cannot be higher than the half of max_chunk_size + /// + /// + public InferenceChunkingSettingsDescriptor Overlap(int? overlap) + { + OverlapValue = overlap; + return Self; + } + + /// + /// + /// Specifies the number of overlapping sentences for chunks + /// Only for sentence chunking strategy + /// It can be either 1 or 0 + /// + /// + public InferenceChunkingSettingsDescriptor SentenceOverlap(int? sentenceOverlap) + { + SentenceOverlapValue = sentenceOverlap; + return Self; + } + + /// + /// + /// The service type + /// + /// + public InferenceChunkingSettingsDescriptor Service(string service) + { + ServiceValue = service; + return Self; + } + + /// + /// + /// Settings specific to the service + /// + /// + public InferenceChunkingSettingsDescriptor ServiceSettings(object serviceSettings) + { + ServiceSettingsValue = serviceSettings; + return Self; + } + + /// + /// + /// Specifies the chunking strategy + /// It could be either sentence or word + /// + /// + public InferenceChunkingSettingsDescriptor Strategy(string? strategy) + { + StrategyValue = strategy; + return Self; + } + + /// + /// + /// Task settings specific to the service and task type + /// + /// + public InferenceChunkingSettingsDescriptor TaskSettings(object? taskSettings) + { + TaskSettingsValue = taskSettings; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (ChunkingSettingsDescriptor is not null) + { + writer.WritePropertyName("chunking_settings"); + JsonSerializer.Serialize(writer, ChunkingSettingsDescriptor, options); + } + else if (ChunkingSettingsDescriptorAction is not null) + { + writer.WritePropertyName("chunking_settings"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor(ChunkingSettingsDescriptorAction), options); + } + else if (ChunkingSettingsValue is not null) + { + writer.WritePropertyName("chunking_settings"); + JsonSerializer.Serialize(writer, ChunkingSettingsValue, options); + } + + if (MaxChunkSizeValue.HasValue) + { + writer.WritePropertyName("max_chunk_size"); + writer.WriteNumberValue(MaxChunkSizeValue.Value); + } + + if (OverlapValue.HasValue) + { + writer.WritePropertyName("overlap"); + writer.WriteNumberValue(OverlapValue.Value); + } + + if (SentenceOverlapValue.HasValue) + { + writer.WritePropertyName("sentence_overlap"); + writer.WriteNumberValue(SentenceOverlapValue.Value); + } + + writer.WritePropertyName("service"); + writer.WriteStringValue(ServiceValue); + writer.WritePropertyName("service_settings"); + JsonSerializer.Serialize(writer, ServiceSettingsValue, options); + if (!string.IsNullOrEmpty(StrategyValue)) + { + writer.WritePropertyName("strategy"); + writer.WriteStringValue(StrategyValue); + } + + if (TaskSettingsValue is not null) + { + writer.WritePropertyName("task_settings"); + JsonSerializer.Serialize(writer, TaskSettingsValue, options); + } + + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceEndpoint.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceEndpoint.g.cs index cd1fd616d31..396fd5dfbf4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceEndpoint.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceEndpoint.g.cs @@ -34,6 +34,14 @@ namespace Elastic.Clients.Elasticsearch.Inference; /// public sealed partial class InferenceEndpoint { + /// + /// + /// Chunking configuration object + /// + /// + [JsonInclude, JsonPropertyName("chunking_settings")] + public Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettings { get; set; } + /// /// /// The service type @@ -72,10 +80,42 @@ public InferenceEndpointDescriptor() : base() { } + private Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? ChunkingSettingsValue { get; set; } + private Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor ChunkingSettingsDescriptor { get; set; } + private Action ChunkingSettingsDescriptorAction { get; set; } private string ServiceValue { get; set; } private object ServiceSettingsValue { get; set; } private object? TaskSettingsValue { get; set; } + /// + /// + /// Chunking configuration object + /// + /// + public InferenceEndpointDescriptor ChunkingSettings(Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings? chunkingSettings) + { + ChunkingSettingsDescriptor = null; + ChunkingSettingsDescriptorAction = null; + ChunkingSettingsValue = chunkingSettings; + return Self; + } + + public InferenceEndpointDescriptor ChunkingSettings(Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor descriptor) + { + ChunkingSettingsValue = null; + ChunkingSettingsDescriptorAction = null; + ChunkingSettingsDescriptor = descriptor; + return Self; + } + + public InferenceEndpointDescriptor ChunkingSettings(Action configure) + { + ChunkingSettingsValue = null; + ChunkingSettingsDescriptor = null; + ChunkingSettingsDescriptorAction = configure; + return Self; + } + /// /// /// The service type @@ -112,6 +152,22 @@ public InferenceEndpointDescriptor TaskSettings(object? taskSettings) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (ChunkingSettingsDescriptor is not null) + { + writer.WritePropertyName("chunking_settings"); + JsonSerializer.Serialize(writer, ChunkingSettingsDescriptor, options); + } + else if (ChunkingSettingsDescriptorAction is not null) + { + writer.WritePropertyName("chunking_settings"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettingsDescriptor(ChunkingSettingsDescriptorAction), options); + } + else if (ChunkingSettingsValue is not null) + { + writer.WritePropertyName("chunking_settings"); + JsonSerializer.Serialize(writer, ChunkingSettingsValue, options); + } + writer.WritePropertyName("service"); writer.WriteStringValue(ServiceValue); writer.WritePropertyName("service_settings"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceEndpointInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceEndpointInfo.g.cs index d0324de75cc..c47cc9d986c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceEndpointInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceEndpointInfo.g.cs @@ -34,6 +34,14 @@ namespace Elastic.Clients.Elasticsearch.Inference; /// public sealed partial class InferenceEndpointInfo { + /// + /// + /// 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/Types/Ingest/DocumentSimulation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DocumentSimulation.g.cs index 8d048ce6754..2b1315027ed 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DocumentSimulation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DocumentSimulation.g.cs @@ -35,7 +35,7 @@ public override DocumentSimulation Read(ref Utf8JsonReader reader, Type typeToCo throw new JsonException("Unexpected JSON detected."); string id = default; string index = default; - Elastic.Clients.Elasticsearch.Ingest.IngestInfo ingest = default; + Elastic.Clients.Elasticsearch.Ingest.Ingest ingest = default; string? routing = default; IReadOnlyDictionary source = default; long? version = default; @@ -60,7 +60,7 @@ public override DocumentSimulation Read(ref Utf8JsonReader reader, Type typeToCo if (property == "_ingest") { - ingest = JsonSerializer.Deserialize(ref reader, options); + ingest = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -124,7 +124,7 @@ public sealed partial class DocumentSimulation /// /// public string Index { get; init; } - public Elastic.Clients.Elasticsearch.Ingest.IngestInfo Ingest { get; init; } + public Elastic.Clients.Elasticsearch.Ingest.Ingest Ingest { get; init; } /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/IngestInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Ingest.g.cs similarity index 97% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/IngestInfo.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Ingest.g.cs index 45e9a06e279..972a815ffdd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/IngestInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Ingest.g.cs @@ -27,7 +27,7 @@ namespace Elastic.Clients.Elasticsearch.Ingest; -public sealed partial class IngestInfo +public sealed partial class Ingest { [JsonInclude, JsonPropertyName("pipeline")] public string? Pipeline { get; init; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnomalyCause.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnomalyCause.g.cs index 9d46f90aac6..5b7654f74c6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnomalyCause.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnomalyCause.g.cs @@ -30,31 +30,33 @@ namespace Elastic.Clients.Elasticsearch.MachineLearning; public sealed partial class AnomalyCause { [JsonInclude, JsonPropertyName("actual")] - public IReadOnlyCollection Actual { get; init; } + public IReadOnlyCollection? Actual { get; init; } [JsonInclude, JsonPropertyName("by_field_name")] - public string ByFieldName { get; init; } + public string? ByFieldName { get; init; } [JsonInclude, JsonPropertyName("by_field_value")] - public string ByFieldValue { get; init; } + public string? ByFieldValue { get; init; } [JsonInclude, JsonPropertyName("correlated_by_field_value")] - public string CorrelatedByFieldValue { get; init; } + public string? CorrelatedByFieldValue { get; init; } [JsonInclude, JsonPropertyName("field_name")] - public string FieldName { get; init; } + public string? FieldName { get; init; } [JsonInclude, JsonPropertyName("function")] - public string Function { get; init; } + public string? Function { get; init; } [JsonInclude, JsonPropertyName("function_description")] - public string FunctionDescription { get; init; } + public string? FunctionDescription { get; init; } + [JsonInclude, JsonPropertyName("geo_results")] + public Elastic.Clients.Elasticsearch.MachineLearning.GeoResults? GeoResults { get; init; } [JsonInclude, JsonPropertyName("influencers")] - public IReadOnlyCollection Influencers { get; init; } + public IReadOnlyCollection? Influencers { get; init; } [JsonInclude, JsonPropertyName("over_field_name")] - public string OverFieldName { get; init; } + public string? OverFieldName { get; init; } [JsonInclude, JsonPropertyName("over_field_value")] - public string OverFieldValue { get; init; } + public string? OverFieldValue { get; init; } [JsonInclude, JsonPropertyName("partition_field_name")] - public string PartitionFieldName { get; init; } + public string? PartitionFieldName { get; init; } [JsonInclude, JsonPropertyName("partition_field_value")] - public string PartitionFieldValue { get; init; } + public string? PartitionFieldValue { get; init; } [JsonInclude, JsonPropertyName("probability")] public double Probability { get; init; } [JsonInclude, JsonPropertyName("typical")] - public IReadOnlyCollection Typical { get; init; } + public IReadOnlyCollection? Typical { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/CalendarEvent.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/CalendarEvent.g.cs index 7bd01bd3b81..a0e178429e7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/CalendarEvent.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/CalendarEvent.g.cs @@ -55,30 +55,6 @@ public sealed partial class CalendarEvent [JsonInclude, JsonPropertyName("event_id")] public Elastic.Clients.Elasticsearch.Id? EventId { get; set; } - /// - /// - /// Shift time by this many seconds. For example adjust time for daylight savings changes - /// - /// - [JsonInclude, JsonPropertyName("force_time_shift")] - public int? ForceTimeShift { get; set; } - - /// - /// - /// When true the model will not be updated for this calendar period. - /// - /// - [JsonInclude, JsonPropertyName("skip_model_update")] - public bool? SkipModelUpdate { get; set; } - - /// - /// - /// When true the model will not create results for this calendar period. - /// - /// - [JsonInclude, JsonPropertyName("skip_result")] - public bool? SkipResult { get; set; } - /// /// /// The timestamp for the beginning of the scheduled event in milliseconds since the epoch or ISO 8601 format. @@ -100,9 +76,6 @@ public CalendarEventDescriptor() : base() private string DescriptionValue { get; set; } private DateTimeOffset EndTimeValue { get; set; } private Elastic.Clients.Elasticsearch.Id? EventIdValue { get; set; } - private int? ForceTimeShiftValue { get; set; } - private bool? SkipModelUpdateValue { get; set; } - private bool? SkipResultValue { get; set; } private DateTimeOffset StartTimeValue { get; set; } /// @@ -144,39 +117,6 @@ public CalendarEventDescriptor EventId(Elastic.Clients.Elasticsearch.Id? eventId return Self; } - /// - /// - /// Shift time by this many seconds. For example adjust time for daylight savings changes - /// - /// - public CalendarEventDescriptor ForceTimeShift(int? forceTimeShift) - { - ForceTimeShiftValue = forceTimeShift; - return Self; - } - - /// - /// - /// When true the model will not be updated for this calendar period. - /// - /// - public CalendarEventDescriptor SkipModelUpdate(bool? skipModelUpdate = true) - { - SkipModelUpdateValue = skipModelUpdate; - return Self; - } - - /// - /// - /// When true the model will not create results for this calendar period. - /// - /// - public CalendarEventDescriptor SkipResult(bool? skipResult = true) - { - SkipResultValue = skipResult; - return Self; - } - /// /// /// The timestamp for the beginning of the scheduled event in milliseconds since the epoch or ISO 8601 format. @@ -207,24 +147,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, EventIdValue, options); } - if (ForceTimeShiftValue.HasValue) - { - writer.WritePropertyName("force_time_shift"); - writer.WriteNumberValue(ForceTimeShiftValue.Value); - } - - if (SkipModelUpdateValue.HasValue) - { - writer.WritePropertyName("skip_model_update"); - writer.WriteBooleanValue(SkipModelUpdateValue.Value); - } - - if (SkipResultValue.HasValue) - { - writer.WritePropertyName("skip_result"); - writer.WriteBooleanValue(SkipResultValue.Value); - } - writer.WritePropertyName("start_time"); JsonSerializer.Serialize(writer, StartTimeValue, options); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/GeoResults.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/GeoResults.g.cs index f3edb0a1949..4839e17a6e9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/GeoResults.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/GeoResults.g.cs @@ -35,7 +35,7 @@ public sealed partial class GeoResults /// /// [JsonInclude, JsonPropertyName("actual_point")] - public string ActualPoint { get; init; } + public string? ActualPoint { get; init; } /// /// @@ -43,5 +43,5 @@ public sealed partial class GeoResults /// /// [JsonInclude, JsonPropertyName("typical_point")] - public string TypicalPoint { get; init; } + public string? TypicalPoint { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs index b9d6ba63c8b..b1417a7bf30 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs @@ -49,6 +49,8 @@ public sealed partial class AggregateMetricDoubleProperty : IProperty public ICollection Metrics { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("time_series_metric")] public Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetric { get; set; } @@ -71,6 +73,7 @@ public AggregateMetricDoublePropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private ICollection MetricsValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } public AggregateMetricDoublePropertyDescriptor DefaultMetric(string defaultMetric) @@ -148,6 +151,12 @@ public AggregateMetricDoublePropertyDescriptor Properties(Action SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + public AggregateMetricDoublePropertyDescriptor TimeSeriesMetric(Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? timeSeriesMetric) { TimeSeriesMetricValue = timeSeriesMetric; @@ -191,6 +200,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesMetricValue is not null) { writer.WritePropertyName("time_series_metric"); @@ -211,6 +226,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, Metrics = MetricsValue, Properties = PropertiesValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesMetric = TimeSeriesMetricValue }; } @@ -230,6 +246,7 @@ public AggregateMetricDoublePropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private ICollection MetricsValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } public AggregateMetricDoublePropertyDescriptor DefaultMetric(string defaultMetric) @@ -307,6 +324,12 @@ public AggregateMetricDoublePropertyDescriptor Properties(Action "binary"; @@ -73,6 +75,7 @@ public BinaryPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public BinaryPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) { @@ -155,6 +158,12 @@ public BinaryPropertyDescriptor Store(bool? store = true) return Self; } + public BinaryPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -206,6 +215,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("binary"); writer.WriteEndObject(); @@ -220,7 +235,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -240,6 +256,7 @@ public BinaryPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public BinaryPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) { @@ -322,6 +339,12 @@ public BinaryPropertyDescriptor Store(bool? store = true) return Self; } + public BinaryPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -373,6 +396,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("binary"); writer.WriteEndObject(); @@ -387,6 +416,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BooleanProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BooleanProperty.g.cs index f0f377e59a1..3823bc9de08 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BooleanProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BooleanProperty.g.cs @@ -60,6 +60,8 @@ public sealed partial class BooleanProperty : IProperty public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "boolean"; @@ -87,6 +89,7 @@ public BooleanPropertyDescriptor() : base() private bool? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public BooleanPropertyDescriptor Boost(double? boost) { @@ -211,6 +214,12 @@ public BooleanPropertyDescriptor Store(bool? store = true) return Self; } + public BooleanPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -296,6 +305,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("boolean"); writer.WriteEndObject(); @@ -338,7 +353,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, NullValue = NullValueValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -364,6 +380,7 @@ public BooleanPropertyDescriptor() : base() private bool? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public BooleanPropertyDescriptor Boost(double? boost) { @@ -488,6 +505,12 @@ public BooleanPropertyDescriptor Store(bool? store = true) return Self; } + public BooleanPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -573,6 +596,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("boolean"); writer.WriteEndObject(); @@ -615,6 +644,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, NullValue = NullValueValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ByteNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ByteNumberProperty.g.cs index 71d104cab4c..3d0ed7df7e3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ByteNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ByteNumberProperty.g.cs @@ -66,6 +66,8 @@ public sealed partial class ByteNumberProperty : IProperty public Elastic.Clients.Elasticsearch.Script? Script { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } /// /// @@ -112,6 +114,7 @@ public ByteNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -256,6 +259,12 @@ public ByteNumberPropertyDescriptor Store(bool? store = true) return Self; } + public ByteNumberPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -381,6 +390,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -439,6 +454,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Properties = PropertiesValue, Script = BuildScript(), Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue }; @@ -469,6 +485,7 @@ public ByteNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -613,6 +630,12 @@ public ByteNumberPropertyDescriptor Store(bool? store = true) return Self; } + public ByteNumberPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -738,6 +761,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -796,6 +825,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Properties = PropertiesValue, Script = BuildScript(), Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue }; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs index c0074fde8a4..e5852e1fc41 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs @@ -64,6 +64,8 @@ public sealed partial class CompletionProperty : IProperty public string? SearchAnalyzer { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "completion"; @@ -94,6 +96,7 @@ public CompletionPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private string? SearchAnalyzerValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public CompletionPropertyDescriptor Analyzer(string? analyzer) { @@ -242,6 +245,12 @@ public CompletionPropertyDescriptor Store(bool? store = true) return Self; } + public CompletionPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -354,6 +363,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("completion"); writer.WriteEndObject(); @@ -398,7 +413,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o PreserveSeparators = PreserveSeparatorsValue, Properties = PropertiesValue, SearchAnalyzer = SearchAnalyzerValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -427,6 +443,7 @@ public CompletionPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private string? SearchAnalyzerValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public CompletionPropertyDescriptor Analyzer(string? analyzer) { @@ -575,6 +592,12 @@ public CompletionPropertyDescriptor Store(bool? store = true) return Self; } + public CompletionPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -687,6 +710,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("completion"); writer.WriteEndObject(); @@ -731,6 +760,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o PreserveSeparators = PreserveSeparatorsValue, Properties = PropertiesValue, SearchAnalyzer = SearchAnalyzerValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs index aa3097fd7bf..d8a59989901 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs @@ -45,6 +45,8 @@ public sealed partial class ConstantKeywordProperty : IProperty public IDictionary? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "constant_keyword"; @@ -66,6 +68,7 @@ public ConstantKeywordPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private object? ValueValue { get; set; } public ConstantKeywordPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) @@ -131,6 +134,12 @@ public ConstantKeywordPropertyDescriptor Properties(Action SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + public ConstantKeywordPropertyDescriptor Value(object? value) { ValueValue = value; @@ -170,6 +179,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("constant_keyword"); if (ValueValue is not null) @@ -188,6 +203,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, Properties = PropertiesValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, Value = ValueValue }; } @@ -205,6 +221,7 @@ public ConstantKeywordPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private object? ValueValue { get; set; } public ConstantKeywordPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) @@ -270,6 +287,12 @@ public ConstantKeywordPropertyDescriptor Properties(Action "date_nanos"; @@ -91,6 +93,7 @@ public DateNanosPropertyDescriptor() : base() private int? PrecisionStepValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public DateNanosPropertyDescriptor Boost(double? boost) { @@ -209,6 +212,12 @@ public DateNanosPropertyDescriptor Store(bool? store = true) return Self; } + public DateNanosPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -296,6 +305,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("date_nanos"); writer.WriteEndObject(); @@ -316,7 +331,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o NullValue = NullValueValue, PrecisionStep = PrecisionStepValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -342,6 +358,7 @@ public DateNanosPropertyDescriptor() : base() private int? PrecisionStepValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public DateNanosPropertyDescriptor Boost(double? boost) { @@ -460,6 +477,12 @@ public DateNanosPropertyDescriptor Store(bool? store = true) return Self; } + public DateNanosPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -547,6 +570,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("date_nanos"); writer.WriteEndObject(); @@ -567,6 +596,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o NullValue = NullValueValue, PrecisionStep = PrecisionStepValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateProperty.g.cs index 39b0ac3fdaa..aa0ba132652 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateProperty.g.cs @@ -68,6 +68,8 @@ public sealed partial class DateProperty : IProperty public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "date"; @@ -99,6 +101,7 @@ public DatePropertyDescriptor() : base() private int? PrecisionStepValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public DatePropertyDescriptor Boost(double? boost) { @@ -247,6 +250,12 @@ public DatePropertyDescriptor Store(bool? store = true) return Self; } + public DatePropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -356,6 +365,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("date"); writer.WriteEndObject(); @@ -402,7 +417,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o NullValue = NullValueValue, PrecisionStep = PrecisionStepValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -432,6 +448,7 @@ public DatePropertyDescriptor() : base() private int? PrecisionStepValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public DatePropertyDescriptor Boost(double? boost) { @@ -580,6 +597,12 @@ public DatePropertyDescriptor Store(bool? store = true) return Self; } + public DatePropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -689,6 +712,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("date"); writer.WriteEndObject(); @@ -735,6 +764,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o NullValue = NullValueValue, PrecisionStep = PrecisionStepValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateRangeProperty.g.cs index bb5b8d54471..b0d04f9d26a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateRangeProperty.g.cs @@ -60,6 +60,8 @@ public sealed partial class DateRangeProperty : IProperty public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "date_range"; @@ -85,6 +87,7 @@ public DateRangePropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public DateRangePropertyDescriptor Boost(double? boost) { @@ -191,6 +194,12 @@ public DateRangePropertyDescriptor Store(bool? store = true) return Self; } + public DateRangePropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -266,6 +275,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("date_range"); writer.WriteEndObject(); @@ -284,7 +299,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -308,6 +324,7 @@ public DateRangePropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public DateRangePropertyDescriptor Boost(double? boost) { @@ -414,6 +431,12 @@ public DateRangePropertyDescriptor Store(bool? store = true) return Self; } + public DateRangePropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -489,6 +512,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("date_range"); writer.WriteEndObject(); @@ -507,6 +536,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs index b511d9b0955..72b319a4a6e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs @@ -29,56 +29,14 @@ namespace Elastic.Clients.Elasticsearch.Mapping; public sealed partial class DenseVectorIndexOptions { - /// - /// - /// The confidence interval to use when quantizing the vectors. Can be any value between and including 0.90 and - /// 1.0 or exactly 0. When the value is 0, this indicates that dynamic quantiles should be calculated for - /// optimized quantization. When between 0.90 and 1.0, this value restricts the values used when calculating - /// the quantization thresholds. - /// - /// - /// For example, a value of 0.95 will only use the middle 95% of the values when calculating the quantization - /// thresholds (e.g. the highest and lowest 2.5% of values will be ignored). - /// - /// - /// Defaults to 1/(dims + 1) for int8 quantized vectors and 0 for int4 for dynamic quantile calculation. - /// - /// - /// Only applicable to int8_hnsw, int4_hnsw, int8_flat, and int4_flat index types. - /// - /// [JsonInclude, JsonPropertyName("confidence_interval")] public float? ConfidenceInterval { get; set; } - - /// - /// - /// The number of candidates to track while assembling the list of nearest neighbors for each new node. - /// - /// - /// Only applicable to hnsw, int8_hnsw, and int4_hnsw index types. - /// - /// [JsonInclude, JsonPropertyName("ef_construction")] public int? EfConstruction { get; set; } - - /// - /// - /// The number of neighbors each node will be connected to in the HNSW graph. - /// - /// - /// Only applicable to hnsw, int8_hnsw, and int4_hnsw index types. - /// - /// [JsonInclude, JsonPropertyName("m")] public int? m { get; set; } - - /// - /// - /// The type of kNN algorithm to use. - /// - /// [JsonInclude, JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.Mapping.DenseVectorIndexOptionsType Type { get; set; } + public string Type { get; set; } } public sealed partial class DenseVectorIndexOptionsDescriptor : SerializableDescriptor @@ -92,66 +50,27 @@ public DenseVectorIndexOptionsDescriptor() : base() private float? ConfidenceIntervalValue { get; set; } private int? EfConstructionValue { get; set; } private int? mValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.DenseVectorIndexOptionsType TypeValue { get; set; } + private string TypeValue { get; set; } - /// - /// - /// The confidence interval to use when quantizing the vectors. Can be any value between and including 0.90 and - /// 1.0 or exactly 0. When the value is 0, this indicates that dynamic quantiles should be calculated for - /// optimized quantization. When between 0.90 and 1.0, this value restricts the values used when calculating - /// the quantization thresholds. - /// - /// - /// For example, a value of 0.95 will only use the middle 95% of the values when calculating the quantization - /// thresholds (e.g. the highest and lowest 2.5% of values will be ignored). - /// - /// - /// Defaults to 1/(dims + 1) for int8 quantized vectors and 0 for int4 for dynamic quantile calculation. - /// - /// - /// Only applicable to int8_hnsw, int4_hnsw, int8_flat, and int4_flat index types. - /// - /// public DenseVectorIndexOptionsDescriptor ConfidenceInterval(float? confidenceInterval) { ConfidenceIntervalValue = confidenceInterval; return Self; } - /// - /// - /// The number of candidates to track while assembling the list of nearest neighbors for each new node. - /// - /// - /// Only applicable to hnsw, int8_hnsw, and int4_hnsw index types. - /// - /// public DenseVectorIndexOptionsDescriptor EfConstruction(int? efConstruction) { EfConstructionValue = efConstruction; return Self; } - /// - /// - /// The number of neighbors each node will be connected to in the HNSW graph. - /// - /// - /// Only applicable to hnsw, int8_hnsw, and int4_hnsw index types. - /// - /// public DenseVectorIndexOptionsDescriptor m(int? m) { mValue = m; return Self; } - /// - /// - /// The type of kNN algorithm to use. - /// - /// - public DenseVectorIndexOptionsDescriptor Type(Elastic.Clients.Elasticsearch.Mapping.DenseVectorIndexOptionsType type) + public DenseVectorIndexOptionsDescriptor Type(string type) { TypeValue = type; return Self; @@ -179,7 +98,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o } writer.WritePropertyName("type"); - JsonSerializer.Serialize(writer, TypeValue, options); + writer.WriteStringValue(TypeValue); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorProperty.g.cs index 945bd8cf841..63eecc6fa75 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorProperty.g.cs @@ -29,47 +29,18 @@ namespace Elastic.Clients.Elasticsearch.Mapping; public sealed partial class DenseVectorProperty : IProperty { - /// - /// - /// Number of vector dimensions. Can't exceed 4096. If dims is not specified, it will be set to the length of - /// the first vector added to the field. - /// - /// [JsonInclude, JsonPropertyName("dims")] public int? Dims { get; set; } [JsonInclude, JsonPropertyName("dynamic")] public Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? Dynamic { get; set; } - - /// - /// - /// The data type used to encode vectors. The supported data types are float (default), byte, and bit. - /// - /// [JsonInclude, JsonPropertyName("element_type")] - public Elastic.Clients.Elasticsearch.Mapping.DenseVectorElementType? ElementType { get; set; } + public string? ElementType { get; set; } [JsonInclude, JsonPropertyName("fields")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Fields { get; set; } [JsonInclude, JsonPropertyName("ignore_above")] public int? IgnoreAbove { get; set; } - - /// - /// - /// If true, you can search this field using the kNN search API. - /// - /// [JsonInclude, JsonPropertyName("index")] public bool? Index { get; set; } - - /// - /// - /// An optional section that configures the kNN indexing algorithm. The HNSW algorithm has two internal parameters - /// that influence how the data structure is built. These can be adjusted to improve the accuracy of results, at the - /// expense of slower indexing speed. - /// - /// - /// This parameter can only be specified when index is true. - /// - /// [JsonInclude, JsonPropertyName("index_options")] public Elastic.Clients.Elasticsearch.Mapping.DenseVectorIndexOptions? IndexOptions { get; set; } @@ -82,28 +53,10 @@ public sealed partial class DenseVectorProperty : IProperty public IDictionary? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } - - /// - /// - /// The vector similarity metric to use in kNN search. - /// - /// - /// Documents are ranked by their vector field's similarity to the query vector. The _score of each document will - /// be derived from the similarity, in a way that ensures scores are positive and that a larger score corresponds - /// to a higher ranking. - /// - /// - /// Defaults to l2_norm when element_type is bit otherwise defaults to cosine. - /// - /// - /// bit vectors only support l2_norm as their similarity metric. - /// - /// - /// This parameter can only be specified when index is true. - /// - /// [JsonInclude, JsonPropertyName("similarity")] - public Elastic.Clients.Elasticsearch.Mapping.DenseVectorSimilarity? Similarity { get; set; } + public string? Similarity { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "dense_vector"; @@ -119,7 +72,7 @@ public DenseVectorPropertyDescriptor() : base() private int? DimsValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.DenseVectorElementType? ElementTypeValue { get; set; } + private string? ElementTypeValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? FieldsValue { get; set; } private int? IgnoreAboveValue { get; set; } private bool? IndexValue { get; set; } @@ -128,14 +81,9 @@ public DenseVectorPropertyDescriptor() : base() private Action IndexOptionsDescriptorAction { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.DenseVectorSimilarity? SimilarityValue { get; set; } + private string? SimilarityValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } - /// - /// - /// Number of vector dimensions. Can't exceed 4096. If dims is not specified, it will be set to the length of - /// the first vector added to the field. - /// - /// public DenseVectorPropertyDescriptor Dims(int? dims) { DimsValue = dims; @@ -148,12 +96,7 @@ public DenseVectorPropertyDescriptor Dynamic(Elastic.Clients.Elastics return Self; } - /// - /// - /// The data type used to encode vectors. The supported data types are float (default), byte, and bit. - /// - /// - public DenseVectorPropertyDescriptor ElementType(Elastic.Clients.Elasticsearch.Mapping.DenseVectorElementType? elementType) + public DenseVectorPropertyDescriptor ElementType(string? elementType) { ElementTypeValue = elementType; return Self; @@ -185,27 +128,12 @@ public DenseVectorPropertyDescriptor IgnoreAbove(int? ignoreAbove) return Self; } - /// - /// - /// If true, you can search this field using the kNN search API. - /// - /// public DenseVectorPropertyDescriptor Index(bool? index = true) { IndexValue = index; return Self; } - /// - /// - /// An optional section that configures the kNN indexing algorithm. The HNSW algorithm has two internal parameters - /// that influence how the data structure is built. These can be adjusted to improve the accuracy of results, at the - /// expense of slower indexing speed. - /// - /// - /// This parameter can only be specified when index is true. - /// - /// public DenseVectorPropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Mapping.DenseVectorIndexOptions? indexOptions) { IndexOptionsDescriptor = null; @@ -261,31 +189,18 @@ public DenseVectorPropertyDescriptor Properties(Action - /// - /// The vector similarity metric to use in kNN search. - /// - /// - /// Documents are ranked by their vector field's similarity to the query vector. The _score of each document will - /// be derived from the similarity, in a way that ensures scores are positive and that a larger score corresponds - /// to a higher ranking. - /// - /// - /// Defaults to l2_norm when element_type is bit otherwise defaults to cosine. - /// - /// - /// bit vectors only support l2_norm as their similarity metric. - /// - /// - /// This parameter can only be specified when index is true. - /// - /// - public DenseVectorPropertyDescriptor Similarity(Elastic.Clients.Elasticsearch.Mapping.DenseVectorSimilarity? similarity) + public DenseVectorPropertyDescriptor Similarity(string? similarity) { SimilarityValue = similarity; return Self; } + public DenseVectorPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -301,10 +216,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DynamicValue, options); } - if (ElementTypeValue is not null) + if (!string.IsNullOrEmpty(ElementTypeValue)) { writer.WritePropertyName("element_type"); - JsonSerializer.Serialize(writer, ElementTypeValue, options); + writer.WriteStringValue(ElementTypeValue); } if (FieldsValue is not null) @@ -353,10 +268,16 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (SimilarityValue is not null) + if (!string.IsNullOrEmpty(SimilarityValue)) { writer.WritePropertyName("similarity"); - JsonSerializer.Serialize(writer, SimilarityValue, options); + writer.WriteStringValue(SimilarityValue); + } + + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); } writer.WritePropertyName("type"); @@ -399,7 +320,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IndexOptions = BuildIndexOptions(), Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue + Similarity = SimilarityValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -413,7 +335,7 @@ public DenseVectorPropertyDescriptor() : base() private int? DimsValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? DynamicValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.DenseVectorElementType? ElementTypeValue { get; set; } + private string? ElementTypeValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? FieldsValue { get; set; } private int? IgnoreAboveValue { get; set; } private bool? IndexValue { get; set; } @@ -422,14 +344,9 @@ public DenseVectorPropertyDescriptor() : base() private Action IndexOptionsDescriptorAction { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.DenseVectorSimilarity? SimilarityValue { get; set; } + private string? SimilarityValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } - /// - /// - /// Number of vector dimensions. Can't exceed 4096. If dims is not specified, it will be set to the length of - /// the first vector added to the field. - /// - /// public DenseVectorPropertyDescriptor Dims(int? dims) { DimsValue = dims; @@ -442,12 +359,7 @@ public DenseVectorPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mappi return Self; } - /// - /// - /// The data type used to encode vectors. The supported data types are float (default), byte, and bit. - /// - /// - public DenseVectorPropertyDescriptor ElementType(Elastic.Clients.Elasticsearch.Mapping.DenseVectorElementType? elementType) + public DenseVectorPropertyDescriptor ElementType(string? elementType) { ElementTypeValue = elementType; return Self; @@ -479,27 +391,12 @@ public DenseVectorPropertyDescriptor IgnoreAbove(int? ignoreAbove) return Self; } - /// - /// - /// If true, you can search this field using the kNN search API. - /// - /// public DenseVectorPropertyDescriptor Index(bool? index = true) { IndexValue = index; return Self; } - /// - /// - /// An optional section that configures the kNN indexing algorithm. The HNSW algorithm has two internal parameters - /// that influence how the data structure is built. These can be adjusted to improve the accuracy of results, at the - /// expense of slower indexing speed. - /// - /// - /// This parameter can only be specified when index is true. - /// - /// public DenseVectorPropertyDescriptor IndexOptions(Elastic.Clients.Elasticsearch.Mapping.DenseVectorIndexOptions? indexOptions) { IndexOptionsDescriptor = null; @@ -555,31 +452,18 @@ public DenseVectorPropertyDescriptor Properties(Action - /// - /// The vector similarity metric to use in kNN search. - /// - /// - /// Documents are ranked by their vector field's similarity to the query vector. The _score of each document will - /// be derived from the similarity, in a way that ensures scores are positive and that a larger score corresponds - /// to a higher ranking. - /// - /// - /// Defaults to l2_norm when element_type is bit otherwise defaults to cosine. - /// - /// - /// bit vectors only support l2_norm as their similarity metric. - /// - /// - /// This parameter can only be specified when index is true. - /// - /// - public DenseVectorPropertyDescriptor Similarity(Elastic.Clients.Elasticsearch.Mapping.DenseVectorSimilarity? similarity) + public DenseVectorPropertyDescriptor Similarity(string? similarity) { SimilarityValue = similarity; return Self; } + public DenseVectorPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -595,10 +479,10 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DynamicValue, options); } - if (ElementTypeValue is not null) + if (!string.IsNullOrEmpty(ElementTypeValue)) { writer.WritePropertyName("element_type"); - JsonSerializer.Serialize(writer, ElementTypeValue, options); + writer.WriteStringValue(ElementTypeValue); } if (FieldsValue is not null) @@ -647,10 +531,16 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } - if (SimilarityValue is not null) + if (!string.IsNullOrEmpty(SimilarityValue)) { writer.WritePropertyName("similarity"); - JsonSerializer.Serialize(writer, SimilarityValue, options); + writer.WriteStringValue(SimilarityValue); + } + + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); } writer.WritePropertyName("type"); @@ -693,6 +583,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IndexOptions = BuildIndexOptions(), Meta = MetaValue, Properties = PropertiesValue, - Similarity = SimilarityValue + Similarity = SimilarityValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleNumberProperty.g.cs index 923e630d9fa..850d6e8d65d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleNumberProperty.g.cs @@ -66,6 +66,8 @@ public sealed partial class DoubleNumberProperty : IProperty public Elastic.Clients.Elasticsearch.Script? Script { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } /// /// @@ -112,6 +114,7 @@ public DoubleNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -256,6 +259,12 @@ public DoubleNumberPropertyDescriptor Store(bool? store = true) return Self; } + public DoubleNumberPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -381,6 +390,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -439,6 +454,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Properties = PropertiesValue, Script = BuildScript(), Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue }; @@ -469,6 +485,7 @@ public DoubleNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -613,6 +630,12 @@ public DoubleNumberPropertyDescriptor Store(bool? store = true) return Self; } + public DoubleNumberPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -738,6 +761,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -796,6 +825,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Properties = PropertiesValue, Script = BuildScript(), Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue }; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleRangeProperty.g.cs index 4c0c6868967..c4c7f2c9284 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleRangeProperty.g.cs @@ -58,6 +58,8 @@ public sealed partial class DoubleRangeProperty : IProperty public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "double_range"; @@ -82,6 +84,7 @@ public DoubleRangePropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public DoubleRangePropertyDescriptor Boost(double? boost) { @@ -182,6 +185,12 @@ public DoubleRangePropertyDescriptor Store(bool? store = true) return Self; } + public DoubleRangePropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -251,6 +260,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("double_range"); writer.WriteEndObject(); @@ -268,7 +283,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -291,6 +307,7 @@ public DoubleRangePropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public DoubleRangePropertyDescriptor Boost(double? boost) { @@ -391,6 +408,12 @@ public DoubleRangePropertyDescriptor Store(bool? store = true) return Self; } + public DoubleRangePropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -460,6 +483,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("double_range"); writer.WriteEndObject(); @@ -477,6 +506,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicProperty.g.cs index e44d585e58d..4738c3bce8a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicProperty.g.cs @@ -92,6 +92,8 @@ public sealed partial class DynamicProperty : IProperty public string? SearchQuoteAnalyzer { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("term_vector")] public Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? TermVector { get; set; } [JsonInclude, JsonPropertyName("time_series_metric")] @@ -141,6 +143,7 @@ public DynamicPropertyDescriptor() : base() private string? SearchAnalyzerValue { get; set; } private string? SearchQuoteAnalyzerValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? TermVectorValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -381,6 +384,12 @@ public DynamicPropertyDescriptor Store(bool? store = true) return Self; } + public DynamicPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + public DynamicPropertyDescriptor TermVector(Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? termVector) { TermVectorValue = termVector; @@ -584,6 +593,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TermVectorValue is not null) { writer.WritePropertyName("term_vector"); @@ -679,6 +694,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SearchAnalyzer = SearchAnalyzerValue, SearchQuoteAnalyzer = SearchQuoteAnalyzerValue, Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TermVector = TermVectorValue, TimeSeriesMetric = TimeSeriesMetricValue }; @@ -724,6 +740,7 @@ public DynamicPropertyDescriptor() : base() private string? SearchAnalyzerValue { get; set; } private string? SearchQuoteAnalyzerValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? TermVectorValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -964,6 +981,12 @@ public DynamicPropertyDescriptor Store(bool? store = true) return Self; } + public DynamicPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + public DynamicPropertyDescriptor TermVector(Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? termVector) { TermVectorValue = termVector; @@ -1167,6 +1190,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TermVectorValue is not null) { writer.WritePropertyName("term_vector"); @@ -1262,6 +1291,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SearchAnalyzer = SearchAnalyzerValue, SearchQuoteAnalyzer = SearchQuoteAnalyzerValue, Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TermVector = TermVectorValue, TimeSeriesMetric = TimeSeriesMetricValue }; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldAliasProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldAliasProperty.g.cs index 3aaabb1fbea..b724d80015d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldAliasProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldAliasProperty.g.cs @@ -47,6 +47,8 @@ public sealed partial class FieldAliasProperty : IProperty public Elastic.Clients.Elasticsearch.Field? Path { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "alias"; @@ -66,6 +68,7 @@ public FieldAliasPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Field? PathValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public FieldAliasPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) { @@ -148,6 +151,12 @@ public FieldAliasPropertyDescriptor Properties(Action SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -187,6 +196,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("alias"); writer.WriteEndObject(); @@ -199,7 +214,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, Path = PathValue, - Properties = PropertiesValue + Properties = PropertiesValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -217,6 +233,7 @@ public FieldAliasPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Field? PathValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public FieldAliasPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) { @@ -299,6 +316,12 @@ public FieldAliasPropertyDescriptor Properties(Action "flattened"; @@ -90,6 +92,7 @@ public FlattenedPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private string? SimilarityValue { get; set; } private bool? SplitQueriesOnWhitespaceValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public FlattenedPropertyDescriptor Boost(double? boost) { @@ -208,6 +211,12 @@ public FlattenedPropertyDescriptor SplitQueriesOnWhitespace(bool? spl return Self; } + public FlattenedPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -295,6 +304,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(SplitQueriesOnWhitespaceValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("flattened"); writer.WriteEndObject(); @@ -315,7 +330,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o NullValue = NullValueValue, Properties = PropertiesValue, Similarity = SimilarityValue, - SplitQueriesOnWhitespace = SplitQueriesOnWhitespaceValue + SplitQueriesOnWhitespace = SplitQueriesOnWhitespaceValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -341,6 +357,7 @@ public FlattenedPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private string? SimilarityValue { get; set; } private bool? SplitQueriesOnWhitespaceValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public FlattenedPropertyDescriptor Boost(double? boost) { @@ -459,6 +476,12 @@ public FlattenedPropertyDescriptor SplitQueriesOnWhitespace(bool? splitQueriesOn return Self; } + public FlattenedPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -546,6 +569,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(SplitQueriesOnWhitespaceValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("flattened"); writer.WriteEndObject(); @@ -566,6 +595,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o NullValue = NullValueValue, Properties = PropertiesValue, Similarity = SimilarityValue, - SplitQueriesOnWhitespace = SplitQueriesOnWhitespaceValue + SplitQueriesOnWhitespace = SplitQueriesOnWhitespaceValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs index 78b51afb62b..71055b76a19 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs @@ -66,6 +66,8 @@ public sealed partial class FloatNumberProperty : IProperty public Elastic.Clients.Elasticsearch.Script? Script { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } /// /// @@ -112,6 +114,7 @@ public FloatNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -256,6 +259,12 @@ public FloatNumberPropertyDescriptor Store(bool? store = true) return Self; } + public FloatNumberPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -381,6 +390,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -439,6 +454,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Properties = PropertiesValue, Script = BuildScript(), Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue }; @@ -469,6 +485,7 @@ public FloatNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -613,6 +630,12 @@ public FloatNumberPropertyDescriptor Store(bool? store = true) return Self; } + public FloatNumberPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -738,6 +761,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -796,6 +825,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Properties = PropertiesValue, Script = BuildScript(), Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue }; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatRangeProperty.g.cs index baba3f12be0..d27758883b2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatRangeProperty.g.cs @@ -58,6 +58,8 @@ public sealed partial class FloatRangeProperty : IProperty public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "float_range"; @@ -82,6 +84,7 @@ public FloatRangePropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public FloatRangePropertyDescriptor Boost(double? boost) { @@ -182,6 +185,12 @@ public FloatRangePropertyDescriptor Store(bool? store = true) return Self; } + public FloatRangePropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -251,6 +260,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("float_range"); writer.WriteEndObject(); @@ -268,7 +283,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -291,6 +307,7 @@ public FloatRangePropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public FloatRangePropertyDescriptor Boost(double? boost) { @@ -391,6 +408,12 @@ public FloatRangePropertyDescriptor Store(bool? store = true) return Self; } + public FloatRangePropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -460,6 +483,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("float_range"); writer.WriteEndObject(); @@ -477,6 +506,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs index 8151792a3a9..e78b7c5d4c7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs @@ -64,6 +64,8 @@ public sealed partial class GeoPointProperty : IProperty public Elastic.Clients.Elasticsearch.Script? Script { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "geo_point"; @@ -93,6 +95,7 @@ public GeoPointPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public GeoPointPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) { @@ -229,6 +232,12 @@ public GeoPointPropertyDescriptor Store(bool? store = true) return Self; } + public GeoPointPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -326,6 +335,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("geo_point"); writer.WriteEndObject(); @@ -370,7 +385,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -398,6 +414,7 @@ public GeoPointPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public GeoPointPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) { @@ -534,6 +551,12 @@ public GeoPointPropertyDescriptor Store(bool? store = true) return Self; } + public GeoPointPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -631,6 +654,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("geo_point"); writer.WriteEndObject(); @@ -675,6 +704,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o OnScriptError = OnScriptErrorValue, Properties = PropertiesValue, Script = BuildScript(), - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs index 0563e2b83b6..2c10ba3ebc0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs @@ -69,6 +69,8 @@ public sealed partial class GeoShapeProperty : IProperty public bool? Store { get; set; } [JsonInclude, JsonPropertyName("strategy")] public Elastic.Clients.Elasticsearch.Mapping.GeoStrategy? Strategy { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "geo_shape"; @@ -102,6 +104,7 @@ public GeoShapePropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.GeoStrategy? StrategyValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public GeoShapePropertyDescriptor Coerce(bool? coerce = true) { @@ -214,6 +217,12 @@ public GeoShapePropertyDescriptor Strategy(Elastic.Clients.Elasticsea return Self; } + public GeoShapePropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -295,6 +304,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, StrategyValue, options); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("geo_shape"); writer.WriteEndObject(); @@ -314,7 +329,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Orientation = OrientationValue, Properties = PropertiesValue, Store = StoreValue, - Strategy = StrategyValue + Strategy = StrategyValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -346,6 +362,7 @@ public GeoShapePropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.GeoStrategy? StrategyValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public GeoShapePropertyDescriptor Coerce(bool? coerce = true) { @@ -458,6 +475,12 @@ public GeoShapePropertyDescriptor Strategy(Elastic.Clients.Elasticsearch.Mapping return Self; } + public GeoShapePropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -539,6 +562,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, StrategyValue, options); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("geo_shape"); writer.WriteEndObject(); @@ -558,6 +587,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Orientation = OrientationValue, Properties = PropertiesValue, Store = StoreValue, - Strategy = StrategyValue + Strategy = StrategyValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs index 5dadc17bb15..fa6266c6b1e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs @@ -66,6 +66,8 @@ public sealed partial class HalfFloatNumberProperty : IProperty public Elastic.Clients.Elasticsearch.Script? Script { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } /// /// @@ -112,6 +114,7 @@ public HalfFloatNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -256,6 +259,12 @@ public HalfFloatNumberPropertyDescriptor Store(bool? store = true) return Self; } + public HalfFloatNumberPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -381,6 +390,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -439,6 +454,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Properties = PropertiesValue, Script = BuildScript(), Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue }; @@ -469,6 +485,7 @@ public HalfFloatNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -613,6 +630,12 @@ public HalfFloatNumberPropertyDescriptor Store(bool? store = true) return Self; } + public HalfFloatNumberPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -738,6 +761,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -796,6 +825,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Properties = PropertiesValue, Script = BuildScript(), Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue }; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HistogramProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HistogramProperty.g.cs index dcdc5b0b0e8..4cc969ef2b6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HistogramProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HistogramProperty.g.cs @@ -47,6 +47,8 @@ public sealed partial class HistogramProperty : IProperty public IDictionary? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "histogram"; @@ -66,6 +68,7 @@ public HistogramPropertyDescriptor() : base() private bool? IgnoreMalformedValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public HistogramPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) { @@ -136,6 +139,12 @@ public HistogramPropertyDescriptor Properties(Action SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -175,6 +184,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("histogram"); writer.WriteEndObject(); @@ -187,7 +202,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IgnoreAbove = IgnoreAboveValue, IgnoreMalformed = IgnoreMalformedValue, Meta = MetaValue, - Properties = PropertiesValue + Properties = PropertiesValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -205,6 +221,7 @@ public HistogramPropertyDescriptor() : base() private bool? IgnoreMalformedValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public HistogramPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) { @@ -275,6 +292,12 @@ public HistogramPropertyDescriptor Properties(Action "icu_collation_keyword"; @@ -132,6 +134,7 @@ public IcuCollationPropertyDescriptor() : base() private string? RulesValue { get; set; } private bool? StoreValue { get; set; } private Elastic.Clients.Elasticsearch.Analysis.IcuCollationStrength? StrengthValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private string? VariableTopValue { get; set; } private string? VariantValue { get; set; } @@ -310,6 +313,12 @@ public IcuCollationPropertyDescriptor Strength(Elastic.Clients.Elasti return Self; } + public IcuCollationPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + public IcuCollationPropertyDescriptor VariableTop(string? variableTop) { VariableTopValue = variableTop; @@ -457,6 +466,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, StrengthValue, options); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("icu_collation_keyword"); if (!string.IsNullOrEmpty(VariableTopValue)) @@ -498,6 +513,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Rules = RulesValue, Store = StoreValue, Strength = StrengthValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, VariableTop = VariableTopValue, Variant = VariantValue }; @@ -533,6 +549,7 @@ public IcuCollationPropertyDescriptor() : base() private string? RulesValue { get; set; } private bool? StoreValue { get; set; } private Elastic.Clients.Elasticsearch.Analysis.IcuCollationStrength? StrengthValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private string? VariableTopValue { get; set; } private string? VariantValue { get; set; } @@ -711,6 +728,12 @@ public IcuCollationPropertyDescriptor Strength(Elastic.Clients.Elasticsearch.Ana return Self; } + public IcuCollationPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + public IcuCollationPropertyDescriptor VariableTop(string? variableTop) { VariableTopValue = variableTop; @@ -858,6 +881,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, StrengthValue, options); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("icu_collation_keyword"); if (!string.IsNullOrEmpty(VariableTopValue)) @@ -899,6 +928,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Rules = RulesValue, Store = StoreValue, Strength = StrengthValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, VariableTop = VariableTopValue, Variant = VariantValue }; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs index 8d2512bed63..14674ebd906 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs @@ -66,6 +66,8 @@ public sealed partial class IntegerNumberProperty : IProperty public Elastic.Clients.Elasticsearch.Script? Script { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } /// /// @@ -112,6 +114,7 @@ public IntegerNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -256,6 +259,12 @@ public IntegerNumberPropertyDescriptor Store(bool? store = true) return Self; } + public IntegerNumberPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -381,6 +390,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -439,6 +454,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Properties = PropertiesValue, Script = BuildScript(), Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue }; @@ -469,6 +485,7 @@ public IntegerNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -613,6 +630,12 @@ public IntegerNumberPropertyDescriptor Store(bool? store = true) return Self; } + public IntegerNumberPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -738,6 +761,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -796,6 +825,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Properties = PropertiesValue, Script = BuildScript(), Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue }; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerRangeProperty.g.cs index 47b66fc7aaf..de6b052568b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerRangeProperty.g.cs @@ -58,6 +58,8 @@ public sealed partial class IntegerRangeProperty : IProperty public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "integer_range"; @@ -82,6 +84,7 @@ public IntegerRangePropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public IntegerRangePropertyDescriptor Boost(double? boost) { @@ -182,6 +185,12 @@ public IntegerRangePropertyDescriptor Store(bool? store = true) return Self; } + public IntegerRangePropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -251,6 +260,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("integer_range"); writer.WriteEndObject(); @@ -268,7 +283,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -291,6 +307,7 @@ public IntegerRangePropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public IntegerRangePropertyDescriptor Boost(double? boost) { @@ -391,6 +408,12 @@ public IntegerRangePropertyDescriptor Store(bool? store = true) return Self; } + public IntegerRangePropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -460,6 +483,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("integer_range"); writer.WriteEndObject(); @@ -477,6 +506,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpProperty.g.cs index 8a4ebec39cb..a7e773c1450 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpProperty.g.cs @@ -64,6 +64,8 @@ public sealed partial class IpProperty : IProperty public Elastic.Clients.Elasticsearch.Script? Script { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } /// /// @@ -101,6 +103,7 @@ public IpPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } public IpPropertyDescriptor Boost(double? boost) @@ -238,6 +241,12 @@ public IpPropertyDescriptor Store(bool? store = true) return Self; } + public IpPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -346,6 +355,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -397,6 +412,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Properties = PropertiesValue, Script = BuildScript(), Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue }; } @@ -425,6 +441,7 @@ public IpPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } public IpPropertyDescriptor Boost(double? boost) @@ -562,6 +579,12 @@ public IpPropertyDescriptor Store(bool? store = true) return Self; } + public IpPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -670,6 +693,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -721,6 +750,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Properties = PropertiesValue, Script = BuildScript(), Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpRangeProperty.g.cs index d714a86ad87..ae250c3913b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpRangeProperty.g.cs @@ -58,6 +58,8 @@ public sealed partial class IpRangeProperty : IProperty public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "ip_range"; @@ -82,6 +84,7 @@ public IpRangePropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public IpRangePropertyDescriptor Boost(double? boost) { @@ -182,6 +185,12 @@ public IpRangePropertyDescriptor Store(bool? store = true) return Self; } + public IpRangePropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -251,6 +260,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("ip_range"); writer.WriteEndObject(); @@ -268,7 +283,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -291,6 +307,7 @@ public IpRangePropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public IpRangePropertyDescriptor Boost(double? boost) { @@ -391,6 +408,12 @@ public IpRangePropertyDescriptor Store(bool? store = true) return Self; } + public IpRangePropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -460,6 +483,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("ip_range"); writer.WriteEndObject(); @@ -477,6 +506,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/JoinProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/JoinProperty.g.cs index 6585e14e662..7bed45378a0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/JoinProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/JoinProperty.g.cs @@ -49,6 +49,8 @@ public sealed partial class JoinProperty : IProperty public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } [JsonInclude, JsonPropertyName("relations")] public IDictionary>>? Relations { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "join"; @@ -69,6 +71,7 @@ public JoinPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private IDictionary>>? RelationsValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public JoinPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) { @@ -145,6 +148,12 @@ public JoinPropertyDescriptor Relations(Func SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -190,6 +199,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, RelationsValue, options); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("join"); writer.WriteEndObject(); @@ -203,7 +218,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, Properties = PropertiesValue, - Relations = RelationsValue + Relations = RelationsValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -222,6 +238,7 @@ public JoinPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private IDictionary>>? RelationsValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public JoinPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) { @@ -298,6 +315,12 @@ public JoinPropertyDescriptor Relations(Func /// @@ -116,6 +118,7 @@ public KeywordPropertyDescriptor() : base() private string? SimilarityValue { get; set; } private bool? SplitQueriesOnWhitespaceValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } public KeywordPropertyDescriptor Boost(double? boost) @@ -283,6 +286,12 @@ public KeywordPropertyDescriptor Store(bool? store = true) return Self; } + public KeywordPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -421,6 +430,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -477,6 +492,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Similarity = SimilarityValue, SplitQueriesOnWhitespace = SplitQueriesOnWhitespaceValue, Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue }; } @@ -510,6 +526,7 @@ public KeywordPropertyDescriptor() : base() private string? SimilarityValue { get; set; } private bool? SplitQueriesOnWhitespaceValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } public KeywordPropertyDescriptor Boost(double? boost) @@ -677,6 +694,12 @@ public KeywordPropertyDescriptor Store(bool? store = true) return Self; } + public KeywordPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -815,6 +838,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -871,6 +900,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Similarity = SimilarityValue, SplitQueriesOnWhitespace = SplitQueriesOnWhitespaceValue, Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongNumberProperty.g.cs index e2454a28973..e9cf13c2661 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongNumberProperty.g.cs @@ -66,6 +66,8 @@ public sealed partial class LongNumberProperty : IProperty public Elastic.Clients.Elasticsearch.Script? Script { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } /// /// @@ -112,6 +114,7 @@ public LongNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -256,6 +259,12 @@ public LongNumberPropertyDescriptor Store(bool? store = true) return Self; } + public LongNumberPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -381,6 +390,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -439,6 +454,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Properties = PropertiesValue, Script = BuildScript(), Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue }; @@ -469,6 +485,7 @@ public LongNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -613,6 +630,12 @@ public LongNumberPropertyDescriptor Store(bool? store = true) return Self; } + public LongNumberPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -738,6 +761,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -796,6 +825,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Properties = PropertiesValue, Script = BuildScript(), Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue }; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongRangeProperty.g.cs index 301a1c2d56a..db676111088 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongRangeProperty.g.cs @@ -58,6 +58,8 @@ public sealed partial class LongRangeProperty : IProperty public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "long_range"; @@ -82,6 +84,7 @@ public LongRangePropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public LongRangePropertyDescriptor Boost(double? boost) { @@ -182,6 +185,12 @@ public LongRangePropertyDescriptor Store(bool? store = true) return Self; } + public LongRangePropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -251,6 +260,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("long_range"); writer.WriteEndObject(); @@ -268,7 +283,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -291,6 +307,7 @@ public LongRangePropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public LongRangePropertyDescriptor Boost(double? boost) { @@ -391,6 +408,12 @@ public LongRangePropertyDescriptor Store(bool? store = true) return Self; } + public LongRangePropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -460,6 +483,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("long_range"); writer.WriteEndObject(); @@ -477,6 +506,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Index = IndexValue, Meta = MetaValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Murmur3HashProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Murmur3HashProperty.g.cs index 13bf5f0c702..f800395efef 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Murmur3HashProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Murmur3HashProperty.g.cs @@ -52,6 +52,8 @@ public sealed partial class Murmur3HashProperty : IProperty public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "murmur3"; @@ -73,6 +75,7 @@ public Murmur3HashPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public Murmur3HashPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) { @@ -155,6 +158,12 @@ public Murmur3HashPropertyDescriptor Store(bool? store = true) return Self; } + public Murmur3HashPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -206,6 +215,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("murmur3"); writer.WriteEndObject(); @@ -220,7 +235,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -240,6 +256,7 @@ public Murmur3HashPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public Murmur3HashPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) { @@ -322,6 +339,12 @@ public Murmur3HashPropertyDescriptor Store(bool? store = true) return Self; } + public Murmur3HashPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -373,6 +396,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("murmur3"); writer.WriteEndObject(); @@ -387,6 +416,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NestedProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NestedProperty.g.cs index 959c90ccf45..ddb85aa7699 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NestedProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NestedProperty.g.cs @@ -56,6 +56,8 @@ public sealed partial class NestedProperty : IProperty public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "nested"; @@ -79,6 +81,7 @@ public NestedPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public NestedPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) { @@ -173,6 +176,12 @@ public NestedPropertyDescriptor Store(bool? store = true) return Self; } + public NestedPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -236,6 +245,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("nested"); writer.WriteEndObject(); @@ -252,7 +267,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IncludeInRoot = IncludeInRootValue, Meta = MetaValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -274,6 +290,7 @@ public NestedPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public NestedPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) { @@ -368,6 +385,12 @@ public NestedPropertyDescriptor Store(bool? store = true) return Self; } + public NestedPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -431,6 +454,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("nested"); writer.WriteEndObject(); @@ -447,6 +476,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IncludeInRoot = IncludeInRootValue, Meta = MetaValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ObjectProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ObjectProperty.g.cs index 72b364f5dea..32b66e7cd6f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ObjectProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ObjectProperty.g.cs @@ -54,6 +54,8 @@ public sealed partial class ObjectProperty : IProperty public bool? Store { get; set; } [JsonInclude, JsonPropertyName("subobjects")] public bool? Subobjects { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "object"; @@ -76,6 +78,7 @@ public ObjectPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } private bool? SubobjectsValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public ObjectPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) { @@ -164,6 +167,12 @@ public ObjectPropertyDescriptor Subobjects(bool? subobjects = true) return Self; } + public ObjectPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -221,6 +230,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(SubobjectsValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("object"); writer.WriteEndObject(); @@ -236,7 +251,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, Properties = PropertiesValue, Store = StoreValue, - Subobjects = SubobjectsValue + Subobjects = SubobjectsValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -257,6 +273,7 @@ public ObjectPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } private bool? SubobjectsValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public ObjectPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) { @@ -345,6 +362,12 @@ public ObjectPropertyDescriptor Subobjects(bool? subobjects = true) return Self; } + public ObjectPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -402,6 +425,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(SubobjectsValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("object"); writer.WriteEndObject(); @@ -417,6 +446,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, Properties = PropertiesValue, Store = StoreValue, - Subobjects = SubobjectsValue + Subobjects = SubobjectsValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PassthroughObjectProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PassthroughObjectProperty.g.cs deleted file mode 100644 index db4a8355410..00000000000 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PassthroughObjectProperty.g.cs +++ /dev/null @@ -1,452 +0,0 @@ -// 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 System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch.Mapping; - -public sealed partial class PassthroughObjectProperty : IProperty -{ - [JsonInclude, JsonPropertyName("copy_to")] - [JsonConverter(typeof(SingleOrManyFieldsConverter))] - public Elastic.Clients.Elasticsearch.Fields? CopyTo { get; set; } - [JsonInclude, JsonPropertyName("dynamic")] - public Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? Dynamic { get; set; } - [JsonInclude, JsonPropertyName("enabled")] - public bool? Enabled { get; set; } - [JsonInclude, JsonPropertyName("fields")] - public Elastic.Clients.Elasticsearch.Mapping.Properties? Fields { get; set; } - [JsonInclude, JsonPropertyName("ignore_above")] - public int? IgnoreAbove { get; set; } - - /// - /// - /// Metadata about the field. - /// - /// - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("priority")] - public int? Priority { get; set; } - [JsonInclude, JsonPropertyName("properties")] - public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } - [JsonInclude, JsonPropertyName("store")] - public bool? Store { get; set; } - [JsonInclude, JsonPropertyName("time_series_dimension")] - public bool? TimeSeriesDimension { get; set; } - - [JsonInclude, JsonPropertyName("type")] - public string Type => "passthrough"; -} - -public sealed partial class PassthroughObjectPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor -{ - internal PassthroughObjectPropertyDescriptor(Action> configure) => configure.Invoke(this); - - public PassthroughObjectPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Fields? CopyToValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? DynamicValue { get; set; } - private bool? EnabledValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private int? PriorityValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - private bool? TimeSeriesDimensionValue { get; set; } - - public PassthroughObjectPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public PassthroughObjectPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public PassthroughObjectPropertyDescriptor Enabled(bool? enabled = true) - { - EnabledValue = enabled; - return Self; - } - - public PassthroughObjectPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public PassthroughObjectPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public PassthroughObjectPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public PassthroughObjectPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public PassthroughObjectPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public PassthroughObjectPropertyDescriptor Priority(int? priority) - { - PriorityValue = priority; - return Self; - } - - public PassthroughObjectPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public PassthroughObjectPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public PassthroughObjectPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public PassthroughObjectPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - public PassthroughObjectPropertyDescriptor TimeSeriesDimension(bool? timeSeriesDimension = true) - { - TimeSeriesDimensionValue = timeSeriesDimension; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PriorityValue.HasValue) - { - writer.WritePropertyName("priority"); - writer.WriteNumberValue(PriorityValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - if (TimeSeriesDimensionValue.HasValue) - { - writer.WritePropertyName("time_series_dimension"); - writer.WriteBooleanValue(TimeSeriesDimensionValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("passthrough"); - writer.WriteEndObject(); - } - - PassthroughObjectProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - Dynamic = DynamicValue, - Enabled = EnabledValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Priority = PriorityValue, - Properties = PropertiesValue, - Store = StoreValue, - TimeSeriesDimension = TimeSeriesDimensionValue - }; -} - -public sealed partial class PassthroughObjectPropertyDescriptor : SerializableDescriptor, IBuildableDescriptor -{ - internal PassthroughObjectPropertyDescriptor(Action configure) => configure.Invoke(this); - - public PassthroughObjectPropertyDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Fields? CopyToValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? DynamicValue { get; set; } - private bool? EnabledValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.Properties? FieldsValue { get; set; } - private int? IgnoreAboveValue { get; set; } - private IDictionary? MetaValue { get; set; } - private int? PriorityValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } - private bool? StoreValue { get; set; } - private bool? TimeSeriesDimensionValue { get; set; } - - public PassthroughObjectPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) - { - CopyToValue = copyTo; - return Self; - } - - public PassthroughObjectPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) - { - DynamicValue = dynamic; - return Self; - } - - public PassthroughObjectPropertyDescriptor Enabled(bool? enabled = true) - { - EnabledValue = enabled; - return Self; - } - - public PassthroughObjectPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Mapping.Properties? fields) - { - FieldsValue = fields; - return Self; - } - - public PassthroughObjectPropertyDescriptor Fields(Elastic.Clients.Elasticsearch.Mapping.PropertiesDescriptor descriptor) - { - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public PassthroughObjectPropertyDescriptor Fields(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - FieldsValue = descriptor.PromisedValue; - return Self; - } - - public PassthroughObjectPropertyDescriptor IgnoreAbove(int? ignoreAbove) - { - IgnoreAboveValue = ignoreAbove; - return Self; - } - - /// - /// - /// Metadata about the field. - /// - /// - public PassthroughObjectPropertyDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public PassthroughObjectPropertyDescriptor Priority(int? priority) - { - PriorityValue = priority; - return Self; - } - - public PassthroughObjectPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Mapping.Properties? properties) - { - PropertiesValue = properties; - return Self; - } - - public PassthroughObjectPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Mapping.PropertiesDescriptor descriptor) - { - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public PassthroughObjectPropertyDescriptor Properties(Action> configure) - { - var descriptor = new Elastic.Clients.Elasticsearch.Mapping.PropertiesDescriptor(); - configure?.Invoke(descriptor); - PropertiesValue = descriptor.PromisedValue; - return Self; - } - - public PassthroughObjectPropertyDescriptor Store(bool? store = true) - { - StoreValue = store; - return Self; - } - - public PassthroughObjectPropertyDescriptor TimeSeriesDimension(bool? timeSeriesDimension = true) - { - TimeSeriesDimensionValue = timeSeriesDimension; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (CopyToValue is not null) - { - writer.WritePropertyName("copy_to"); - JsonSerializer.Serialize(writer, CopyToValue, options); - } - - if (DynamicValue is not null) - { - writer.WritePropertyName("dynamic"); - JsonSerializer.Serialize(writer, DynamicValue, options); - } - - if (EnabledValue.HasValue) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(EnabledValue.Value); - } - - if (FieldsValue is not null) - { - writer.WritePropertyName("fields"); - JsonSerializer.Serialize(writer, FieldsValue, options); - } - - if (IgnoreAboveValue.HasValue) - { - writer.WritePropertyName("ignore_above"); - writer.WriteNumberValue(IgnoreAboveValue.Value); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PriorityValue.HasValue) - { - writer.WritePropertyName("priority"); - writer.WriteNumberValue(PriorityValue.Value); - } - - if (PropertiesValue is not null) - { - writer.WritePropertyName("properties"); - JsonSerializer.Serialize(writer, PropertiesValue, options); - } - - if (StoreValue.HasValue) - { - writer.WritePropertyName("store"); - writer.WriteBooleanValue(StoreValue.Value); - } - - if (TimeSeriesDimensionValue.HasValue) - { - writer.WritePropertyName("time_series_dimension"); - writer.WriteBooleanValue(TimeSeriesDimensionValue.Value); - } - - writer.WritePropertyName("type"); - writer.WriteStringValue("passthrough"); - writer.WriteEndObject(); - } - - PassthroughObjectProperty IBuildableDescriptor.Build() => new() - { - CopyTo = CopyToValue, - Dynamic = DynamicValue, - Enabled = EnabledValue, - Fields = FieldsValue, - IgnoreAbove = IgnoreAboveValue, - Meta = MetaValue, - Priority = PriorityValue, - Properties = PropertiesValue, - Store = StoreValue, - TimeSeriesDimension = TimeSeriesDimensionValue - }; -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PercolatorProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PercolatorProperty.g.cs index 5861ca10580..2cae62921b4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PercolatorProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PercolatorProperty.g.cs @@ -45,6 +45,8 @@ public sealed partial class PercolatorProperty : IProperty public IDictionary? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "percolator"; @@ -63,6 +65,7 @@ public PercolatorPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public PercolatorPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) { @@ -127,6 +130,12 @@ public PercolatorPropertyDescriptor Properties(Action SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -160,6 +169,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("percolator"); writer.WriteEndObject(); @@ -171,7 +186,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Fields = FieldsValue, IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, - Properties = PropertiesValue + Properties = PropertiesValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -188,6 +204,7 @@ public PercolatorPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public PercolatorPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) { @@ -252,6 +269,12 @@ public PercolatorPropertyDescriptor Properties(Action "point"; @@ -82,6 +84,7 @@ public PointPropertyDescriptor() : base() private string? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public PointPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) { @@ -182,6 +185,12 @@ public PointPropertyDescriptor Store(bool? store = true) return Self; } + public PointPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -251,6 +260,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("point"); writer.WriteEndObject(); @@ -268,7 +283,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, NullValue = NullValueValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -291,6 +307,7 @@ public PointPropertyDescriptor() : base() private string? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public PointPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) { @@ -391,6 +408,12 @@ public PointPropertyDescriptor Store(bool? store = true) return Self; } + public PointPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -460,6 +483,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("point"); writer.WriteEndObject(); @@ -477,6 +506,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, NullValue = NullValueValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Properties.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Properties.g.cs index b3b3c49457d..9cf52241069 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Properties.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Properties.g.cs @@ -236,11 +236,6 @@ public PropertiesDescriptor() : base(new Properties()) public PropertiesDescriptor Object(Elastic.Clients.Elasticsearch.PropertyName propertyName, ObjectProperty objectProperty) => AssignVariant(propertyName, objectProperty); public PropertiesDescriptor Object(Expression> propertyName) => AssignVariant, ObjectProperty>(propertyName, null); public PropertiesDescriptor Object(Expression> propertyName, Action> configure) => AssignVariant, ObjectProperty>(propertyName, configure); - public PropertiesDescriptor PassthroughObject(Elastic.Clients.Elasticsearch.PropertyName propertyName) => AssignVariant, PassthroughObjectProperty>(propertyName, null); - public PropertiesDescriptor PassthroughObject(Elastic.Clients.Elasticsearch.PropertyName propertyName, Action> configure) => AssignVariant, PassthroughObjectProperty>(propertyName, configure); - public PropertiesDescriptor PassthroughObject(Elastic.Clients.Elasticsearch.PropertyName propertyName, PassthroughObjectProperty passthroughObjectProperty) => AssignVariant(propertyName, passthroughObjectProperty); - public PropertiesDescriptor PassthroughObject(Expression> propertyName) => AssignVariant, PassthroughObjectProperty>(propertyName, null); - public PropertiesDescriptor PassthroughObject(Expression> propertyName, Action> configure) => AssignVariant, PassthroughObjectProperty>(propertyName, configure); public PropertiesDescriptor Percolator(Elastic.Clients.Elasticsearch.PropertyName propertyName) => AssignVariant, PercolatorProperty>(propertyName, null); public PropertiesDescriptor Percolator(Elastic.Clients.Elasticsearch.PropertyName propertyName, Action> configure) => AssignVariant, PercolatorProperty>(propertyName, configure); public PropertiesDescriptor Percolator(Elastic.Clients.Elasticsearch.PropertyName propertyName, PercolatorProperty percolatorProperty) => AssignVariant(propertyName, percolatorProperty); @@ -400,8 +395,6 @@ public override IProperty Read(ref Utf8JsonReader reader, Type typeToConvert, Js return JsonSerializer.Deserialize(ref reader, options); case "object": return JsonSerializer.Deserialize(ref reader, options); - case "passthrough": - return JsonSerializer.Deserialize(ref reader, options); case "percolator": return JsonSerializer.Deserialize(ref reader, options); case "point": @@ -549,9 +542,6 @@ public override void Write(Utf8JsonWriter writer, IProperty value, JsonSerialize case "object": JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Mapping.ObjectProperty), options); return; - case "passthrough": - JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Mapping.PassthroughObjectProperty), options); - return; case "percolator": JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Mapping.PercolatorProperty), options); return; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeatureProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeatureProperty.g.cs index 3ee3c6d40c8..f69e0dd7818 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeatureProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeatureProperty.g.cs @@ -47,6 +47,8 @@ public sealed partial class RankFeatureProperty : IProperty public bool? PositiveScoreImpact { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "rank_feature"; @@ -66,6 +68,7 @@ public RankFeaturePropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private bool? PositiveScoreImpactValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public RankFeaturePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) { @@ -136,6 +139,12 @@ public RankFeaturePropertyDescriptor Properties(Action SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -175,6 +184,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("rank_feature"); writer.WriteEndObject(); @@ -187,7 +202,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, PositiveScoreImpact = PositiveScoreImpactValue, - Properties = PropertiesValue + Properties = PropertiesValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -205,6 +221,7 @@ public RankFeaturePropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private bool? PositiveScoreImpactValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public RankFeaturePropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) { @@ -275,6 +292,12 @@ public RankFeaturePropertyDescriptor Properties(Action "rank_features"; @@ -66,6 +68,7 @@ public RankFeaturesPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private bool? PositiveScoreImpactValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public RankFeaturesPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) { @@ -136,6 +139,12 @@ public RankFeaturesPropertyDescriptor Properties(Action SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -175,6 +184,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("rank_features"); writer.WriteEndObject(); @@ -187,7 +202,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, PositiveScoreImpact = PositiveScoreImpactValue, - Properties = PropertiesValue + Properties = PropertiesValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -205,6 +221,7 @@ public RankFeaturesPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private bool? PositiveScoreImpactValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public RankFeaturesPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) { @@ -275,6 +292,12 @@ public RankFeaturesPropertyDescriptor Properties(Action /// @@ -115,6 +117,7 @@ public ScaledFloatNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -265,6 +268,12 @@ public ScaledFloatNumberPropertyDescriptor Store(bool? store = true) return Self; } + public ScaledFloatNumberPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -396,6 +405,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -455,6 +470,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o ScalingFactor = ScalingFactorValue, Script = BuildScript(), Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue }; @@ -486,6 +502,7 @@ public ScaledFloatNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -636,6 +653,12 @@ public ScaledFloatNumberPropertyDescriptor Store(bool? store = true) return Self; } + public ScaledFloatNumberPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -767,6 +790,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -826,6 +855,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o ScalingFactor = ScalingFactorValue, Script = BuildScript(), Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue }; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs index 01869286d25..ccfb13d6ed1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs @@ -66,6 +66,8 @@ public sealed partial class SearchAsYouTypeProperty : IProperty public string? Similarity { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("term_vector")] public Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? TermVector { get; set; } @@ -96,6 +98,7 @@ public SearchAsYouTypePropertyDescriptor() : base() private string? SearchQuoteAnalyzerValue { get; set; } private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? TermVectorValue { get; set; } public SearchAsYouTypePropertyDescriptor Analyzer(string? analyzer) @@ -221,6 +224,12 @@ public SearchAsYouTypePropertyDescriptor Store(bool? store = true) return Self; } + public SearchAsYouTypePropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + public SearchAsYouTypePropertyDescriptor TermVector(Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? termVector) { TermVectorValue = termVector; @@ -320,6 +329,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TermVectorValue is not null) { writer.WritePropertyName("term_vector"); @@ -348,6 +363,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SearchQuoteAnalyzer = SearchQuoteAnalyzerValue, Similarity = SimilarityValue, Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TermVector = TermVectorValue }; } @@ -375,6 +391,7 @@ public SearchAsYouTypePropertyDescriptor() : base() private string? SearchQuoteAnalyzerValue { get; set; } private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? TermVectorValue { get; set; } public SearchAsYouTypePropertyDescriptor Analyzer(string? analyzer) @@ -500,6 +517,12 @@ public SearchAsYouTypePropertyDescriptor Store(bool? store = true) return Self; } + public SearchAsYouTypePropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + public SearchAsYouTypePropertyDescriptor TermVector(Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? termVector) { TermVectorValue = termVector; @@ -599,6 +622,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TermVectorValue is not null) { writer.WritePropertyName("term_vector"); @@ -627,6 +656,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SearchQuoteAnalyzer = SearchQuoteAnalyzerValue, Similarity = SimilarityValue, Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TermVector = TermVectorValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SemanticTextProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SemanticTextProperty.g.cs index 0e3d3412758..25d160139c7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SemanticTextProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SemanticTextProperty.g.cs @@ -29,11 +29,28 @@ namespace Elastic.Clients.Elasticsearch.Mapping; public sealed partial class SemanticTextProperty : IProperty { + /// + /// + /// Inference endpoint that will be used to generate embeddings for the field. + /// This parameter cannot be updated. Use the Create inference API to create the endpoint. + /// If search_inference_id is specified, the inference endpoint will only be used at index time. + /// + /// [JsonInclude, JsonPropertyName("inference_id")] - public Elastic.Clients.Elasticsearch.Id InferenceId { get; set; } + public Elastic.Clients.Elasticsearch.Id? InferenceId { get; set; } [JsonInclude, JsonPropertyName("meta")] public IDictionary? Meta { get; set; } + /// + /// + /// Inference endpoint that will be used to generate embeddings at query time. + /// You can update this parameter by using the Update mapping API. Use the Create inference API to create the endpoint. + /// If not specified, the inference endpoint defined by inference_id will be used at both index and query time. + /// + /// + [JsonInclude, JsonPropertyName("search_inference_id")] + public Elastic.Clients.Elasticsearch.Id? SearchInferenceId { get; set; } + [JsonInclude, JsonPropertyName("type")] public string Type => "semantic_text"; } @@ -46,10 +63,18 @@ public SemanticTextPropertyDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Id InferenceIdValue { get; set; } + private Elastic.Clients.Elasticsearch.Id? InferenceIdValue { get; set; } private IDictionary? MetaValue { get; set; } + private Elastic.Clients.Elasticsearch.Id? SearchInferenceIdValue { get; set; } - public SemanticTextPropertyDescriptor InferenceId(Elastic.Clients.Elasticsearch.Id inferenceId) + /// + /// + /// Inference endpoint that will be used to generate embeddings for the field. + /// This parameter cannot be updated. Use the Create inference API to create the endpoint. + /// If search_inference_id is specified, the inference endpoint will only be used at index time. + /// + /// + public SemanticTextPropertyDescriptor InferenceId(Elastic.Clients.Elasticsearch.Id? inferenceId) { InferenceIdValue = inferenceId; return Self; @@ -61,17 +86,40 @@ public SemanticTextPropertyDescriptor Meta(Func return Self; } + /// + /// + /// Inference endpoint that will be used to generate embeddings at query time. + /// You can update this parameter by using the Update mapping API. Use the Create inference API to create the endpoint. + /// If not specified, the inference endpoint defined by inference_id will be used at both index and query time. + /// + /// + public SemanticTextPropertyDescriptor SearchInferenceId(Elastic.Clients.Elasticsearch.Id? searchInferenceId) + { + SearchInferenceIdValue = searchInferenceId; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - writer.WritePropertyName("inference_id"); - JsonSerializer.Serialize(writer, InferenceIdValue, options); + if (InferenceIdValue is not null) + { + writer.WritePropertyName("inference_id"); + JsonSerializer.Serialize(writer, InferenceIdValue, options); + } + if (MetaValue is not null) { writer.WritePropertyName("meta"); JsonSerializer.Serialize(writer, MetaValue, options); } + if (SearchInferenceIdValue is not null) + { + writer.WritePropertyName("search_inference_id"); + JsonSerializer.Serialize(writer, SearchInferenceIdValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("semantic_text"); writer.WriteEndObject(); @@ -80,6 +128,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SemanticTextProperty IBuildableDescriptor.Build() => new() { InferenceId = InferenceIdValue, - Meta = MetaValue + Meta = MetaValue, + SearchInferenceId = SearchInferenceIdValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs index 746ae77f100..1c11744d207 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs @@ -67,6 +67,8 @@ public sealed partial class ShapeProperty : IProperty public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "shape"; @@ -99,6 +101,7 @@ public ShapePropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Mapping.GeoOrientation? OrientationValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public ShapePropertyDescriptor Coerce(bool? coerce = true) { @@ -205,6 +208,12 @@ public ShapePropertyDescriptor Store(bool? store = true) return Self; } + public ShapePropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -280,6 +289,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("shape"); writer.WriteEndObject(); @@ -298,7 +313,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, Orientation = OrientationValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -329,6 +345,7 @@ public ShapePropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.Mapping.GeoOrientation? OrientationValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public ShapePropertyDescriptor Coerce(bool? coerce = true) { @@ -435,6 +452,12 @@ public ShapePropertyDescriptor Store(bool? store = true) return Self; } + public ShapePropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -510,6 +533,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("shape"); writer.WriteEndObject(); @@ -528,6 +557,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, Orientation = OrientationValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShortNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShortNumberProperty.g.cs index 828c1519a6d..86726793733 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShortNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShortNumberProperty.g.cs @@ -66,6 +66,8 @@ public sealed partial class ShortNumberProperty : IProperty public Elastic.Clients.Elasticsearch.Script? Script { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } /// /// @@ -112,6 +114,7 @@ public ShortNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -256,6 +259,12 @@ public ShortNumberPropertyDescriptor Store(bool? store = true) return Self; } + public ShortNumberPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -381,6 +390,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -439,6 +454,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Properties = PropertiesValue, Script = BuildScript(), Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue }; @@ -469,6 +485,7 @@ public ShortNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -613,6 +630,12 @@ public ShortNumberPropertyDescriptor Store(bool? store = true) return Self; } + public ShortNumberPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -738,6 +761,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -796,6 +825,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Properties = PropertiesValue, Script = BuildScript(), Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue }; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SparseVectorProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SparseVectorProperty.g.cs index 421e6a48fc4..cecbc772afe 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SparseVectorProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SparseVectorProperty.g.cs @@ -45,6 +45,8 @@ public sealed partial class SparseVectorProperty : IProperty public IDictionary? Meta { get; set; } [JsonInclude, JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "sparse_vector"; @@ -63,6 +65,7 @@ public SparseVectorPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public SparseVectorPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) { @@ -127,6 +130,12 @@ public SparseVectorPropertyDescriptor Properties(Action SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -160,6 +169,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, PropertiesValue, options); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("sparse_vector"); writer.WriteEndObject(); @@ -171,7 +186,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Fields = FieldsValue, IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, - Properties = PropertiesValue + Properties = PropertiesValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -188,6 +204,7 @@ public SparseVectorPropertyDescriptor() : base() private int? IgnoreAboveValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public SparseVectorPropertyDescriptor Dynamic(Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? dynamic) { @@ -252,6 +269,12 @@ public SparseVectorPropertyDescriptor Properties(Action Analyzer(string? analyzer) @@ -315,6 +318,12 @@ public TextPropertyDescriptor Store(bool? store = true) return Self; } + public TextPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + public TextPropertyDescriptor TermVector(Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? termVector) { TermVectorValue = termVector; @@ -470,6 +479,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TermVectorValue is not null) { writer.WritePropertyName("term_vector"); @@ -552,6 +567,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SearchQuoteAnalyzer = SearchQuoteAnalyzerValue, Similarity = SimilarityValue, Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TermVector = TermVectorValue }; } @@ -589,6 +605,7 @@ public TextPropertyDescriptor() : base() private string? SearchQuoteAnalyzerValue { get; set; } private string? SimilarityValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? TermVectorValue { get; set; } public TextPropertyDescriptor Analyzer(string? analyzer) @@ -786,6 +803,12 @@ public TextPropertyDescriptor Store(bool? store = true) return Self; } + public TextPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + public TextPropertyDescriptor TermVector(Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? termVector) { TermVectorValue = termVector; @@ -941,6 +964,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TermVectorValue is not null) { writer.WritePropertyName("term_vector"); @@ -1023,6 +1052,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SearchQuoteAnalyzer = SearchQuoteAnalyzerValue, Similarity = SimilarityValue, Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TermVector = TermVectorValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TokenCountProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TokenCountProperty.g.cs index 6a9e2302b3e..a0e6f6a9248 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TokenCountProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TokenCountProperty.g.cs @@ -62,6 +62,8 @@ public sealed partial class TokenCountProperty : IProperty public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "token_count"; @@ -88,6 +90,7 @@ public TokenCountPropertyDescriptor() : base() private double? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public TokenCountPropertyDescriptor Analyzer(string? analyzer) { @@ -200,6 +203,12 @@ public TokenCountPropertyDescriptor Store(bool? store = true) return Self; } + public TokenCountPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -281,6 +290,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("token_count"); writer.WriteEndObject(); @@ -300,7 +315,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, NullValue = NullValueValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -325,6 +341,7 @@ public TokenCountPropertyDescriptor() : base() private double? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public TokenCountPropertyDescriptor Analyzer(string? analyzer) { @@ -437,6 +454,12 @@ public TokenCountPropertyDescriptor Store(bool? store = true) return Self; } + public TokenCountPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -518,6 +541,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("token_count"); writer.WriteEndObject(); @@ -537,6 +566,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, NullValue = NullValueValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs index 0d7d4bebd18..62babbd8409 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs @@ -66,6 +66,8 @@ public sealed partial class UnsignedLongNumberProperty : IProperty public Elastic.Clients.Elasticsearch.Script? Script { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } /// /// @@ -112,6 +114,7 @@ public UnsignedLongNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -256,6 +259,12 @@ public UnsignedLongNumberPropertyDescriptor Store(bool? store = true) return Self; } + public UnsignedLongNumberPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -381,6 +390,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -439,6 +454,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Properties = PropertiesValue, Script = BuildScript(), Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue }; @@ -469,6 +485,7 @@ public UnsignedLongNumberPropertyDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor ScriptDescriptor { get; set; } private Action ScriptDescriptorAction { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } private bool? TimeSeriesDimensionValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetricValue { get; set; } @@ -613,6 +630,12 @@ public UnsignedLongNumberPropertyDescriptor Store(bool? store = true) return Self; } + public UnsignedLongNumberPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + /// /// /// For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false. @@ -738,6 +761,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + if (TimeSeriesDimensionValue.HasValue) { writer.WritePropertyName("time_series_dimension"); @@ -796,6 +825,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Properties = PropertiesValue, Script = BuildScript(), Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue, TimeSeriesDimension = TimeSeriesDimensionValue, TimeSeriesMetric = TimeSeriesMetricValue }; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/VersionProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/VersionProperty.g.cs index aeab1142b5e..a47cc0b2ba0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/VersionProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/VersionProperty.g.cs @@ -52,6 +52,8 @@ public sealed partial class VersionProperty : IProperty public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "version"; @@ -73,6 +75,7 @@ public VersionPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public VersionPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) { @@ -155,6 +158,12 @@ public VersionPropertyDescriptor Store(bool? store = true) return Self; } + public VersionPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -206,6 +215,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("version"); writer.WriteEndObject(); @@ -220,7 +235,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -240,6 +256,7 @@ public VersionPropertyDescriptor() : base() private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public VersionPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) { @@ -322,6 +339,12 @@ public VersionPropertyDescriptor Store(bool? store = true) return Self; } + public VersionPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -373,6 +396,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("version"); writer.WriteEndObject(); @@ -387,6 +416,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o IgnoreAbove = IgnoreAboveValue, Meta = MetaValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/WildcardProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/WildcardProperty.g.cs index a35b3b65721..3ea44163a71 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/WildcardProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/WildcardProperty.g.cs @@ -54,6 +54,8 @@ public sealed partial class WildcardProperty : IProperty public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } [JsonInclude, JsonPropertyName("store")] public bool? Store { get; set; } + [JsonInclude, JsonPropertyName("synthetic_source_keep")] + public Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeep { get; set; } [JsonInclude, JsonPropertyName("type")] public string Type => "wildcard"; @@ -76,6 +78,7 @@ public WildcardPropertyDescriptor() : base() private string? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public WildcardPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) { @@ -164,6 +167,12 @@ public WildcardPropertyDescriptor Store(bool? store = true) return Self; } + public WildcardPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -221,6 +230,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("wildcard"); writer.WriteEndObject(); @@ -236,7 +251,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, NullValue = NullValueValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } @@ -257,6 +273,7 @@ public WildcardPropertyDescriptor() : base() private string? NullValueValue { get; set; } private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private bool? StoreValue { get; set; } + private Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? SyntheticSourceKeepValue { get; set; } public WildcardPropertyDescriptor CopyTo(Elastic.Clients.Elasticsearch.Fields? copyTo) { @@ -345,6 +362,12 @@ public WildcardPropertyDescriptor Store(bool? store = true) return Self; } + public WildcardPropertyDescriptor SyntheticSourceKeep(Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? syntheticSourceKeep) + { + SyntheticSourceKeepValue = syntheticSourceKeep; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -402,6 +425,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(StoreValue.Value); } + if (SyntheticSourceKeepValue is not null) + { + writer.WritePropertyName("synthetic_source_keep"); + JsonSerializer.Serialize(writer, SyntheticSourceKeepValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("wildcard"); writer.WriteEndObject(); @@ -417,6 +446,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Meta = MetaValue, NullValue = NullValueValue, Properties = PropertiesValue, - Store = StoreValue + Store = StoreValue, + SyntheticSourceKeep = SyntheticSourceKeepValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeReloadResult.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeReloadResult.g.cs index e0ad61a6cd6..b55c403a77b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeReloadResult.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeReloadResult.g.cs @@ -17,26 +17,20 @@ #nullable restore -using Elastic.Clients.Elasticsearch.Core; using Elastic.Clients.Elasticsearch.Fluent; using Elastic.Clients.Elasticsearch.Serialization; -using Elastic.Transport; using System; using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; using System.Linq.Expressions; using System.Text.Json; using System.Text.Json.Serialization; namespace Elastic.Clients.Elasticsearch.Nodes; -public sealed partial class NodeReloadResult : Union +public sealed partial class NodeReloadResult { - public NodeReloadResult(Elastic.Clients.Elasticsearch.Nodes.Stats Stats) : base(Stats) - { - } - - public NodeReloadResult(Elastic.Clients.Elasticsearch.Nodes.NodeReloadError Error) : base(Error) - { - } + [JsonInclude, JsonPropertyName("name")] + public string Name { get; init; } + [JsonInclude, JsonPropertyName("reload_exception")] + public Elastic.Clients.Elasticsearch.ErrorCause? ReloadException { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FieldAndFormat.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FieldAndFormat.g.cs index 16db583ecbe..3f01188d339 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FieldAndFormat.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FieldAndFormat.g.cs @@ -36,7 +36,7 @@ public sealed partial class FieldAndFormat { /// /// - /// Wildcard pattern. The request returns values for field names matching this pattern. + /// A wildcard pattern. The request returns values for field names matching this pattern. /// /// [JsonInclude, JsonPropertyName("field")] @@ -44,7 +44,7 @@ public sealed partial class FieldAndFormat /// /// - /// Format in which the values are returned. + /// The format in which the values are returned. /// /// [JsonInclude, JsonPropertyName("format")] @@ -72,7 +72,7 @@ public FieldAndFormatDescriptor() : base() /// /// - /// Wildcard pattern. The request returns values for field names matching this pattern. + /// A wildcard pattern. The request returns values for field names matching this pattern. /// /// public FieldAndFormatDescriptor Field(Elastic.Clients.Elasticsearch.Field field) @@ -83,7 +83,7 @@ public FieldAndFormatDescriptor Field(Elastic.Clients.Elasticsearch.F /// /// - /// Wildcard pattern. The request returns values for field names matching this pattern. + /// A wildcard pattern. The request returns values for field names matching this pattern. /// /// public FieldAndFormatDescriptor Field(Expression> field) @@ -94,7 +94,7 @@ public FieldAndFormatDescriptor Field(Expression /// - /// Wildcard pattern. The request returns values for field names matching this pattern. + /// A wildcard pattern. The request returns values for field names matching this pattern. /// /// public FieldAndFormatDescriptor Field(Expression> field) @@ -105,7 +105,7 @@ public FieldAndFormatDescriptor Field(Expression /// - /// Format in which the values are returned. + /// The format in which the values are returned. /// /// public FieldAndFormatDescriptor Format(string? format) @@ -160,7 +160,7 @@ public FieldAndFormatDescriptor() : base() /// /// - /// Wildcard pattern. The request returns values for field names matching this pattern. + /// A wildcard pattern. The request returns values for field names matching this pattern. /// /// public FieldAndFormatDescriptor Field(Elastic.Clients.Elasticsearch.Field field) @@ -171,7 +171,7 @@ public FieldAndFormatDescriptor Field(Elastic.Clients.Elasticsearch.Field field) /// /// - /// Wildcard pattern. The request returns values for field names matching this pattern. + /// A wildcard pattern. The request returns values for field names matching this pattern. /// /// public FieldAndFormatDescriptor Field(Expression> field) @@ -182,7 +182,7 @@ public FieldAndFormatDescriptor Field(Expression /// - /// Wildcard pattern. The request returns values for field names matching this pattern. + /// A wildcard pattern. The request returns values for field names matching this pattern. /// /// public FieldAndFormatDescriptor Field(Expression> field) @@ -193,7 +193,7 @@ public FieldAndFormatDescriptor Field(Expression /// - /// Format in which the values are returned. + /// The format in which the values are returned. /// /// public FieldAndFormatDescriptor Format(string? format) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoGridQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoGridQuery.g.cs new file mode 100644 index 00000000000..bb5ec2e3665 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoGridQuery.g.cs @@ -0,0 +1,424 @@ +// 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 System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.QueryDsl; + +[JsonConverter(typeof(GeoGridQueryConverter))] +public sealed partial class GeoGridQuery +{ + internal GeoGridQuery(string variantName, object variant) + { + if (variantName is null) + throw new ArgumentNullException(nameof(variantName)); + if (variant is null) + throw new ArgumentNullException(nameof(variant)); + if (string.IsNullOrWhiteSpace(variantName)) + throw new ArgumentException("Variant name must not be empty or whitespace."); + VariantName = variantName; + Variant = variant; + } + + internal object Variant { get; } + internal string VariantName { get; } + + public static GeoGridQuery Geogrid(string s) => new GeoGridQuery("geogrid", s); + public static GeoGridQuery Geohash(string s) => new GeoGridQuery("geohash", s); + public static GeoGridQuery Geohex(string s) => new GeoGridQuery("geohex", s); + + /// + /// + /// Floating point number used to decrease or increase the relevance scores of the query. + /// Boost values are relative to the default value of 1.0. + /// A boost value between 0 and 1.0 decreases the relevance score. + /// A value greater than 1.0 increases the relevance score. + /// + /// + [JsonInclude, JsonPropertyName("boost")] + public float? Boost { get; set; } + [JsonInclude, JsonPropertyName("field")] + public Elastic.Clients.Elasticsearch.Field Field { get; set; } + [JsonInclude, JsonPropertyName("_name")] + public string? QueryName { get; set; } + + public bool TryGet([NotNullWhen(true)] out T? result) where T : class + { + result = default; + if (Variant is T variant) + { + result = variant; + return true; + } + + return false; + } +} + +internal sealed partial class GeoGridQueryConverter : JsonConverter +{ + public override GeoGridQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType != JsonTokenType.StartObject) + { + throw new JsonException("Expected start token."); + } + + reader.Read(); + var fieldName = reader.GetString(); + reader.Read(); + object? variantValue = default; + string? variantNameValue = default; + float? boostValue = default; + string? queryNameValue = default; + while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) + { + if (reader.TokenType != JsonTokenType.PropertyName) + { + throw new JsonException("Expected a property name token."); + } + + if (reader.TokenType != JsonTokenType.PropertyName) + { + throw new JsonException("Expected a property name token representing the name of an Elasticsearch field."); + } + + var propertyName = reader.GetString(); + reader.Read(); + if (propertyName == "boost") + { + boostValue = JsonSerializer.Deserialize(ref reader, options); + continue; + } + + if (propertyName == "_name") + { + queryNameValue = JsonSerializer.Deserialize(ref reader, options); + continue; + } + + if (propertyName == "geogrid") + { + variantValue = JsonSerializer.Deserialize(ref reader, options); + variantNameValue = propertyName; + continue; + } + + if (propertyName == "geohash") + { + variantValue = JsonSerializer.Deserialize(ref reader, options); + variantNameValue = propertyName; + continue; + } + + if (propertyName == "geohex") + { + variantValue = JsonSerializer.Deserialize(ref reader, options); + variantNameValue = propertyName; + continue; + } + + throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'GeoGridQuery' from the response."); + } + + reader.Read(); + var result = new GeoGridQuery(variantNameValue, variantValue); + result.Boost = boostValue; + result.Field = fieldName; + result.QueryName = queryNameValue; + return result; + } + + public override void Write(Utf8JsonWriter writer, GeoGridQuery value, JsonSerializerOptions options) + { + if (value.Field is null) + throw new JsonException("Unable to serialize GeoGridQuery because the `Field` property is not set. Field name queries must include a valid field name."); + if (!options.TryGetClientSettings(out var settings)) + throw new JsonException("Unable to retrieve client settings required to infer field."); + writer.WriteStartObject(); + writer.WritePropertyName(settings.Inferrer.Field(value.Field)); + writer.WriteStartObject(); + if (value.Boost.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(value.Boost.Value); + } + + if (!string.IsNullOrEmpty(value.QueryName)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(value.QueryName); + } + + if (value.VariantName is not null && value.Variant is not null) + { + writer.WritePropertyName(value.VariantName); + switch (value.VariantName) + { + case "geogrid": + JsonSerializer.Serialize(writer, (string)value.Variant, options); + break; + case "geohash": + JsonSerializer.Serialize(writer, (string)value.Variant, options); + break; + case "geohex": + JsonSerializer.Serialize(writer, (string)value.Variant, options); + break; + } + } + + writer.WriteEndObject(); + writer.WriteEndObject(); + } +} + +public sealed partial class GeoGridQueryDescriptor : SerializableDescriptor> +{ + internal GeoGridQueryDescriptor(Action> configure) => configure.Invoke(this); + + public GeoGridQueryDescriptor() : base() + { + } + + private bool ContainsVariant { get; set; } + private string ContainedVariantName { get; set; } + private object Variant { get; set; } + private Descriptor Descriptor { get; set; } + + private GeoGridQueryDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor + { + ContainedVariantName = variantName; + ContainsVariant = true; + var descriptor = (T)Activator.CreateInstance(typeof(T), true); + descriptorAction?.Invoke(descriptor); + Descriptor = descriptor; + return Self; + } + + private GeoGridQueryDescriptor Set(object variant, string variantName) + { + Variant = variant; + ContainedVariantName = variantName; + ContainsVariant = true; + return Self; + } + + private float? BoostValue { get; set; } + private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } + private string? QueryNameValue { get; set; } + + /// + /// + /// Floating point number used to decrease or increase the relevance scores of the query. + /// Boost values are relative to the default value of 1.0. + /// A boost value between 0 and 1.0 decreases the relevance score. + /// A value greater than 1.0 increases the relevance score. + /// + /// + public GeoGridQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + public GeoGridQueryDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + { + FieldValue = field; + return Self; + } + + public GeoGridQueryDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + public GeoGridQueryDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + public GeoGridQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + + public GeoGridQueryDescriptor Geogrid(string s) => Set(s, "geogrid"); + public GeoGridQueryDescriptor Geohash(string s) => Set(s, "geohash"); + public GeoGridQueryDescriptor Geohex(string s) => Set(s, "geohex"); + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + if (FieldValue is null) + throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); + writer.WriteStartObject(); + writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); + writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + + if (!string.IsNullOrEmpty(ContainedVariantName)) + { + writer.WritePropertyName(ContainedVariantName); + if (Variant is not null) + { + JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); + writer.WriteEndObject(); + return; + } + + JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); + } + + writer.WriteEndObject(); + writer.WriteEndObject(); + } +} + +public sealed partial class GeoGridQueryDescriptor : SerializableDescriptor +{ + internal GeoGridQueryDescriptor(Action configure) => configure.Invoke(this); + + public GeoGridQueryDescriptor() : base() + { + } + + private bool ContainsVariant { get; set; } + private string ContainedVariantName { get; set; } + private object Variant { get; set; } + private Descriptor Descriptor { get; set; } + + private GeoGridQueryDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor + { + ContainedVariantName = variantName; + ContainsVariant = true; + var descriptor = (T)Activator.CreateInstance(typeof(T), true); + descriptorAction?.Invoke(descriptor); + Descriptor = descriptor; + return Self; + } + + private GeoGridQueryDescriptor Set(object variant, string variantName) + { + Variant = variant; + ContainedVariantName = variantName; + ContainsVariant = true; + return Self; + } + + private float? BoostValue { get; set; } + private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } + private string? QueryNameValue { get; set; } + + /// + /// + /// Floating point number used to decrease or increase the relevance scores of the query. + /// Boost values are relative to the default value of 1.0. + /// A boost value between 0 and 1.0 decreases the relevance score. + /// A value greater than 1.0 increases the relevance score. + /// + /// + public GeoGridQueryDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + public GeoGridQueryDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + { + FieldValue = field; + return Self; + } + + public GeoGridQueryDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + public GeoGridQueryDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + public GeoGridQueryDescriptor QueryName(string? queryName) + { + QueryNameValue = queryName; + return Self; + } + + public GeoGridQueryDescriptor Geogrid(string s) => Set(s, "geogrid"); + public GeoGridQueryDescriptor Geohash(string s) => Set(s, "geohash"); + public GeoGridQueryDescriptor Geohex(string s) => Set(s, "geohex"); + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + if (FieldValue is null) + throw new JsonException("Unable to serialize field name query descriptor with a null field. Ensure you use a suitable descriptor constructor or call the Field method, passing a non-null value for the field argument."); + writer.WriteStartObject(); + writer.WritePropertyName(settings.Inferrer.Field(FieldValue)); + writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + if (!string.IsNullOrEmpty(QueryNameValue)) + { + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); + } + + if (!string.IsNullOrEmpty(ContainedVariantName)) + { + writer.WritePropertyName(ContainedVariantName); + if (Variant is not null) + { + JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); + writer.WriteEndObject(); + return; + } + + JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); + } + + writer.WriteEndObject(); + writer.WriteEndObject(); + } +} diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Query.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Query.g.cs index 35c8ba75904..f1dd33535f6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Query.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Query.g.cs @@ -28,6 +28,11 @@ namespace Elastic.Clients.Elasticsearch.QueryDsl; +/// +/// +/// An Elasticsearch Query DSL (Domain Specific Language) object that defines a query. +/// +/// [JsonConverter(typeof(QueryConverter))] public sealed partial class Query { @@ -59,6 +64,7 @@ internal Query(string variantName, object variant) public static Query Fuzzy(Elastic.Clients.Elasticsearch.QueryDsl.FuzzyQuery fuzzyQuery) => new Query("fuzzy", fuzzyQuery); public static Query GeoBoundingBox(Elastic.Clients.Elasticsearch.QueryDsl.GeoBoundingBoxQuery geoBoundingBoxQuery) => new Query("geo_bounding_box", geoBoundingBoxQuery); public static Query GeoDistance(Elastic.Clients.Elasticsearch.QueryDsl.GeoDistanceQuery geoDistanceQuery) => new Query("geo_distance", geoDistanceQuery); + public static Query GeoGrid(Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery geoGridQuery) => new Query("geo_grid", geoGridQuery); public static Query GeoShape(Elastic.Clients.Elasticsearch.QueryDsl.GeoShapeQuery geoShapeQuery) => new Query("geo_shape", geoShapeQuery); public static Query HasChild(Elastic.Clients.Elasticsearch.QueryDsl.HasChildQuery hasChildQuery) => new Query("has_child", hasChildQuery); public static Query HasParent(Elastic.Clients.Elasticsearch.QueryDsl.HasParentQuery hasParentQuery) => new Query("has_parent", hasParentQuery); @@ -223,6 +229,13 @@ public override Query Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSe continue; } + if (propertyName == "geo_grid") + { + variantValue = JsonSerializer.Deserialize(ref reader, options); + variantNameValue = propertyName; + continue; + } + if (propertyName == "geo_shape") { variantValue = JsonSerializer.Deserialize(ref reader, options); @@ -586,6 +599,9 @@ public override void Write(Utf8JsonWriter writer, Query value, JsonSerializerOpt case "geo_distance": JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.QueryDsl.GeoDistanceQuery)value.Variant, options); break; + case "geo_grid": + JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery)value.Variant, options); + break; case "geo_shape": JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.QueryDsl.GeoShapeQuery)value.Variant, options); break; @@ -782,6 +798,8 @@ private QueryDescriptor Set(object variant, string variantName) public QueryDescriptor GeoBoundingBox(Action> configure) => Set(configure, "geo_bounding_box"); public QueryDescriptor GeoDistance(Elastic.Clients.Elasticsearch.QueryDsl.GeoDistanceQuery geoDistanceQuery) => Set(geoDistanceQuery, "geo_distance"); public QueryDescriptor GeoDistance(Action> configure) => Set(configure, "geo_distance"); + public QueryDescriptor GeoGrid(Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery geoGridQuery) => Set(geoGridQuery, "geo_grid"); + public QueryDescriptor GeoGrid(Action> configure) => Set(configure, "geo_grid"); public QueryDescriptor GeoShape(Elastic.Clients.Elasticsearch.QueryDsl.GeoShapeQuery geoShapeQuery) => Set(geoShapeQuery, "geo_shape"); public QueryDescriptor GeoShape(Action> configure) => Set(configure, "geo_shape"); public QueryDescriptor HasChild(Elastic.Clients.Elasticsearch.QueryDsl.HasChildQuery hasChildQuery) => Set(hasChildQuery, "has_child"); @@ -948,6 +966,8 @@ private QueryDescriptor Set(object variant, string variantName) public QueryDescriptor GeoBoundingBox(Action configure) => Set(configure, "geo_bounding_box"); public QueryDescriptor GeoDistance(Elastic.Clients.Elasticsearch.QueryDsl.GeoDistanceQuery geoDistanceQuery) => Set(geoDistanceQuery, "geo_distance"); public QueryDescriptor GeoDistance(Action configure) => Set(configure, "geo_distance"); + public QueryDescriptor GeoGrid(Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery geoGridQuery) => Set(geoGridQuery, "geo_grid"); + public QueryDescriptor GeoGrid(Action configure) => Set(configure, "geo_grid"); public QueryDescriptor GeoShape(Elastic.Clients.Elasticsearch.QueryDsl.GeoShapeQuery geoShapeQuery) => Set(geoShapeQuery, "geo_shape"); public QueryDescriptor GeoShape(Action configure) => Set(configure, "geo_shape"); public QueryDescriptor HasChild(Elastic.Clients.Elasticsearch.QueryDsl.HasChildQuery hasChildQuery) => Set(hasChildQuery, "has_child"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsSetQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsSetQuery.g.cs index 47cb8cf5415..dab8941c77b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsSetQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsSetQuery.g.cs @@ -74,7 +74,7 @@ public override TermsSetQuery Read(ref Utf8JsonReader reader, Type typeToConvert if (property == "terms") { - variant.Terms = JsonSerializer.Deserialize>(ref reader, options); + variant.Terms = JsonSerializer.Deserialize>(ref reader, options); continue; } } @@ -178,7 +178,7 @@ public TermsSetQuery(Elastic.Clients.Elasticsearch.Field field) /// Array of terms you wish to find in the provided field. /// /// - public ICollection Terms { get; set; } + public ICollection Terms { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.Query(TermsSetQuery termsSetQuery) => Elastic.Clients.Elasticsearch.QueryDsl.Query.TermsSet(termsSetQuery); } @@ -199,7 +199,7 @@ public TermsSetQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor MinimumShouldMatchScriptDescriptor { get; set; } private Action MinimumShouldMatchScriptDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private ICollection TermsValue { get; set; } + private ICollection TermsValue { get; set; } /// /// @@ -317,7 +317,7 @@ public TermsSetQueryDescriptor QueryName(string? queryName) /// Array of terms you wish to find in the provided field. /// /// - public TermsSetQueryDescriptor Terms(ICollection terms) + public TermsSetQueryDescriptor Terms(ICollection terms) { TermsValue = terms; return Self; @@ -393,7 +393,7 @@ public TermsSetQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.ScriptDescriptor MinimumShouldMatchScriptDescriptor { get; set; } private Action MinimumShouldMatchScriptDescriptorAction { get; set; } private string? QueryNameValue { get; set; } - private ICollection TermsValue { get; set; } + private ICollection TermsValue { get; set; } /// /// @@ -511,7 +511,7 @@ public TermsSetQueryDescriptor QueryName(string? queryName) /// Array of terms you wish to find in the provided field. /// /// - public TermsSetQueryDescriptor Terms(ICollection terms) + public TermsSetQueryDescriptor Terms(ICollection terms) { TermsValue = terms; return Self; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRule.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRule.g.cs index fc8f7a84ead..157ded6328a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRule.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRule.g.cs @@ -29,15 +29,42 @@ namespace Elastic.Clients.Elasticsearch.QueryRules; public sealed partial class QueryRule { + /// + /// + /// 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; } + + /// + /// + /// A unique identifier for the rule. + /// + /// [JsonInclude, JsonPropertyName("rule_id")] public Elastic.Clients.Elasticsearch.Id RuleId { get; set; } + + /// + /// + /// 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; set; } } @@ -61,6 +88,12 @@ public QueryRuleDescriptor() : base() private Elastic.Clients.Elasticsearch.Id RuleIdValue { 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 QueryRuleDescriptor Actions(Elastic.Clients.Elasticsearch.QueryRules.QueryRuleActions actions) { ActionsDescriptor = null; @@ -85,6 +118,12 @@ public QueryRuleDescriptor 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 QueryRuleDescriptor Criteria(ICollection criteria) { CriteriaDescriptor = null; @@ -127,12 +166,24 @@ public QueryRuleDescriptor Priority(int? priority) return Self; } + /// + /// + /// A unique identifier for the rule. + /// + /// public QueryRuleDescriptor RuleId(Elastic.Clients.Elasticsearch.Id ruleId) { RuleIdValue = ruleId; return Self; } + /// + /// + /// 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. + /// + /// public QueryRuleDescriptor Type(Elastic.Clients.Elasticsearch.QueryRules.QueryRuleType type) { TypeValue = type; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRuleActions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRuleActions.g.cs index b8db32502f8..90b30f342bf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRuleActions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRuleActions.g.cs @@ -29,8 +29,35 @@ namespace Elastic.Clients.Elasticsearch.QueryRules; public sealed partial class QueryRuleActions { + /// + /// + /// The documents to apply the rule to. + /// Only one of ids or docs may be specified and at least one must be specified. + /// There is a maximum value of 100 documents in a rule. + /// You can specify the following attributes for each document: + /// + /// + /// + /// + /// _index: The index of the document to pin. + /// + /// + /// + /// + /// _id: The unique document ID. + /// + /// + /// + /// [JsonInclude, JsonPropertyName("docs")] public ICollection? Docs { get; set; } + + /// + /// + /// The unique document IDs of the documents to apply the rule to. + /// Only one of ids or docs may be specified and at least one must be specified. + /// + /// [JsonInclude, JsonPropertyName("ids")] public ICollection? Ids { get; set; } } @@ -49,6 +76,26 @@ public QueryRuleActionsDescriptor() : base() private Action[] DocsDescriptorActions { get; set; } private ICollection? IdsValue { get; set; } + /// + /// + /// The documents to apply the rule to. + /// Only one of ids or docs may be specified and at least one must be specified. + /// There is a maximum value of 100 documents in a rule. + /// You can specify the following attributes for each document: + /// + /// + /// + /// + /// _index: The index of the document to pin. + /// + /// + /// + /// + /// _id: The unique document ID. + /// + /// + /// + /// public QueryRuleActionsDescriptor Docs(ICollection? docs) { DocsDescriptor = null; @@ -85,6 +132,12 @@ public QueryRuleActionsDescriptor Docs(params Action + /// + /// The unique document IDs of the documents to apply the rule to. + /// Only one of ids or docs may be specified and at least one must be specified. + /// + /// public QueryRuleActionsDescriptor Ids(ICollection? ids) { IdsValue = ids; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRuleCriteria.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRuleCriteria.g.cs index f29c12c6a80..42bd4563f2a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRuleCriteria.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRuleCriteria.g.cs @@ -29,10 +29,83 @@ namespace Elastic.Clients.Elasticsearch.QueryRules; public sealed partial class QueryRuleCriteria { + /// + /// + /// The metadata field to match against. + /// This metadata will be used to match against match_criteria sent in the rule. + /// It is required for all criteria types except always. + /// + /// [JsonInclude, JsonPropertyName("metadata")] public string? Metadata { get; set; } + + /// + /// + /// The type of criteria. The following criteria types are supported: + /// + /// + /// + /// + /// always: Matches all queries, regardless of input. + /// + /// + /// + /// + /// contains: Matches that contain this value anywhere in the field meet the criteria defined by the rule. Only applicable for string values. + /// + /// + /// + /// + /// exact: Only exact matches meet the criteria defined by the rule. Applicable for string or numerical values. + /// + /// + /// + /// + /// fuzzy: Exact matches or matches within the allowed Levenshtein Edit Distance meet the criteria defined by the rule. Only applicable for string values. + /// + /// + /// + /// + /// gt: Matches with a value greater than this value meet the criteria defined by the rule. Only applicable for numerical values. + /// + /// + /// + /// + /// gte: Matches with a value greater than or equal to this value meet the criteria defined by the rule. Only applicable for numerical values. + /// + /// + /// + /// + /// lt: Matches with a value less than this value meet the criteria defined by the rule. Only applicable for numerical values. + /// + /// + /// + /// + /// lte: Matches with a value less than or equal to this value meet the criteria defined by the rule. Only applicable for numerical values. + /// + /// + /// + /// + /// prefix: Matches that start with this value meet the criteria defined by the rule. Only applicable for string values. + /// + /// + /// + /// + /// suffix: Matches that end with this value meet the criteria defined by the rule. Only applicable for string values. + /// + /// + /// + /// [JsonInclude, JsonPropertyName("type")] public Elastic.Clients.Elasticsearch.QueryRules.QueryRuleCriteriaType Type { get; set; } + + /// + /// + /// The values to match against the metadata field. + /// Only one value must match for the criteria to be met. + /// It is required for all criteria types except always. + /// + /// [JsonInclude, JsonPropertyName("values")] public ICollection? Values { get; set; } } @@ -49,18 +122,89 @@ public QueryRuleCriteriaDescriptor() : base() private Elastic.Clients.Elasticsearch.QueryRules.QueryRuleCriteriaType TypeValue { get; set; } private ICollection? ValuesValue { get; set; } + /// + /// + /// The metadata field to match against. + /// This metadata will be used to match against match_criteria sent in the rule. + /// It is required for all criteria types except always. + /// + /// public QueryRuleCriteriaDescriptor Metadata(string? metadata) { MetadataValue = metadata; return Self; } + /// + /// + /// The type of criteria. The following criteria types are supported: + /// + /// + /// + /// + /// always: Matches all queries, regardless of input. + /// + /// + /// + /// + /// contains: Matches that contain this value anywhere in the field meet the criteria defined by the rule. Only applicable for string values. + /// + /// + /// + /// + /// exact: Only exact matches meet the criteria defined by the rule. Applicable for string or numerical values. + /// + /// + /// + /// + /// fuzzy: Exact matches or matches within the allowed Levenshtein Edit Distance meet the criteria defined by the rule. Only applicable for string values. + /// + /// + /// + /// + /// gt: Matches with a value greater than this value meet the criteria defined by the rule. Only applicable for numerical values. + /// + /// + /// + /// + /// gte: Matches with a value greater than or equal to this value meet the criteria defined by the rule. Only applicable for numerical values. + /// + /// + /// + /// + /// lt: Matches with a value less than this value meet the criteria defined by the rule. Only applicable for numerical values. + /// + /// + /// + /// + /// lte: Matches with a value less than or equal to this value meet the criteria defined by the rule. Only applicable for numerical values. + /// + /// + /// + /// + /// prefix: Matches that start with this value meet the criteria defined by the rule. Only applicable for string values. + /// + /// + /// + /// + /// suffix: Matches that end with this value meet the criteria defined by the rule. Only applicable for string values. + /// + /// + /// + /// public QueryRuleCriteriaDescriptor Type(Elastic.Clients.Elasticsearch.QueryRules.QueryRuleCriteriaType type) { TypeValue = type; return Self; } + /// + /// + /// The values to match against the metadata field. + /// Only one value must match for the criteria to be met. + /// It is required for all criteria types except always. + /// + /// public QueryRuleCriteriaDescriptor Values(ICollection? values) { ValuesValue = values; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRulesetListItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRulesetListItem.g.cs index b2263dece8b..d6c376465ec 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRulesetListItem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRulesetListItem.g.cs @@ -31,7 +31,10 @@ public sealed partial class QueryRulesetListItem { /// /// - /// A map of criteria type (e.g. exact) to the number of rules of that type + /// A map of criteria type (for example, exact) to the number of rules of that type. + /// + /// + /// NOTE: The counts in rule_criteria_types_counts may be larger than the value of rule_total_count because a rule may have multiple criteria. /// /// [JsonInclude, JsonPropertyName("rule_criteria_types_counts")] @@ -39,7 +42,7 @@ public sealed partial class QueryRulesetListItem /// /// - /// Ruleset unique identifier + /// A unique identifier for the ruleset. /// /// [JsonInclude, JsonPropertyName("ruleset_id")] @@ -47,7 +50,7 @@ public sealed partial class QueryRulesetListItem /// /// - /// The number of rules associated with this ruleset + /// The number of rules associated with the ruleset. /// /// [JsonInclude, JsonPropertyName("rule_total_count")] @@ -55,7 +58,7 @@ public sealed partial class QueryRulesetListItem /// /// - /// A map of rule type (e.g. pinned) to the number of rules of that type + /// A map of rule type (for example, pinned) to the number of rules of that type. /// /// [JsonInclude, JsonPropertyName("rule_type_counts")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Retries.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Retries.g.cs index 03ba029d9a9..e1d9e9efe76 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Retries.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Retries.g.cs @@ -29,8 +29,19 @@ namespace Elastic.Clients.Elasticsearch; public sealed partial class Retries { + /// + /// + /// The number of bulk actions retried. + /// + /// [JsonInclude, JsonPropertyName("bulk")] public long Bulk { get; init; } + + /// + /// + /// The number of search actions retried. + /// + /// [JsonInclude, JsonPropertyName("search")] public long Search { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Rollup/RollupCapabilities.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Rollup/RollupCapabilities.g.cs index bfd22219cc4..14261858c28 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Rollup/RollupCapabilities.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Rollup/RollupCapabilities.g.cs @@ -29,6 +29,11 @@ namespace Elastic.Clients.Elasticsearch.Rollup; public sealed partial class RollupCapabilities { + /// + /// + /// There can be multiple, independent jobs configured for a single index or index pattern. Each of these jobs may have different configurations, so the API returns a list of all the various configurations available. + /// + /// [JsonInclude, JsonPropertyName("rollup_jobs")] public IReadOnlyCollection RollupJobs { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Rollup/RollupJob.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Rollup/RollupJob.g.cs index 824f882f957..156bc4d18f1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Rollup/RollupJob.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Rollup/RollupJob.g.cs @@ -29,10 +29,29 @@ namespace Elastic.Clients.Elasticsearch.Rollup; public sealed partial class RollupJob { + /// + /// + /// The rollup job configuration. + /// + /// [JsonInclude, JsonPropertyName("config")] public Elastic.Clients.Elasticsearch.Rollup.RollupJobConfiguration Config { get; init; } + + /// + /// + /// Transient statistics about the rollup job, such as how many documents have been processed and how many rollup summary docs have been indexed. + /// These stats are not persisted. + /// If a node is restarted, these stats are reset. + /// + /// [JsonInclude, JsonPropertyName("stats")] public Elastic.Clients.Elasticsearch.Rollup.RollupJobStats Stats { get; init; } + + /// + /// + /// The current status of the indexer for the rollup job. + /// + /// [JsonInclude, JsonPropertyName("status")] public Elastic.Clients.Elasticsearch.Rollup.RollupJobStatus Status { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchApplication/SearchApplication.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchApplication/SearchApplication.g.cs index 7dc4df34f85..645430c37b4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchApplication/SearchApplication.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchApplication/SearchApplication.g.cs @@ -35,7 +35,7 @@ public sealed partial class SearchApplication /// /// [JsonInclude, JsonPropertyName("analytics_collection_name")] - public string? AnalyticsCollectionName { get; init; } + public Elastic.Clients.Elasticsearch.Name? AnalyticsCollectionName { get; set; } /// /// @@ -43,15 +43,15 @@ public sealed partial class SearchApplication /// /// [JsonInclude, JsonPropertyName("indices")] - public IReadOnlyCollection Indices { get; init; } + public ICollection Indices { get; set; } /// /// - /// Search Application name + /// Search Application name. /// /// [JsonInclude, JsonPropertyName("name")] - public string Name { get; init; } + public Elastic.Clients.Elasticsearch.Name Name { get; set; } /// /// @@ -59,7 +59,7 @@ public sealed partial class SearchApplication /// /// [JsonInclude, JsonPropertyName("template")] - public Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationTemplate? Template { get; init; } + public Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationTemplate? Template { get; set; } /// /// @@ -67,5 +67,129 @@ public sealed partial class SearchApplication /// /// [JsonInclude, JsonPropertyName("updated_at_millis")] - public long UpdatedAtMillis { get; init; } + public long UpdatedAtMillis { get; set; } +} + +public sealed partial class SearchApplicationDescriptor : SerializableDescriptor +{ + internal SearchApplicationDescriptor(Action configure) => configure.Invoke(this); + + public SearchApplicationDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.Name? AnalyticsCollectionNameValue { get; set; } + private ICollection IndicesValue { get; set; } + private Elastic.Clients.Elasticsearch.Name NameValue { get; set; } + private Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationTemplate? TemplateValue { get; set; } + private Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationTemplateDescriptor TemplateDescriptor { get; set; } + private Action TemplateDescriptorAction { get; set; } + private long UpdatedAtMillisValue { get; set; } + + /// + /// + /// Analytics collection associated to the Search Application. + /// + /// + public SearchApplicationDescriptor AnalyticsCollectionName(Elastic.Clients.Elasticsearch.Name? analyticsCollectionName) + { + AnalyticsCollectionNameValue = analyticsCollectionName; + return Self; + } + + /// + /// + /// Indices that are part of the Search Application. + /// + /// + public SearchApplicationDescriptor Indices(ICollection indices) + { + IndicesValue = indices; + return Self; + } + + /// + /// + /// Search Application name. + /// + /// + public SearchApplicationDescriptor Name(Elastic.Clients.Elasticsearch.Name name) + { + NameValue = name; + return Self; + } + + /// + /// + /// Search template to use on search operations. + /// + /// + public SearchApplicationDescriptor Template(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationTemplate? template) + { + TemplateDescriptor = null; + TemplateDescriptorAction = null; + TemplateValue = template; + return Self; + } + + public SearchApplicationDescriptor Template(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationTemplateDescriptor descriptor) + { + TemplateValue = null; + TemplateDescriptorAction = null; + TemplateDescriptor = descriptor; + return Self; + } + + public SearchApplicationDescriptor Template(Action configure) + { + TemplateValue = null; + TemplateDescriptor = null; + TemplateDescriptorAction = configure; + return Self; + } + + /// + /// + /// Last time the Search Application was updated. + /// + /// + public SearchApplicationDescriptor UpdatedAtMillis(long updatedAtMillis) + { + UpdatedAtMillisValue = updatedAtMillis; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (AnalyticsCollectionNameValue is not null) + { + writer.WritePropertyName("analytics_collection_name"); + JsonSerializer.Serialize(writer, AnalyticsCollectionNameValue, options); + } + + writer.WritePropertyName("indices"); + JsonSerializer.Serialize(writer, IndicesValue, options); + writer.WritePropertyName("name"); + JsonSerializer.Serialize(writer, NameValue, options); + if (TemplateDescriptor is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateDescriptor, options); + } + else if (TemplateDescriptorAction is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationTemplateDescriptor(TemplateDescriptorAction), options); + } + else if (TemplateValue is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateValue, options); + } + + writer.WritePropertyName("updated_at_millis"); + writer.WriteNumberValue(UpdatedAtMillisValue); + writer.WriteEndObject(); + } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchApplication/SearchApplicationListItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchApplication/SearchApplicationListItem.g.cs new file mode 100644 index 00000000000..f660ec1cfd7 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchApplication/SearchApplicationListItem.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 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 SearchApplicationListItem +{ + /// + /// + /// Analytics collection associated to the Search Application + /// + /// + [JsonInclude, JsonPropertyName("analytics_collection_name")] + public string? AnalyticsCollectionName { get; init; } + + /// + /// + /// Indices that are part of the Search Application + /// + /// + [JsonInclude, JsonPropertyName("indices")] + public IReadOnlyCollection Indices { get; init; } + + /// + /// + /// Search Application name + /// + /// + [JsonInclude, JsonPropertyName("name")] + public string Name { get; init; } + + /// + /// + /// Last time the Search Application was updated + /// + /// + [JsonInclude, JsonPropertyName("updated_at_millis")] + public long UpdatedAtMillis { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchApplication/SearchApplicationParameters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchApplication/SearchApplicationParameters.g.cs deleted file mode 100644 index 923ead8239e..00000000000 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchApplication/SearchApplicationParameters.g.cs +++ /dev/null @@ -1,151 +0,0 @@ -// 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 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 SearchApplicationParameters -{ - /// - /// - /// Analytics collection associated to the Search Application. - /// - /// - [JsonInclude, JsonPropertyName("analytics_collection_name")] - public Elastic.Clients.Elasticsearch.Name? AnalyticsCollectionName { get; set; } - - /// - /// - /// Indices that are part of the Search Application. - /// - /// - [JsonInclude, JsonPropertyName("indices")] - public ICollection Indices { get; set; } - - /// - /// - /// Search template to use on search operations. - /// - /// - [JsonInclude, JsonPropertyName("template")] - public Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationTemplate? Template { get; set; } -} - -public sealed partial class SearchApplicationParametersDescriptor : SerializableDescriptor -{ - internal SearchApplicationParametersDescriptor(Action configure) => configure.Invoke(this); - - public SearchApplicationParametersDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Name? AnalyticsCollectionNameValue { get; set; } - private ICollection IndicesValue { get; set; } - private Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationTemplate? TemplateValue { get; set; } - private Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationTemplateDescriptor TemplateDescriptor { get; set; } - private Action TemplateDescriptorAction { get; set; } - - /// - /// - /// Analytics collection associated to the Search Application. - /// - /// - public SearchApplicationParametersDescriptor AnalyticsCollectionName(Elastic.Clients.Elasticsearch.Name? analyticsCollectionName) - { - AnalyticsCollectionNameValue = analyticsCollectionName; - return Self; - } - - /// - /// - /// Indices that are part of the Search Application. - /// - /// - public SearchApplicationParametersDescriptor Indices(ICollection indices) - { - IndicesValue = indices; - return Self; - } - - /// - /// - /// Search template to use on search operations. - /// - /// - public SearchApplicationParametersDescriptor Template(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationTemplate? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public SearchApplicationParametersDescriptor Template(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationTemplateDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public SearchApplicationParametersDescriptor Template(Action configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AnalyticsCollectionNameValue is not null) - { - writer.WritePropertyName("analytics_collection_name"); - JsonSerializer.Serialize(writer, AnalyticsCollectionNameValue, options); - } - - writer.WritePropertyName("indices"); - JsonSerializer.Serialize(writer, IndicesValue, options); - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicationTemplateDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - writer.WriteEndObject(); - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApplicationPrivilegesCheck.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApplicationPrivilegesCheck.g.cs index 1c8c7875f33..a1722cdeb72 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApplicationPrivilegesCheck.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApplicationPrivilegesCheck.g.cs @@ -39,7 +39,8 @@ public sealed partial class ApplicationPrivilegesCheck /// /// - /// A list of the privileges that you want to check for the specified resources. May be either application privilege names, or the names of actions that are granted by those privileges + /// A list of the privileges that you want to check for the specified resources. + /// It may be either application privilege names or the names of actions that are granted by those privileges /// /// [JsonInclude, JsonPropertyName("privileges")] @@ -47,7 +48,7 @@ public sealed partial class ApplicationPrivilegesCheck /// /// - /// A list of resource names against which the privileges should be checked + /// A list of resource names against which the privileges should be checked. /// /// [JsonInclude, JsonPropertyName("resources")] @@ -79,7 +80,8 @@ public ApplicationPrivilegesCheckDescriptor Application(string application) /// /// - /// A list of the privileges that you want to check for the specified resources. May be either application privilege names, or the names of actions that are granted by those privileges + /// A list of the privileges that you want to check for the specified resources. + /// It may be either application privilege names or the names of actions that are granted by those privileges /// /// public ApplicationPrivilegesCheckDescriptor Privileges(ICollection privileges) @@ -90,7 +92,7 @@ public ApplicationPrivilegesCheckDescriptor Privileges(ICollection privi /// /// - /// A list of resource names against which the privileges should be checked + /// A list of resource names against which the privileges should be checked. /// /// public ApplicationPrivilegesCheckDescriptor Resources(ICollection resources) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/Authentication.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/Authentication.g.cs new file mode 100644 index 00000000000..ce5f188a6f8 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/Authentication.g.cs @@ -0,0 +1,54 @@ +// 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 System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Security; + +public sealed partial class Authentication +{ + [JsonInclude, JsonPropertyName("api_key")] + public IReadOnlyDictionary? ApiKey { get; init; } + [JsonInclude, JsonPropertyName("authentication_realm")] + public Elastic.Clients.Elasticsearch.Security.AuthenticationRealm AuthenticationRealm { get; init; } + [JsonInclude, JsonPropertyName("authentication_type")] + public string AuthenticationType { get; init; } + [JsonInclude, JsonPropertyName("email")] + public string? Email { get; init; } + [JsonInclude, JsonPropertyName("enabled")] + public bool Enabled { get; init; } + [JsonInclude, JsonPropertyName("full_name")] + public string? FullName { get; init; } + [JsonInclude, JsonPropertyName("lookup_realm")] + public Elastic.Clients.Elasticsearch.Security.AuthenticationRealm LookupRealm { get; init; } + [JsonInclude, JsonPropertyName("metadata")] + public IReadOnlyDictionary Metadata { get; init; } + [JsonInclude, JsonPropertyName("roles")] + public IReadOnlyCollection Roles { get; init; } + [JsonInclude, JsonPropertyName("token")] + public IReadOnlyDictionary? Token { get; init; } + [JsonInclude, JsonPropertyName("username")] + public string Username { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/AuthenticationRealm.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/AuthenticationRealm.g.cs new file mode 100644 index 00000000000..818cba15063 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/AuthenticationRealm.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 System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Security; + +public sealed partial class AuthenticationRealm +{ + [JsonInclude, JsonPropertyName("domain")] + public string? Domain { get; init; } + [JsonInclude, JsonPropertyName("name")] + public string Name { get; init; } + [JsonInclude, JsonPropertyName("type")] + public string Type { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/GrantApiKey.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/GrantApiKey.g.cs index 1014fb194b1..d88bfbbc6bf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/GrantApiKey.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/GrantApiKey.g.cs @@ -52,7 +52,6 @@ public sealed partial class GrantApiKey /// /// /// The role descriptors for this API key. - /// This parameter is optional. /// When it is not specified or is an empty array, the API key has a point in time snapshot of permissions of the specified user or access token. /// If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token. /// @@ -108,7 +107,6 @@ public GrantApiKeyDescriptor Name(Elastic.Clients.Elasticsearch.Name /// /// /// The role descriptors for this API key. - /// This parameter is optional. /// When it is not specified or is an empty array, the API key has a point in time snapshot of permissions of the specified user or access token. /// If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token. /// @@ -192,7 +190,6 @@ public GrantApiKeyDescriptor Name(Elastic.Clients.Elasticsearch.Name name) /// /// /// The role descriptors for this API key. - /// This parameter is optional. /// When it is not specified or is an empty array, the API key has a point in time snapshot of permissions of the specified user or access token. /// If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token. /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/Hint.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/Hint.g.cs index c194b947807..c184dd519c1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/Hint.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/Hint.g.cs @@ -41,7 +41,7 @@ public sealed partial class Hint /// /// - /// A list of Profile UIDs to match against. + /// A list of profile UIDs to match against. /// /// [JsonInclude, JsonPropertyName("uids")] @@ -74,7 +74,7 @@ public HintDescriptor Labels(Func /// - /// A list of Profile UIDs to match against. + /// A list of profile UIDs to match against. /// /// public HintDescriptor Uids(ICollection? uids) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndexPrivilegesCheck.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndexPrivilegesCheck.g.cs index 1738636adc9..c5bcc5bb5bc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndexPrivilegesCheck.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndexPrivilegesCheck.g.cs @@ -31,9 +31,9 @@ public sealed partial class IndexPrivilegesCheck { /// /// - /// This needs to be set to true (default is false) if using wildcards or regexps for patterns that cover restricted indices. + /// This needs to be set to true (default is false) if using wildcards or regexps for patterns that cover restricted indices. /// Implicitly, restricted indices do not match index patterns because restricted indices usually have limited privileges and including them in pattern tests would render most such tests false. - /// If restricted indices are explicitly included in the names list, privileges will be checked against them regardless of the value of allow_restricted_indices. + /// If restricted indices are explicitly included in the names list, privileges will be checked against them regardless of the value of allow_restricted_indices. /// /// [JsonInclude, JsonPropertyName("allow_restricted_indices")] @@ -70,9 +70,9 @@ public IndexPrivilegesCheckDescriptor() : base() /// /// - /// This needs to be set to true (default is false) if using wildcards or regexps for patterns that cover restricted indices. + /// This needs to be set to true (default is false) if using wildcards or regexps for patterns that cover restricted indices. /// Implicitly, restricted indices do not match index patterns because restricted indices usually have limited privileges and including them in pattern tests would render most such tests false. - /// If restricted indices are explicitly included in the names list, privileges will be checked against them regardless of the value of allow_restricted_indices. + /// If restricted indices are explicitly included in the names list, privileges will be checked against them regardless of the value of allow_restricted_indices. /// /// public IndexPrivilegesCheckDescriptor AllowRestrictedIndices(bool? allowRestrictedIndices = true) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/KibanaToken.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/KibanaToken.g.cs index 251936ca047..4949c3a2107 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/KibanaToken.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/KibanaToken.g.cs @@ -29,8 +29,20 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class KibanaToken { + /// + /// + /// The name of the bearer token for the elastic/kibana service account. + /// + /// [JsonInclude, JsonPropertyName("name")] public string Name { get; init; } + + /// + /// + /// The value of the bearer token for the elastic/kibana service account. + /// Use this value to authenticate the service account with Elasticsearch. + /// + /// [JsonInclude, JsonPropertyName("value")] public string Value { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/QueryRole.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/QueryRole.g.cs index e137275de92..cbec368b368 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/QueryRole.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/QueryRole.g.cs @@ -194,7 +194,8 @@ public sealed partial class QueryRole /// /// - /// A list of cluster permissions for remote clusters. Note - this is limited a subset of the cluster permissions. + /// A list of cluster permissions for remote clusters. + /// NOTE: This is limited a subset of the cluster permissions. /// /// public IReadOnlyCollection? RemoteCluster { get; init; } @@ -215,7 +216,9 @@ public sealed partial class QueryRole /// /// - /// A list of users that the API keys can impersonate. Note: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty run_as field, but a non-empty list will be rejected. + /// A list of users that the API keys can impersonate. + /// NOTE: In Elastic Cloud Serverless, the run-as feature is disabled. + /// For API compatibility, you can still specify an empty run_as field, but a non-empty list will be rejected. /// /// public IReadOnlyCollection? RunAs { get; init; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RemoteUserIndicesPrivileges.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RemoteUserIndicesPrivileges.g.cs new file mode 100644 index 00000000000..1b0ea2f3c79 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RemoteUserIndicesPrivileges.g.cs @@ -0,0 +1,74 @@ +// 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 System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Security; + +public sealed partial class RemoteUserIndicesPrivileges +{ + /// + /// + /// Set to true if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the names list, Elasticsearch checks privileges against these indices regardless of the value set for allow_restricted_indices. + /// + /// + [JsonInclude, JsonPropertyName("allow_restricted_indices")] + public bool AllowRestrictedIndices { get; init; } + [JsonInclude, JsonPropertyName("clusters")] + public IReadOnlyCollection Clusters { get; init; } + + /// + /// + /// The document fields that the owners of the role have read access to. + /// + /// + [JsonInclude, JsonPropertyName("field_security")] + public IReadOnlyCollection? FieldSecurity { get; init; } + + /// + /// + /// A list of indices (or index name patterns) to which the permissions in this entry apply. + /// + /// + [JsonInclude, JsonPropertyName("names")] + [SingleOrManyCollectionConverter(typeof(string))] + public IReadOnlyCollection Names { get; init; } + + /// + /// + /// The index level privileges that owners of the role have on the specified indices. + /// + /// + [JsonInclude, JsonPropertyName("privileges")] + public IReadOnlyCollection Privileges { get; init; } + + /// + /// + /// Search queries that define the documents the user has access to. A document within the specified indices must match these queries for it to be accessible by the owners of the role. + /// + /// + [JsonInclude, JsonPropertyName("query")] + public object? Query { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/Restriction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/Restriction.g.cs index 0f48846bd95..bedf71ce381 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/Restriction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/Restriction.g.cs @@ -29,6 +29,12 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class Restriction { + /// + /// + /// A list of workflows to which the API key is restricted. + /// NOTE: In order to use a role restriction, an API key must be created with a single role descriptor. + /// + /// [JsonInclude, JsonPropertyName("workflows")] public ICollection Workflows { get; set; } } @@ -43,6 +49,12 @@ public RestrictionDescriptor() : base() private ICollection WorkflowsValue { get; set; } + /// + /// + /// A list of workflows to which the API key is restricted. + /// NOTE: In order to use a role restriction, an API key must be created with a single role descriptor. + /// + /// public RestrictionDescriptor Workflows(ICollection workflows) { WorkflowsValue = workflows; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/Role.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/Role.g.cs index feecdc34beb..8804eee441c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/Role.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/Role.g.cs @@ -33,6 +33,8 @@ public sealed partial class Role public IReadOnlyCollection Applications { get; init; } [JsonInclude, JsonPropertyName("cluster")] public IReadOnlyCollection Cluster { get; init; } + [JsonInclude, JsonPropertyName("description")] + public string? Description { get; init; } [JsonInclude, JsonPropertyName("global")] public IReadOnlyDictionary>>>? Global { get; init; } [JsonInclude, JsonPropertyName("indices")] @@ -46,7 +48,7 @@ public sealed partial class Role [JsonInclude, JsonPropertyName("role_templates")] public IReadOnlyCollection? RoleTemplates { get; init; } [JsonInclude, JsonPropertyName("run_as")] - public IReadOnlyCollection RunAs { get; init; } + public IReadOnlyCollection? RunAs { get; init; } [JsonInclude, JsonPropertyName("transient_metadata")] public IReadOnlyDictionary? TransientMetadata { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleDescriptor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleDescriptor.g.cs index 3eaf8158d4c..bb8f8688391 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleDescriptor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleDescriptor.g.cs @@ -230,7 +230,8 @@ public sealed partial class RoleDescriptor /// /// - /// A list of cluster permissions for remote clusters. Note - this is limited a subset of the cluster permissions. + /// A list of cluster permissions for remote clusters. + /// NOTE: This is limited a subset of the cluster permissions. /// /// public ICollection? RemoteCluster { get; set; } @@ -251,7 +252,9 @@ public sealed partial class RoleDescriptor /// /// - /// A list of users that the API keys can impersonate. Note: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty run_as field, but a non-empty list will be rejected. + /// A list of users that the API keys can impersonate. + /// NOTE: In Elastic Cloud Serverless, the run-as feature is disabled. + /// For API compatibility, you can still specify an empty run_as field, but a non-empty list will be rejected. /// /// public ICollection? RunAs { get; set; } @@ -453,7 +456,8 @@ public RoleDescriptorDescriptor Metadata(Func /// - /// A list of cluster permissions for remote clusters. Note - this is limited a subset of the cluster permissions. + /// A list of cluster permissions for remote clusters. + /// NOTE: This is limited a subset of the cluster permissions. /// /// public RoleDescriptorDescriptor RemoteCluster(ICollection? remoteCluster) @@ -564,7 +568,9 @@ public RoleDescriptorDescriptor Restriction(Action /// - /// A list of users that the API keys can impersonate. Note: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty run_as field, but a non-empty list will be rejected. + /// A list of users that the API keys can impersonate. + /// NOTE: In Elastic Cloud Serverless, the run-as feature is disabled. + /// For API compatibility, you can still specify an empty run_as field, but a non-empty list will be rejected. /// /// public RoleDescriptorDescriptor RunAs(ICollection? runAs) @@ -980,7 +986,8 @@ public RoleDescriptorDescriptor Metadata(Func, /// /// - /// A list of cluster permissions for remote clusters. Note - this is limited a subset of the cluster permissions. + /// A list of cluster permissions for remote clusters. + /// NOTE: This is limited a subset of the cluster permissions. /// /// public RoleDescriptorDescriptor RemoteCluster(ICollection? remoteCluster) @@ -1091,7 +1098,9 @@ public RoleDescriptorDescriptor Restriction(Action /// - /// A list of users that the API keys can impersonate. Note: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty run_as field, but a non-empty list will be rejected. + /// A list of users that the API keys can impersonate. + /// NOTE: In Elastic Cloud Serverless, the run-as feature is disabled. + /// For API compatibility, you can still specify an empty run_as field, but a non-empty list will be rejected. /// /// public RoleDescriptorDescriptor RunAs(ICollection? runAs) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleDescriptorRead.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleDescriptorRead.g.cs index 0cbba91ee67..0ce7e0a1c83 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleDescriptorRead.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleDescriptorRead.g.cs @@ -145,7 +145,7 @@ public sealed partial class RoleDescriptorRead /// /// - /// Optional description of the role descriptor + /// An optional description of the role descriptor. /// /// public string? Description { get; init; } @@ -173,7 +173,8 @@ public sealed partial class RoleDescriptorRead /// /// - /// A list of cluster permissions for remote clusters. Note - this is limited a subset of the cluster permissions. + /// A list of cluster permissions for remote clusters. + /// NOTE: This is limited a subset of the cluster permissions. /// /// public IReadOnlyCollection? RemoteCluster { get; init; } @@ -187,7 +188,7 @@ public sealed partial class RoleDescriptorRead /// /// - /// Restriction for when the role descriptor is allowed to be effective. + /// A restriction for when the role descriptor is allowed to be effective. /// /// public Elastic.Clients.Elasticsearch.Security.Restriction? Restriction { get; init; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/SecuritySettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/SecuritySettings.g.cs new file mode 100644 index 00000000000..6fa6be1e3cf --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/SecuritySettings.g.cs @@ -0,0 +1,152 @@ +// 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 System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Security; + +public sealed partial class SecuritySettings +{ + [JsonInclude, JsonPropertyName("index")] + public Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? Index { get; set; } +} + +public sealed partial class SecuritySettingsDescriptor : SerializableDescriptor> +{ + internal SecuritySettingsDescriptor(Action> configure) => configure.Invoke(this); + + public SecuritySettingsDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? IndexValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor IndexDescriptor { get; set; } + private Action> IndexDescriptorAction { get; set; } + + public SecuritySettingsDescriptor Index(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? index) + { + IndexDescriptor = null; + IndexDescriptorAction = null; + IndexValue = index; + return Self; + } + + public SecuritySettingsDescriptor Index(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor descriptor) + { + IndexValue = null; + IndexDescriptorAction = null; + IndexDescriptor = descriptor; + return Self; + } + + public SecuritySettingsDescriptor Index(Action> configure) + { + IndexValue = null; + IndexDescriptor = null; + IndexDescriptorAction = configure; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (IndexDescriptor is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexDescriptor, options); + } + else if (IndexDescriptorAction is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor(IndexDescriptorAction), options); + } + else if (IndexValue is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexValue, options); + } + + writer.WriteEndObject(); + } +} + +public sealed partial class SecuritySettingsDescriptor : SerializableDescriptor +{ + internal SecuritySettingsDescriptor(Action configure) => configure.Invoke(this); + + public SecuritySettingsDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? IndexValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor IndexDescriptor { get; set; } + private Action IndexDescriptorAction { get; set; } + + public SecuritySettingsDescriptor Index(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? index) + { + IndexDescriptor = null; + IndexDescriptorAction = null; + IndexValue = index; + return Self; + } + + public SecuritySettingsDescriptor Index(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor descriptor) + { + IndexValue = null; + IndexDescriptorAction = null; + IndexDescriptor = descriptor; + return Self; + } + + public SecuritySettingsDescriptor Index(Action configure) + { + IndexValue = null; + IndexDescriptor = null; + IndexDescriptorAction = configure; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (IndexDescriptor is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexDescriptor, options); + } + else if (IndexDescriptorAction is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor(IndexDescriptorAction), options); + } + else if (IndexValue is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexValue, options); + } + + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardStatistics.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardStatistics.g.cs index 81e8acb34b8..bd3a30849f6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardStatistics.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardStatistics.g.cs @@ -29,6 +29,11 @@ namespace Elastic.Clients.Elasticsearch; public sealed partial class ShardStatistics { + /// + /// + /// The number of shards the operation or search attempted to run on but failed. + /// + /// [JsonInclude, JsonPropertyName("failed")] public int Failed { get; init; } [JsonInclude, JsonPropertyName("failures")] @@ -38,7 +43,7 @@ public sealed partial class ShardStatistics /// /// - /// Indicates how many shards have successfully run the search. + /// The number of shards the operation or search succeeded on. /// /// [JsonInclude, JsonPropertyName("successful")] @@ -46,7 +51,7 @@ public sealed partial class ShardStatistics /// /// - /// Indicates how many shards the search will run on overall. + /// The number of shards the operation or search will run on overall. /// /// [JsonInclude, JsonPropertyName("total")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Simulate/IngestDocumentSimulation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Simulate/IngestDocumentSimulation.g.cs new file mode 100644 index 00000000000..42516255062 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Simulate/IngestDocumentSimulation.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.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Simulate; + +internal sealed partial class IngestDocumentSimulationConverter : JsonConverter +{ + public override IngestDocumentSimulation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException("Unexpected JSON detected."); + Elastic.Clients.Elasticsearch.ErrorCause? error = default; + IReadOnlyCollection executedPipelines = default; + string id = default; + IReadOnlyCollection>? ignoredFields = default; + string index = default; + IReadOnlyDictionary source = default; + long version = default; + Dictionary additionalProperties = null; + while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) + { + if (reader.TokenType == JsonTokenType.PropertyName) + { + var property = reader.GetString(); + if (property == "error") + { + error = JsonSerializer.Deserialize(ref reader, options); + continue; + } + + if (property == "executed_pipelines") + { + executedPipelines = JsonSerializer.Deserialize>(ref reader, options); + continue; + } + + if (property == "_id") + { + id = JsonSerializer.Deserialize(ref reader, options); + continue; + } + + if (property == "ignored_fields") + { + ignoredFields = JsonSerializer.Deserialize>?>(ref reader, options); + continue; + } + + if (property == "_index") + { + index = JsonSerializer.Deserialize(ref reader, options); + continue; + } + + if (property == "_source") + { + source = JsonSerializer.Deserialize>(ref reader, options); + continue; + } + + if (property == "_version") + { + version = JsonSerializer.Deserialize(ref reader, options); + continue; + } + + additionalProperties ??= new Dictionary(); + var additionalValue = JsonSerializer.Deserialize(ref reader, options); + additionalProperties.Add(property, additionalValue); + } + } + + return new IngestDocumentSimulation { Error = error, ExecutedPipelines = executedPipelines, Id = id, IgnoredFields = ignoredFields, Index = index, Metadata = additionalProperties, Source = source, Version = version }; + } + + public override void Write(Utf8JsonWriter writer, IngestDocumentSimulation value, JsonSerializerOptions options) + { + throw new NotImplementedException("'IngestDocumentSimulation' is a readonly type, used only on responses and does not support being written to JSON."); + } +} + +/// +/// +/// The results of ingest simulation on a single document. The _source of the document contains +/// the results after running all pipelines listed in executed_pipelines on the document. The +/// list of executed pipelines is derived from the pipelines that would be executed if this +/// document had been ingested into _index. +/// +/// +[JsonConverter(typeof(IngestDocumentSimulationConverter))] +public sealed partial class IngestDocumentSimulation +{ + /// + /// + /// Any error resulting from simulatng ingest on this doc. This can be an error generated by + /// executing a processor, or a mapping validation error when simulating indexing the resulting + /// doc. + /// + /// + public Elastic.Clients.Elasticsearch.ErrorCause? Error { get; init; } + + /// + /// + /// A list of the names of the pipelines executed on this document. + /// + /// + public IReadOnlyCollection ExecutedPipelines { get; init; } + + /// + /// + /// Identifier for the document. + /// + /// + public string Id { get; init; } + + /// + /// + /// A list of the fields that would be ignored at the indexing step. For example, a field whose + /// value is larger than the allowed limit would make it through all of the pipelines, but + /// would not be indexed into Elasticsearch. + /// + /// + public IReadOnlyCollection>? IgnoredFields { get; init; } + + /// + /// + /// Name of the index that the document would be indexed into if this were not a simulation. + /// + /// + public string Index { get; init; } + + /// + /// + /// Additional metadata + /// + /// + public IReadOnlyDictionary Metadata { get; init; } + + /// + /// + /// JSON body for the document. + /// + /// + public IReadOnlyDictionary Source { get; init; } + public long Version { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/FileSettingsIndicatorDetails.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Simulate/SimulateIngestDocumentResult.g.cs similarity index 81% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/FileSettingsIndicatorDetails.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Simulate/SimulateIngestDocumentResult.g.cs index e104bbb7ddb..c1e3ae9f062 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/FileSettingsIndicatorDetails.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Simulate/SimulateIngestDocumentResult.g.cs @@ -25,12 +25,10 @@ using System.Text.Json; using System.Text.Json.Serialization; -namespace Elastic.Clients.Elasticsearch.Core.HealthReport; +namespace Elastic.Clients.Elasticsearch.Simulate; -public sealed partial class FileSettingsIndicatorDetails +public sealed partial class SimulateIngestDocumentResult { - [JsonInclude, JsonPropertyName("failure_streak")] - public long FailureStreak { get; init; } - [JsonInclude, JsonPropertyName("most_recent_failure")] - public string MostRecentFailure { get; init; } + [JsonInclude, JsonPropertyName("doc")] + public Elastic.Clients.Elasticsearch.Simulate.IngestDocumentSimulation? Doc { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/BlobDetails.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/BlobDetails.g.cs new file mode 100644 index 00000000000..cb468018d0d --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/BlobDetails.g.cs @@ -0,0 +1,90 @@ +// 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 System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Snapshot; + +public sealed partial class BlobDetails +{ + /// + /// + /// The name of the blob. + /// + /// + [JsonInclude, JsonPropertyName("name")] + public string Name { get; init; } + + /// + /// + /// Indicates whether the blob was overwritten while the read operations were ongoing. + /// /** + /// + /// + [JsonInclude, JsonPropertyName("overwritten")] + public bool Overwritten { get; init; } + [JsonInclude, JsonPropertyName("read_early")] + public bool ReadEarly { get; init; } + + /// + /// + /// The position, in bytes, at which read operations completed. + /// + /// + [JsonInclude, JsonPropertyName("read_end")] + public long ReadEnd { get; init; } + + /// + /// + /// A description of every read operation performed on the blob. + /// + /// + [JsonInclude, JsonPropertyName("reads")] + public Elastic.Clients.Elasticsearch.Snapshot.ReadBlobDetails Reads { get; init; } + + /// + /// + /// The position, in bytes, at which read operations started. + /// + /// + [JsonInclude, JsonPropertyName("read_start")] + public long ReadStart { get; init; } + + /// + /// + /// The size of the blob. + /// + /// + [JsonInclude, JsonPropertyName("size")] + public Elastic.Clients.Elasticsearch.ByteSize Size { get; init; } + + /// + /// + /// The size of the blob in bytes. + /// + /// + [JsonInclude, JsonPropertyName("size_bytes")] + public long SizeBytes { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/DetailsInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/DetailsInfo.g.cs new file mode 100644 index 00000000000..f0b69f04947 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/DetailsInfo.g.cs @@ -0,0 +1,97 @@ +// 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 System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Snapshot; + +public sealed partial class DetailsInfo +{ + /// + /// + /// A description of the blob that was written and read. + /// + /// + [JsonInclude, JsonPropertyName("blob")] + public Elastic.Clients.Elasticsearch.Snapshot.BlobDetails Blob { get; init; } + + /// + /// + /// The elapsed time spent overwriting the blob. + /// If the blob was not overwritten, this information is omitted. + /// + /// + [JsonInclude, JsonPropertyName("overwrite_elapsed")] + public Elastic.Clients.Elasticsearch.Duration? OverwriteElapsed { get; init; } + + /// + /// + /// The elapsed time spent overwriting the blob, in nanoseconds. + /// If the blob was not overwritten, this information is omitted. + /// + /// + [JsonInclude, JsonPropertyName("overwrite_elapsed_nanos")] + public long? OverwriteElapsedNanos { get; init; } + + /// + /// + /// The elapsed time spent writing the blob. + /// + /// + [JsonInclude, JsonPropertyName("write_elapsed")] + public Elastic.Clients.Elasticsearch.Duration WriteElapsed { get; init; } + + /// + /// + /// The elapsed time spent writing the blob, in nanoseconds. + /// + /// + [JsonInclude, JsonPropertyName("write_elapsed_nanos")] + public long WriteElapsedNanos { get; init; } + + /// + /// + /// The node which wrote the blob and coordinated the read operations. + /// + /// + [JsonInclude, JsonPropertyName("writer_node")] + public Elastic.Clients.Elasticsearch.Snapshot.SnapshotNodeInfo WriterNode { get; init; } + + /// + /// + /// The length of time spent waiting for the max_snapshot_bytes_per_sec (or indices.recovery.max_bytes_per_sec if the recovery settings for managed services are set) throttle while writing the blob. + /// + /// + [JsonInclude, JsonPropertyName("write_throttled")] + public Elastic.Clients.Elasticsearch.Duration WriteThrottled { get; init; } + + /// + /// + /// The length of time spent waiting for the max_snapshot_bytes_per_sec (or indices.recovery.max_bytes_per_sec if the recovery settings for managed services are set) throttle while writing the blob, in nanoseconds. + /// + /// + [JsonInclude, JsonPropertyName("write_throttled_nanos")] + public long WriteThrottledNanos { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadBlobDetails.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadBlobDetails.g.cs new file mode 100644 index 00000000000..17acefa6cf2 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadBlobDetails.g.cs @@ -0,0 +1,110 @@ +// 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 System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Snapshot; + +public sealed partial class ReadBlobDetails +{ + /// + /// + /// Indicates whether the read operation may have started before the write operation was complete. + /// + /// + [JsonInclude, JsonPropertyName("before_write_complete")] + public bool? BeforeWriteComplete { get; init; } + + /// + /// + /// The length of time spent reading the blob. + /// If the blob was not found, this detail is omitted. + /// + /// + [JsonInclude, JsonPropertyName("elapsed")] + public Elastic.Clients.Elasticsearch.Duration? Elapsed { get; init; } + + /// + /// + /// The length of time spent reading the blob, in nanoseconds. + /// If the blob was not found, this detail is omitted. + /// + /// + [JsonInclude, JsonPropertyName("elapsed_nanos")] + public long? ElapsedNanos { get; init; } + + /// + /// + /// The length of time waiting for the first byte of the read operation to be received. + /// If the blob was not found, this detail is omitted. + /// + /// + [JsonInclude, JsonPropertyName("first_byte_time")] + public Elastic.Clients.Elasticsearch.Duration? FirstByteTime { get; init; } + + /// + /// + /// The length of time waiting for the first byte of the read operation to be received, in nanoseconds. + /// If the blob was not found, this detail is omitted. + /// + /// + [JsonInclude, JsonPropertyName("first_byte_time_nanos")] + public long FirstByteTimeNanos { get; init; } + + /// + /// + /// Indicates whether the blob was found by the read operation. + /// If the read was started before the write completed or the write was ended before completion, it might be false. + /// + /// + [JsonInclude, JsonPropertyName("found")] + public bool Found { get; init; } + + /// + /// + /// The node that performed the read operation. + /// + /// + [JsonInclude, JsonPropertyName("node")] + public Elastic.Clients.Elasticsearch.Snapshot.SnapshotNodeInfo Node { get; init; } + + /// + /// + /// The length of time spent waiting due to the max_restore_bytes_per_sec or indices.recovery.max_bytes_per_sec throttles during the read of the blob. + /// If the blob was not found, this detail is omitted. + /// + /// + [JsonInclude, JsonPropertyName("throttled")] + public Elastic.Clients.Elasticsearch.Duration? Throttled { get; init; } + + /// + /// + /// The length of time spent waiting due to the max_restore_bytes_per_sec or indices.recovery.max_bytes_per_sec throttles during the read of the blob, in nanoseconds. + /// If the blob was not found, this detail is omitted. + /// + /// + [JsonInclude, JsonPropertyName("throttled_nanos")] + public long? ThrottledNanos { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadSummaryInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadSummaryInfo.g.cs new file mode 100644 index 00000000000..03a0d2e7847 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadSummaryInfo.g.cs @@ -0,0 +1,119 @@ +// 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 System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Snapshot; + +public sealed partial class ReadSummaryInfo +{ + /// + /// + /// The number of read operations performed in the test. + /// + /// + [JsonInclude, JsonPropertyName("count")] + public int Count { get; init; } + + /// + /// + /// The maximum time spent waiting for the first byte of any read request to be received. + /// + /// + [JsonInclude, JsonPropertyName("max_wait")] + public Elastic.Clients.Elasticsearch.Duration MaxWait { get; init; } + + /// + /// + /// The maximum time spent waiting for the first byte of any read request to be received, in nanoseconds. + /// + /// + [JsonInclude, JsonPropertyName("max_wait_nanos")] + public long MaxWaitNanos { get; init; } + + /// + /// + /// The total elapsed time spent on reading blobs in the test. + /// + /// + [JsonInclude, JsonPropertyName("total_elapsed")] + public Elastic.Clients.Elasticsearch.Duration TotalElapsed { get; init; } + + /// + /// + /// The total elapsed time spent on reading blobs in the test, in nanoseconds. + /// + /// + [JsonInclude, JsonPropertyName("total_elapsed_nanos")] + public long TotalElapsedNanos { get; init; } + + /// + /// + /// The total size of all the blobs or partial blobs read in the test. + /// + /// + [JsonInclude, JsonPropertyName("total_size")] + public Elastic.Clients.Elasticsearch.ByteSize TotalSize { get; init; } + + /// + /// + /// The total size of all the blobs or partial blobs read in the test, in bytes. + /// + /// + [JsonInclude, JsonPropertyName("total_size_bytes")] + public long TotalSizeBytes { get; init; } + + /// + /// + /// The total time spent waiting due to the max_restore_bytes_per_sec or indices.recovery.max_bytes_per_sec throttles. + /// + /// + [JsonInclude, JsonPropertyName("total_throttled")] + public Elastic.Clients.Elasticsearch.Duration TotalThrottled { get; init; } + + /// + /// + /// The total time spent waiting due to the max_restore_bytes_per_sec or indices.recovery.max_bytes_per_sec throttles, in nanoseconds. + /// + /// + [JsonInclude, JsonPropertyName("total_throttled_nanos")] + public long TotalThrottledNanos { get; init; } + + /// + /// + /// The total time spent waiting for the first byte of each read request to be received. + /// + /// + [JsonInclude, JsonPropertyName("total_wait")] + public Elastic.Clients.Elasticsearch.Duration TotalWait { get; init; } + + /// + /// + /// The total time spent waiting for the first byte of each read request to be received, in nanoseconds. + /// + /// + [JsonInclude, JsonPropertyName("total_wait_nanos")] + public long TotalWaitNanos { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeReloadError.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SnapshotNodeInfo.g.cs similarity index 86% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeReloadError.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SnapshotNodeInfo.g.cs index 0f97bac6e7d..5f9098ecda0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeReloadError.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SnapshotNodeInfo.g.cs @@ -25,12 +25,12 @@ using System.Text.Json; using System.Text.Json.Serialization; -namespace Elastic.Clients.Elasticsearch.Nodes; +namespace Elastic.Clients.Elasticsearch.Snapshot; -public sealed partial class NodeReloadError +public sealed partial class SnapshotNodeInfo { + [JsonInclude, JsonPropertyName("id")] + public string Id { get; init; } [JsonInclude, JsonPropertyName("name")] public string Name { get; init; } - [JsonInclude, JsonPropertyName("reload_exception")] - public Elastic.Clients.Elasticsearch.ErrorCause? ReloadException { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SummaryInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SummaryInfo.g.cs new file mode 100644 index 00000000000..ae1877ae6f4 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SummaryInfo.g.cs @@ -0,0 +1,47 @@ +// 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 System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Snapshot; + +public sealed partial class SummaryInfo +{ + /// + /// + /// A collection of statistics that summarise the results of the read operations in the test. + /// + /// + [JsonInclude, JsonPropertyName("read")] + public Elastic.Clients.Elasticsearch.Snapshot.ReadSummaryInfo Read { get; init; } + + /// + /// + /// A collection of statistics that summarise the results of the write operations in the test. + /// + /// + [JsonInclude, JsonPropertyName("write")] + public Elastic.Clients.Elasticsearch.Snapshot.WriteSummaryInfo Write { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/WriteSummaryInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/WriteSummaryInfo.g.cs new file mode 100644 index 00000000000..0af04ba64da --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/WriteSummaryInfo.g.cs @@ -0,0 +1,87 @@ +// 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 System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Snapshot; + +public sealed partial class WriteSummaryInfo +{ + /// + /// + /// The number of write operations performed in the test. + /// + /// + [JsonInclude, JsonPropertyName("count")] + public int Count { get; init; } + + /// + /// + /// The total elapsed time spent on writing blobs in the test. + /// + /// + [JsonInclude, JsonPropertyName("total_elapsed")] + public Elastic.Clients.Elasticsearch.Duration TotalElapsed { get; init; } + + /// + /// + /// The total elapsed time spent on writing blobs in the test, in nanoseconds. + /// + /// + [JsonInclude, JsonPropertyName("total_elapsed_nanos")] + public long TotalElapsedNanos { get; init; } + + /// + /// + /// The total size of all the blobs written in the test. + /// + /// + [JsonInclude, JsonPropertyName("total_size")] + public Elastic.Clients.Elasticsearch.ByteSize TotalSize { get; init; } + + /// + /// + /// The total size of all the blobs written in the test, in bytes. + /// + /// + [JsonInclude, JsonPropertyName("total_size_bytes")] + public long TotalSizeBytes { get; init; } + + /// + /// + /// The total time spent waiting due to the max_snapshot_bytes_per_sec throttle. + /// + /// + [JsonInclude, JsonPropertyName("total_throttled")] + public Elastic.Clients.Elasticsearch.Duration TotalThrottled { get; init; } + + /// + /// + /// The total time spent waiting due to the max_snapshot_bytes_per_sec throttle, in nanoseconds. + /// + /// + [JsonInclude, JsonPropertyName("total_throttled_nanos")] + public long TotalThrottledNanos { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SnapshotLifecycle.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SnapshotLifecycle.g.cs index e502de544fb..f4a9896f7d8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SnapshotLifecycle.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SnapshotLifecycle.g.cs @@ -35,10 +35,22 @@ public sealed partial class SnapshotLifecycle public Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.Invocation? LastFailure { get; init; } [JsonInclude, JsonPropertyName("last_success")] public Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.Invocation? LastSuccess { get; init; } + + /// + /// + /// The last time the policy was modified. + /// + /// [JsonInclude, JsonPropertyName("modified_date")] public DateTimeOffset? ModifiedDate { get; init; } [JsonInclude, JsonPropertyName("modified_date_millis")] public long ModifiedDateMillis { get; init; } + + /// + /// + /// The next time the policy will run. + /// + /// [JsonInclude, JsonPropertyName("next_execution")] public DateTimeOffset? NextExecution { get; init; } [JsonInclude, JsonPropertyName("next_execution_millis")] @@ -47,6 +59,13 @@ public sealed partial class SnapshotLifecycle public Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.SlmPolicy Policy { get; init; } [JsonInclude, JsonPropertyName("stats")] public Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.Statistics Stats { get; init; } + + /// + /// + /// The version of the snapshot policy. + /// Only the latest version is stored and incremented when the policy is updated. + /// + /// [JsonInclude, JsonPropertyName("version")] public long Version { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoredScript.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoredScript.g.cs index d7551125245..60688ac17db 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoredScript.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoredScript.g.cs @@ -31,7 +31,8 @@ public sealed partial class StoredScript { /// /// - /// Specifies the language the script is written in. + /// The language the script is written in. + /// For serach templates, use mustache. /// /// [JsonInclude, JsonPropertyName("lang")] @@ -42,6 +43,7 @@ public sealed partial class StoredScript /// /// /// The script source. + /// For search templates, an object containing the search template. /// /// [JsonInclude, JsonPropertyName("source")] @@ -62,7 +64,8 @@ public StoredScriptDescriptor() : base() /// /// - /// Specifies the language the script is written in. + /// The language the script is written in. + /// For serach templates, use mustache. /// /// public StoredScriptDescriptor Language(Elastic.Clients.Elasticsearch.ScriptLanguage language) @@ -80,6 +83,7 @@ public StoredScriptDescriptor Options(Func, Flu /// /// /// The script source. + /// For search templates, an object containing the search template. /// /// public StoredScriptDescriptor Source(string source) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Synonyms/SynonymRule.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Synonyms/SynonymRule.g.cs index 91bfd2db8bd..b17b72d196f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Synonyms/SynonymRule.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Synonyms/SynonymRule.g.cs @@ -31,7 +31,8 @@ public sealed partial class SynonymRule { /// /// - /// Synonym Rule identifier + /// The identifier for the synonym rule. + /// If you do not specify a synonym rule ID when you create a rule, an identifier is created automatically by Elasticsearch. /// /// [JsonInclude, JsonPropertyName("id")] @@ -39,7 +40,7 @@ public sealed partial class SynonymRule /// /// - /// Synonyms, in Solr format, that conform the synonym rule. See https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-graph-tokenfilter.html#_solr_synonyms_2 + /// The synonyms that conform the synonym rule in Solr format. /// /// [JsonInclude, JsonPropertyName("synonyms")] @@ -59,7 +60,8 @@ public SynonymRuleDescriptor() : base() /// /// - /// Synonym Rule identifier + /// The identifier for the synonym rule. + /// If you do not specify a synonym rule ID when you create a rule, an identifier is created automatically by Elasticsearch. /// /// public SynonymRuleDescriptor Id(Elastic.Clients.Elasticsearch.Id? id) @@ -70,7 +72,7 @@ public SynonymRuleDescriptor Id(Elastic.Clients.Elasticsearch.Id? id) /// /// - /// Synonyms, in Solr format, that conform the synonym rule. See https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-graph-tokenfilter.html#_solr_synonyms_2 + /// The synonyms that conform the synonym rule in Solr format. /// /// public SynonymRuleDescriptor Synonyms(string synonyms) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/IlmPolicyStatistics.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/IlmPolicyStatistics.g.cs index b684b4369bc..be0d3fda2f1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/IlmPolicyStatistics.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/IlmPolicyStatistics.g.cs @@ -32,5 +32,5 @@ public sealed partial class IlmPolicyStatistics [JsonInclude, JsonPropertyName("indices_managed")] public int IndicesManaged { get; init; } [JsonInclude, JsonPropertyName("phases")] - public Elastic.Clients.Elasticsearch.IndexLifecycleManagement.Phases Phases { get; init; } + public Elastic.Clients.Elasticsearch.Xpack.Phases Phases { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Phase.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Phase.g.cs new file mode 100644 index 00000000000..9215ae75778 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Phase.g.cs @@ -0,0 +1,36 @@ +// 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 System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Xpack; + +public sealed partial class Phase +{ + [JsonInclude, JsonPropertyName("actions")] + public IReadOnlyCollection Actions { get; init; } + [JsonInclude, JsonPropertyName("min_age")] + public long MinAge { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Phases.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Phases.g.cs new file mode 100644 index 00000000000..8b1328b0b0c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Phases.g.cs @@ -0,0 +1,42 @@ +// 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 System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Xpack; + +public sealed partial class Phases +{ + [JsonInclude, JsonPropertyName("cold")] + public Elastic.Clients.Elasticsearch.Xpack.Phase? Cold { get; init; } + [JsonInclude, JsonPropertyName("delete")] + public Elastic.Clients.Elasticsearch.Xpack.Phase? Delete { get; init; } + [JsonInclude, JsonPropertyName("frozen")] + public Elastic.Clients.Elasticsearch.Xpack.Phase? Frozen { get; init; } + [JsonInclude, JsonPropertyName("hot")] + public Elastic.Clients.Elasticsearch.Xpack.Phase? Hot { get; init; } + [JsonInclude, JsonPropertyName("warm")] + public Elastic.Clients.Elasticsearch.Xpack.Phase? Warm { get; init; } +} \ No newline at end of file diff --git a/src/Playground/Playground.csproj b/src/Playground/Playground.csproj index 863f7d2015e..eace8526b9c 100644 --- a/src/Playground/Playground.csproj +++ b/src/Playground/Playground.csproj @@ -10,7 +10,7 @@ - +