Class: ThinkingSphinx::Deletion::PlainDeletion

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



36
37
38
39
40
41
42
43
44
# File 'lib/thinking_sphinx/deletion.rb', line 36

def perform
  ids.each_slice(1000) do |some_ids|
    execute <<-SQL
UPDATE #{name}
SET sphinx_deleted = 1
WHERE sphinx_internal_id IN (#{some_ids.join(', ')})
    SQL
  end
end