Class: Hyrax::CatalogSearchBuilder
- Inherits:
-
SearchBuilder
- Object
- Blacklight::SearchBuilder
- SearchBuilder
- Hyrax::CatalogSearchBuilder
- Defined in:
- app/search_builders/hyrax/catalog_search_builder.rb
Instance Method Summary collapse
-
#show_only_active_records(solr_parameters) ⇒ Object
show works that are in the active state.
-
#show_works_or_works_that_contain_files(solr_parameters) ⇒ Object
show both works that match the query and works that contain files that match the query.
Methods included from SearchFilters
Methods included from FilterSuppressed
Methods included from FilterByType
Instance Method Details
#show_only_active_records(solr_parameters) ⇒ Object
show works that are in the active state.
17 18 19 20 |
# File 'app/search_builders/hyrax/catalog_search_builder.rb', line 17 def show_only_active_records(solr_parameters) solr_parameters[:fq] ||= [] solr_parameters[:fq] << '-suppressed_bsi:true' end |
#show_works_or_works_that_contain_files(solr_parameters) ⇒ Object
show both works that match the query and works that contain files that match the query
9 10 11 12 13 14 |
# File 'app/search_builders/hyrax/catalog_search_builder.rb', line 9 def show_works_or_works_that_contain_files(solr_parameters) return if blacklight_params[:q].blank? || blacklight_params[:search_field] != 'all_fields' solr_parameters[:user_query] = blacklight_params[:q] solr_parameters[:q] = new_query solr_parameters[:defType] = 'lucene' end |