Content Hub Tip #39: Facets not showing up in your search (facet filter)

Content Hub Dev Logo

The Sitecore Content Hub is a centralized location where a company or organization can house all of its digital content. It serves as a one-stop shop for users to access all types of content, such as articles, videos, images, and more. However, as the amount of content within a hub grows, it can become increasingly difficult for users to find exactly what they are looking for. This is where facet filters come in.

Facet filters are a powerful tool that allows users to refine their search results within a Content Hub. They provide a list of relevant criteria or facets that users can use to narrow down their search results based on specific attributes, such as content type, date, author, and more. By selecting one or more facets, users can quickly and easily find the exact content they need, without having to sift through irrelevant results.

In this way, facet filters provide a more streamlined and personalized user experience within a Content Hub. They make it easier for users to discover new content, explore related topics, and navigate through large amounts of information. Overall, facet filters are an essential feature for any Content Hub looking to improve user engagement and satisfaction.

But sometimes I have a hard time configuring them and understanding why it doesn't work like I want them to. Today, I was working on a search page and adding a facet filter. I've created the new Taxonomy and created a relation between Entity definition and Taxonomy. Set the taxonomy values on the entities and voila. An implementation is ready to be used in the Search component.

I went to Pages, searched the page and opened up the Search component. On the Functionality tab, I switched on the Facets, which enables the Facets tab. The only thing that remained was to configure the Taxonomy item and hit Save, twice ;).

Configuration of Facet filter

Then I refreshed the page with the Search component. Drum ruffling, no facets... That's interesting. 

Missing facets on page

How come the facet isn't displayed?

In the last blog post, I wrote about the relation properties and how these are important. This time I forgot about those properties. I didn't properly configure them. If you run into such a problem, be sure to double-check your relation properties, before pulling out your hair. I've added an example of a good configuration that enables the facet values to be displayed on your search component.

Proper Taxonomy relation configuration
This is how it looks after the relation properties were changed.

Search component result

Until next time!

PS: Don't forget to publish your changes made to the schema!