Class: ThinkingSphinx::Deletion
- Inherits:
-
Object
- Object
- ThinkingSphinx::Deletion
- Defined in:
- lib/thinking_sphinx/deletion.rb
Direct Known Subclasses
Defined Under Namespace
Classes: PlainDeletion, RealtimeDeletion
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(index, ids) ⇒ Deletion
constructor
A new instance of Deletion.
Constructor Details
#initialize(index, ids) ⇒ Deletion
Returns a new instance of Deletion.
17 18 19 |
# File 'lib/thinking_sphinx/deletion.rb', line 17 def initialize(index, ids) @index, @ids = index, Array(ids) end |
Class Method Details
.perform(index, ids) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/thinking_sphinx/deletion.rb', line 6 def self.perform(index, ids) return if index.distributed? { 'plain' => PlainDeletion, 'rt' => RealtimeDeletion }[index.type].new(index, ids).perform rescue ThinkingSphinx::ConnectionError => error # This isn't vital, so don't raise the error. end |