module Elasticsearch::API::DanglingIndices::Actions
Public Instance Methods
Source
# File lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb, line 37 def delete_dangling_index(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'dangling_indices.delete_dangling_index' } defined_params = [:index_uuid].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'index_uuid' missing" unless arguments[:index_uuid] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _index_uuid = arguments.delete(:index_uuid) method = Elasticsearch::API::HTTP_DELETE path = "_dangling/#{Utils.listify(_index_uuid)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Delete a dangling index. If Elasticsearch
encounters index data that is absent from the current cluster state, those indices are considered to be dangling. For example, this can happen if you delete more than cluster.indices.tombstones.size
indices while an Elasticsearch
node is offline.
@option arguments [String] :index_uuid The UUID of the index to delete. Use the get dangling indices API
to find the UUID. (Required) @option arguments [Boolean] :accept_data_loss This parameter must be set to true to acknowledge that it will no longer be possible to recove data from the dangling index. (Required) @option arguments [Time] :master_timeout Specify timeout for connection to master @option arguments [Time] :timeout Explicit operation timeout @option arguments [Hash] :headers Custom HTTP headers
Source
# File lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb, line 38 def import_dangling_index(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'dangling_indices.import_dangling_index' } defined_params = [:index_uuid].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'index_uuid' missing" unless arguments[:index_uuid] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _index_uuid = arguments.delete(:index_uuid) method = Elasticsearch::API::HTTP_POST path = "_dangling/#{Utils.listify(_index_uuid)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Import a dangling index. If Elasticsearch
encounters index data that is absent from the current cluster state, those indices are considered to be dangling. For example, this can happen if you delete more than cluster.indices.tombstones.size
indices while an Elasticsearch
node is offline.
@option arguments [String] :index_uuid The UUID of the index to import. Use the get dangling indices API
to locate the UUID. (Required) @option arguments [Boolean] :accept_data_loss This parameter must be set to true to import a dangling index.
Because Elasticsearch cannot know where the dangling index data came from or determine which shard copies are fresh and which are stale, it cannot guarantee that the imported data represents the latest state of the index when it was last in the cluster. (*Required*)
@option arguments [Time] :master_timeout Specify timeout for connection to master @option arguments [Time] :timeout Explicit operation timeout @option arguments [Hash] :headers Custom HTTP headers
Source
# File lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb, line 34 def list_dangling_indices(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'dangling_indices.list_dangling_indices' } arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil method = Elasticsearch::API::HTTP_GET path = '_dangling' params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Get the dangling indices. If Elasticsearch
encounters index data that is absent from the current cluster state, those indices are considered to be dangling. For example, this can happen if you delete more than cluster.indices.tombstones.size
indices while an Elasticsearch
node is offline. Use this API
to list dangling indices, which you can then import or delete.
@option arguments [Hash] :headers Custom HTTP headers