app/controllers/concerns/europeana/blacklight/catalog.rb in europeana-blacklight-0.3.3 vs app/controllers/concerns/europeana/blacklight/catalog.rb in europeana-blacklight-0.4.0
- old
+ new
@@ -5,20 +5,17 @@
include ::Blacklight::Catalog
include Europeana::Blacklight::SearchHelper
included do
- self.search_params_logic = Europeana::Blacklight::SearchBuilder.default_processor_chain
-
configure_blacklight do |config|
# Adapter classes
- config.repository_class = Europeana::Blacklight::ApiRepository
+ config.repository_class = Europeana::Blacklight::Repository
config.search_builder_class = Europeana::Blacklight::SearchBuilder
config.response_model = Europeana::Blacklight::Response
config.document_model = Europeana::Blacklight::Document
config.document_presenter_class = Europeana::Blacklight::DocumentPresenter
- # config.facet_paginator_class = Europeana::Blacklight::FacetPaginator
# Prevent BL's "did you mean" spellcheck feature kicking in
config.spell_max = -1
end
end
@@ -26,10 +23,10 @@
# Empty search returns all records
def has_search_parameters?
super || params.key?(:q) || params.key?(:mlt)
end
- def search_results(user_params, _search_params_logic)
+ def search_results(user_params)
super.tap do |results|
if has_search_parameters?
results.first[:facet_queries] = europeana_api_query_facet_counts(user_params)
end
end