Coveo Numeric Facet Range

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 Numeric Facet Range is now recommended over the Coveo Numeric Facet Range rendering.

Implements the Coveo JavaScript Search Framework FacetRange component to display a facet whose values are expressed as numeric ranges.

Usage notes

  • The Sitecore field used as the data source Field value must be included for indexing in the Templates table of the Indexing Manager (see About the Indexing Manager - Fields).

  • To use the Coveo Numeric Facet Range rendering with custom numeric ranges, you first need to create a content tree structure, such as the one below, containing a Custom Numeric Ranges item with children Numeric Range items. This structure can be placed anywhere in the content tree. You will reference the location of the Custom Numeric Ranges item in the Facet value ranges data source option (see Configure custom ranges for a date range or numeric range facet).

    Dyn Numeric Facet Range required items | Coveo for Sitecore 5
  • Any change to the facet range value selections triggers a new Search API call.

  • You can customize the CSS associated with this rendering.

Insertion location

Coveo Hive

The Coveo Numeric Facet Range rendering is an Allowed Control in the following placeholder(s): Facets

Example insertion sequence for the Coveo Numeric Facet Range rendering.

Coveo Hive SXA

Coveo for Sitecore SXA rendering insertion locations aren't limited by placeholder Allowed Controls. The Coveo Numeric Facet Range rendering may therefore be inserted throughout the partial design, whether in Coveo for Sitecore or Sitecore placeholders.

Example insertion sequence for the Coveo Numeric Facet Range 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

This option is exposed for legacy reasons.

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

This option is exposed for legacy reasons. It’s not recommended to use it. Specifies if the facet should push data to the Omnibox component.

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

Sets the injectionDepth component option to a preset value.

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.

Facet value ranges

Specifies whether to use automatically generated numeric ranges or custom numeric ranges created in Sitecore.

DOM unique ID

Randomly generated HTML element ID.

Additional data attributes

Allows use of the Coveo JavaScript Search Framework FacetRange component options that aren’t directly available in the data source.

Sample generated HTML and corresponding visual output

<div id="coveod863082c" class="CoveoFacetRange"
data-available-sorts="alphaascending,alphadescending,occurrences,score"
data-value-caption="{"range1" : "Under $100" , "range2" : "$100 - $250" , "range3" : "$250 - $500" ,
"range4" : "$500 - $1000" , "range5" : "Over $1000"}"
data-prebind-field="fieldTranslator" data-field="@saleprice" data-injection-depth="1000"
data-sort-criteria="alphaascending" data-title="Sale Price"
data-ranges="[{"start":"0","end":"100","endInclusive":false,"label":"range1"},
{"start":"100","end":"250","endInclusive":false,"label":"range2"},
{"start":"250","end":"500","endInclusive":false,"label":"range3"},
{"start":"500","end":"1000","endInclusive":false,"label":"range4"},
{"start":"1000","end":"1000000","endInclusive":false,"label":"range5"}]"
data-date-field="false" data-applied-prebind="true">
Facet Range sample | Coveo for Sitecore 5