From f56663eb7370c390810ec335f456c75d747d1faf Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 24 Feb 2025 15:29:13 +0000 Subject: [PATCH] [API] Updates cat APIs cat.segments - Adds :master_timeout and :local Boolean parameter: return local information, do not retrieve the state from master node (default: false) cat.tasks - Adds :timeout and :wait_for_completion parameters --- elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb | 4 +--- .../lib/elasticsearch/api/actions/cat/segments.rb | 2 ++ elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb index dc2e32f358..2a6aa4bbf6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb @@ -24,8 +24,6 @@ module Cat module Actions # Returns help for the Cat APIs. # - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat.html @@ -40,7 +38,7 @@ def help(arguments = {}) method = Elasticsearch::API::HTTP_GET path = '_cat' - params = Utils.process_params(arguments) + params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb index f6d1f69a1b..98535a177b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb @@ -26,6 +26,8 @@ module Actions # # @option arguments [List] :index A comma-separated list of index names to limit the returned information # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml + # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) # @option arguments [List] :h Comma-separated list of column names to display # @option arguments [Boolean] :help Return help information diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb index f90b09886e..0bd23ee547 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb @@ -38,6 +38,8 @@ module Actions # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by # @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + # @option arguments [Boolean] :wait_for_completion If `true`, the request blocks until the task has completed. # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/tasks.html