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 is a Blacklight::Solr::Response::GroupResponse, which does not use numFound. The total doc count will instead be in ['grouped']['_root_']['matches'], where _root_ is the configured group.field, e.g. :
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 is a
Blacklight::Solr::Response::GroupResponse
, which does not usenumFound
. The total doc count will instead be in['grouped']['_root_']['matches']
, where_root_
is the configuredgroup.field
, e.g. :The text was updated successfully, but these errors were encountered: