Sha256: 9a7a7319ecec1f17d60362cffbe807d904f241bc2f3441939c40ff6612e3fb5a

Contents?: true

Size: 820 Bytes

Versions: 14

Compression:

Stored size: 820 Bytes

Contents

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

14 entries across 14 versions & 1 rubygems

Version Path
hyrax-3.6.0 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-3.5.0 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-3.4.2 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-3.4.1 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-3.4.0 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-3.3.0 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-3.2.0 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-3.1.0 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-3.0.2 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-3.0.1 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-3.0.0 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-3.0.0.pre.rc4 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-3.0.0.pre.rc3 app/search_builders/hyrax/stats/work_status_search_builder.rb
hyrax-3.0.0.pre.rc2 app/search_builders/hyrax/stats/work_status_search_builder.rb