Class: Hyrax::EmbargoSearchBuilder
- Inherits:
-
Blacklight::SearchBuilder
- Object
- Blacklight::SearchBuilder
- Hyrax::EmbargoSearchBuilder
- Defined in:
- app/search_builders/hyrax/embargo_search_builder.rb
Overview
Finds embargoed objects
Direct Known Subclasses
DeactivatedEmbargoSearchBuilder, ExpiredEmbargoSearchBuilder
Instance Method Summary collapse
- #only_active_embargoes(solr_params) ⇒ Object
-
#with_pagination(solr_params) ⇒ Object
TODO: add more complex pagination.
- #with_sorting(solr_params) ⇒ Object
Instance Method Details
#only_active_embargoes(solr_params) ⇒ Object
15 16 17 18 |
# File 'app/search_builders/hyrax/embargo_search_builder.rb', line 15 def (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/hyrax/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/hyrax/embargo_search_builder.rb', line 11 def with_sorting(solr_params) solr_params[:sort] = 'embargo_release_date_dtsi desc' end |