Sha256: b8a67fb9aebc9b963fcb58374d9901c2921425370f15a1881251ac0ad6b006a5

Contents?: true

Size: 411 Bytes

Versions: 25

Compression:

Stored size: 411 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  # 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

25 entries across 25 versions & 1 rubygems

Version Path
hyrax-5.0.1 app/search_builders/hyrax/filter_suppressed.rb
hyrax-5.0.0 app/search_builders/hyrax/filter_suppressed.rb
hyrax-5.0.0.rc3 app/search_builders/hyrax/filter_suppressed.rb
hyrax-5.0.0.rc2 app/search_builders/hyrax/filter_suppressed.rb
hyrax-5.0.0.rc1 app/search_builders/hyrax/filter_suppressed.rb
hyrax-3.6.0 app/search_builders/hyrax/filter_suppressed.rb
hyrax-4.0.0 app/search_builders/hyrax/filter_suppressed.rb
hyrax-4.0.0.rc3 app/search_builders/hyrax/filter_suppressed.rb
hyrax-4.0.0.rc2 app/search_builders/hyrax/filter_suppressed.rb
hyrax-4.0.0.rc1 app/search_builders/hyrax/filter_suppressed.rb
hyrax-3.5.0 app/search_builders/hyrax/filter_suppressed.rb
hyrax-4.0.0.beta2 app/search_builders/hyrax/filter_suppressed.rb
hyrax-3.4.2 app/search_builders/hyrax/filter_suppressed.rb
hyrax-4.0.0.beta1 app/search_builders/hyrax/filter_suppressed.rb
hyrax-3.4.1 app/search_builders/hyrax/filter_suppressed.rb
hyrax-3.4.0 app/search_builders/hyrax/filter_suppressed.rb
hyrax-3.3.0 app/search_builders/hyrax/filter_suppressed.rb
hyrax-3.2.0 app/search_builders/hyrax/filter_suppressed.rb
hyrax-3.1.0 app/search_builders/hyrax/filter_suppressed.rb
hyrax-3.0.2 app/search_builders/hyrax/filter_suppressed.rb