Sha256: d9b1eb330c6544801ed4e6932d5bf5049ee03fcecf75a6daedca2209d157eeaf
Contents?: true
Size: 710 Bytes
Versions: 6
Compression:
Stored size: 710 Bytes
Contents
# frozen_string_literal: true module Hyrax ## # Indexes properties common to PCDM Collections class PcdmCollectionIndexer < Hyrax::ValkyrieIndexer include Hyrax::ResourceIndexer include Hyrax::PermissionIndexer include Hyrax::VisibilityIndexer include Hyrax::Indexer(:core_metadata) include Hyrax::Indexer(:basic_metadata) 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[:thumbnail_path_ss] = Hyrax::CollectionThumbnailPathService.call(resource) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems