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



40
41
42
43
44
45
46
47
48
# File 'lib/thinking_sphinx/deletion.rb', line 40

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