Currently we have config[:default_qt] and
Blacklight.config[:index][:num_per_page] . These are used by
SolrHelper#solr_search_params (a mix-in to CatalogController) to provide
default Solr values for a search operation.
I plan to consolidate these into the more flexible:
config[:search_solr_defaults], which will be a hash of _any_ arbitrary
solr params. No more lines of code, more flexible, the facet.fields can
be specified here IF you want BL to send them, or left out if you do not.
The old config values may stop working, I worry about too many attempts
to support backwards compatibility resulting in spaghetti code in BL,
there isn't too large an install base yet, this is a simple change, you
may have to change your config.
Now, currently ALSO we have SolrDocument.default_params[:search], which
_looks_ like it would already be used for setting default search
params. This is at the SolrDocument "model" level, not at the
controller level. Setting SolrDocument.default_params[:search] will
cause those defaults to be used when SolrDocument#search is called.
However, Blacklight never actually calls SolrDocument#search.
SolrDocument mixes in RSolr::Ext::Model, but this
"default_params[:search]" stuff doesn't come from the mix-in, it's local
to BL, and not actually used by BL.
I plan to completely remove the (currently ineffective)
default_params[:search] stuff, less code, less confusion.
So please, share opinion now, or I'll go ahead and do it!
Will also make
CODEBASE-233 trivial to solve, don't have solr_search_params automatically include facet fields, instead you can include them in config.default_search_params if you want, or not if you don't want.