Sha256: bd92a8bcde071e09eb7720724e19bb96645e92b0b8ad219b0b07abeeed740f58

Contents?: true

Size: 1.39 KB

Versions: 33

Compression:

Stored size: 1.39 KB

Contents

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

  include Blacklight::Solr::Document

  # self.unique_key = 'id'
  
  # 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

33 entries across 33 versions & 3 rubygems

Version Path
blacklight-4.3.0 lib/generators/blacklight/templates/solr_document.rb
hydra_mediated-0.0.1 app/models/solr_document.rb
hydra-editor-0.0.5 spec/dummy/app/models/solr_document.rb
hydra-editor-0.0.4 spec/dummy/app/models/solr_document.rb
blacklight-4.2.2 lib/generators/blacklight/templates/solr_document.rb
hydra-editor-0.0.3 spec/dummy/app/models/solr_document.rb
hydra-editor-0.0.2 spec/dummy/app/models/solr_document.rb
hydra-editor-0.0.1 spec/dummy/app/models/solr_document.rb
blacklight-4.2.1 lib/generators/blacklight/templates/solr_document.rb
blacklight-4.2.0 lib/generators/blacklight/templates/solr_document.rb
blacklight-4.1.0 lib/generators/blacklight/templates/solr_document.rb
blacklight-4.0.1 lib/generators/blacklight/templates/solr_document.rb
blacklight-3.8.2 lib/generators/blacklight/templates/solr_document.rb
blacklight-4.0.0 lib/generators/blacklight/templates/solr_document.rb
blacklight-4.0.0.rc2 lib/generators/blacklight/templates/solr_document.rb
blacklight-4.0.0.rc1 lib/generators/blacklight/templates/solr_document.rb
blacklight-4.0.0.pre7 lib/generators/blacklight/templates/solr_document.rb
blacklight-4.0.0.pre6 lib/generators/blacklight/templates/solr_document.rb
blacklight-3.8.1 lib/generators/blacklight/templates/solr_document.rb
blacklight-3.8.0 lib/generators/blacklight/templates/solr_document.rb