Sha256: 799e5d819dff1aa062f0e21a1fcb6b112e996a0ed8a7261afabd6e1ddd95d68e

Contents?: true

Size: 392 Bytes

Versions: 4

Compression:

Stored size: 392 Bytes

Contents

# Given the id of a GenericWork, finds its parent collections
class ParentCollectionSearchBuilder < CurationConcerns::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

4 entries across 4 versions & 1 rubygems

Version Path
sufia-7.0.0.beta4 app/search_builders/parent_collection_search_builder.rb
sufia-7.0.0.beta3 app/search_builders/parent_collection_search_builder.rb
sufia-7.0.0.beta2 app/search_builders/parent_collection_search_builder.rb
sufia-7.0.0.beta1 app/search_builders/parent_collection_search_builder.rb