Class: Hyrax::MemberWithFilesSearchBuilder
- Inherits:
-
SearchBuilder
- Object
- SearchBuilder
- Hyrax::MemberWithFilesSearchBuilder
- 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
-
#include_collection_ids(solr_parameters) ⇒ Object
include filters into the query to only include the collection memebers.
-
#include_contained_files(solr_parameters) ⇒ Object
This is like include_collection_ids, but it also joins the files.
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 |