Search and Process Overview

Search and process operations enable you to use Microsoft Office SharePoint Server 2007 to perform a search query, and then perform a specific, custom action upon each list item returned by the query. For example, you might need to identify a certain set of documents, based on specific document metadata, and then move those documents into a records repository.

In addition, you can specify a list of people who are sent an e-mail message with the results of the search and process operation.

Note

The search and process results are sent in e-mail using the standard Windows SharePoint Services 3.0 mechanism. You must configure the appropriate Windows SharePoint Services 3.0 e-mail settings for the search and process results to be sent. For more information, see the Microsoft Windows SharePoint Services 3.0 SDK.

You can perform search and process operations only programmatically.

The search and process functionality in Office SharePoint Server 2007 is exposed through the Microsoft.Office.RecordsManagement.SearchAndProcess namespace. This namespace includes the following interface and class:

  • IProcess interface. Each assembly you create to process items as part of a search and process operation must implement this interface.

  • SearchAndProcessItem class. This class represents the search and process operation that you want to execute, and includes a method to initiate the operation.

Executing the Search and Process Operation

Following are the steps, in brief, that describe how Office SharePoint Server 2007 executes search and process operations.

For more information about how to create search and process operations, including how to create an assembly for custom processing of list items, see Search and Process Development Process.

Note

This discussion assumes the developer has already created an assembly to perform the custom processing he or she wants on the list items returned by the search query.

  1. The user programmatically constructs an object that represents the search and process operation he or she wants to run. This object includes properties that specify the search query to use, the assembly class to call to process the items, and the users to notify of the results. The user then programmatically adds the search and process operation to the Office SharePoint Server 2007 master timer job.

    The search and process operation is created as a one-time, asynchronous timer job. The operation executes the search query and generates a return set of matching list items. The search query is executed using the credentials of the user who created the operation, using the Search provider registered with the specified site.

  2. The operation generates a list of the list items and documents included in the return set. Search results that are not list items, such as sites, are not included on this list, and are not processed.

  3. The operation calls the specified assembly class for each list item in the return item list. The assembly class processes each list item separately, and returns status on whether the processing was completed successfully. The assembly class can also return detailed processing information for each list item it processes.

  4. After the search and process operation has called the specified assembly class on all the items in the search return set, Office SharePoint Server 2007 generates a report of the results, with detailed processing results for each list item in the return set. It then sends an e-mail message with the report to the specified users.

Reporting on the Search and Process Operation

The header section of the report that Office SharePoint Server 2007 sends in an e-mail message includes the following information:

  • Search and process operation name

  • Search query used

  • Time the operation was created and completed

  • Number of items processed

The detail section includes a table that lists each item that was processed and the results, including the following:

  • Item title, formatted as a link to the item itself

  • Whether or not the processing completed successfully

  • Any processing details returned by the processing assembly

See Also

Concepts

Search and Process Development Process