Class: Hyrax::AdminAdminSetMemberSearchBuilder
- Inherits:
-
SearchBuilder
- Object
- SearchBuilder
- Hyrax::AdminAdminSetMemberSearchBuilder
- Defined in:
- app/search_builders/hyrax/admin_admin_set_member_search_builder.rb
Overview
Builds a query to find the members of an admin set. For use on the admin menu, so it includes works regardless of status.
Instance Attribute Summary collapse
-
#collection ⇒ Object
readonly
Returns the value of attribute collection.
Instance Method Summary collapse
-
#in_admin_set(solr_parameters) ⇒ void
include filters into the query to only include the admin_set members (regardless of status).
-
#initialize(scope:, collection:) ⇒ AdminAdminSetMemberSearchBuilder
constructor
A new instance of AdminAdminSetMemberSearchBuilder.
Constructor Details
#initialize(scope:, collection:) ⇒ AdminAdminSetMemberSearchBuilder
Returns a new instance of AdminAdminSetMemberSearchBuilder.
14 15 16 17 |
# File 'app/search_builders/hyrax/admin_admin_set_member_search_builder.rb', line 14 def initialize(scope:, collection:) @collection = collection super(scope) end |
Instance Attribute Details
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
9 10 11 |
# File 'app/search_builders/hyrax/admin_admin_set_member_search_builder.rb', line 9 def collection @collection end |
Instance Method Details
#in_admin_set(solr_parameters) ⇒ void
This method returns an undefined value.
include filters into the query to only include the admin_set members (regardless of status)
25 26 27 28 |
# File 'app/search_builders/hyrax/admin_admin_set_member_search_builder.rb', line 25 def in_admin_set(solr_parameters) solr_parameters[:fq] ||= [] solr_parameters[:fq] << "{!term f=#{Hyrax.config.admin_set_predicate.qname.last}_ssim}#{collection.id}" end |