sitecore Search Create an outbound filter for the search


Example

Outbound filter can be used to filter the search results.

One of the examples of outbound filter usage is removing items which user doesn't have access to from search results.

Outbound filters are set in the configuration:

<indexing.filterIndex.outbound>
 <processor type="Sitecore.ContentSearch.Pipelines.IndexingFilters.ApplyOutboundSecurityFilter, Sitecore.ContentSearch"></processor>
</indexing.filterIndex.outbound>

Example of outbound filter implementation:

public class ApplyOutboundIndexWorkflowFilter : OutboundIndexFilterProcessor   
{        
    public override void Process(OutboundIndexFilterArgs args)       
    { 
        //You can use args.IsExcluded to remove items from the search results here
    }
}

More examples and information could be found on http://www.sitecore.net/learn/blogs/technical-blogs/sitecore-7-development-team/posts/2013/04/sitecore-7-inbound-and-outbound-filter-pipelines.aspx