Module: MongoidXapian
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/mongoid-xapian.rb,
lib/mongoid-xapian/trail.rb,
lib/mongoid-xapian/indexer.rb
Defined Under Namespace
Modules: ClassMethods, Indexer Classes: Trail
Class Method Summary collapse
-
.index! ⇒ Object
Usage: MongoidXapian.index_all! short cut for MongoidXapian::Trail.index_all!.
-
.indexable_models ⇒ Object
List of indexable models.
Instance Method Summary collapse
Class Method Details
.index! ⇒ Object
Usage: MongoidXapian.index_all! short cut for MongoidXapian::Trail.index_all!
69 70 71 |
# File 'lib/mongoid-xapian.rb', line 69 def self.index! MongoidXapian::Trail.index_all! end |
.indexable_models ⇒ Object
List of indexable models
74 75 76 |
# File 'lib/mongoid-xapian.rb', line 74 def self.indexable_models @indexable_models ||= Set.new end |
Instance Method Details
#to_xapian ⇒ Object
58 59 60 61 62 63 64 65 |
# File 'lib/mongoid-xapian.rb', line 58 def to_xapian fields = {:_id => self._id} self.class.xapian_fields.each do |field| fields[field] = self.send(field) end fields end |
#xapian_indexer ⇒ Object
54 55 56 |
# File 'lib/mongoid-xapian.rb', line 54 def xapian_indexer MongoidXapian::Indexer.new(self) end |