The Coveo JavaScript Search Framework, currently at version 2.10125.2, provides a comprehensive set of pre-built UI components for creating search interfaces powered by the Coveo Platform. Developed in TypeScript and shipping with integrated type definitions, it facilitates robust and type-safe development. The framework exhibits a very frequent release cadence, with minor versions often released daily, reflecting active maintenance. Its core differentiator lies in a declarative approach to building search UIs, primarily utilizing HTML data attributes for components and a global `Coveo` object for programmatic control and initialization. This abstracts much of the direct interaction with the underlying search API. While actively maintained, Coveo now advises developers to use its more modern, framework-agnostic Atomic or Headless libraries for new projects, as `coveo-search-ui` is explicitly in maintenance mode.
npm install coveo-search-uiVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates the foundational setup of a Coveo search interface using `coveo-search-ui`. It includes configuring the cloud endpoint with an API key and organization ID, defining essential search components via HTML classes, and initializing the framework.
For new implementations, evaluate `@coveo/atomic` or `@coveo/headless`. For existing projects, be aware that new features are unlikely to be added, and focus will be on bug fixes and critical updates.
Consult the official 'Version 1.x to 2.x breaking changes and upgrade guidelines' documentation. Thoroughly test existing custom components and integrations after upgrading.
Configure the `accessToken` option in `Coveo.init()` to accept a function that asynchronously fetches and returns a fresh search token when needed. This allows the framework to automatically renew the token.
Review `DynamicFacet` and `DynamicHierarchicalFacet` implementations. If previous behavior (where `filterFacetCount` was `false` by default) is desired, explicitly set `data-filter-facet-count='false'` on the component's HTML element.
Adjust any custom Usage Analytics reports or integrations that rely on the `notifications` trigger or `customData.executed` to reflect the new `executions` array format.
Pass a function to the `accessToken` option of `Coveo.init()` that returns a promise resolving to a new token. The framework will call this function automatically when the token needs renewal. Do not call `Coveo.init()` multiple times on the same root element.
Ensure that `CoveoJsSearch.min.js` (or its lazy equivalent) is loaded via a `<script>` tag in your HTML *before* any inline scripts that use `Coveo`, or that your module bundler correctly includes `coveo-search-ui` and the `import * as Coveo from 'coveo-search-ui'` statement is at the top of your relevant module.
Upgrade to Coveo for Salesforce package version 3.31 or later, which includes a fix. As a workaround, add a custom script to override `Coveo.SearchInterface.prototype.setupMobileFastclick` to an empty function.
Review Sitecore logs for specific initialization failures or `NullReferenceException` details. Ensure all Coveo for Sitecore components are correctly installed, configured, and that indexes are initialized and accessible. Rebuilding indexes may resolve the issue.
No dependency data recorded yet.