Conversation
46d3dfb to
0339a6e
Compare
|
@jrochkind observes in Slack: ArcLight uses a mixin that does not override the initializer. Spotlight uses two: an access control mixin that does not override the initializer, and a category browse mixin that also does not. GeoBlacklight likewise uses a mixin without overriding the initializer. All of these expect SearchBuilder.default_processor_chain to be an appendable list of symbols identifying methods to be added to the processing chain for params. None of them directly instantiate a SearchBuilder outside their specs, but all of them instantiate a SearchBuilder without the |
|
ArcLight doesn't appear to interact with SearchService at all. |
5114646 to
9a1e1ee
Compare
|
@barmintor : I think you're observing that this change is backwards-compatible (and/or having done some due diligence in some complicated apps to assure that, even if it was in some way, it doesn't impact real-world use)? |
|
@cbeer that's right - per Jonathan's concern, I think things are mostly ok, but there is a spec in GeoBlacklight that will fail and apps that use the Spotlight helper might have an issue (though I think it may be a vestigial method). |
|
|
||
| # This method may be overridden to customize search behavior. | ||
| # @return [Blacklight::Solr::Response] the solr response object | ||
| def retrieve_search_results(params: nil) |
There was a problem hiding this comment.
Should we change this kwarg to builder since we're always passing a SearchBuilder here?
There was a problem hiding this comment.
I'm just matching the argument name to the repository for consistency.
| builder = builder.facet_suggestion_query(params[:query_fragment]) | ||
| end | ||
|
|
||
| @response = retrieve_search_results(params: builder) |
There was a problem hiding this comment.
This conflates search results (documents) from facet results. Can we keep these two concerns separated?
There was a problem hiding this comment.
Is there any value in doing that? I find the current state incredibly confusing and it's not clear to me what behavior the seam is intending to provide that isn't better suited for the search builder.
There was a problem hiding this comment.
I think that it is confusing, and having one method handle the one case makes it less so.
0d5039d to
d113f8b
Compare
0d13b0d to
d113f8b
Compare
…w blacklight_config kwarg
I'm not there's advantage to having
Blacklight::SearchServiceconstruct the search builder internally (other than it probably made sense at the time, before we encapsulated the params with SearchState).If we hoist the search builder up to the controller (via the
Searchableconcern), maybe there's less magic?Bypassing
SearchService#facet_field_responseand#facet_suggest_responseare potentially backwards-incompatible, but I couldn't find any indication that it's a method people are actually overriding downstream.Includes #3856, #3843, and #3854