Sha256: e06a7593058cb439accc48b8743a9a27388b5eceb25cc0876d51eb3055404e0c

Contents?: true

Size: 384 Bytes

Versions: 10

Compression:

Stored size: 384 Bytes

Contents

# 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

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
hyrax-1.1.1 app/search_builders/parent_collection_search_builder.rb
hyrax-1.1.0 app/search_builders/parent_collection_search_builder.rb
hyrax-1.0.5 app/search_builders/parent_collection_search_builder.rb
hyrax-1.0.4 app/search_builders/parent_collection_search_builder.rb
hyrax-1.0.3 app/search_builders/parent_collection_search_builder.rb
hyrax-1.0.2 app/search_builders/parent_collection_search_builder.rb
hyrax-1.0.1 app/search_builders/parent_collection_search_builder.rb
hyrax-1.0.0.rc2 app/search_builders/parent_collection_search_builder.rb
hyrax-1.0.0.rc1 app/search_builders/parent_collection_search_builder.rb
test_hyrax-0.0.1.alpha app/search_builders/parent_collection_search_builder.rb