Sha256: eca121238414e85aa880fcaebe80e9b284ee49a8991f60c1a32fe16b783d5fc4
Contents?: true
Size: 989 Bytes
Versions: 20
Compression:
Stored size: 989 Bytes
Contents
# frozen_string_literal: true 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
20 entries across 20 versions & 1 rubygems