Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If number of items in a Solr facet is zero, do not display the facet in the UI #10

Closed
fishytodd opened this issue Dec 16, 2014 · 2 comments

Comments

@fishytodd
Copy link

This is especially relevant when we filter results by source, then by category. For example:

if we select data from NOAA Economics (http://wcga-vm01.sdsc.edu/discover/#?s=NOAA%20Economics:%20National%20Ocean%20Watch), we expect the results to be mostly in the Human categories, and yet, when we look at the Categories being displayed for further filtering, we see all possible categories, even those with zero contents.
This is not ideal. Only facets with contents that are relevant (non-zero) should be visible for filtering.

WC-registry Ecotrust/wc-data-registry#124

@tchaddad
Copy link

tchaddad commented Jan 6, 2015

As mentioned in the original issue, the hiding of "zero" facets appears to be working as expected if the user starts filtering by Issue or Category. However the behavior is different if the user begins to filter by first choosing a Source. If the user starts with Source, the zero facet items are not removed from the UI.

This elevates this issue to bug status.

@tchaddad
Copy link

tchaddad commented Jan 9, 2015

To duplicate the problem behavior follow these steps:

You will see that the full list of CATEGORIES is presented, with most items listing zero. The optimal behavior would be to only show CATEGORIES that have non-zero values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants