Sha256: e0760fbefcaceaf4371d388d30de9b12aec7bdf23067a4ea131c91c280e161e3

Contents?: true

Size: 598 Bytes

Versions: 37

Compression:

Stored size: 598 Bytes

Contents

module CurationConcerns
  class MemberSearchBuilder < ::SearchBuilder
    class_attribute :from_field
    self.from_field = 'member_ids_ssim'

    # Defines which search_params_logic should be used when searching for Collection members
    self.default_processor_chain += [:include_collection_ids]

    delegate :collection, to: :scope

    # include filters into the query to only include the collection memebers
    def include_collection_ids(solr_parameters)
      solr_parameters[:fq] ||= []
      solr_parameters[:fq] << "{!join from=#{from_field} to=id}id:#{collection.id}"
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
curation_concerns-1.5.0 app/search_builders/curation_concerns/member_search_builder.rb
curation_concerns-1.4.0 app/search_builders/curation_concerns/member_search_builder.rb
curation_concerns-1.3.3 app/search_builders/curation_concerns/member_search_builder.rb
curation_concerns-1.3.2 app/search_builders/curation_concerns/member_search_builder.rb
curation_concerns-1.3.1 app/search_builders/curation_concerns/member_search_builder.rb
curation_concerns-1.3.0 app/search_builders/curation_concerns/member_search_builder.rb
curation_concerns-1.2.0 app/search_builders/curation_concerns/member_search_builder.rb
curation_concerns-1.1.2 app/search_builders/curation_concerns/member_search_builder.rb
curation_concerns-1.1.1 app/search_builders/curation_concerns/member_search_builder.rb
curation_concerns-1.1.0 app/search_builders/curation_concerns/member_search_builder.rb
curation_concerns-1.0.0 app/search_builders/curation_concerns/member_search_builder.rb
curation_concerns-1.0.0.beta10 app/search_builders/curation_concerns/member_search_builder.rb
curation_concerns-1.0.0.beta9 app/search_builders/curation_concerns/member_search_builder.rb
curation_concerns-1.0.0.beta8 app/search_builders/curation_concerns/member_search_builder.rb
curation_concerns-1.0.0.beta7 app/search_builders/curation_concerns/member_search_builder.rb
curation_concerns-1.0.0.beta6 app/search_builders/curation_concerns/member_search_builder.rb
curation_concerns-1.0.0.beta5 app/search_builders/curation_concerns/member_search_builder.rb
curation_concerns-1.0.0.beta4 app/search_builders/curation_concerns/member_search_builder.rb
curation_concerns-1.0.0.beta3 app/search_builders/curation_concerns/member_search_builder.rb
curation_concerns-1.0.0.beta2 app/search_builders/curation_concerns/member_search_builder.rb