--- title: Create a custom coveoInboundFilterPipeline processor slug: '2241' canonical_url: https://docs.coveo.com/en/2241/ collection: coveo-for-sitecore-v5 source_format: adoc --- # Create a custom coveoInboundFilterPipeline processor Coveo inbound filters work exactly like Sitecore inbound filters but are adapted for a Coveo for Sitecore installation. They're applied only to the Coveo indexes and you can even choose to which indexes you want to apply them. > **Important** > > If excluded items were previously indexed, you must rebuild the index to delete them. > Filters don't delete items from the index, they only filter them out as they're indexed. ## Creating a `coveoInboundFilterPipeline` processor Coveo inbound filters must: * Inherit the `AbstractCoveoInboundFilterProcessor` class. * Take arguments of type `CoveoInboundFilterPipelineArgs`. * Invoke the `ShouldExecute` method to validate if the processor needs to be run. The following example shows you how to code your own Coveo inbound filter processor, to be called for each item only indexed in the Coveo indexes. This processor is used to exclude the items named `__Standard Values`. . Create a new C# project that references the `Sitecore.ContentSearch.dll`, the `Sitecore.Kernel`, the `Coveo.Framework.dll`, and the `Coveo.SearchProviderBase.dll` assemblies. Those assemblies are located under: `\website\bin`. For this tutorial, the project is named `InboundFilterTest`. . Create a new class. For this tutorial, the class is called `ApplyCoveoInboundIndexStandardValuesFilter` and is located in the `InboundFilterTest` namespace. . Use the code below for the `ApplyCoveoInboundIndexStandardValuesFilter` class. [source,c#] ``` using Coveo.SearchProvider.Pipelines; using Coveo.SearchProvider.InboundFilters; namespace InboundFilterTest { public class ApplyCoveoInboundIndexStandardValuesFilter : AbstractCoveoInboundFilterProcessor { public override void Process(CoveoInboundFilterPipelineArgs args) { if (args.IndexableToIndex != null && !args.IsExcluded && ShouldExecute(args)) { if (args.IndexableToIndex.Item.Name == "__Standard Values") { args.IsExcluded = true; } } } } } ``` ## Adding the `coveoInboundFilterPipeline` processor to the pipeline . Open the `Coveo.SearchProvider.Custom.config` file. . Locate the `coveoInboundFilterPipeline` node. . Add your processor as a child node: ```xml ``` . Validate that the standard values items are excluded from the indexing operations. ## Restricting the processor to a specific index It's possible to define two lists in the configuration of Coveo Inbound filters: * Included indexes: the list of indexes the processor is applied to. * Excluded indexes: the list of indexes the processor isn't applied to. > **Note** > > Exclusion has priority over inclusion. > This means that if the same index is specified both in inclusion and exclusion, the processor isn't applied in the index. To define which indexes are filtered, specify the following indexes in your processor definition: ```xml Coveo_web_index Coveo_master_index ```