Product DocsMenu

Coveo Platform 6.5 >
Administrator Help > Connectors > Sitecore Connector > Enabling Live Indexing on a Database

Enabling Live Indexing on a Sitecore Database

The Coveo connector for Sitecore supports live indexing to allow your Sitecore source to remain up-to-date as Sitecore content changes (see Toggling Live Indexing for a Source).

Live Indexing uses the History Engine feature of Sitecore that tracks changes. When it is enabled in your Sitecore web.config file for the database that the connector source targets, modified items are logged by Sitecore into the dbo.History table with a timestamp. The event handler that comes with the Coveo web service plugin establishes the link with the Sitecore History Engine.

To enable live indexing on a Sitecore database

  1. Using and administrator account, connect to the Sitecore server.

  2. If not already done, install the Coveo web service plugin (see Installing the Coveo Web Service Plugin in Sitecore).
  3. Using a text editor:

    1. Open the Sitecore web.config file.

      Note: It is recommended to make a backup of the web.config file before editing it.

    2. In the <database> section for the desired website, add the Engines.HistoryEngine.Storage section as shown in the following example.

      Example: When your Sitecore source targets the site named website and the database serving this site is named web:

      <database id="web" singleInstance="true" type="Sitecore.Data.Database, 
      …
        <Engines.HistoryEngine.Storage>
          <obj type="Sitecore.Data.$(database).$(database)HistoryStorage, Sitecore.Kernel">
            <param connectionStringName="$(id)"/>
            <EntryLifeTime>30.00:00:00</EntryLifeTime>
          </obj>
        </Engines.HistoryEngine.Storage>
      …
      </database> 
      
    3. In the <events> section, add the following lines:

      <event name="item:deleting">
        <handler type="Coveo.Connectors.Sitecore2.SitecoreEventHandler.EventHandler, Coveo.Connectors.Sitecore2.SitecoreEventHandler" method="OnItemDeleting" />
      </event>
      <event name="item:moving">
        <handler type="Coveo.Connectors. Sitecore2 .SitecoreEventHandler.EventHandler, Coveo.Connectors.Sitecore2.SitecoreEventHandler" method="OnItemMoving" />
      </event>  
    4. Save the file.

What's Next?

When you want to index Sitecore permissions, create a user identity for the Sitecore crawling account (see Adding a User Identity) and a Sitecore security provider (see Configuring a Sitecore Security Provider).