Module: Geoblacklight::SolrDocument::Finder::ClassMethods
- Defined in:
- app/models/concerns/geoblacklight/solr_document/finder.rb
Overview
Class level finder methods for documents
Instance Method Summary collapse
-
#find(id) ⇒ Object
Find a Solr Document from an index.
- #index ⇒ Object
Instance Method Details
#find(id) ⇒ Object
Find a Solr Document from an index
19 20 21 22 |
# File 'app/models/concerns/geoblacklight/solr_document/finder.rb', line 19 def find(id) solr_response = index.find(id) solr_response.documents.first end |
#index ⇒ Object
24 25 26 |
# File 'app/models/concerns/geoblacklight/solr_document/finder.rb', line 24 def index @index ||= blacklight_config.repository_class.new(blacklight_config) end |