Class: Hyrax::DepositSearchBuilder
- Inherits:
-
SearchBuilder
- Object
- SearchBuilder
- Hyrax::DepositSearchBuilder
- Defined in:
- app/search_builders/hyrax/deposit_search_builder.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#include_depositor_facet(solr_parameters) ⇒ Object
includes the depositor_facet to get information on deposits.
Class Method Details
.depositor_field ⇒ Object
20 21 22 |
# File 'app/search_builders/hyrax/deposit_search_builder.rb', line 20 def self.depositor_field "depositor_ssim" end |
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
8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/search_builders/hyrax/deposit_search_builder.rb', line 8 def include_depositor_facet(solr_parameters) solr_parameters.append_facet_fields(DepositSearchBuilder.depositor_field) # default facet limit is 10, which will only show the top 10 users. # As we want to show all user deposits, so set the facet.limit to the # the number of users in the database solr_parameters[:"facet.limit"] = ::User.count # we only want the facte counts not the actual data solr_parameters[:rows] = 0 end |