Class: Hyrax::Indexers::PcdmCollectionIndexer
- Inherits:
-
ResourceIndexer
- Object
- ResourceIndexer
- Hyrax::Indexers::PcdmCollectionIndexer
- Defined in:
- app/indexers/hyrax/indexers/pcdm_collection_indexer.rb
Overview
Indexes properties common to PCDM Collections
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from ResourceIndexer
Instance Method Summary collapse
Methods included from ThumbnailIndexer
#index_thumbnails, #thumbnail_path
Methods inherited from ResourceIndexer
for, #generate_solr_document, #initialize
Constructor Details
This class inherits a constructor from Hyrax::Indexers::ResourceIndexer
Instance Method Details
#to_solr ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'app/indexers/hyrax/indexers/pcdm_collection_indexer.rb', line 16 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 |