Sha256: 365bae2442a6a6abdc2324a20e2bb5514b3548b4bde2a58403aa58251958346b
Contents?: true
Size: 959 Bytes
Versions: 30
Compression:
Stored size: 959 Bytes
Contents
module Geoblacklight module SolrDocument ## # Finder methods for SolrDocuments # modeled after Spotlight's Finder module # https://github.com/sul-dlss/spotlight/blob/master/app/models/concerns/spotlight/solr_document/finder.rb module Finder extend ActiveSupport::Concern include Blacklight::Configurable ## # Class level finder methods for documents module ClassMethods ## # Find a Solr Document from an index # @param [String] def find(id) solr_response = index.find(id) solr_response.documents.first end def index @index ||= blacklight_config.repository_class.new(blacklight_config) end protected def blacklight_config @conf ||= copy_blacklight_config_from(CatalogController) end end def blacklight_solr self.class.index.connection end end end end
Version data entries
30 entries across 30 versions & 1 rubygems