Coveo Search Interface

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.

Implements the Coveo JavaScript Search Framework SearchInterface component. The SearchInterface component is the root and main component of a Coveo-powered search page.

The new Filter results based on the current Sitecore context database option lets you control whether to add a filter on the current Sitecore context database in the constant query expression (cq). Prior to the October 30, 2020 release, search results and recommendations were automatically filtered on the current Sitecore context database using a source==<SITECORE_SOURCE_NAME> filter in the advanced query expression (aq).

Usage notes

  • The Coveo Search Interface rendering automatically adds the Automatic Boosting, Query Filter, Query Ranking, and Sitecore Instance Filter renderings to the page. These renderings are configured through the Coveo Search Interface data source.

  • Some features of the Automatic Boosting, Query Filter, and Query Ranking renderings are only available with the Enterprise Edition.

  • You can customize the CSS associated with this rendering.

Insertion location

Coveo Hive

The Coveo Search Interface rendering is an Allowed Control in the following placeholder(s): Coveo UI.

Example insertion sequence for the Coveo Search Interface rendering.

Coveo Hive SXA

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

Example insertion sequence for the Coveo Search Interface rendering.

Data source options

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

Option name Description

Filter expression rules

See the Query Filter rendering.

Filter results based on the current Sitecore context database

See the Sitecore Instance Filter rendering data source options.

Filter results on the current context language

See the Sitecore Instance Filter rendering data source options.

Filter results on the latest version

See the Sitecore Instance Filter rendering data source options.

Exclude bucket folders in results

See the Query Filter rendering data source options.

Exclude media folders in results

See the Query Filter rendering data source options.

Boost expression rules

See the Query Ranking rendering.

Enable automatic boosting

See the Automatic Boosting rendering.

Query pipeline

See the pipeline component option.

Results per page

See the resultsPerPage component option.

Excerpt length

See the excerptLength component option.

Maximum age

See the maximumAge component option.

Automatically trigger first query

See the autoTriggerQuery component option.

Hide until first query

See the hideUntilFirstQuery component option.

Enable history

See the enableHistory component option.

Names of external content sources

See the External Content rendering.

Custom CSS classes

See Insert Custom CSS.

Initialization file name

See Custom Initialization Scripts.

DOM unique ID

Randomly generated HTML element ID.

Additional data attributes

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

Sample generated HTML

<div id="coveo5c7ed6eb" class="CoveoSearchInterface Coveostate CoveoComponentState
CoveoComponentOptions CoveoQueryController CoveoHistoryController CoveoDebug
coveo-after-initialization" data-enable-history="true"
data-prebind-maximum-age="currentMaximumAge" data-applied-prebind="true"
data-maximum-age="0" style="display: block;"
data-coveo-for-sitecore-syntax-event-registered="true"
data-coveo-for-sitecore-event-registered="true">