Coveo Facet Value Suggestions

Implements the Coveo JavaScript Search Framework FacetValueSuggestions which provides query suggestions scoped to distinct categories based on a faceted field (i.e., the Field data source option value).

Selecting a facet value suggestion from the list of query suggestions triggers a query to the Search API with an advanced query expression (aq) which reflects the selected facet value (i.e., @<FIELD> == <SELECTED_FACET_VALUE>).

Usage Notes

Insertion Location

The Coveo Facet Value Suggestions rendering is an Allowed Control in the following placeholder(s): Searchbox Components

Example insertion sequence for the Coveo Facet Value Suggestions rendering.

When you add the Coveo Searchbox SXA rendering, this adds a coveouisearchboxcomponentssxa placeholder. Insert your Coveo Facet Value Suggestions rendering in this coveouisearchboxcomponentssxa placeholder.

Example insertion sequence for the Coveo Facet Value Suggestions rendering.

Data Source Options

Option name Description
Field Sitecore field whose values will be used in the facet value suggestions
Number of values to display in the suggestions list See numberOfSuggestions component option
Display the estimate number of results See displayEstimateNumberOfResults component option
Use value from search box See useValueFromSearchbox component option
DOM unique Id Randomly generated HTML element id.
Additional data attributes Allows use of the Coveo JavaScript Search Framework FacetValueSuggestions component options that aren't directly available in the data source.

Sample Generated HTML and Corresponding Visual Output

<div>
  <div id="coveocaf18e11" class="CoveoFacetValueSuggestions" data-prebind-field="fieldTranslator" 
  data-field="@manufacturer" data-applied-prebind="true">
  </div>
</div>

What's Next for Me?