projectblacklight/blacklight

View on GitHub
lib/generators/blacklight/templates/solr_document.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

# Represents a single document returned from Solr
class <%= model_name.classify %>
  include Blacklight::Solr::Document

  # self.unique_key = 'id'

  # 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::Document::SemanticFields#field_semantics
  # and Blacklight::Document::SemanticFields#to_semantic_values
  # Recommendation: Use field names from Dublin Core
  use_extension(Blacklight::Document::DublinCore)
end