About the Architecture

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 Coveo. It’s responsible for handling queries originating from within Sitecore and for synchronizing your Coveo indexes with your Sitecore search indexes.

Block 2: Coveo

This module is responsible for creating, managing, and maintaining your index. Coveo 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 | Coveo for Sitecore 5
  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 Coveo 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 Hive Search Page Through the Proxy

Performing a query from a Coveo Hive search page when the Coveo for Sitecore REST Endpoint Proxy (typically located at http://<INSTANCE_HOSTNAME>/coveo/rest) is enabled causes these events to occur:

Query processing using proxy | Coveo for Sitecore 5
Note

When a user requests a Coveo-powered search page, a client-side process generates a search token using the API key and the user identities. The token is visible to the user in search page calls, but the API key isn’t.

  1. The Coveo 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 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. Coveo returns search results to the REST Endpoint Proxy in a JSON format.

  5. The REST Endpoint Proxy returns the search results to the Coveo Search Page.

Scenario 3: Performing a Query from a Coveo Hive Search Page Directly to Coveo

You can now configure Coveo for Sitecore to bypass the REST Endpoint Proxy and have your Coveo Hive search pages perform calls directly to the Coveo Search API endpoint.

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

Query processing when bypassing proxy | Coveo for Sitecore 5
Note

When a user requests a Coveo-powered search page, a client-side process generates a search token using the API key and the user identities. The token is visible to the user in search page calls, but the API key isn’t.

  1. The Coveo Search Page sends the query to the Coveo 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. Coveo returns search results to the Coveo Search Page in a JSON format.