Class: Hyrax::MemberWithFilesSearchBuilder

Inherits:
SearchBuilder
  • Object
show all
Defined in:
app/search_builders/hyrax/member_with_files_search_builder.rb

Overview

Finds the child objects contained within a collection

Instance Method Summary collapse

Instance Method Details

#include_collection_ids(solr_parameters) ⇒ Object

include filters into the query to only include the collection memebers


15
16
17
18
# File 'app/search_builders/hyrax/member_with_files_search_builder.rb', line 15

def include_collection_ids(solr_parameters)
  solr_parameters[:fq] ||= []
  solr_parameters[:fq] << "{!join from=#{from_field} to=id}id:#{collection_id}"
end

#include_contained_files(solr_parameters) ⇒ Object

This is like include_collection_ids, but it also joins the files.


9
10
11
12
# File 'app/search_builders/hyrax/member_with_files_search_builder.rb', line 9

def include_contained_files(solr_parameters)
  solr_parameters[:fq] ||= []
  solr_parameters[:fq] << "{!join from=file_set_ids_ssim to=id}{!join from=child_object_ids_ssim to=id}id:#{collection_id}"
end