elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb
# Provides low-level information about the segments in the shards of an index.
#
# @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 [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
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
# @option arguments [Boolean] :v Verbose mode. Display column headers
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html
#
Provides low-level information about the segments in the shards of an index.
Provides low - level information about the segments in the shards of an index .
def segments(arguments = {})
          headers = arguments.delete(:headers) || {}
          body = nil
          arguments = arguments.clone
          _index = arguments.delete(:index)
          method = Elasticsearch::API::HTTP_GET
          path   = if _index
                     "_cat/segments/#{Utils.__listify(_index)}"
                   else
                     "_cat/segments"
                   end
          params = Utils.process_params(arguments)
          perform_request(method, path, params, body, headers).body
        end
def segments ( arguments = { } ) headers = arguments . delete ( :headers ) || { } body = nil arguments = arguments . clone _index = arguments . delete ( :index ) method = Elasticsearch :: API :: HTTP_GET path = if _index "_cat/segments/#{Utils.__listify(_index)}" else "_cat/segments" end params = Utils . process_params ( arguments ) perform_request ( method , path , params , body , headers ) . body end
Provides low-level information about the segments in the shards of an index.
Provides low - level information about the segments in the shards of an index .
arguments
:headers Custom HTTP headers
: headers Custom HTTP headers
see
None