Hard limit with a large facet list can render chosen options inaccessible

Created on 20 November 2017, about 7 years ago
Updated 2 November 2023, about 1 year ago

Problem/Motivation

Consider a large taxonomy term list used for keywords (650 keywords at this moment) which are used as a facet in conjunction with Solr (and all terms are used at least once in the index). Because this list is to large to properly be rendered in the facet, rendering of the results page takes at least 6 seconds, we've opted to use a hard limit of 30, and only show the top results. To access the less common keywords we've added a field formatter for entity references which act as a facet URL, so you can basically access filter options that do not appear in the facet block due to the hardlimit.

This causes weird behavior because it is possible to add the facet this way, and the filter is applied correctly but it isn't possible to remove the filter through the facet summary, the selected filter won't show up in the summary (if you combine multiple active filters both in and outside the hardlimit you'll end up with all sorts of wacky behavior). Removing the hardlimit and refresh the same page and the active filter does show up in the summary (the same applies to the facet block, however you can get sortof around that using various sortings).

As a reference our facet config: https://gist.github.com/erikfrerejean/aa5269c2f056a4cc3ce66d79241b13e5

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

๐Ÿ‡ณ๐Ÿ‡ฑNetherlands erik frรจrejean ๐Ÿดโ€โ˜ ๏ธ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States chrisolof

    This is still an issue in the 2.x branch. However, setting the facet operator to AND appears to fix it. For my use case switching from OR to AND was acceptable, but I think we still have an issue here when OR is the facet operator. When OR is the operator, the chosen facet will not show if it normally falls outside of the hard-limited choices, regardless of sorting by active state.

  • ๐Ÿ‡บ๐Ÿ‡ฆUkraine nginex

    simple reroll against 2.0.x

Production build 0.71.5 2024