Sha256: 82751c8b3bcb6fbe289fa757013d825f2506d0408be98394f6970cfd2a35ece4

Contents?: true

Size: 1.37 KB

Versions: 6

Compression:

Stored size: 1.37 KB

Contents

# -*- encoding : utf-8 -*-
class SolrDocument 

  include Blacklight::Solr::Document
  
  # The following shows how to setup this blacklight document to display marc documents
  extension_parameters[:marc_source_field] = :marc_display
  extension_parameters[:marc_format_type] = :marcxml
  use_extension( Blacklight::Solr::Document::Marc) do |document|
    document.key?( :marc_display  )
  end
  
  # Email uses the semantic field mappings below to generate the body of an email.
  SolrDocument.use_extension( Blacklight::Solr::Document::Email )
  
  # SMS uses the semantic field mappings below to generate the body of an SMS email.
  SolrDocument.use_extension( Blacklight::Solr::Document::Sms )

  # DublinCore uses the semantic field mappings below to assemble an OAI-compliant Dublin Core document
  # Semantic mappings of solr stored fields. Fields may be multi or
  # single valued. See Blacklight::Solr::Document::ExtendableClassMethods#field_semantics
  # and Blacklight::Solr::Document#to_semantic_values
  # Recommendation: Use field names from Dublin Core
  use_extension( Blacklight::Solr::Document::DublinCore)    
  field_semantics.merge!(    
                         :title => "title_display",
                         :author => "author_display",
                         :language => "language_facet",
                         :format => "format"
                         )
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
blacklight-3.1.2 lib/generators/blacklight/templates/solr_document.rb
blacklight-3.1.1 lib/generators/blacklight/templates/solr_document.rb
blacklight-3.1.0 lib/generators/blacklight/templates/solr_document.rb
blacklight-3.0.0 lib/generators/blacklight/templates/solr_document.rb
blacklight-3.0.0pre8 lib/generators/blacklight/templates/solr_document.rb
blacklight-3.0.0pre7 lib/generators/blacklight/templates/solr_document.rb