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
17 18 19 20 |
# File 'app/models/concerns/geoblacklight/solr_document/finder.rb', line 17 def find(id) solr_response = index.find(id) solr_response.documents.first end |
#index ⇒ Object
22 23 24 |
# File 'app/models/concerns/geoblacklight/solr_document/finder.rb', line 22 def index @index ||= blacklight_config.repository_class.new(blacklight_config) end |