diff --git a/app/indexers/file_set_indexer.rb b/app/indexers/file_set_indexer.rb index c95c91ca..e0a6cc6d 100644 --- a/app/indexers/file_set_indexer.rb +++ b/app/indexers/file_set_indexer.rb @@ -3,6 +3,7 @@ def generate_solr_document super.tap do |solr_doc| solr_doc['hasFormat_ssim'] = object.rendering_ids + solr_doc['digest_ssim'] = "urn:sha1:#{object.s3_only}" if object.s3_only.present? end rescue Ldp::HttpError => exception diff --git a/app/indexers/hyrax/file_set_indexer_decorator.rb b/app/indexers/hyrax/file_set_indexer_decorator.rb deleted file mode 100644 index d0578ae5..00000000 --- a/app/indexers/hyrax/file_set_indexer_decorator.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -# OVERRIDE Hyrax v3.5.0 to index the rdf_type on the FileSet - -module Hyrax - module FileSetIndexerDecorator - def generate_solr_document - super.tap do |solr_doc| - # digest of the original file if we are using an external file due to s3 direct upload - solr_doc['digest_ssim'] = "urn:sha1:#{object.s3_only}" if object.s3_only.present? - solr_doc['rdf_type_ssim'] = object.parent_works.first.rdf_type if attachment? - solr_doc['all_text_tesimv'] = solr_doc['all_text_tsimv'] if solr_doc['all_text_tsimv'].present? - end - end - - private - - def attachment? - object.parent_works.first.is_a?(Attachment) - end - end -end - -Hyrax::FileSetIndexer.prepend(Hyrax::FileSetIndexerDecorator)