projectblacklight / blacklight_advanced_search

Advanced search plugin for Blacklight
http://projectblacklight.org
Other
24 stars 25 forks source link

Allow add_avanced_search_to_solr to take passed in params #82

Closed dkinzer closed 5 years ago

dkinzer commented 6 years ago

The current method signature

def add_advanced_search_to_solr(solr_parameters)

I'm running into a situation where it would be nice to be able to transform the params that this function uses when it creates it's initial query:

 advanced_query = BlacklightAdvancedSearch::QueryParser.new(blacklight_params, self.blacklight_config)

To do what I want I am left with two choices, either override this function which I would prefer not to maintain, or override blackligh_param which seems like overkill.

Since the behavior of this method depends so much on what blacklight_params are, maybe it makes total sense to pass that in as a parameter. The method would be easier to understand and to use without overriding.