Sha256: d6c92e9c0b7d47d156e993d77972cc30d702476e540c99c6cf5b4e1a217f851b
Contents?: true
Size: 653 Bytes
Versions: 3
Compression:
Stored size: 653 Bytes
Contents
# indexes the full text of a Newspaper object module NewspaperWorks module IndexesFullText # index full text # load text from plain text derivative # index as *both* stored (for highlighting) and non-stored (Hyrax default) text field # # @param work [Newspaper*] an instance of a NewspaperWorks model # @param solr_doc [Hash] the hash of field data to be pushed to Solr def index_full_text(work, solr_doc) text = NewspaperWorks::Data::WorkDerivatives.new(work).data('txt') text = text.gsub(/\n/, ' ').squeeze(' ') solr_doc['all_text_timv'] = text solr_doc['all_text_tsimv'] = text end end end
Version data entries
3 entries across 3 versions & 1 rubygems