Class: Hyrax::PcdmCollectionIndexer
- Inherits:
-
ValkyrieIndexer
- Object
- ValkyrieIndexer
- Hyrax::PcdmCollectionIndexer
- Defined in:
- app/indexers/hyrax/pcdm_collection_indexer.rb
Overview
Indexes properties common to PCDM Collections
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from ValkyrieIndexer
Instance Method Summary collapse
Methods included from ThumbnailIndexer
#index_thumbnails, #thumbnail_path
Methods inherited from ValkyrieIndexer
for, #generate_solr_document, #initialize
Constructor Details
This class inherits a constructor from Hyrax::ValkyrieIndexer
Instance Method Details
#to_solr ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'app/indexers/hyrax/pcdm_collection_indexer.rb', line 15 def to_solr super.tap do |index_document| index_document[Hyrax.config.collection_type_index_field.to_sym] = Array(resource.try(:collection_type_gid)&.to_s) index_document[:generic_type_sim] = ['Collection'] index_document[:member_of_collection_ids_ssim] = resource.member_of_collection_ids.map(&:to_s) index_document[:depositor_ssim] = [resource.depositor] index_document[:depositor_tesim] = [resource.depositor] end end |