You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When search results are grouped (a feature essential to ArcLight), the range limit facet will show zero results for the selected range, and fail to render a histogram.
This is a long-standing issue that pre-dates v9.x of blacklight_range_limit; it does not appear that the plugin has ever accounted for grouped search results.
Steps to Reproduce
This would be true of any Blacklight app that uses grouped search results. ArcLight certainly does; TBD which other BL-based applications are impacted.
In a new ArcLight app w/blacklight_range_limit added, perform a blank search
Enter any date range in the facet; click Apply button
Plugin works correctly here (shows correct hits for selected range and displays histogram)
Toggle results to Grouped by collection
Plugin will show 0 hits for the selected range (and fail to show the histogram)
Why This Matters
The majority of current ArcLight implementations have added the blacklight_range_limit gem and have had to make various local fixes to get it to work correctly. Grouping by collection is essential and the community even supports making that the default view of search results (see projectblacklight/arclight#1488). It would be quite helpful to the community if this plugin would just work out-of-the-box for ArcLight without requiring local modifications.
Some Technical Details
The BlacklightRangeLimit::FacetFieldPresenter currently expects the Solr response for search results to be a Blacklight::Solr::Response and for the total hit count to be in response.total, aka response['numFound'] (see code).
But when search results are grouped, the Solr response does not use numFound. The total doc count will instead be in ['grouped']['_root_']['matches'], where _root_ is the applied group.field, e.g. :
I'm personally unlikely to have time to try to implement this (and have never used group search results), but would find time to review PRs.
Presumably it just requires changing the query that's sent to Solr and/or how the results are parsed? To do what Blacklight itself is doing? It could be a fairly small tweak.
I feel like this plugin tries to use your configured CatalogController already to get results though, in a way that it should already incorporate any logic Blacklight original has for delaing with grouped results in facets... ah but maybe not when it comes to facets, since we have to do special stuff there. Anyway, I think the chances are good of it being a small code change, the hard part is figuring out that small code change. first place to look is what Blacklight itself is doing for grouped results in facets .
Overview
When search results are grouped (a feature essential to ArcLight), the range limit facet will show zero results for the selected range, and fail to render a histogram.
This is a long-standing issue that pre-dates v9.x of
blacklight_range_limit
; it does not appear that the plugin has ever accounted for grouped search results.Steps to Reproduce
This would be true of any Blacklight app that uses grouped search results. ArcLight certainly does; TBD which other BL-based applications are impacted.
blacklight_range_limit
added, perform a blank searchApply
buttonGrouped by collection
0
hits for the selected range (and fail to show the histogram)Why This Matters
The majority of current ArcLight implementations have added the
blacklight_range_limit
gem and have had to make various local fixes to get it to work correctly. Grouping by collection is essential and the community even supports making that the default view of search results (see projectblacklight/arclight#1488). It would be quite helpful to the community if this plugin would just work out-of-the-box for ArcLight without requiring local modifications.Some Technical Details
The
BlacklightRangeLimit::FacetFieldPresenter
currently expects the Solr response for search results to be aBlacklight::Solr::Response
and for the total hit count to be inresponse.total
, akaresponse['numFound']
(see code).E.g., for a query yielding 510 docs:
But when search results are grouped, the Solr response does not use
numFound
. The total doc count will instead be in['grouped']['_root_']['matches']
, where_root_
is the appliedgroup.field
, e.g. :The text was updated successfully, but these errors were encountered: