Step 1: Set up Your Content

Facets use Content fields. For each vertical you want to enable facets for, you’ll need to determine which fields to enable facets for, make sure the fields exist on the entity types for that vertical, and that the fields are populated with content.

Determine Fields to Enable Facets For

Facets are best for structured enum/option fields for which there are a finite number of options.

For hierarchical facets in particular, you’ll want to use a category field that has multiple nested levels of categories.

For best practices and tips on what fields to use, check out the Searchable Fields Best Practices reference doc.

Enable Fields

There are several ways to tell whether the fields exist on the relevant entity type:

  • Attempt to add fields as searchable fields to the vertical (see step 2 of this guide).
  • View an entity of the relevant entity type to see all fields it has. Check out the Edit Entity Information help article to learn how.
  • View the configuration for the entity type. Check out the View Field API Name (Content) help article to learn how.

If you determine the field is missing from the entity type, add it:

  • If the field already exists on a different entity type, but is not enabled on the relevant entity type, add it. Follow the steps to add additional fields in the Customize Entity Type Field Configurations help article.
  • If the field does not already exist, create a field for it. Follow the steps in the Add Custom Fields help article.

Create Fields

Hierarchical facets require a specific field set up, which we’ll cover below.

To set up the field in the Content, follow the Add Custom Field help article with these nuances:

  1. The field type should be “multi-option select”.
  2. Set the structure of the field options using a delimiter (“|”, “>”, etc.) to indicate the hierarchy. For example:

    1. Appliances
    2. Appliances > Small Appliances
    3. Appliances > Small Appliances > Refrigeration

    fields

Populate Content for Fields

Once the field exists, make sure it is populated with content so you can actually use it! Check out the Edit Entity Information help article for steps on how to edit a single entity and other options for editing.

When populating the field for each entity, select the correct categories for the entity. If an entity’s category is a lower level in the hierarchy, make sure to select all parent categories as well. For example, if an entity’s category is “Appliances > Small Appliances > Refrigeration”, both “Appliances” and “Appliances > Small Appliances” must be selected as well:

selected-fields

Feedback