Sha256: 32f42a01b71a6b9404b7d3eefa65b9454ff016d75c20661d13de07287a490fac

Contents?: true

Size: 483 Bytes

Versions: 33

Compression:

Stored size: 483 Bytes

Contents

module Hyrax
  # Given the id of a work, find the collections it is a member of
  class ParentCollectionSearchBuilder < Hyrax::CollectionSearchBuilder
    delegate :item, to: :scope

    # include filters into the query to only include the collections containing this item
    def include_item_ids(solr_parameters)
      solr_parameters[:fq] ||= []
      solr_parameters[:fq] << ActiveFedora::SolrQueryBuilder.construct_query_for_ids(item.member_of_collection_ids)
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
hyrax-2.9.6 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.9.5 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.9.4 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.9.3 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.9.2 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.9.1 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.9.0 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.8.0 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.7.2 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.7.1 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.7.0 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.6.0 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.5.1 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.5.0 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-3.0.0.pre.beta2 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.4.1 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-3.0.0.pre.beta1 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.4.0 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.3.3 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.3.2 app/search_builders/hyrax/parent_collection_search_builder.rb