Sha256: 7963bbae112cb60070aa89d056369eb9ff1a8bd47b1d50be7e18c8d060b8a8fe

Contents?: true

Size: 1004 Bytes

Versions: 13

Compression:

Stored size: 1004 Bytes

Contents

# frozen_string_literal: true

module Hyrax
  ##
  # Indexes Hyrax::AdministrativeSet objects
  class AdministrativeSetIndexer < Hyrax::ValkyrieIndexer
    include Hyrax::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

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
hyrax-5.0.0.rc2 app/indexers/hyrax/administrative_set_indexer.rb
hyrax-5.0.0.rc1 app/indexers/hyrax/administrative_set_indexer.rb
hyrax-3.6.0 app/indexers/hyrax/administrative_set_indexer.rb
hyrax-4.0.0 app/indexers/hyrax/administrative_set_indexer.rb
hyrax-4.0.0.rc3 app/indexers/hyrax/administrative_set_indexer.rb
hyrax-4.0.0.rc2 app/indexers/hyrax/administrative_set_indexer.rb
hyrax-4.0.0.rc1 app/indexers/hyrax/administrative_set_indexer.rb
hyrax-3.5.0 app/indexers/hyrax/administrative_set_indexer.rb
hyrax-4.0.0.beta2 app/indexers/hyrax/administrative_set_indexer.rb
hyrax-3.4.2 app/indexers/hyrax/administrative_set_indexer.rb
hyrax-4.0.0.beta1 app/indexers/hyrax/administrative_set_indexer.rb
hyrax-3.4.1 app/indexers/hyrax/administrative_set_indexer.rb
hyrax-3.4.0 app/indexers/hyrax/administrative_set_indexer.rb