Module: ActiveFedora::Indexing
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #indexing_service ⇒ Object
-
#to_solr(solr_doc = Hash.new, opts = {}) ⇒ Object
Return a Hash representation of this object where keys in the hash are appropriate Solr field names.
-
#update_index ⇒ Object
Updates Solr index with self.
Instance Method Details
#indexing_service ⇒ Object
13 14 15 |
# File 'lib/active_fedora/indexing.rb', line 13 def indexing_service @indexing_service ||= self.class.indexer.new(self) end |
#to_solr(solr_doc = Hash.new, opts = {}) ⇒ Object
Return a Hash representation of this object where keys in the hash are appropriate Solr field names. If opts == true, the base object metadata and the RELS-EXT datastream will be omitted. This is mainly to support shelver, which calls .to_solr for each model an object subscribes to.
9 10 11 |
# File 'lib/active_fedora/indexing.rb', line 9 def to_solr(solr_doc = Hash.new, opts={}) indexing_service.generate_solr_document end |
#update_index ⇒ Object
Updates Solr index with self.
18 19 20 |
# File 'lib/active_fedora/indexing.rb', line 18 def update_index SolrService.add(to_solr, softCommit: true) end |