How Exchange Server 2003 Conducts Searches


Topic Last Modified: 2005-05-06

As a database system, the Exchange store uses tables to organize data such as mailboxes, folders, and messages. As with any other database, certain attributes in each table are indexed for easy searching. These indexes are different from full-text indexes, which are external to the store. The Microsoft Search service (MSSearch) generates and maintains full-text indexes. One full-text index covers an entire mailbox store or public folder store.

For more information about full-text indexes, see Using Exchange Server 2003 Full-Text Indexing. Full-text indexing reduces the resources that are required during a search by spending them before the search to build the index. However, full-text indexing does have the following drawbacks:

  • Creating an index with a size of several gigabytes (GB) may require several days.

  • A correct search result can be obtained only when the index is brought up to date.

When Exchange Server 2003 receives a search request, a store component named the query processor analyzes the search conditions defined in the request to find the most efficient way to process the request. For example, it may change the sequence of the search conditions or delete unnecessary search conditions.

In addition, the query processor also determines whether to search a full-text index or the Exchange Server 2003 table indexes. The query processor may use both types of searches to satisfy a single search request.

To determine whether to use a full-text index, a table index, or some combination for a search request, the query processor evaluates the following factors:

  • Location of attributes used as search criteria.

    This includes whether the search conditions refer to attributes that are included in the full-text index or in a table index.

    For example, if the search request includes a Contains clause that refers to an attribute indexed in the full-text index, a full-text index search is appropriate.

    If the query processor locates two or more table indexes that contain the appropriate attribute, it calculates the number of messages that would be returned using either table. Then, the query processor selects the table that returns the most messages for the least resource cost.

  • Type of search request issued.

    For example, if the search request involves comparing all values of an attribute, a full-text index search is not appropriate.

The following figure illustrates the basic steps in the search process. This example involves the Advanced Find feature of Outlook. To locate this feature, in the Outlook toolbar, click Find. Then in the Find toolbar, point to Options, and then click Advanced Find.

Components involved in a complex search using Outlook


The sequence of events in a search process is the following:

  1. In Outlook, a user creates a search request with the following search conditions:

    • The message is in the Testing folder.

    • The message Subject field contains the string "test plan".

    • The message size is greater than 10 kilobytes (KB).

  2. The user executes the search. Outlook sends the search request to Exchange Server 2003.

  3. The Exchange Server 2003 query processor analyzes the search request and determines that both table index and full-text index searches are appropriate.

  4. The query processor sends MSSearch a search character string for the Subject field.

  5. MSSearch conducts the search and returns the results that matched the search character string to the query processor.

  6. The query processor uses a table index search to search the result set obtained in Step 5 for messages larger than 10 KB.

  7. The query processor sends the final search results to Outlook.

By default, full-text indexes include the following MAPI attributes:


By default, full-text indexes include the following DAV/OLEDB attributes: