Coveo Facet

Warning
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.

Tip
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

Example insertion sequence for the Coveo Facet rendering.

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.

Example insertion sequence for the Coveo Facet rendering.

Data source options

The following table lists the available data source options for this rendering.

Option name Description

Title

See the title component option.

Field

See the field component option.

Facet ID

See the id component option.

Number of values

See the numberOfValues component option.

Sort

See the sortCriteria component option.

Ignore accents in facet search

See the facetSearchIgnoreAccents component option.

Allowed facet values

See the allowedValues component option.

Facet value caption

See the valueCaption component option.

Enable collapse button

See the enableCollapse component option.

Enable settings button

See the enableSettings component option.

Sort criteria displayed in the settings menu

See the availableSorts component option.

Enable search for the facet

See the enableFacetSearch component option.

Number of values to display in the facet search results

See the numberOfValuesInFacetSearch component option.

Enable more/less button

See the enableMoreLess component option.

Number of additional facet values to fetch when 'More' is clicked

See the pageSize component option.

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 component option.

Maximum number of facet values displayed in the breadcrumb

See the numberOfValuesInBreadcrumb component option.

Computed field

See the computedField component option. Not to be confused with a Sitecore computed index field.

Computed field operation

See the computedFieldOperation component option.

Computed field format

See the computedFieldFormat component option.

Computed field caption

See the computedFieldCaption component option.

Is multi-value field

See the isMultiValueField component option.

Facet uses the AND operator

See the useAnd component option.

Allows user to select the facet operator

See the enableTogglingOperator component option.

Facet accuracy determined by the number of scanned results

See the injectionDepth component option.

Enable 'Save Facet State' option in Settings menu

See the enableSettingsFacetState component option.

Preserve facet position under mouse on new facet query

See the preservePosition component option.

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">
Image showing text facet in published search page | Coveo for Sitecore 5