Toggle menu

Search Facets

Search facets can be set up in the article extras, allowing users to refine their results. Facets are organised into groups, the titles of which are content managed.

Search Facets
 Each group holds a particular facet type, one of:

  • Content Root (articles or media in a certain group or section of the site)
  • Media Type (for example, PDFs, or Word documents)
  • Metadata (items tagged with the selected metadata values)
  • Template Type
  • A custom SOLR query
  • Date (created, last modified, display start, display end) which will appear as either a month or year facet, within a set range
  • Metadata Property (automatically builds facets from all of the values of the selected property)

The names of most facets (excluding date and metadata property) are also content managed. After each facet, the number of results that match that facet is displayed in brackets.

As facets are selected they are added to the "You selected" panel. Individual facets can be deselected by clicking on them, or all facets can be removed by clicking "Clear all".

Facets only appear if there are results that include those facet types. For example, if you created a date range facet for content created before October 2005, and the search results only returned items created after that date, the facet would not appear. Similarly, if the search returns results that only match one facet in a given group, the group will not appear.

Selecting Facets

As facets are selected the list of results updates to only include items that match. The list of relevant facets will also update. For example, should facets exist for media types, created date, and metadata, and a user selects a metadata value that is not used by any media item, the media types facet group would disappear.

Selecting Multiple Facets

Most facets behave exclusively within their group. For example, selecting a facet from an "article root" group would display results from that root and hide the other "article root" facets (because an article can only be in one root).

Others, like metadata property and date range, behave inclusively, that is, you could select the date facet for December, and the facet for January, and the facet for February, returning a greater number of results as more are selected.

InclusiveExclusive
Metadata PropertyContent Roots
DatesMedia Type
 Metadata Value
 Template Type

Creating Facets

Facets are organised into groups. There are three types of group, and each group holds a different type of facet. You need to enter a name for all group types, which will appear above those facets on the search page.

Simple Facets

The simple facet group is a container that can hold any number of facets of any type, although it generally makes sense for all of the facets in one group to be of the same type.

The four types are CONTENTROOT, MEDIATYPE, METADATA, TEMPLATE and CUSTOMSOLRQUERY.

Article and Media Content Roots, Media Types, Template Types and Metadata Values

These facet types let you pick content, or types of content, that will act as facets for the search results.

An article root facet filters search results to articles beneath a particular article.

A media root facet filters search results to media items in the chosen group. 

The media type facet filters search results to just that media type, for example, selecting a PDF facet would only display PDFs.

The template type filters results based on the type of template an article uses.

Metadata value facets filter results based upon items tagged with those values. Unlike the metadata property group described below, you are able to select exactly which values will be used, and they can come from a variety of different properties.

Once you've created a simple group, use the "Add facet" button to create the individual facets.

For example, this group has two article root facets, each corresponding to a different area of the site:

Article Facet Extras
  
Article Facets
 

Custom SOLR Queries

The CUSTOMSOLRQUERY facet type provides a free-text area that allows you to enter a SOLR query in the same format as you would from the SOLR admin console. Building custom SOLR queries is beyond the scope of this documentation.

Dates Group

To add a date facet, click "Add group" and select DATES from the drop-down.

Select the dates between which you would like facets to be generated. If you'd like date facets to cover all of the content on your site, it's a good idea to set the "From" date to a time before content was created on your site, and the "To" date several years into the future (so that you don't have to keep rolling the end date forward).

The "Query Field" drop-down lets you choose whether articles and media are faceted based upon when they were created, when they were last updated, when they started to be displayed, or when they are set to stop being displayed.

"Facet Mode" sets whether the facets appear as months or as years.

For example, the following DATES group in iCM would create these facets on the site:

Date Facet Configuration
  
Date Facet
 

When a user selects a date, only the search results relevant to that month or year will be displayed. As more dates are selected, more results are shown.

Metadata Property

To add a metadata property group, click "Add group" and select METADATAPROPERTY from the drop-down.

Use the "Select" button to pick a metadata property.

The metadata property facet group generates facets automatically using the values of the chosen property, there's no need to manually add facets to the group.

For example, the following METADATAPROPERTY group in iCM would create these facets on the site:

Metadata Facet Extras
  
Metadata Facets
 

The values of the "EventType" property appear as facets (as long as there are articles that are tagged with those values). When a user selects a facet, only results that are tagged with that value will be displayed. As more value facets are selected, more results are displayed.

Last modified on September 17, 2024

Share this page

Facebook icon Twitter icon email icon

Print

print icon