Sha256: 0d6ae5ae1b73d5269d1b91d35934a6f601dd40796dbb66ef05ab256b77a973d4

Contents?: true

Size: 392 Bytes

Versions: 12

Compression:

Stored size: 392 Bytes

Contents

module CurationConcerns
  # Injects a search builder filter to hide documents marked as suppressed
  module FilterSuppressed
    extend ActiveSupport::Concern

    included do
      self.default_processor_chain += [:only_active_works]
    end

    def only_active_works(solr_parameters)
      solr_parameters[:fq] ||= []
      solr_parameters[:fq] << '-suppressed_bsi:true'
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
curation_concerns-1.7.8 app/search_builders/curation_concerns/filter_suppressed.rb
curation_concerns-1.7.7 app/search_builders/curation_concerns/filter_suppressed.rb
curation_concerns-2.0.0 app/search_builders/curation_concerns/filter_suppressed.rb
curation_concerns-2.0.0.rc2 app/search_builders/curation_concerns/filter_suppressed.rb
curation_concerns-1.7.6 app/search_builders/curation_concerns/filter_suppressed.rb
curation_concerns-1.7.5 app/search_builders/curation_concerns/filter_suppressed.rb
curation_concerns-1.7.4 app/search_builders/curation_concerns/filter_suppressed.rb
curation_concerns-1.7.3 app/search_builders/curation_concerns/filter_suppressed.rb
curation_concerns-1.7.2 app/search_builders/curation_concerns/filter_suppressed.rb
curation_concerns-2.0.0.rc1 app/search_builders/curation_concerns/filter_suppressed.rb
curation_concerns-1.7.1 app/search_builders/curation_concerns/filter_suppressed.rb
curation_concerns-1.7.0 app/search_builders/curation_concerns/filter_suppressed.rb