Class: Elastic::Commands::ImportIndexDocuments

Inherits:
Object
  • Object
show all
Defined in:
lib/elastic/commands/import_index_documents.rb

Instance Method Summary collapse

Instance Method Details

#performObject



5
6
7
8
9
10
11
12
# File 'lib/elastic/commands/import_index_documents.rb', line 5

def perform
  if collection.present?
    target.collect_from(collection, middleware_options) { |obj| queue obj }
  else
    target.collect_all(middleware_options) { |obj| queue obj }
  end
  flush
end