Sha256: a66dd8ad22345ecab45b37e7f384cadb9e9349b36ab62eda41ab2b07679e078b
Contents?: true
Size: 601 Bytes
Versions: 3
Compression:
Stored size: 601 Bytes
Contents
class ThinkingSphinx::Deltas::DeleteJob def initialize(index_name, document_id) @index_name, @document_id = index_name, document_id end def perform return if @document_id.nil? ThinkingSphinx::Logger.log :query, statement do ThinkingSphinx::Connection.take do |connection| connection.execute statement end end rescue ThinkingSphinx::ConnectionError => error # This isn't vital, so don't raise the error. end private def statement @statement ||= Riddle::Query.update( @index_name, @document_id, :sphinx_deleted => true ) end end
Version data entries
3 entries across 3 versions & 1 rubygems