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 target 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' }, target: { index: 'test2' }, refresh: true


35
36
37
38
39
# File 'lib/elasticsearch/extensions/reindex.rb', line 35

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