Facets are a useful method of refining your search results using various characteristics of your content. They allow you to use a Knowledge Graph field as a type of dynamic filter that a user can interact with in the frontend search experience to narrow the search results.
Facets are visible post-search, since they’re dependent on the search query, and can be used to further refine a query. Facets usually have a number next to each one, to indicate the result count. You can see an example of Facets in the left sidebar below. To learn more about Facets visit the Facets and Filters training module.
Note: Facets are only supported on vertical search.
To add a facet in the UI:
- Click Search in the navigation bar and click on the desired Search experience.
- Click Verticals.
- In the Settings for: drop-down select the Vertical you want to add Facets to.
- If the field you want to use as a Facet is not already a Searchable Field, you will need to add it as a Searchable Field.
- To add additional fields click on the + Add / Update Fields link. A dialog box appears.
- Select the checkbox next to the fields you would like to add as Searchable fields. Then click Update Fields.
- Select the Facet checkbox next to the fields you would like to add as Facets.
- Click Save.
To add a facet using the JSON Editor:
- Click Edit in JSON to navigate to your Search Configuration file.
- In the relevant vertical add the custom field as a Searchable Field.
- Then add the Facet Filter via JSON
“facet”: true
within thesearchableField
object.
It should look something like this:
"searchableFields": {
"c_jobDepartment": {
"facet": true
}
}
Once you have set your facet in the backend, you will need to make sure it appears in the frontend experience. The steps vary depending on your implementation method, visit the relevant documentation below for the steps to add Facets to the frontend:
Comments
0 comments
Please sign in to leave a comment.