Method: OpenSearch::API::Indices::Actions#open

Defined in:
lib/opensearch/api/actions/indices/open.rb

#open(arguments = {}) ⇒ Object

Opens an index.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :index (List)

    A comma separated list of indices to open

  • :timeout (Time)

    Explicit operation timeout

  • :master_timeout (Time) — default: DEPRECATED: use cluster_manager_timeout instead

    Specify timeout for connection to master

  • :cluster_manager_timeout (Time)

    Explicit operation timeout for connection to cluster_manager node

  • :ignore_unavailable (Boolean)

    Whether specified concrete indices should be ignored when unavailable (missing or closed)

  • :allow_no_indices (Boolean)

    Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes ‘_all` string or when no indices have been specified)

  • :expand_wildcards (String)

    Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all)

  • :wait_for_active_shards (String)

    Sets the number of active shards to wait for before the operation returns.

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)


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

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

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

  arguments = arguments.clone

  _index = arguments.delete(:index)

  method = OpenSearch::API::HTTP_POST
  path   = "#{Utils.__listify(_index)}/_open"
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

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