Module: Elasticsearch::Extensions::Reindex::API

Defined in:
lib/elasticsearch/extensions/reindex.rb

Instance Method Summary collapse

Instance Method Details

#reindex(arguments = {}) ⇒ Object

Copy documents from one index into another and refresh the destination index

The method allows all the options as Reindex::Reindex.new.

This method will be mixed into the Elasticsearch client’s API, if available.

Examples:

client.reindex source: { index: 'test1' }, dest: { index: 'test2' }, refresh: true


52
53
54
55
56
# File 'lib/elasticsearch/extensions/reindex.rb', line 52

def reindex(arguments={})
  arguments[:source] ||= {}
  arguments[:source][:client] = self
  Reindex.new(arguments).perform
end