Method: OpenSearch::API::Cat::Actions#fielddata

Defined in:
lib/opensearch/api/actions/cat/fielddata.rb

#fielddata(arguments = {}) ⇒ Object

Shows how much heap memory is currently being used by fielddata on every data node in the cluster.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :fields (List)

    A comma-separated list of fields to return the fielddata size

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :bytes (String)

    The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb)

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/opensearch/api/actions/cat/fielddata.rb', line 43

def fielddata(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  _fields = arguments.delete(:fields)

  method = OpenSearch::API::HTTP_GET
  path   = if _fields
             "_cat/fielddata/#{Utils.__listify(_fields)}"
           else
             "_cat/fielddata"
           end
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = nil
  perform_request(method, path, params, body, headers).body
end