Method: Elasticsearch::API::Indices::Actions#resolve_index

Defined in:
lib/elasticsearch/api/actions/indices/resolve_index.rb

#resolve_index(arguments = {}) ⇒ Object

Returns information about any matching indices, aliases, and data streams

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :name (List)

    A comma-separated list of names or wildcard expressions

  • :expand_wildcards (String)

    Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all)

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:

[View source]

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/elasticsearch/api/actions/indices/resolve_index.rb', line 33

def resolve_index(arguments = {})
  raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _name = arguments.delete(:name)

  method = Elasticsearch::API::HTTP_GET
  path   = "_resolve/index/#{Utils.__listify(_name)}"
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers)
  )
end