I just spent way more time than I'd care to admit debugging something,
and I think the BL advanced could be improved to play a little better
with Blacklight with respect to the which "qt" gets used.
Here's what had me confused... In the README for Blacklight advanced
search, it says:
"If your application uses a single Solr qt request handler for all its
search fields, then this plugin may work well with no configuration."
Hey -- that's me! So I figure I'm good to go, but when I load up my
advanced search page, I have no facets. Boo!
The configuration examples at:
https://github.com/projectblacklight/blacklight/blob/master/lib/generators/blacklight/templates/catalog_controller.rb
show this:
config.default_solr_params = {
:qt => 'search',
:rows => 10
}
and I've basically got that. But, as it turns out, Blacklight
advanced search doesn't look for
blacklight_config.default_solr_params[:qt]. In
blacklight_advanced_search/app/controllers/blacklight_advanced_search/advanced_controller.rb,
you can see:
input.merge!( :qt => blacklight_config.advanced_search[:qt] ||
blacklight_config.default_qt , :per_page => 0)
I've worked around it by adding the following to my
CatalogController's blacklight_config:
config.default_qt = "search"
So, does it seem reasonable to update Blacklight advanced search to
look for blacklight_config.default_solr_params[:qt] instead of
config.default_qt?
Also, the README for Blacklight advanced search says:
"Solr request handler to use for any search that includes advanced
search criteria. Defaults to what the application has set as
Blacklight.config[:default_qt]"
which should also be updated to use the new configs (and possibly
changed as I suggested above).
If these changes are acceptable to you all, I can go ahead and do them.
Molly