Module: CurationConcerns::IndexesThumbnails
- Extended by:
- ActiveSupport::Concern
- Included in:
- AdminSetIndexer, CollectionIndexer, FileSetIndexer, WorkIndexer
- Defined in:
- app/services/curation_concerns/indexes_thumbnails.rb
Instance Method Summary collapse
-
#generate_solr_document ⇒ Object
Adds thumbnail indexing to the solr document.
-
#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.
Instance Method Details
#generate_solr_document ⇒ Object
Adds thumbnail indexing to the solr document
13 14 15 16 17 |
# File 'app/services/curation_concerns/indexes_thumbnails.rb', line 13 def generate_solr_document super.tap do |solr_doc| index_thumbnails(solr_doc) end end |
#index_thumbnails(solr_document) ⇒ Object
Write the thumbnail paths into the solr_document
21 22 23 |
# File 'app/services/curation_concerns/indexes_thumbnails.rb', line 21 def index_thumbnails(solr_document) solr_document[thumbnail_field] = thumbnail_path end |
#thumbnail_path ⇒ Object
Returns the value for the thumbnail path to put into the solr document
26 27 28 |
# File 'app/services/curation_concerns/indexes_thumbnails.rb', line 26 def thumbnail_path self.class.thumbnail_path_service.call(object) end |