Sha256: f556e7873517b945a0e2b6b8baee2e40c698f4a029fb9c1381a8ef0c00e51bbd

Contents?: true

Size: 1.12 KB

Versions: 7

Compression:

Stored size: 1.12 KB

Contents

module Elasticsearch
  module XPack
    module API
      module Migration
        module Actions

          # Perform the upgrade of internal indices to make them compatible with the next major version
          #
          # @option arguments [String] :index The name of the index (*Required*)
          # @option arguments [Boolean] :wait_for_completion Should the request block until the upgrade operation is completed
          #
          # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-upgrade.html
          #
          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
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
elasticsearch-xpack-6.8.1 lib/elasticsearch/xpack/api/actions/migration/upgrade.rb
elasticsearch-xpack-6.8.0 lib/elasticsearch/xpack/api/actions/migration/upgrade.rb
elasticsearch-xpack-6.3.1 lib/elasticsearch/xpack/api/actions/migration/upgrade.rb
elasticsearch-xpack-6.3.0 lib/elasticsearch/xpack/api/actions/migration/upgrade.rb
elasticsearch-xpack-6.2.0 lib/elasticsearch/xpack/api/actions/migration/upgrade.rb
elasticsearch-xpack-6.1.0 lib/elasticsearch/xpack/api/actions/migration/upgrade.rb
elasticsearch-xpack-6.0.0 lib/elasticsearch/xpack/api/actions/migration/upgrade.rb