Sha256: 6143b554273ee52de1e642fd56248711e099301ddb4e57cbef66d13f69d8252e

Contents?: true

Size: 570 Bytes

Versions: 62

Compression:

Stored size: 570 Bytes

Contents

module CurationConcerns
  # Finds embargoed objects
  class EmbargoSearchBuilder < Blacklight::SearchBuilder
    self.default_processor_chain = [:with_pagination, :with_sorting, :only_active_embargoes]

    # TODO: add more complex pagination
    def with_pagination(solr_params)
      solr_params[:rows] = 1000
    end

    def with_sorting(solr_params)
      solr_params[:sort] = 'embargo_release_date_dtsi desc'
    end

    def only_active_embargoes(solr_params)
      solr_params[:fq] ||= []
      solr_params[:fq] = 'embargo_release_date_dtsi:*'
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
curation_concerns-1.7.8 app/search_builders/curation_concerns/embargo_search_builder.rb
curation_concerns-1.7.7 app/search_builders/curation_concerns/embargo_search_builder.rb
curation_concerns-2.0.0 app/search_builders/curation_concerns/embargo_search_builder.rb
curation_concerns-2.0.0.rc2 app/search_builders/curation_concerns/embargo_search_builder.rb
curation_concerns-1.7.6 app/search_builders/curation_concerns/embargo_search_builder.rb
curation_concerns-1.7.5 app/search_builders/curation_concerns/embargo_search_builder.rb
curation_concerns-1.7.4 app/search_builders/curation_concerns/embargo_search_builder.rb
curation_concerns-1.7.3 app/search_builders/curation_concerns/embargo_search_builder.rb
curation_concerns-1.7.2 app/search_builders/curation_concerns/embargo_search_builder.rb
curation_concerns-2.0.0.rc1 app/search_builders/curation_concerns/embargo_search_builder.rb
curation_concerns-1.7.1 app/search_builders/curation_concerns/embargo_search_builder.rb
curation_concerns-1.7.0 app/search_builders/curation_concerns/embargo_search_builder.rb
curation_concerns-1.7.0.beta1 app/search_builders/curation_concerns/embargo_search_builder.rb
curation_concerns-1.6.3 app/search_builders/curation_concerns/embargo_search_builder.rb
curation_concerns-1.6.2 app/search_builders/curation_concerns/embargo_search_builder.rb
curation_concerns-1.6.1 app/search_builders/curation_concerns/embargo_search_builder.rb
curation_concerns-1.6.0 app/search_builders/curation_concerns/embargo_search_builder.rb
curation_concerns-1.5.0 app/search_builders/curation_concerns/embargo_search_builder.rb
curation_concerns-1.4.0 app/search_builders/curation_concerns/embargo_search_builder.rb
curation_concerns-1.3.3 app/search_builders/curation_concerns/embargo_search_builder.rb