Class: ThinkingSphinx::Deletion::RealtimeDeletion

Inherits:
ThinkingSphinx::Deletion show all
Defined in:
lib/thinking_sphinx/deletion.rb

Instance Method Summary collapse

Methods inherited from ThinkingSphinx::Deletion

#initialize, perform

Constructor Details

This class inherits a constructor from ThinkingSphinx::Deletion

Instance Method Details

#performObject



48
49
50
51
52
53
54
55
56
57
# File 'lib/thinking_sphinx/deletion.rb', line 48

def perform
  return unless callbacks_enabled?

  ids.each_slice(1000) do |some_ids|
    execute <<-SQL
DELETE FROM #{name}
WHERE sphinx_internal_id IN (#{some_ids.join(', ')})
    SQL
  end
end