Enter a keyword in the Search Bar and click the Search button (). The default search experience redirects to a page with results on the right and a collection of facets on the left.
A Facet aggregates search results by some common characteristic, with each facet holding search results that share something in common. After scanning the full list of results, a User might decide the results from just one facet are more appropriate (for example, all the results from a particular site, or all the results that are Blogs Entries). So what facets are included by default?
- Site Facet for filtering results by their site.
- Type Facet for filtering results by the Asset Type.
- Tag Facet for filtering results by Tag.
- Category Facet for filtering results by Category.
- Folder Facet for filtering results by Folder.
- User Facet for filtering results by the content creator.
- Modified Facet for filtering results by the Last Modified Date.
- Custom Facet for filtering results by some other indexed field. See here for more information.
Each item in a facet (selected using the checkbox) is called a Facet Term (term for short).
In this tutorial, you’ll explore how facets and their terms are used and how to find a facet’s configuration. The remaining articles show the configurations available for each facet.
If you’re not actually an accomplished oboe player, pretend for a moment. You’re visiting a site for classical musicians. You remember reading a great technical analysis of Johann Bach’s compositions, but you forgot to bookmark it (or would it be a bachmark?). You enter the keyword bach into the search bar and, because Johann Bach was a very important and famous composer, you get lots of results: too many, in fact. At first you’re discouraged, but you remember that there’s a site member who produces most of the site’s good technical content, who’s named back2bach. You see that his name is listed in the User facet, and there aren’t many results in the facet count (the number in parentheses next to the facet). You click into the facet and quickly find the content you wanted.
Clicking on a facet narrows down the search results. It’s added to the filter list in the search query, and the results list is refined by the selected facets.
Facet term selections within one facet are additive. Clicking more terms in the same facet expands the search results, because it’s processed as if you want to see results matching Term-1 OR Term-2, OR etc. To remove all the term selections from a facet, click the Clear link.
Facet term selections from different facets are exclusive. Clicking facet terms from multiple facets narrows the results because they’re processed as if you want to see results matching Facet-1 AND Facet-2, AND etc. This is intuitive. The facets
Considering a case where you make two term selections in the Type Facet: (Blogs Entry and Web Content Article), and two term selections in the User Facet (James Jeffries and Marvin Smart). What results are displayed?
Blogs Entries OR Web Content Articles AND authored by James Jeffries OR Marvin Smart.
If Marvin and James each created four pieces of content (two blogs and two Web Content Articles), all eight would appear in the Search Results. Any Blogs or Web Content created by other Users are not shown, and assets of other Type created by Marvin and James are not displayed. Content that isn’t Blog Entries or Web Content Articles created by other Users are obviously not searched.
In the classic, monolithic Search portlet, URLs like this were not uncommon:
The new Search functionality uses friendly search URLs for facet filtering. With the default settings, here’s the default main search URL when searching for keyword test:
Selecting a facet term causes a new parameter to the above URL. For example, selecting Blogs Entry from the Type facet results in this URL:
Selecting another facet term from the same facet category appends the same parameter again, but with the newly selected value:
The rest of the facets work the same way. Filtering by the last hour option in the Last Modified facet portlet produces this URL:
The parameter names are configurable for each facet.
Now that you know how facets work, read about configuring each of the included facets.