class XapianDb::IndexWriters::ResqueWriter

Public Class Methods

delete_doc_with(xapian_id, commit=true) click to toggle source

Remove an object from the index @param [String] xapian_id The document id

   # File lib/xapian_db/index_writers/resque_writer.rb
20 def delete_doc_with(xapian_id, commit=true)
21   Resque.enqueue worker_class, :delete_doc, :xapian_id => xapian_id
22 end
index(obj, commit=true, changed_attrs: []) click to toggle source

Update an object in the index @param [Object] obj An instance of a class with a blueprint configuration

   # File lib/xapian_db/index_writers/resque_writer.rb
14 def index(obj, commit=true, changed_attrs: [])
15   Resque.enqueue worker_class, :index, :class => obj.class.name, :id => obj.id, changed_attrs: changed_attrs
16 end
reindex_class(klass, options = {}) click to toggle source

Reindex all objects of a given class @param [Class] klass The class to reindex

   # File lib/xapian_db/index_writers/resque_writer.rb
26 def reindex_class(klass, options = {})
27   Resque.enqueue worker_class, :reindex_class, :class => klass.name
28 end

Private Class Methods

worker_class() click to toggle source
   # File lib/xapian_db/index_writers/resque_writer.rb
30 def worker_class
31   ResqueWorker
32 end