About the Architecture of Coveo for Sitecore

This page covers the architecture of Coveo for Sitecore. You will learn about its different parts and how they interact with each other. This can be valuable if you need to troubleshoot issues.

The Building Blocks

From a conceptual point of view, Coveo for Sitecore is made of the following building blocks.

Block 1: Coveo Search Provider

This module is deployed as a Sitecore package (ZIP file). The Coveo Search Provider acts as a bridge between Sitecore and the Coveo Platform. It’s responsible for handling queries originating from within Sitecore and for synchronizing your Coveo Cloud indexes with your Sitecore search indexes.

Block 2: Coveo Platform

This module is the service responsible for creating, managing, and maintaining your Coveo index. The Coveo Platform also handles all search queries in the background.

Among other things, it contains:

  • a Push API, which is used to index your Sitecore items.

  • a Sitecore security provider, which handles Sitecore security permissions and lets you find only what you’re allowed to see when you perform a query.

Event Workflow

Depending on the type of action that you trigger in Coveo for Sitecore, a different sequence of events occur under the cover. Here are explained the most common scenarios.

Scenario 1: Rebuilding Your Search Indexes

Rebuilding your search indexes causes these events to occur:

Indexing event sequence

  1. The Sitecore application from where you performed the rebuild (Sitecore Desktop or Content Editor) tells the Search Provider to rebuild the chosen search index (e.g. Coveo_master_index).

  2. The Coveo Search Provider tells the Coveo Platform to create everything necessary on the Coveo side to begin indexing Sitecore items. This includes:

    1. one Coveo field for each one of the Sitecore fields selected in the Fields section of the Coveo Indexing Manager (see About the Indexing Manager - Fields).

    2. a field mapping for each Coveo field to map it to the corresponding Sitecore field.

    3. a source of type Sitecore (e.g. Coveo_master_index - <farmname>).

    4. if the Sitecore security permissions are indexed, an Expanded Sitecore Security Provider (e.g. Expanded Sitecore Security Provider for <farmname>). The Sitecore Security Provider expands security permissions found on Sitecore items.

  3. If Sitecore permissions are indexed, the Coveo Search Provider begins to retrieve the users and roles (known as identities) from Sitecore.

  4. If Sitecore permissions are indexed, the Coveo Search Provider pushes those identities to the Push API.

  5. The Coveo Search Provider begins to retrieve Sitecore items from the database corresponding to the chosen search index (e.g. master).

  6. The Coveo Search Provider pushes those Sitecore items to the Push API.

  7. The Push API indexes those Sitecore items, including their selected fields and their security permissions, if applicable.

Scenario 2: Performing a Query from a Coveo-Powered Search Page Through the Proxy

Performing a query from a Coveo-powered search page with the proxy enabled causes these events to occur:

Query processing using proxy

  1. The Coveo-powered Search Page sends the query to the Coveo for Sitecore REST Endpoint Proxy (typically located at http://<INSTANCE_HOSTNAME>/coveo/rest)

  2. The REST Endpoint Proxy forwards the query to the Coveo Platform Search API Endpoint.

  3. Coveo processes the query and returns only the results that the user is allowed to view (see What’s a Query Pipeline?).

  4. The Coveo Platform returns search results to the REST Endpoint Proxy in a JSON format.

  5. The REST Endpoint Proxy returns the search results to the Coveo-powered Search Page (i.e., the Coveo for Sitecore search interface).

Scenario 3: Performing a Query from a Coveo-Powered Search Page Directly to the Coveo Platform

Coveo for Sitecore (October 30, 2020)

You can now configure Coveo for Sitecore to bypass the REST Endpoint Proxy and have your Coveo-powered search page(s) perform calls directly to the Coveo Platform search endpoint.

Performing a query from a Coveo-powered search page with the proxy disabled causes these events to occur:

Query processing when bypassing proxy

  1. The Coveo-powered Search Page sends the query to the Coveo Platform Search API Endpoint.

  2. Coveo processes the query and returns only the results that the user is allowed to view (see What’s a Query Pipeline?).

  3. The Coveo Platform returns search results to the Coveo Search Page in a JSON format.

Recommended Articles