THIS IS ARCHIVED DOCUMENTATION

Disabling the Master Database On Sitecore 9 CD Servers

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

In our many CM and CD server example setup, this entails 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 now 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 App_Config\Modules\Coveo\Coveo.SearchProvider.config file as follows:

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

This is why the SwitchMasterToWeb.config Sitecore and Coveo for Sitecore files are no longer necessary. Hence, Coveo for Sitecore package configuration files no longer include SwitchMasterToWeb.Coveo.config.example and step 4 in Deploying Coveo for Sitecore on the Content Delivery Servers can be skipped.