Sha256: d7b4c036373fdf2a8bf3306384e60e558b7a527bd715a28fd730b4823a49f305

Contents?: true

Size: 796 Bytes

Versions: 42

Compression:

Stored size: 796 Bytes

Contents

module Hyrax
  module Stats
    class WorkStatusSearchBuilder < ::SearchBuilder
      self.default_processor_chain = [:include_suppressed_facet, :filter_models]

      # includes the suppressed facet to get information on deposits.
      # use caution when combining this with other searches as it sets the rows to
      # zero to just get the facet information
      # @param solr_parameters the current solr parameters
      def include_suppressed_facet(solr_parameters)
        solr_parameters[:"facet.field"].concat([IndexesWorkflow.suppressed_field])
        solr_parameters[:'facet.missing'] = true

        # we only want the facet counts not the actual data
        solr_parameters[:rows] = 0
      end

      private

        def only_works?
          true
        end
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
hyrax-2.9.6 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-2.9.5 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-2.9.4 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-2.9.3 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-2.9.2 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-2.9.1 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-2.9.0 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-2.8.0 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-2.7.2 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-2.7.1 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-2.7.0 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-2.6.0 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-3.0.0.pre.rc1 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-3.0.0.pre.beta3 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-2.5.1 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-2.5.0 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-3.0.0.pre.beta2 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-2.4.1 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-3.0.0.pre.beta1 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-2.4.0 app/search_builders/hyrax/stats/work_status_search_builder.rb