Class: Hyrax::CollectionIndexer
- Inherits:
-
Hydra::PCDM::CollectionIndexer
- Object
- Hydra::PCDM::CollectionIndexer
- Hyrax::CollectionIndexer
- Includes:
- IndexesThumbnails
- Defined in:
- app/indexers/hyrax/collection_indexer.rb
Direct Known Subclasses
Constant Summary collapse
- STORED_LONG =
ActiveFedora::Indexing::Descriptor.new(:long, :stored)
Instance Method Summary collapse
-
#generate_solr_document {|Hash| ... } ⇒ Hash
The solr document WITH all changes.
Methods included from IndexesThumbnails
#index_thumbnails, #thumbnail_path
Instance Method Details
#generate_solr_document {|Hash| ... } ⇒ Hash
Returns the solr document WITH all changes.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/indexers/hyrax/collection_indexer.rb', line 12 def generate_solr_document super.tap do |solr_doc| # Makes Collections show under the "Collections" tab solr_doc['generic_type_sim'] = ["Collection"] solr_doc['visibility_ssi'] = object.visibility object.in_collections.each do |col| (solr_doc['member_of_collection_ids_ssim'] ||= []) << col.id (solr_doc['member_of_collections_ssim'] ||= []) << col.to_s end end end |