Coveo Facet
Coveo Facet
|
Legacy feature
This article pertains to the Coveo Hive framework which is now in maintenance mode. Choose one of Coveo’s more modern, lightweight, and responsive libraries for any future search interface development. See the search interface Implementation guide for more details. |
|
Leading practice
The Coveo Dynamic Facet is now recommended over the Coveo Facet rendering. |
Implements the Coveo JavaScript Search Framework Facet component to allow filtering of results on one or multiple values of a field.
Usage notes
-
The field selected in the
Field
data source option must be facetable (see Make a Sitecore field facetable). -
Any change to the facet value selections triggers a new Search API call.
Insertion location
Coveo Hive
The Coveo Facet rendering is an Allowed Control in the following placeholder(s): Facets
Coveo Hive SXA
Coveo for Sitecore SXA rendering insertion locations aren't limited by placeholder Allowed Controls. The Coveo Facet rendering may therefore be inserted throughout the partial design, whether in Coveo for Sitecore or Sitecore placeholders.
Data source options
The following table lists the available data source options for this rendering.
Option name | Description |
---|---|
Title |
See the title |
Field |
See the field |
Facet ID |
See the id |
Number of values |
See the numberOfValues |
Sort |
See the sortCriteria |
Ignore accents in facet search |
See the facetSearchIgnoreAccents |
Allowed facet values |
See the allowedValues |
Facet value caption |
See the valueCaption |
Enable collapse button |
See the enableCollapse |
Enable settings button |
See the enableSettings |
Sort criteria displayed in the settings menu |
See the availableSorts |
Enable search for the facet |
See the enableFacetSearch |
Number of values to display in the facet search results |
See the numberOfValuesInFacetSearch |
Enable more/less button |
See the enableMoreLess |
Number of additional facet values to fetch when 'More' is clicked |
See the pageSize |
Include facet values in the omnibox |
Don’t use this option. It is only exposed for legacy reasons. |
Include facet values in the breadcrumb |
See the includeInBreadcrumb |
Maximum number of facet values displayed in the breadcrumb |
See the numberOfValuesInBreadcrumb |
Computed field |
See the computedField |
Computed field operation |
See the computedFieldOperation |
Computed field format |
See the computedFieldFormat |
Computed field caption |
See the computedFieldCaption |
Is multi-value field |
See the isMultiValueField |
Facet uses the AND operator |
See the useAnd |
Allows user to select the facet operator |
See the enableTogglingOperator |
Facet accuracy determined by the number of scanned results |
See the injectionDepth |
Enable 'Save Facet State' option in Settings menu |
See the enableSettingsFacetState |
Preserve facet position under mouse on new facet query |
See the preservePosition |
DOM unique ID |
Randomly generated HTML element ID. |
Additional data attributes |
Allows use of the Coveo JavaScript Search Framework Facet component options that aren’t directly available in the data source. |
Sample generated HTML and corresponding visual output
<div id="coveo493E5F13" class="CoveoFacet"
data-available-sorts="alphaascending,alphadescending,occurrences,score"
data-prebind-field="fieldTranslator" data-field="@z95xtemplatename" data-id="templatename"
data-injection-depth="1000" data-sort-criteria="occurrences" data-title="Template Name"
data-applied-prebind="true">
