Sha256: ae93581025ab337b23c3f90cee60278a65fd69e1e77fde3951e27a4e5bb59597

Contents?: true

Size: 419 Bytes

Versions: 13

Compression:

Stored size: 419 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 collection memebers
    def include_item_ids(solr_parameters)
      solr_parameters[:fq] ||= []
      solr_parameters[:fq] << "child_object_ids_ssim:#{item.id}"
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
hyrax-2.0.3 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.0.2 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.1.0.beta1 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.0.1 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.0.0 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.0.0.rc3 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.0.0.rc2 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.0.0.rc1 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.0.0.beta5 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.0.0.beta4 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.0.0.beta3 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.0.0.beta2 app/search_builders/hyrax/parent_collection_search_builder.rb
hyrax-2.0.0.beta1 app/search_builders/hyrax/parent_collection_search_builder.rb