Configure a Basic Faceted Tree

Overview

This page describes how to configure a basic faceted node tree in the content repository. This configuration enables faceted navigation in the delivery tier of Bloomreach Content.

When to Use

Use a faceted node tree when you want to provide users with filter options based on document metadata, allowing them to incrementally refine search results.

Prerequisites

  • A Bloomreach Content project created using the Maven archetype.
  • The "News" feature added to your project. See Adding Features to a Project.
  • Additional news documents in the CMS with values set for Date, Author, and Source fields.

Minimum Configuration for a Faceted Tree

To configure a basic faceted tree, you need:

  • A node of type hippofacnav:facetnavigation with a chosen name.
  • A hippo:docbase String property containing the UUID (or multiple comma-separated UUIDs) of the source folder(s). All documents in these folders and their subfolders are included in the faceted tree.
  • A multi-valued String property hippofacnav:facets, listing the document property names to use as facets.

Implementation Steps

1. Find the Source Folder UUID

Locate the UUID of the news folder. For example:

/content/documents/myproject/news: jcr:primaryType: hippostd:folder jcr:uuid: d2b1775c-fb97-4080-bd66-ede4ac874b5a

2. Create the Faceted Tree Node

Add a faceted-news node with the following configuration:

/content/documents/myproject: /faceted-news: jcr:primaryType: hippofacnav:facetnavigation hippo:docbase: d2b1775c-fb97-4080-bd66-ede4ac874b5a hippofacnav:facets: [myproject:author, myproject:source]

3. Verify the Faceted Tree Structure

After saving the changes to the repository, the faceted-news node displays a number in square brackets. This number represents the total number of matching documents.

Expanding the faceted-news node shows three child nodes, each with a result count:

/content/documents/myproject: /faceted-news [30]: jcr:primaryType: hippofacnav:facetnavigation /myproject:author [27]: jcr:primaryType: hippofacnav:facetsavailablenavigation /myproject:source [27]: jcr:primaryType: hippofacnav:facetsavailablenavigation /hippo:resultset [30]: jcr:primaryType: hippo:facetresult
  • The first two child nodes (myproject:author and myproject:source) correspond to the configured facets. These nodes allow drill-down navigation based on facet values.
  • The hippo:resultset node contains all results at the current level.

Expand the myproject:source node to view its child nodes:

/content/documents/myproject: /faceted-news [30]: /myproject:author [27]: /myproject:source [27]: /onehippo.com [15]: /GoGreen [9]: /hippo:resultset [27]: /hippo:resultset [30]:

Each child node (except hippo:resultset) represents a unique value of the myproject:source property. For example, "onehippo.com" has 15 documents, and "GoGreen" has 9.

Note: All visible folders and document variants are included in the faceted tree. As a result, the numbers in the Console may be higher than expected, since each document is counted for each variant. Delivery tier users typically see only live or preview variants, so each document appears once on the website. You can configure a filter to include only live variants or other specific criteria.

The hippo:resultset node at each level contains all results matching the current drill-down path.

You can further refine results by navigating through facet values. For example, selecting the myproject:source value "GoGreen" and then the myproject:author value "Sonja Verde" results in:

/content/documents/myproject: /faceted-news [30]: /myproject:author [27]: /myproject:source [27]: /onehippo.com [15]: /GoGreen [9]: /myproject:author [9]: /Robert Greene [3]: /Sonja Verde [6]: /myproject:author [6]: /myproject:source [6]: /hippo:resultset [6]: /sustainable-business-award: /sustainable-business-award: /sustainable-business-award: /record-growth: /record-growth: /record-growth: /myproject:source [9]: /hippo:resultset [9]: /hippo:resultset [27]: /hippo:resultset [30]:

Optional Configuration

Add Display Names to Facet Nodes

By default, facet nodes use the property names from hippofacnav:facets. To specify display names, set the hippofacnav:facetnodenames multi-valued String property:

/content/documents/myproject: /faceted-news: jcr:primaryType: hippofacnav:facetnavigation hippo:docbase: d2b1775c-fb97-4080-bd66-ede4ac874b5a hippofacnav:facets: [myproject:author, myproject:source] hippofacnav:facetnodenames: [Author, Source]

The number and order of values in hippofacnav:facetnodenames must match those in hippofacnav:facets.

The resulting faceted tree displays the configured display names:

/content/documents/myproject: /faceted-news [30]: /Author [27]: /Source [27]: /hippo:resultset [30]:

Configure Multiple Source Folders

To include multiple source folders, provide a comma-separated list of UUIDs in the hippo:docbase property:

/content/documents/myproject: /faceted-news: jcr:primaryType: hippofacnav:facetnavigation hippo:docbase: d2b1775c-fb97-4080-bd66-ede4ac874b5a,121916d1-1a36-4ea4-a4f2-32797c456ee9
Share Feedback
Page: /build/search/faceted-navigation/configure-a-basic-faceted-tree
Section: Build
Category *
Configure a Basic Faceted Tree | Bloomreach Content Documentation