Out-of-the-Box Item Indexing Filtering

The purpose of this article is to provide you with information on the default item filtering for Coveo indexes. This will let you know why, by default, certain Sitecore items aren’t sent to the Coveo indexes. This may perhaps also save you some time in configuring unnecessary filtering.

Default Coveo Index Crawling Roots

By default, Coveo for Sitecore indexes all items under /sitecore/content, as well as all items under /sitecore/media library/Files. These settings can easily be modified (see Change the Crawling Root of an Index).

Out-of-the-Box Filtering

By default, the Coveo.SearchProvider.config file <coveoInboundFilterPipeline> element contains enabled <processor> elements that automatically filter out certain Sitecore items from Coveo indexes. These processors exclude the following items from being indexed in Coveo:

  • items targeted by the processors defined in the Sitecore <indexing.filterIndex.inbound> pipeline,

  • all Coveo component data source items,

  • all but the latest version of each of your Sitecore items.

Having your Sitecore <indexing.filterIndex.inbound> pipeline processors applied on all your indexes, including the Coveo indexes, may or may not suit your needs. You can change Sitecore and Coveo for Sitecore configurations to apply some of your Sitecore <indexing.filterIndex.inbound> pipeline processors only to Coveo indexes (see Apply Sitecore Inbound Filters Only to Coveo Indexes).

Apply Sitecore Inbound Filters Only to Coveo Indexes

By default, Coveo for Sitecore filters some Sitecore items from Coveo indexes. This filtering is the result of processors called in the <coveoInboundFilterPipeline> pipeline of the Coveo.SearchProvider.config file.

Two of these Coveo processors actually can be used in conjunction with your Sitecore <indexing.filterIndex.inbound> pipeline processors. The declaration of these two processors, the ApplySitecoreInboundFilterProcessor and the InvokeSitecoreInboundFilterPipeline processors, are shown below.

<coveoInboundFilterPipeline>
  <processor type="Coveo.SearchProvider.InboundFilters.ApplySitecoreInboundFilterProcessor, Coveo.SearchProviderBase" />
  <!-- ... -->
  <!-- This processor executes the processors located in the coveoSitecoreInboundFilterPipeline pipeline below. -->
  <processor type="Coveo.SearchProvider.InboundFilters.InvokeSitecoreInboundFilterPipeline, Coveo.SearchProviderBase" />
</coveoInboundFilterPipeline>
<!-- Pipeline used to execute Sitecore inbound filter processors. This pipeline is run by the InvokeSitecoreInboundFilterPipeline processor in the coveoInboundFilterPipeline pipeline. -->
<!-- Add your existing Sitecore inbound filter processors to be run only on Coveo indexes. -->
<coveoSitecoreInboundFilterPipeline>
</coveoSitecoreInboundFilterPipeline>

Difference Between <coveoInboundFilterPipeline> and <coveoSitecoreInboundFilterPipeline>

The <coveoInboundFilterPipeline> pipeline is the only one that’s run only for Coveo indexes, therefore leaving other indexes (e.g., Lucene, Solr) untouched. However, the <coveoInboundFilterPipeline> pipeline doesn’t use the same type of arguments as the Sitecore <indexing.filterIndex.inbound> pipeline. Therefore, you can’t simply move your Sitecore <indexing.filterIndex.inbound> pipeline processor declarations into the <coveoInboundFilterPipeline> pipeline to have your Sitecore indexing filters applied solely on Coveo indexes.

The <coveoSitecoreInboundFilterPipeline> pipeline, on the other hand, uses the same type of arguments as the Sitecore <indexing.filterIndex.inbound> pipeline. You can therefore insert your Sitecore <indexing.filterIndex.inbound> pipeline processor declarations in this pipeline and they will be executed. Additionally, the arguments passed to the <coveoSitecoreInboundFilterPipeline> pipeline contain the targeted indexes, i.e., only the Coveo indexes.

Applying Sitecore <indexing.filterIndex.inbound> Pipeline Processors Only Against Coveo Indexes

Given the ApplySitecoreInboundFilterProcessor processor calls the execution of all processors in the Sitecore <indexing.filterIndex.inbound> pipeline, whereas you can specify Sitecore <indexing.filterIndex.inbound> pipeline processors you want to execute individually in the <coveoSitecoreInboundFilterPipeline> pipeline, you should decide where to declare your Sitecore <indexing.filterIndex.inbound> pipeline processors as follows:

  • If you’re sure that you want to apply the associated filtering to all indexes (e.g., Coveo, Lucene, Solr, Azure Search), leave your existing Sitecore inbound filtering processor declaration in the Sitecore <indexing.filterIndex.inbound> pipeline .

  • If you want to apply the associated filtering only to Coveo indexes, move your existing Sitecore inbound filtering processor declaration to the Coveo <coveoSitecoreInboundFilterPipeline> pipeline.

Use the Coveo pipelines to avoid affecting other indexes used by Sitecore.

If excluded items were previously indexed, you must rebuild the index to delete them.

What's Next for Me?