Disable the master database on CD servers

Sitecore 9 introduced rules based configuration. This approach lets you define the server role in the Sitecore web.config file and subsequently apply configurations on a per-role basis.

In our multi-CM, multi-CD server example setup, this implies that you have already included the following line in the web.config files of your CD servers:

<add key="role:define" value="ContentDelivery" />

Coveo for Sitecore leverages the server role out of the box when applying configurations through role:require attributes. Index-related operations are therefore disabled on CDs in the <SITECORE_INSTANCE_ROOT>\App_Config\Modules\Coveo\Coveo.SearchProvider.config file as follows:

    <indexes hint="list:AddIndex">
        <index role:require="!ContentDelivery" id="Coveo_master_index" type="Coveo.SearchProvider.ProviderIndex, Coveo.SearchProvider" patch:before = "*[1]">
    <agent role:require="!ContentDelivery" name="CoveoSynchronizeTopResults" type="Coveo.SearchProvider.Agents.SynchronizeTopResults, Coveo.SearchProviderBase" method="Run" interval="00:01:00">