Sha256: fc7aa9f16cf7ef7f07317a2a69b8eae50c9264457aafbd379f296343945a16e7

Contents?: true

Size: 765 Bytes

Versions: 3

Compression:

Stored size: 765 Bytes

Contents

# Generated via
#  `rails generate hyrax:work NewspaperTitle`
class NewspaperTitleIndexer < NewspaperWorks::NewspaperCoreIndexer
  # This indexes the default metadata. You can remove it if you want to
  # provide your own metadata and indexing.
  # include Hyrax::IndexesBasicMetadata
  include NewspaperWorks::IndexesPublicationDateRange

  # Fetch remote labels for based_near. You can remove this if you don't want
  # this behavior
  # include Hyrax::IndexesLinkedMetadata

  def generate_solr_document
    super.tap do |solr_doc|
      index_pubdate_start(object.publication_date_start, solr_doc) if object.publication_date_start.present?
      index_pubdate_end(object.publication_date_end, solr_doc) if object.publication_date_end.present?
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
newspaper_works-1.0.1 app/indexers/newspaper_title_indexer.rb
newspaper_works-1.0.0 app/indexers/newspaper_title_indexer.rb
newspaper_works-0.1.0 app/indexers/newspaper_title_indexer.rb