Root Element of a Crawler for a Coveo Index is Invalid


  1. Coveo for Sitecore (September 2016)

    When looking at the Coveo Diagnostic Page, you see the following error:

     The root element of one or more crawlers for a Coveo index is invalid.

  2. When rebuilding, you get this message:

     Job has finished unexpectedly: Index_update_IndexName=<NAME_OF_INDEX> See the log file for more details

  3. When indexing or publishing, you see this error in your logs:

     Exception: System.InvalidOperationException
     Message: [Index=SpecificCoveoIndex, Crawler=SitecoreItemCrawler, Database=TheDatabase] Root item couldn't be found: <TheRootItem>.
     Source: Sitecore.ContentSearch
        at Sitecore.ContentSearch.SitecoreItemCrawler.get_RootItem()
        at Sitecore.ContentSearch.SitecoreItemCrawler.GetIndexableRoot()
        at Sitecore.ContentSearch.HierarchicalDataCrawler`1.RebuildFromRoot(IProviderUpdateContext context, IndexingOptions indexingOptions, CancellationToken cancellationToken)
        at Sitecore.ContentSearch.Crawler`1.RebuildFromRoot(IProviderUpdateContext context, IndexingOptions indexingOptions)
        at Coveo.SearchProvider.ProviderIndex.<>c__DisplayClass40.<Rebuild>b__3f(IProviderCrawler crawler)
        at Coveo.SearchProvider.ProviderIndexBase.PerformRebuild(IProviderUpdateContext p_Context, Action`1 p_CrawlerAction)


This issue occurs if an item used as a root for a Coveo crawler was deleted or doesn’t exist.


To know exactly which root of which crawler is invalid, check the message in your logs.

Coveo for Sitecore (September 2016)

You can now more simply go to the Diagnostic page and click Show details on the Coveo Index Crawler component (see screenshot of the first symptom).

For each crawler in error, there are three options:

  1. Put the item used as the crawler root back into your solution.

  2. Change the crawler root via the Website\App_config\Include\Coveo\Coveo.SearchProvider.Custom.config file. For more information on how to change a crawler root, see Changing the Crawling Root of an Index.

    Be careful when choosing a new crawling root, as you don’t want to index undesired items.

  3. Remove the crawler completely if it’s not useful for you. In this case, the best way to do it would be to add patch:delete on the crawler you want to remove in the Website\App_config\Include\Coveo\Coveo.SearchProvider.Custom.config file.

    Add the following line at node contentSearch/configuration/indexes/index id="<SPECIFIC_COVEO_INDEX>"/locations/crawler name="<INVALID_CRAWLER_NAME>":

     <patch:delete />