Walkthrough: Using a Custom Security Trimmer for Search Results

Enterprise Search in Microsoft Office SharePoint Server 2007 performs query-time security trimming of search results. However, there may be scenarios in which you want to perform custom security trimming. Enterprise Search provides support for these scenarios, as well, through the ISecurityTrimmer interface in the Microsoft.Office.Server.Search.Query namespace.

By implementing this interface, you can create a component to perform custom security trimming of search results before they are returned to the user. The security trimmer registration process allows you to specify configuration properties for the custom security trimmer.

This walkthrough guides you through the steps to implement a basic custom security trimmer, with an optional step that shows you how to implement a configurable limit on the number of content items that will be checked by the trimmer.

Prerequisites

To perform this walkthrough, ensure the following:

  • Microsoft Visual Studio 2005 is installed on your development computer.

  • Microsoft Office SharePoint Server 2007 is installed on your development computer, and you have created a Shared Service Provider.

Completing the Walkthrough

The following topics walk you through creating, deploying, and registering a custom security trimmer for Enterprise Search:

Step 1: Create the Custom Security Trimmer

Step 2: Deploy and Register the Custom Security Trimmer

Step 3 (Optional): Specify a Configurable Limit on the Number of Crawl URLs Checked

See Also

Reference

Microsoft.Office.Server.Search.Query.ISecurityTrimmer
Microsoft.Office.Server.Search.Query.PluggableAccessCheckException

Concepts

Custom Security Trimming for Enterprise Search Results Overview
Enterprise Search Security Model