Class: ThinkingSphinx::Commands::MergeAndUpdate
- Inherits:
-
Base
- Object
- Base
- ThinkingSphinx::Commands::MergeAndUpdate
show all
- Defined in:
- lib/thinking_sphinx/commands/merge_and_update.rb
Instance Method Summary
collapse
Methods inherited from Base
call, #call_with_handling
Methods included from WithOutput
#initialize
Instance Method Details
#call ⇒ Object
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/thinking_sphinx/commands/merge_and_update.rb', line 4
def call
configuration.preload_indices
configuration.render
index_pairs.each do |(core_index, delta_index)|
command :merge,
:core_index => core_index,
:delta_index => delta_index,
:filters => {:sphinx_deleted => 0}
core_index.model.where(:delta => true).update_all(:delta => false)
end
end
|