Module: Elasticsearch::XPack::API::Migration::Actions

Included in:
MigrationClient
Defined in:
lib/elasticsearch/xpack/api/namespace/migration.rb,
lib/elasticsearch/xpack/api/actions/migration/upgrade.rb,
lib/elasticsearch/xpack/api/actions/migration/deprecations.rb,
lib/elasticsearch/xpack/api/actions/migration/get_assistance.rb

Instance Method Summary collapse

Instance Method Details

#deprecations(arguments = {}) ⇒ Object

Retrieve information about different cluster, node, and index level settings that use deprecated features that will be removed or changed in the next major version

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :index (String)

    Index pattern (optional)

See Also:



18
19
20
21
22
23
24
25
# File 'lib/elasticsearch/xpack/api/actions/migration/deprecations.rb', line 18

def deprecations(arguments={})
  method = Elasticsearch::API::HTTP_GET
  path   = Elasticsearch::API::Utils.__pathify arguments[:index], "_xpack/migration/deprecations"
  params = {}
  body   = nil

  perform_request(method, path, params, body).body
end

#get_assistance(arguments = {}) ⇒ Object

Returns the information about indices that require some changes before the cluster can be upgraded to the next major version

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :index (List)

    A comma-separated list of index names; use ‘_all` or empty string to perform the operation on all indices

  • :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, none, all)

  • :ignore_unavailable (Boolean)

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

See Also:



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/elasticsearch/xpack/api/actions/migration/get_assistance.rb', line 20

def get_assistance(arguments={})
  valid_params = [
    :allow_no_indices,
    :expand_wildcards,
    :ignore_unavailable ]

  method = Elasticsearch::API::HTTP_GET
  path   = "_xpack/migration/assistance"
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
  body   = nil

  perform_request(method, path, params, body).body
end

#upgrade(arguments = {}) ⇒ Object

Perform the upgrade of internal indices to make them compatible with the next major version

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :index (String)

    The name of the index (Required)

  • :wait_for_completion (Boolean)

    Should the request block until the upgrade operation is completed

Raises:

  • (ArgumentError)

See Also:



18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/elasticsearch/xpack/api/actions/migration/upgrade.rb', line 18

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

  valid_params = [
    :wait_for_completion ]

  method = Elasticsearch::API::HTTP_POST
  path   = Elasticsearch::API::Utils.__pathify "_xpack/migration/upgrade", arguments[:index]
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
  body   = nil

  perform_request(method, path, params, body).body
end