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



53
54
55
56
57
58
59
60
61
# File 'lib/thinking_sphinx/deletion.rb', line 53

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