Class: CurationConcerns::LeaseSearchBuilder

Inherits:
Blacklight::SearchBuilder
  • Object
show all
Defined in:
app/search_builders/curation_concerns/lease_search_builder.rb

Overview

Finds objects under lease

Instance Method Summary collapse

Instance Method Details

#only_active_leases(solr_params) ⇒ Object



15
16
17
18
# File 'app/search_builders/curation_concerns/lease_search_builder.rb', line 15

def only_active_leases(solr_params)
  solr_params[:fq] ||= []
  solr_params[:fq] = 'lease_expiration_date_dtsi:*'
end

#with_pagination(solr_params) ⇒ Object

TODO: add more complex pagination



7
8
9
# File 'app/search_builders/curation_concerns/lease_search_builder.rb', line 7

def with_pagination(solr_params)
  solr_params[:rows] = 1000
end

#with_sorting(solr_params) ⇒ Object



11
12
13
# File 'app/search_builders/curation_concerns/lease_search_builder.rb', line 11

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