Sha256: af05fda36ab2da8bcb56740c3d07f477732d306eee2114b17c9f4c7551b5087c
Contents?: true
Size: 1.01 KB
Versions: 4
Compression:
Stored size: 1.01 KB
Contents
# frozen_string_literal: true module Hyrax module Indexers ## # Indexes Hyrax::AdministrativeSet objects class AdministrativeSetIndexer < Hyrax::Indexers::ResourceIndexer include Hyrax::PermissionIndexer include Hyrax::VisibilityIndexer include Hyrax::Indexer(:core_metadata) def to_solr # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength super.tap do |solr_doc| solr_doc[Hyrax.config.collection_type_index_field.to_sym] = Array(resource.try(:collection_type_gid)&.to_s) solr_doc[:alternative_title_tesim] = resource.alternative_title solr_doc[:creator_ssim] = [resource.creator] solr_doc[:creator_tesim] = [resource.creator] solr_doc[:description_tesim] = resource.description solr_doc[:generic_type_sim] = ['Admin Set'] solr_doc[:thumbnail_path_ss] = Hyrax::CollectionThumbnailPathService.call(resource) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems