Module: Hyrax::ThumbnailIndexer
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/indexers/concerns/hyrax/thumbnail_indexer.rb
Instance Method Summary collapse
-
#index_thumbnails(solr_document) ⇒ Object
Write the thumbnail paths into the solr_document.
-
#thumbnail_path ⇒ Object
Returns the value for the thumbnail path to put into the solr document.
-
#to_solr ⇒ Object
Adds thumbnail indexing to the solr document of a valkyrie resource.
Instance Method Details
#index_thumbnails(solr_document) ⇒ Object
Write the thumbnail paths into the solr_document
22 23 24 |
# File 'app/indexers/concerns/hyrax/thumbnail_indexer.rb', line 22 def index_thumbnails(solr_document) solr_document[thumbnail_field] = thumbnail_path.to_s end |
#thumbnail_path ⇒ Object
Returns the value for the thumbnail path to put into the solr document
27 28 29 |
# File 'app/indexers/concerns/hyrax/thumbnail_indexer.rb', line 27 def thumbnail_path self.class.thumbnail_path_service.call(resource) end |
#to_solr ⇒ Object
Adds thumbnail indexing to the solr document of a valkyrie resource
14 15 16 17 18 |
# File 'app/indexers/concerns/hyrax/thumbnail_indexer.rb', line 14 def to_solr super.tap do |solr_doc| index_thumbnails(solr_doc) end end |