THIS IS ARCHIVED DOCUMENTATION

Synchronizing Top Results Automatically

On-Premises only

With Coveo Cloud, Top Results have been renamed Featured Results and are managed from the Query Pipelines. See Manage Featured Result Rules.

Top Results are configured using Sitecore items, but they need to be replicated in CES. Most of the time, you won’t need to worry about it because Coveo for Sitecore enables a recurrent task that does it for you.

The task is defined in the Coveo.SearchProvider.config file and is scheduled to run every minute to synchronize Top Results from both the master and web databases. The XML snippet below shows the default configuration.

<scheduling>
  <agent type="Coveo.SearchProvider.Agents.SynchronizeTopResults, Coveo.SearchProviderBase" method="Run" interval="00:01:00">
    <DatabasesToSynchronize>master;web</DatabasesToSynchronize>
  </agent>
</scheduling>

Configuring the Interval Task Attribute

The Interval attribute receives a TimeSpan type and can be easily configured. Depending on your needs, you may want to adjust the frequency of the task. Increasing the task frequency keeps the Top Results better synchronized. However, increasing the task frequency too much puts more pressure on the database, which might hurt the overall performance of your Sitecore instance.

Configuring the DatabasesToSynchronize Parameter

The parameter receives a semicolon-separated list of databases to synchronize. For example, to synchronize Top Results from master,web, and pub databases, you would set the parameter as follows.

<DatabasesToSynchronize>master;web;pub</DatabasesToSynchronize>

Configuring Different Intervals for Databases

To use different interval depending on the database, you can define two agents instead of one. In this example, the Top Results are synchronized every 10 minutes for the master database and daily for the web database.

<scheduling>
  <agent type="Coveo.SearchProvider.Agents.SynchronizeTopResults, Coveo.SearchProviderBase" method="Run" interval="00:10:00">
    <DatabasesToSynchronize>master</DatabasesToSynchronize>
  </agent>
  <agent type="Coveo.SearchProvider.Agents.SynchronizeTopResults, Coveo.SearchProviderBase" method="Run" interval="1.00:00:00">
    <DatabasesToSynchronize>web</DatabasesToSynchronize>
  </agent>
</scheduling>

What’s Next?