Sha256: 25353a8150a4d949bbe4d6f143d3737b5d453be634e74744f2200ba68cceb025
Contents?: true
Size: 562 Bytes
Versions: 11
Compression:
Stored size: 562 Bytes
Contents
module Hyrax # Finds objects under lease class LeaseSearchBuilder < Blacklight::SearchBuilder self.default_processor_chain = [:with_pagination, :with_sorting, :only_active_leases] # TODO: add more complex pagination def with_pagination(solr_params) solr_params[:rows] = 1000 end def with_sorting(solr_params) solr_params[:sort] = 'lease_expiration_date_dtsi desc' end def only_active_leases(solr_params) solr_params[:fq] ||= [] solr_params[:fq] = 'lease_expiration_date_dtsi:[* TO *]' end end end
Version data entries
11 entries across 11 versions & 1 rubygems