app/models/concerns/sufia/solr_document_behavior.rb
# Find the solr documents for the collections this object belongs to
Find the solr documents for the collections this object belongs to
Find the solr documents for the collections this object belongs to
def collections
      return @collections if @collections
      query = 'id:' + collection_ids.map { |id| '"' + id + '"' }.join(' OR ')
      result = Blacklight.default_index.connection.select(params: { q: query })
      @collections = result['response']['docs'].map do |hash|
        ::SolrDocument.new(hash)
      end
    end
def collections return @collections if @collections query = 'id:' + collection_ids . map { | id | '"' + id + '"' } . join ( ' OR ' ) result = Blacklight . default_index . connection . select ( params : { q : query } ) @collections = result [ 'response' ] [ 'docs' ] . map do | hash | :: SolrDocument . new ( hash ) end end
Find the solr documents for the collections this object belongs to
Find the solr documents for the collections this object belongs to