Class: Hyrax::ParentCollectionSearchBuilder
- Inherits:
-
CollectionSearchBuilder
- Object
- SearchBuilder
- CollectionSearchBuilder
- Hyrax::ParentCollectionSearchBuilder
- Defined in:
- app/search_builders/hyrax/parent_collection_search_builder.rb
Overview
Given the id of a work, find the collections it is a member of
Instance Attribute Summary
Attributes inherited from CollectionSearchBuilder
Instance Method Summary collapse
-
#include_item_ids(solr_parameters) ⇒ Object
include filters into the query to only include the collections containing this item.
Methods inherited from CollectionSearchBuilder
#add_sorting_to_solr, #discovery_permissions, #gated_discovery_filters, #models, #sort_field, #with_access
Methods included from FilterByType
Instance Method Details
#include_item_ids(solr_parameters) ⇒ Object
include filters into the query to only include the collections containing this item
8 9 10 11 |
# File 'app/search_builders/hyrax/parent_collection_search_builder.rb', line 8 def include_item_ids(solr_parameters) solr_parameters[:fq] ||= [] solr_parameters[:fq] += [Hyrax::SolrQueryBuilderService.construct_query_for_ids([item.member_of_collection_ids])] end |