Skip to end of metadata
Go to start of metadata

The indexing and search pipelines allow you to:

  • Modify how Sitecore items are indexed in your search indexes.
  • Modify how and which search results are returned.

Among all pipelines included in Coveo for Sitecore, these are the most commonly customized ones. You can find them in the /configuration/sitecore/pipelines section of the Coveo.SearchProvider.config file.

At the bottom of this page, you can find a series of code samples showing you how to implement your own custom processors for the most commonly customized pipelines. You can also download the complete Visual Studio 2013 solution.

Overview of Pipelines

PipelinePurposeDescriptionProcessors included by defaultIs typically customized?
coveoItemProcessingPipelineItem pre-processingUsed to pre-process Sitecore items, allowing you to reject them, create entirely new virtual items based on them, or fetch associated items (see the RelatedItemPreProcessor code sample below). Input and ouput items are of type  Sitecore.ContentSearch.IIndexable. Received items have not been processed by the Coveo Search Provider yet.NoneYes
coveoPostItemProcessingPipelineItem post-processingUsed to post-process Sitecore items, allowing you to perform various customizations (see the TranslatedItemPostProcessor code sample below). Processors added to this pipeline have access to the original IIndexableItem object and to the pre-processed item as well (and thus to all fields added by the Coveo Search Provider). Input and output items are of type Coveo.AbstractLayer.RepositoryItem.CoveoIndexableItem.Coveo.SearchProvider.Processors.AddCoveoVersionTagYes
coveoFieldConverterPipelineField processingUsed to filter out fields and format the remaining ones in a format recognized by the Coveo index (as specified in the fieldMap section of the Coveo Search Provider configuration).Coveo.SearchProvider.Processors.SkipMetadataNamesProcessor
Coveo.SearchProvider.Processors.FieldValueConverterProcessor
No
contentSearch.getContextIndexContext utilitiesUsed to determine the name of the search index corresponding to the currently selected Sitecore item or database.Coveo.SearchProvider.Processors.FetchCoveoIndexNo
coveoFieldNameTranslatorPipelineField processingUsed to  translate a Sitecore field name to its equivalent name in the Coveo index (e.g. Title becomes @ftitle87624, where '87624' is a hash value computed from the name of the Coveo source corresponding to the current search index).Coveo.AbstractLayer.Pipeline.CoveoFieldNameTranslatorProcessorNo
coveoAutomaticBoostingPipelineAnalytics-based rankingUsed to automatically adjust the ranking of search results based on the browsing history of the current user, which is stored in the Sitecore Analytics database.Coveo.SearchProvider.Processors.AutomaticBoostingProcessorNo

coveoIndexingGetFields
Fields set pre-processing

Used to determine which fields will be indexed by Coveo. Reducing the amount of indexed fields results in faster indexing and search queries, as indexed documents are smaller.

 

The Coveo.AbstractLayer.Processors.Indexing.Fields.AddTemplateFieldsProcessor processor invokes the coveoIndexingGetTemplates pipeline to retrieve a list of templates from which the fields are extracted.

Coveo.AbstractLayer.Processors.Indexing.Fields.AddSpecialFieldsProcessor
Coveo.AbstractLayer.Processors.Indexing.Fields.AddComputedFieldsProcessor
Coveo.AbstractLayer.Processors.Indexing.Fields.IncludeFieldsFromConfigOnlyProcessor
Coveo.AbstractLayer.Processors.Indexing.Fields.AddCoveoFieldsProcessor
Coveo.AbstractLayer.Processors.Indexing.Fields.AddTemplateFieldsProcessor
Coveo.AbstractLayer.Processors.Indexing.Fields.AddAnalyticsFieldsProcessor
Coveo.AbstractLayer.Processors.Indexing.Fields.AddExternalFieldsProcessor
Coveo.AbstractLayer.Processors.Indexing.Fields.AddFieldMapFieldsProcessor
Coveo.AbstractLayer.Processors.Indexing.Fields.ExcludeFieldsFromConfigProcessor

Yes

coveoIndexingGetTemplates

Fields set pre-processing

Used to determine which templates will be indexed by Coveo. Reducing the number of templates to index results in faster indexing because less items will be indexed. It also reduces the amount of indexed fields.

 

The coveoIndexingGetTemplates pipeline is invoked by the Coveo.AbstractLayer.Processors.Indexing.Fields.AddTemplateFieldsProcessor processor which is executed by the coveoIndexingGetFields pipeline.

Coveo.AbstractLayer.Processors.Indexing.Templates.IncludeTemplatesFromConfigOnlyProcessor
Coveo.AbstractLayer.Processors.Indexing.Templates.AddAllTemplatesProcessor
Coveo.AbstractLayer.Processors.Indexing.Templates.ExcludeTemplatesFromConfigProcessor

Yes
coveoBeforeUpdateFieldSetPipelineFields set pre-processingUsed to pre-process Sitecore fields before they are added to their corresponding fields set in the Coveo index (see the BeforeUpdateFieldSetProcessor code sample below). This allows you to programmatically make fields facettable, sortable, or multi-values just like you can do via the fieldMap section of the Coveo Search Provider configuration.NoneYes
coveoQueryFieldPipelineLINQ field processingUsed to include or exclude which fields should be returned in LINQ query results.Coveo.SearchProvider.Processors.Queries.AddAllFieldsProcessor
Coveo.SearchProvider.Processors.Queries.AddBasicFieldsProcessor
Coveo.SearchProvider.Processors.Queries.AddVirtualFieldsProcessor
Coveo.SearchProvider.Processors.Queries.AddFieldsRelatedToSearchTypeProcessor
Yes
coveoInboundFilterPipelineItem filteringUsed to define inbound filter processors. Inbound filters are used to filter out items from your search indexes based on some condition. Unlike the indexing.filterIndex.inbound pipeline, this pipeline only applies to Coveo indexes.

Coveo.SearchProvider.InboundFilters.ApplySitecoreInboundFilterProcessor

Coveo.SearchProvider.InboundFilters.ItemPathInboundFilter
Coveo.SearchProvider.InboundFilters.IndexLatestVersionInboundFilter

 

Yes

indexing.filterIndex.inbound

Item filteringUsed to define inbound filter processors. Inbound filters are used to filter out items from your search indexes based on certain conditions (see the ExcludeStandardValuesItemsProcessor code sample below). Be aware that processors added to this pipeline may conflict with those defined in the same pipeline in the Sitecore.ContentSearch.config file, so you may need to remove them or comment them out. This pipeline requires the ApplySitecoreInboundFilterProcessor processor to be defined in coveoInboundFilterPipeline in order to be applied to Coveo indexes.Coveo.SearchProvider.InboundFilters.ItemPathInboundFilter
Coveo.SearchProvider.InboundFilters.IndexLatestVersionInboundFilter
Yes

Adding a Processor to coveoItemProcessingPipeline

The following code sample shows you how to index a Sitecore item along with its related items. In this case, you can decide which items are related to the original one. You will however need to adapt this code sample to make it work in your own environment.

Adding a Processor to coveoPostItemProcessingPipeline

The following code sample shows you how to index entirely virtual items (i.e. items that do not exist in Sitecore) based on existing items.  Again, you will need to adapt this code sample to make it work in your own environment.

Adding a Processor to coveoBeforeUpdateFieldSetPipeline

The following code sample shows you how to pre-process Sitecore fields before they are added to a Coveo fields set. The NumericField1 field comes from some Sitecore template; Coveo for Sitecore makes it facettable. Again, you will need to adapt this code sample to make it work in your own environment.

Adding a Processor to indexing.filterIndex.inbound

The following code sample shows you how to filter out items from your search indexes. In this case, the items named __Standard Values are excluded. Normally, you will not need to adapt this code sample to make it work in your own environment.

Using the coveoInboundFilterPipeline

The advantage of using this pipeline over Sitecore's indexing.filterIndex.inbound pipeline is that its filters can be applied to specific Coveo indexes. In other words, indexes can be included or excluded from a processor's scope.

By default, a processor defined in this pipeline is applied to all Coveo indexes. To apply a processor only to specific indexes, specify those indexes name under a includedIndexNames node as follows.

To apply a processor to all but certain specific indexes, specify the name of those indexes under a excludedIndexNames node as follows.

Icon

If an index is specified in both lists, the filter will not be applied to this index.

Adding a Processor to coveoInboundFilterPipeline

The following code sample shows how you can filter out items from your search indexes. In this case, the items named __Standard Values are excluded. Normally, you will not need to adapt this code sample to make it work in your own environment.


  • No labels