Class: CurationConcerns::EmbargoSearchBuilder

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

Overview

Finds embargoed objects

Instance Method Summary collapse

Instance Method Details

#only_active_embargoes(solr_params) ⇒ Object



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

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

#with_pagination(solr_params) ⇒ Object

TODO: add more complex pagination



7
8
9
# File 'app/search_builders/curation_concerns/embargo_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/embargo_search_builder.rb', line 11

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