diff --git a/src/ApiGenerator/RestSpecification/Core/nodes.info.json b/src/ApiGenerator/RestSpecification/Core/nodes.info.json index 78da8caa0a3..a4cf6481c55 100644 --- a/src/ApiGenerator/RestSpecification/Core/nodes.info.json +++ b/src/ApiGenerator/RestSpecification/Core/nodes.info.json @@ -46,9 +46,11 @@ "transport", "http", "plugins", - "ingest" + "ingest", + "indices", + "aggregations" ], - "description":"A comma-separated list of metrics you wish returned. Leave empty to return all." + "description":"A comma-separated list of metrics you wish returned. Leave empty to return all metrics." } } }, @@ -73,9 +75,13 @@ "transport", "http", "plugins", - "ingest" + "ingest", + "indices", + "aggregations", + "_all", + "_none" ], - "description":"A comma-separated list of metrics you wish returned. Leave empty to return all." + "description":"A comma-separated list of metrics you wish returned. Use `_all` to retrieve all metrics and `_none` to retrieve the node identity without any additional metrics." } } } diff --git a/src/ApiGenerator/RestSpecification/Core/nodes.stats.json b/src/ApiGenerator/RestSpecification/Core/nodes.stats.json index 338b4fa42a6..1352707c769 100644 --- a/src/ApiGenerator/RestSpecification/Core/nodes.stats.json +++ b/src/ApiGenerator/RestSpecification/Core/nodes.stats.json @@ -128,7 +128,7 @@ "store", "warmer", "suggest", - "shards" + "shard_stats" ], "description":"Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified." } @@ -177,7 +177,7 @@ "store", "warmer", "suggest", - "shards" + "shard_stats" ], "description":"Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified." }, diff --git a/src/Elasticsearch.Net/Api/Enums.Generated.cs b/src/Elasticsearch.Net/Api/Enums.Generated.cs index ae6500901cf..c8a1a1a420d 100644 --- a/src/Elasticsearch.Net/Api/Enums.Generated.cs +++ b/src/Elasticsearch.Net/Api/Enums.Generated.cs @@ -108,7 +108,15 @@ public enum NodesInfoMetric [EnumMember(Value = "plugins")] Plugins = 1 << 7, [EnumMember(Value = "ingest")] - Ingest = 1 << 8 + Ingest = 1 << 8, + [EnumMember(Value = "indices")] + Indices = 1 << 9, + [EnumMember(Value = "aggregations")] + Aggregations = 1 << 10, + [EnumMember(Value = "_none")] + None = 1 << 11, + [EnumMember(Value = "_all")] + All = 1 << 12 } [Flags, StringEnum] @@ -569,6 +577,8 @@ public static string GetStringValue(this IndicesStatsMetric enumValue) public static string GetStringValue(this NodesInfoMetric enumValue) { + if ((enumValue & NodesInfoMetric.All) != 0) + return "_all"; var list = new List(); if ((enumValue & NodesInfoMetric.Settings) != 0) list.Add("settings"); @@ -588,6 +598,12 @@ public static string GetStringValue(this NodesInfoMetric enumValue) list.Add("plugins"); if ((enumValue & NodesInfoMetric.Ingest) != 0) list.Add("ingest"); + if ((enumValue & NodesInfoMetric.Indices) != 0) + list.Add("indices"); + if ((enumValue & NodesInfoMetric.Aggregations) != 0) + list.Add("aggregations"); + if ((enumValue & NodesInfoMetric.None) != 0) + list.Add("_none"); return string.Join(",", list); } diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Nodes.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Nodes.cs index c599dec7cbf..b7f324fe70a 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Nodes.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Nodes.cs @@ -115,25 +115,25 @@ public TResponse Info(string nodeId, NodesInfoRequestParameters reque public Task InfoAsync(string nodeId, NodesInfoRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_nodes/{nodeId:nodeId}"), ctx, null, RequestParams(requestParameters)); ///GET on /_nodes/{metric} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html - ///A comma-separated list of metrics you wish returned. Leave empty to return all. + ///A comma-separated list of metrics you wish returned. Use `_all` to retrieve all metrics and `_none` to retrieve the node identity without any additional metrics. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse InfoForAll(string metric, NodesInfoRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"_nodes/{metric:metric}"), null, RequestParams(requestParameters)); ///GET on /_nodes/{metric} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html - ///A comma-separated list of metrics you wish returned. Leave empty to return all. + ///A comma-separated list of metrics you wish returned. Use `_all` to retrieve all metrics and `_none` to retrieve the node identity without any additional metrics. ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("nodes.info", "metric")] public Task InfoForAllAsync(string metric, NodesInfoRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_nodes/{metric:metric}"), ctx, null, RequestParams(requestParameters)); ///GET on /_nodes/{node_id}/{metric} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - ///A comma-separated list of metrics you wish returned. Leave empty to return all. + ///A comma-separated list of metrics you wish returned. Use `_all` to retrieve all metrics and `_none` to retrieve the node identity without any additional metrics. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Info(string nodeId, string metric, NodesInfoRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"_nodes/{nodeId:nodeId}/{metric:metric}"), null, RequestParams(requestParameters)); ///GET on /_nodes/{node_id}/{metric} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - ///A comma-separated list of metrics you wish returned. Leave empty to return all. + ///A comma-separated list of metrics you wish returned. Use `_all` to retrieve all metrics and `_none` to retrieve the node identity without any additional metrics. ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("nodes.info", "node_id, metric")] public Task InfoAsync(string nodeId, string metric, NodesInfoRequestParameters requestParameters = null, CancellationToken ctx = default)