Coveo Search Resources

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.

Coveo for Sitecore Specific Rendering This rendering adds JavaScript and CSS references required to use the Coveo JavaScript Search Framework renderings and the Coveo for Sitecore-specific renderings.

This rendering generates a <div class="CoveoForSitecoreContext"> tag whose attribute values serve primarily to add Sitecore context information (for example, current language, current database) to search queries and result templates.

Usage notes

  • Coveo Search Resources is a mandatory rendering in any Coveo for Sitecore search interface, whether for a complete search page or in a content item layout header simply containing a Coveo Global Searchbox.

Insertion location

Coveo Hive

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

Example insertion sequence for the Coveo Search Resources rendering.

Coveo Hive SXA

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

Example insertion sequence for the Coveo Search Resources rendering.

Data source options

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

Option name Description

Use local files for Coveo JavaScript Search Framework

Use local files for Coveo JavaScript Resources

When selected, Coveo for Sitecore uses the Coveo JavaScript Search Framework files included in the downloaded package. When not selected, Coveo for Sitecore references the Coveo JavaScript Search Framework CDN files.

When selected, Coveo for Sitecore uses the Coveo JavaScript Search Framework and Coveo Hive files included in the downloaded package. When not selected, Coveo for Sitecore references the CDN files (see Understanding How the Coveo JavaScript Files are Loaded (CDN)).

CDN Version

Coveo JavaScript Search Framework CDN Version

Used to select a specific version of the Coveo JavaScript Search Framework CDN files, overriding the Coveo JavaScript Search Framework version that the Coveo for Sitecore package was designed to use. The CDN version must be in the major.minor format (for example, 2.5549).

Important

Coveo can’t guarantee your Coveo for Sitecore package works with a version of the Coveo JavaScript Search Framework that’s different from the one your Coveo for Sitecore version was coded for and tested with.

Resources local path

The path to the Coveo for Sitecore css, image, templates, init, Coveo JavaScript Search Framework and Coveo Hive local files js folders.

Coveo REST endpoint

The path to the Coveo REST endpoint proxy.

When bypassCoveoForSitecoreProxy is set to true, this option isn’t displayed in the data source.

Coveo Analytics endpoint

The path to the Coveo Analytics endpoint proxy.

The Coveo analytics endpoint value must be harmonized with the custom Coveo REST endpoint value you’re using. For example, the following combination of values in a Coveo Search Resources data source is valid:

  • Coveo REST endpoint: /coveo/customendpoint

  • Coveo analytics endpoint: /coveo/customendpoint/ua


When bypassCoveoForSitecoreProxy is set to true, this option isn’t displayed in the data source.

Additional Dictionaries

The additional dictionary folders in which Coveo for Sitecore clients have saved custom Dictionary entry items.

Important

Don’t store custom Dictionary entry items in the /sitecore/system/Dictionary/Coveo Hive folder as this folder is overwritten when upgrading Coveo for Sitecore (see Create a Dictionary for Your Custom Labels).

DOM unique ID

Randomly generated HTML element ID.

Sample Generated HTML

<link rel="stylesheet" href="https://static.cloud.coveo.com/searchui/v2.9159/css/CoveoFullSearch.css">
<link rel="stylesheet" href="https://static.cloud.coveo.com/coveoforsitecore/ui/v0.41.3/css/CoveoForSitecore.css">
<script class="coveo-script" type="text/javascript"
src="https://static.cloud.coveo.com/searchui/v2.9159/js/CoveoJsSearch.Lazy.min.js"></script>
<script class="coveo-for-sitecore-script chromeWithDatasource scEnabledChrome" type="text/javascript"
src="https://static.cloud.coveo.com/coveoforsitecore/ui/v0.41.3/js/CoveoForSitecore.Lazy.js"></script>
<script type="text/javascript" src="https://static.cloud.coveo.com/searchui/v2.9159/js/cultures/en.js"></script>
...
<div id="coveo3a949f41" class="CoveoForSitecoreContext" data-sc-should-have-analytics-component="true"
data-sc-analytics-enabled="true" data-sc-current-language="en" data-prebind-sc-language-field-name="fieldTranslator"
data-sc-language-field-name="z95xlanguage" data-sc-labels="{"Created" : "Created" , "Created by" : "Created by" ,
"Creation time." : "Creation time." , "Language" : "Language" , "Last time modified." : "Last time modified." ,
"Template" : "Template" , "Uniform resource identifier" : "URI" , "Updated by" : "Updated by" ,
"If the problem persists contact the administrator." : "If the problem persists contact the administrator." ,
"Search is currently unavailable" : "Oops! Something went wrong on the server."}"
data-sc-maximum-age="900000" data-sc-page-name="Search-DistanceResource-DistanceRange-HTTPS"
data-sc-page-name-full-path="/sitecore/content/Site4/Search-DistanceResource-DistanceRange-HTTPS"
data-sc-index-source-name="Coveo_web_index - mdes827aMar2020" data-sc-is-in-experience-editor="false"
data-sc-is-user-anonymous="true" data-sc-item-uri="sitecore://web/{444B1C8C-0348-4440-8089-AD7C1C902D4F}?lang=en&amp;ver=2"
data-sc-item-id="444b1c8c-0348-4440-8089-ad7c1c902d4f" data-prebind-sc-latest-version-field-name="fieldTranslator"
data-sc-latest-version-field-name="z95xlatestversion" data-sc-rest-endpoint-uri="/coveo/rest" data-sc-site-name="website"
data-sc-field-prefix="f" data-sc-field-suffix="51395" data-sc-prefer-source-specific-fields="false"
data-sc-external-fields="[{"fieldName":"permanentid","shouldEscape":false}]"
data-sc-source-specific-fields="[{"fieldName":"attachmentparentid"},{"fieldName":"author"},
{"fieldName":"clickableuri"},{"fieldName":"collection"},{"fieldName":"concepts"},{"fieldName":"date"},
{"fieldName":"filetype"},{"fieldName":"indexeddate"},{"fieldName":"isattachment"},{"fieldName":"language"},
{"fieldName":"printableuri"},{"fieldName":"rowid"},{"fieldName":"size"},{"fieldName":"title"},
{"fieldName":"topparent"},{"fieldName":"topparentid"},{"fieldName":"transactionid"},{"fieldName":"uri"},
{"fieldName":"urihash"}]"
data-applied-prebind="true">
</div>