Class: Hyrax::ParentCollectionSearchBuilder

Inherits:
CollectionSearchBuilder show all
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

#access

Instance Method Summary collapse

Methods inherited from CollectionSearchBuilder

#add_sorting_to_solr, #discovery_permissions, #gated_discovery_filters, #models, #sort_field, #with_access

Methods included from FilterByType

#filter_models

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