Identifying the JavaScript Search Framework Version

Before using a new Coveo JavaScript Search Framework component or feature in a search interface, you should typically ensure that the JavaScript Search Framework version on which that search interface relies supports the new component or feature.

You want to use the FacetValueSuggestions component in a Coveo Cloud-based product (e.g., hosted search page, Coveo for Sitecore, Coveo for Salesforce, etc.).

Looking at the corresponding documentation (see Providing Facet Value Suggestions), you notice that this component is only available since the May 2018 Release (v2.4094.8) of the JavaScript Search Framework.

Using one of the methods detailed in this article, you then find out that the product in which you want to use the component relies on a previous release of the JavaScript Search Framework (e.g., June 2018). The FacetValueSuggestions component is thus not yet available in your product.

This article explains how to identify the JavaScript Search Framework version being used in a Coveo Cloud-based product.

Method 1 - From a Search Interface

  1. Access the search interface using your preferred web browser (e.g., Chrome).
  2. Open your web browser developer tools console (e.g., in Chrome, press Control+Shift+J [Windows/Linux], or CMD+ALT+J [Mac]).
  3. In the console prompt, type Coveo.version, then press Enter.

    This returns an object similar to:

    {
      "lib": "2.4710.8",
      "product": "2.4710.8",
      "supportedApiVersion: 2
    }
    

    In the lib and product values above, 1 is the major version, 4710 is the minor version, and 8 is the hotfix version.

  4. Optionally, find the release notes corresponding to the retrieved product value (see JavaScript Search Release Notes).

Method 2 - From the Distribution Files

For an administrator or a developer, when you have access to the CoveoJsSearch.zip distribution file or to the folder containing the Coveo JavaScript Search Framework:

  1. Using a text editor, open the \[JsSearch\_Installation\_Path\]/js/CoveoSearch.js file.
  2. Toward the beginning of the file, locate the Coveo.version function, and note the product value.

    // ...
    (function (Coveo) {
      Coveo.version = {
        "lib" : "1.0.3.23",
        "product": "1.0.20.0",
        "supportedApiVersion": 2
      };
    // ...