Class: Hydra::PCDM::PCDMIndexer

Inherits:
ActiveFedora::IndexingService
  • Object
show all
Defined in:
lib/hydra/pcdm/pcdm_indexer.rb

Direct Known Subclasses

CollectionIndexer, ObjectIndexer

Instance Method Summary collapse

Instance Method Details

#generate_solr_documentObject



3
4
5
6
7
8
9
10
11
# File 'lib/hydra/pcdm/pcdm_indexer.rb', line 3

def generate_solr_document
  super.tap do |solr_doc|
    solr_doc[Config.indexing_member_ids_key] ||= []
    solr_doc[Config.indexing_member_ids_key] += object.member_ids
    solr_doc[Config.indexing_member_ids_key].uniq!
    solr_doc[Config.indexing_object_ids_key] = object.ordered_object_ids
    solr_doc[Config.indexing_member_of_collection_ids_key] = object.member_of_collection_ids
  end
end