Solr Sitecore

Sitecore 7 - Inbound and Outbound Filter Pipelines

Sitecore 7 introduces pipelines for controlling a global filter over what goes into the index and what comes out of the index.

public class ApplyInboundIndexVersionFilter : InboundIndexFilterProcessor   
{        
    public override void Process(InboundIndexFilterArgs args)       
    { 
        var item = args.IndexableToIndex as SitecoreIndexableItem;

        if (!item.Item.Versions.IsLatestVersion())            
        {                  
            args.IsExcluded = true;            
        }
    }
}
Sitecore 7 - Inbound and Outbound Filter Pipelines