Was this ever implemented? I’ve come to the conclusion that it’s more user-friendly to continue showing all filters even if there are no results. I felt like something was “off” with my application (https://directory.njmonthly.com/search?category=South%20American§ion=restaurants), and I think the disappearing filters is the thing.
With the way that it’s set up, now, the user has to uncheck their current filter to see all the filters in other facets. For example, if they select a category with only one item in it, all the other filters (Awards, Rating, and Best For) will disappear. This is even more confusing for someone just coming to the page from Google or somewhere else. Also, I was able to prevent the current facet type (category) from removing the rest of the categories, but if someone’s just visiting that page from Google, they’ll just see that one category.
I couldn’t put my finger on why my application was so confusing to use, but I think this may be it.
Here’s my application:https://directory.njmonthly.com/search?category=South%20American§ion=restaurants
You can see how, if someone was just visiting it, they would think that the number of restaurants in this database are severely limited because all the facets are almost gone.
Here, it looks like the facets in the same facet type all display, but the rest of the facets disappear: https://www.washingtonian.com/best/doctors/search/q/%20/locations/all/speciality/Audiology/p/1/
It looks like Yelp grays out their filters that are not relevant.
I don’t think the answer is very straightforward, though. For example, if I’m searching for web designers, I don’t want to see grayed out results for Mexican or American (restaurant categories).
I think the solution would be to have one master facet (for example, the section is the master facet for my application). The master facet could be restarurants, web designers, computers, etc. I guess, you would have to make one API call with the master facet selected to get all relevant categories, awards, and ratings (and therefore remove the irrelevant, empty facets). Then, another API call would have to be made with the facets that are actually selected. At that point, it would be okay to show facets with no results, but they would have to be grayed out and not clickable (or at least show the count).
So, if Algolia was to implement the option to show all facets (whether there are results or not), it would also be good to have the option to set a master facet, so that irrelevant facets don’t show up.
I guess what I’ll have to do for my application is first get all the facets (categories, awards, and ratings) for a certain section (like restaurants), and then make a second call to get the counts for the facets by using the currently selected facets and update the master facets list. It will be complicated, but I am almost certain that that is the one thing that is making the application feel “off.”
It’s a complicated problem, so I can understand why there have been no solutions, but it would be awesome to see this feature in the future.