Closed christinach closed 1 week ago
See if there as a way to manipulate the number of categories shown or add a "more" option to a pivot facet.
Check in google analytics to see how many users use this feature.
Can all classifications be listed (more than 10) or if not, user will see a "more" option at bottom of list?
@rladdusaw will write up conclusions and we will look at in technical discussion on Friday
Pivot facets seem to work differently than standard facets and don't appear to respect the limit config value. They also do not create a field in solr for the pivot facet, only the two facets used to create the pivot facet can be found in solr.
In order for a facet to have the "more" link and paginate the fields blacklight has to make a query to solr and find more available fields than the maximum number of displayed fields, but since there is not a solr field for the pivot facet it can only find the default limit of 10 fields, and does not display the "more" link.
Even if you set the limit to a smaller number to force the "more" link to appear the attempt to retrieve the paginated fields fails since it tries to get the data from an endpoint for the pivot facet that does not exist like /catalog/facet/classification_pivot_field, which attempts to query solr for the facet and is unable to find a solr field for the pivot facet and it causes a 500.
Trying Blacklight Hierarchy gem from Stanford, which Cornell also uses.
Hierarchy gem is looking like it does what we need, but it does require a new field in Solr.
@rladdusaw will create a ticket in Bibdata for the new fields needed in Solr
Reported by Martin H. Not all classifications are listed in the classification facet. For example 'Z' is missing.
https://github.com/pulibrary/orangelight/blob/2b7f62c034b65a15157013e284f4e968dfb654f4/app/controllers/catalog_controller.rb#L137
Implementation notes
Try adding
limit: true
to this facet in the catalog controller