Using the CDN in Coveo for Sitecore Hive Framework
Using the CDN in Coveo for Sitecore Hive Framework
Coveo for Sitecore 4.1 (March 2018)
The March 2018 version of Coveo for Sitecore 4.1 introduces the possibility to load the Coveo JavaScript Search Framework files using the Content Delivery Network (CDN). This is an alternative to using local files to load it. Moreover, by default, the product now references the CDN files.
For more information about this CDN, see JavaScript Search Framework CDN links.
Using Local Resources
If you want to use the local files in your Sitecore instance instead, you must add a Data Source to your Coveo Search Resource component.
Once added, edit the properties of this data source and check the Use local files for Coveo JavaScript Search Framework property. If you prefer to fetch the Coveo JavaScript Search Framework without the hotfixes, you should use local resources.
Using a CDN
The CDN is updated by the Coveo team when a new version is released. Therefore, if you’re using the CDN, Coveo can push hotfixes into the CDN and the page will automatically be updated.
Moreover, the CDN removes some load on your site and instead requests the file to an external server. Usually, this separation helps to have a more responsive search interface.
Switching Between the CDN and Local Files
To allow loading the Coveo JavaScript Search Framework files from the CDN, make sure you installed the latest version of Coveo for Sitecore (see Downloads and Installing Coveo for Sitecore 4).
From the Content Editor, create a new search page or select an existing one. Open it in the Experience Editor.
- You first need to set a data source for the Coveo Search Resources component. If it already has a data source, you can skip this step
- Find the Coveo Search Resources component, which is usually located at the bottom of the page.
- Click it to display the related options.
-
Choose Add associated content.
- In the configuration window, select Create New Content.
- Select the parent item to put your Data Source and click OK.
-
On your search page, click the orange Coveo icon of the Coveo Search Resources component.
- This will open a dialog page allowing you to edit the renderings data source.
- Leave the Use local files for Coveo JavaScript Search Framework checkbox blank if you want to load Coveo JavaScript Search Framework files using the CDN.
- Leave the CDN version field blank to use the default version of the CDN files.
-
Type the number of your Coveo JavaScript Search Framework version in the CDN version field if you want to reference a more recent version of the Coveo JavaScript Search Framework (see Coveo JavaScript Search Release Notes). The CDN version must be in the
major.minor
format, as in the example below.Coveo can’t guarantee your Coveo for Sitecore version works with a version of the Coveo JavaScript Search Framework that’s more recent than the one your Coveo for Sitecore version has been coded for and tested with.
-
If you prefer to fetch Coveo JavaScript Search Framework files using local files, check the Use local files for Coveo JavaScript Search Framework checkbox. The resources local path field will automatically use
/Coveo/Hive
unless you enter another one in the Resources local path field.This doesn’t affect the Coveo for Sitecore resources files, which are always local.
Therefore, when the box is unchecked, the local path is used to retrieve the Coveo for Sitecore resources files. When the box is checked, the path is used for both the Coveo for Sitecore resources and the Coveo JavaScript Search Framework.