Sha256: 0f820aedbbe153edc6d1c07a3852d78e0605922bfd1a45ad4f76fc33a489f7bc
Contents?: true
Size: 972 Bytes
Versions: 6
Compression:
Stored size: 972 Bytes
Contents
# frozen_string_literal: true module Hyrax module Indexers ## # Indexes properties common to PCDM Collections class PcdmCollectionIndexer < Hyrax::Indexers::ResourceIndexer include Hyrax::PermissionIndexer include Hyrax::VisibilityIndexer include Hyrax::LocationIndexer include Hyrax::ThumbnailIndexer include Hyrax::Indexer(:core_metadata) self.thumbnail_path_service = CollectionThumbnailPathService 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 end end end
Version data entries
6 entries across 6 versions & 1 rubygems