Sha256: 16d26e62dfc9aeaf40d5162009f8ba965824b9c4fbdf24474aee0cc02adaa959

Contents?: true

Size: 608 Bytes

Versions: 3

Compression:

Stored size: 608 Bytes

Contents

module Sufia
  class GenericFileIndexingService < ActiveFedora::IndexingService
    STORED_INTEGER = Solrizer::Descriptor.new(:integer, :stored)

    def generate_solr_document
      super.tap do |solr_doc|
        solr_doc[Solrizer.solr_name('label')] = object.label
        solr_doc[Solrizer.solr_name('file_format')] = object.file_format
        solr_doc[Solrizer.solr_name('file_format', :facetable)] = object.file_format
        solr_doc['all_text_timv'] = object.full_text.content
        solr_doc[Solrizer.solr_name('file_size', STORED_INTEGER)] = object.content.size.to_i
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sufia-models-6.3.0 app/services/sufia/generic_file_indexing_service.rb
sufia-models-6.2.0 app/services/sufia/generic_file_indexing_service.rb
sufia-models-6.1.0 app/services/sufia/generic_file_indexing_service.rb