diff --git a/src/Nest/Descriptors.Cat.cs b/src/Nest/Descriptors.Cat.cs index fb2e19b22fb..8d6245f233f 100644 --- a/src/Nest/Descriptors.Cat.cs +++ b/src/Nest/Descriptors.Cat.cs @@ -494,6 +494,8 @@ public partial class CatNodesDescriptor : RequestDescriptorBase Qs("h", headers); ///Return help information public CatNodesDescriptor Help(bool? help = true) => Qs("help", help); + ///If set to true segment stats will include stats for segments that are not currently loaded into memory + public CatNodesDescriptor IncludeUnloadedSegments(bool? includeunloadedsegments = true) => Qs("include_unloaded_segments", includeunloadedsegments); ///Calculate the selected nodes using the local cluster state rather than the state from master node (default: false) [Obsolete("Scheduled to be removed in 8.0, Deprecated as of: 7.6.0, reason: This parameter does not cause this API to act locally.")] public CatNodesDescriptor Local(bool? local = true) => Qs("local", local); diff --git a/src/Nest/Descriptors.Cluster.cs b/src/Nest/Descriptors.Cluster.cs index ac3b811366e..e3b14ba98f9 100644 --- a/src/Nest/Descriptors.Cluster.cs +++ b/src/Nest/Descriptors.Cluster.cs @@ -52,7 +52,7 @@ public partial class DeleteVotingConfigExclusionsDescriptor : RequestDescriptorB public DeleteVotingConfigExclusionsDescriptor WaitForRemoval(bool? waitforremoval = true) => Qs("wait_for_removal", waitforremoval); } - ///Descriptor for GetSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html + ///Descriptor for GetSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html public partial class ClusterGetSettingsDescriptor : RequestDescriptorBase, IClusterGetSettingsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterGetSettings; diff --git a/src/Nest/Descriptors.Indices.cs b/src/Nest/Descriptors.Indices.cs index cd794dc5ef0..50b6db4f9d0 100644 --- a/src/Nest/Descriptors.Indices.cs +++ b/src/Nest/Descriptors.Indices.cs @@ -209,7 +209,7 @@ public CloseIndexDescriptor Index() public CloseIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Explicit operation timeout public CloseIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Sets the number of active shards to wait for before the operation returns. + ///Sets the number of active shards to wait for before the operation returns. Set to `index-setting` to wait according to the index setting `index.write.wait_for_active_shards`, or `all` to wait for all shards, or an integer. Defaults to `0`. public CloseIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } diff --git a/src/Nest/Descriptors.Ingest.cs b/src/Nest/Descriptors.Ingest.cs index be278c09c53..50c11aa9f2f 100644 --- a/src/Nest/Descriptors.Ingest.cs +++ b/src/Nest/Descriptors.Ingest.cs @@ -77,6 +77,8 @@ public GetPipelineDescriptor(Id id): base(r => r.Optional("id", id)) // Request parameters ///Explicit operation timeout for connection to master node public GetPipelineDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); + ///Return pipelines without their definitions (default: false) + public GetPipelineDescriptor Summary(bool? summary = true) => Qs("summary", summary); } ///Descriptor for GrokProcessorPatterns https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get diff --git a/src/Nest/Descriptors.MachineLearning.cs b/src/Nest/Descriptors.MachineLearning.cs index ab3be292bd9..1b17303a746 100644 --- a/src/Nest/Descriptors.MachineLearning.cs +++ b/src/Nest/Descriptors.MachineLearning.cs @@ -756,19 +756,20 @@ public partial class PreviewDatafeedDescriptor : RequestDescriptorBase ApiUrlsLookups.MachineLearningPreviewDatafeed; ////_ml/datafeeds/{datafeed_id}/_preview - ///this parameter is required - public PreviewDatafeedDescriptor(Id datafeedId): base(r => r.Required("datafeed_id", datafeedId)) + ///Optional, accepts null + public PreviewDatafeedDescriptor(Id datafeedId): base(r => r.Optional("datafeed_id", datafeedId)) { } - ///Used for serialization purposes, making sure we have a parameterless constructor - [SerializationConstructor] - protected PreviewDatafeedDescriptor(): base() + ////_ml/datafeeds/_preview + public PreviewDatafeedDescriptor(): base() { } // values part of the url path Id IPreviewDatafeedRequest.DatafeedId => Self.RouteValues.Get("datafeed_id"); + ///The ID of the datafeed to preview + public PreviewDatafeedDescriptor DatafeedId(Id datafeedId) => Assign(datafeedId, (a, v) => a.RouteValues.Optional("datafeed_id", v)); // Request parameters } diff --git a/src/Nest/Descriptors.NoNamespace.cs b/src/Nest/Descriptors.NoNamespace.cs index f928ec0b643..4831dcd694b 100644 --- a/src/Nest/Descriptors.NoNamespace.cs +++ b/src/Nest/Descriptors.NoNamespace.cs @@ -1323,6 +1323,8 @@ public SearchDescriptor Index() public SearchDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); ///The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests public SearchDescriptor MaxConcurrentShardRequests(long? maxconcurrentshardrequests) => Qs("max_concurrent_shard_requests", maxconcurrentshardrequests); + ///The minimum compatible version that all shards involved in search should have for this request to be successful + public SearchDescriptor MinCompatibleShardNode(string mincompatibleshardnode) => Qs("min_compatible_shard_node", mincompatibleshardnode); ///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 ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. public SearchDescriptor PreFilterShardSize(long? prefiltershardsize) => Qs("pre_filter_shard_size", prefiltershardsize); ///Specify the node or shard the operation should be performed on (default: random) diff --git a/src/Nest/Descriptors.Nodes.cs b/src/Nest/Descriptors.Nodes.cs index eb34a860301..fb3e3be551c 100644 --- a/src/Nest/Descriptors.Nodes.cs +++ b/src/Nest/Descriptors.Nodes.cs @@ -203,6 +203,8 @@ public NodesStatsDescriptor Fields(params Expression>[] field public NodesStatsDescriptor Groups(bool? groups = true) => Qs("groups", groups); ///Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) public NodesStatsDescriptor IncludeSegmentFileSizes(bool? includesegmentfilesizes = true) => Qs("include_segment_file_sizes", includesegmentfilesizes); + ///If set to true segment stats will include stats for segments that are not currently loaded into memory + public NodesStatsDescriptor IncludeUnloadedSegments(bool? includeunloadedsegments = true) => Qs("include_unloaded_segments", includeunloadedsegments); ///Return indices stats aggregated at index, node or shard level public NodesStatsDescriptor Level(Level? level) => Qs("level", level); ///Explicit operation timeout diff --git a/src/Nest/Descriptors.Snapshot.cs b/src/Nest/Descriptors.Snapshot.cs index e59d5fb1dd2..a3c51dd8726 100644 --- a/src/Nest/Descriptors.Snapshot.cs +++ b/src/Nest/Descriptors.Snapshot.cs @@ -209,6 +209,8 @@ protected GetSnapshotDescriptor(): base() // Request parameters ///Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown public GetSnapshotDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); + ///Whether to include details of each index in the snapshot, if those details are available. Defaults to false. + public GetSnapshotDescriptor IndexDetails(bool? indexdetails = true) => Qs("index_details", indexdetails); ///Explicit operation timeout for connection to master node public GetSnapshotDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); ///Whether to show verbose snapshot info or only show the basic info found in the repository index blob diff --git a/src/Nest/ElasticClient.Cluster.cs b/src/Nest/ElasticClient.Cluster.cs index dc398dab4be..f03b20cc7b1 100644 --- a/src/Nest/ElasticClient.Cluster.cs +++ b/src/Nest/ElasticClient.Cluster.cs @@ -87,25 +87,25 @@ internal ClusterNamespace(ElasticClient client): base(client) /// /// GET request to the cluster.get_settings API, read more about this API online: /// - /// https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html + /// https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html /// public ClusterGetSettingsResponse GetSettings(Func selector = null) => GetSettings(selector.InvokeOrDefault(new ClusterGetSettingsDescriptor())); /// /// GET request to the cluster.get_settings API, read more about this API online: /// - /// https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html + /// https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html /// public Task GetSettingsAsync(Func selector = null, CancellationToken ct = default) => GetSettingsAsync(selector.InvokeOrDefault(new ClusterGetSettingsDescriptor()), ct); /// /// GET request to the cluster.get_settings API, read more about this API online: /// - /// https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html + /// https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html /// public ClusterGetSettingsResponse GetSettings(IClusterGetSettingsRequest request) => DoRequest(request, request.RequestParameters); /// /// GET request to the cluster.get_settings API, read more about this API online: /// - /// https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html + /// https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html /// public Task GetSettingsAsync(IClusterGetSettingsRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct); /// diff --git a/src/Nest/ElasticClient.MachineLearning.cs b/src/Nest/ElasticClient.MachineLearning.cs index 39ff97799eb..9c4310fd577 100644 --- a/src/Nest/ElasticClient.MachineLearning.cs +++ b/src/Nest/ElasticClient.MachineLearning.cs @@ -759,28 +759,28 @@ public Task EstimateModelMemoryAsync(Fun /// public Task PostJobDataAsync(IPostJobDataRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct); /// - /// GET request to the ml.preview_datafeed API, read more about this API online: + /// POST request to the ml.preview_datafeed API, read more about this API online: /// /// https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html /// - public PreviewDatafeedResponse PreviewDatafeed(Id datafeedId, Func selector = null) - where TDocument : class => PreviewDatafeed(selector.InvokeOrDefault(new PreviewDatafeedDescriptor(datafeedId: datafeedId))); + public PreviewDatafeedResponse PreviewDatafeed(Func selector = null) + where TDocument : class => PreviewDatafeed(selector.InvokeOrDefault(new PreviewDatafeedDescriptor())); /// - /// GET request to the ml.preview_datafeed API, read more about this API online: + /// POST request to the ml.preview_datafeed API, read more about this API online: /// /// https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html /// - public Task> PreviewDatafeedAsync(Id datafeedId, Func selector = null, CancellationToken ct = default) - where TDocument : class => PreviewDatafeedAsync(selector.InvokeOrDefault(new PreviewDatafeedDescriptor(datafeedId: datafeedId)), ct); + public Task> PreviewDatafeedAsync(Func selector = null, CancellationToken ct = default) + where TDocument : class => PreviewDatafeedAsync(selector.InvokeOrDefault(new PreviewDatafeedDescriptor()), ct); /// - /// GET request to the ml.preview_datafeed API, read more about this API online: + /// POST request to the ml.preview_datafeed API, read more about this API online: /// /// https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html /// public PreviewDatafeedResponse PreviewDatafeed(IPreviewDatafeedRequest request) where TDocument : class => DoRequest>(request, ResponseBuilder(request.RequestParameters, PreviewDatafeedResponseBuilder.Instance)); /// - /// GET request to the ml.preview_datafeed API, read more about this API online: + /// POST request to the ml.preview_datafeed API, read more about this API online: /// /// https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html /// diff --git a/src/Nest/Requests.Cat.cs b/src/Nest/Requests.Cat.cs index a3781b1270f..262b28abab3 100644 --- a/src/Nest/Requests.Cat.cs +++ b/src/Nest/Requests.Cat.cs @@ -1160,6 +1160,13 @@ public bool? Help set => Q("help", value); } + ///If set to true segment stats will include stats for segments that are not currently loaded into memory + public bool? IncludeUnloadedSegments + { + get => Q("include_unloaded_segments"); + set => Q("include_unloaded_segments", value); + } + ///Calculate the selected nodes using the local cluster state rather than the state from master node (default: false) [Obsolete("Scheduled to be removed in 8.0, Deprecated as of: 7.6.0, reason: This parameter does not cause this API to act locally.")] public bool? Local diff --git a/src/Nest/Requests.Cluster.cs b/src/Nest/Requests.Cluster.cs index 18ef232f202..2e6a1cb8121 100644 --- a/src/Nest/Requests.Cluster.cs +++ b/src/Nest/Requests.Cluster.cs @@ -83,7 +83,7 @@ public partial interface IClusterGetSettingsRequest : IRequestRequest for GetSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html + ///Request for GetSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html public partial class ClusterGetSettingsRequest : PlainRequestBase, IClusterGetSettingsRequest { protected IClusterGetSettingsRequest Self => this; diff --git a/src/Nest/Requests.Indices.cs b/src/Nest/Requests.Indices.cs index 26f133fb692..f203ae483b9 100644 --- a/src/Nest/Requests.Indices.cs +++ b/src/Nest/Requests.Indices.cs @@ -356,7 +356,10 @@ public Time Timeout set => Q("timeout", value); } - ///Sets the number of active shards to wait for before the operation returns. + /// + /// Sets the number of active shards to wait for before the operation returns. Set to `index-setting` to wait according to the index setting + /// `index.write.wait_for_active_shards`, or `all` to wait for all shards, or an integer. Defaults to `0`. + /// public string WaitForActiveShards { get => Q("wait_for_active_shards"); diff --git a/src/Nest/Requests.Ingest.cs b/src/Nest/Requests.Ingest.cs index efc173815e7..8b43ac6dc1d 100644 --- a/src/Nest/Requests.Ingest.cs +++ b/src/Nest/Requests.Ingest.cs @@ -113,6 +113,13 @@ public Time MasterTimeout get => Q