module ActiveFedora::Indexing
def _create_record(options = {})
def _create_record(options = {}) super update_index if create_needs_index? && options.fetch(:update_index, true) true end
def _update_record(options = {})
def _update_record(options = {}) super update_index if update_needs_index? && options.fetch(:update_index, true) true end
def create_needs_index?
Determines whether a create operation causes a solr index of this object by default.
def create_needs_index? ActiveFedora.enable_solr_updates? end
def indexing_service
def indexing_service @indexing_service ||= self.class.indexer.new(self) end
def to_solr(_solr_doc = {}, _opts = {})
-
_opts
(Hash
) -- (optional) -
_solr_doc
(Hash
) -- (optional) Hash to insert the fields into
def to_solr(_solr_doc = {}, _opts = {}) indexing_service.generate_solr_document end
def update_index
def update_index SolrService.add(to_solr, softCommit: true) end
def update_needs_index?
Determines whether an update operation causes a solr index of this object by default.
def update_needs_index? ActiveFedora.enable_solr_updates? end