Class: Escargot::DistributedIndexing::IndexDocuments

Inherits:
Object
  • Object
show all
Defined in:
lib/escargot/distributed_indexing.rb

Class Method Summary collapse

Class Method Details

.perform(model_name, ids, index_version) ⇒ Object



25
26
27
28
29
30
# File 'lib/escargot/distributed_indexing.rb', line 25

def self.perform(model_name, ids, index_version)
  model = model_name.constantize
  model.find(:all, :conditions => {model.primary_key => ids}).each do |record|
    record.local_index_in_elastic_search(:index => index_version)
  end
end