Class: DepositSearchBuilder
- Inherits:
-
Blacklight::Solr::SearchBuilder
- Object
- Blacklight::Solr::SearchBuilder
- DepositSearchBuilder
- Includes:
- Hydra::Collections::SearchBehaviors
- Defined in:
- app/search_builders/deposit_search_builder.rb
Instance Method Summary collapse
-
#include_depositor_facet(solr_parameters) ⇒ Object
includes the depositor_facet to get information on deposits.
Instance Method Details
#include_depositor_facet(solr_parameters) ⇒ Object
includes the depositor_facet to get information on deposits.
use caution when combining this with other searches as it sets the rows to zero to just get the facet information
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/search_builders/deposit_search_builder.rb', line 7 def include_depositor_facet(solr_parameters) solr_parameters[:"facet.field"].concat([Solrizer.solr_name("depositor", :symbol)]) # defualt facet limit is 10, which will only show the top 10 users not all users deposits solr_parameters[:"facet.limit"] = ::User.count # only get file information solr_parameters[:fq] = "has_model_ssim:GenericFile" # we only want the facte counts not the actual data solr_parameters[:rows] = 0 end |