Sun Java System Directory Server Enterprise Edition 6.1 Developer's Guide

How Directory Server Handles Extensible Match Searches

    The following process describes how Directory Server handles an extensible match search.

  1. When Directory Server receives a search request containing an extensible match filter, the server calls the filter factory function in the plug-in handling the corresponding matching rule. The server passes the filter factory a parameter block containing the extensible match filter information.

  2. The filter factory function builds a filter object. The function then sets pointers to the object as well as the appropriate filter matching and filter index functions.

  3. The server attempts to look up a set of results in an index rather than searching the entire directory.

    In order to read an index, the server calls the filter index function, which helps the server locate the appropriate indexer function.

    Directory Server only considers all entries in the directory, which can slow the search considerably if one of the following is the case:

    • No existing index applies to the search

    • The plug-in specifies no indexer function

    • The plug-in generates no keys for the values specified

    Directory Server calls the indexer function to generate the keys. Refer to Indexer Function for details about that function.

  4. Directory Server builds a list of candidate entries.

  5. Directory Server verifies that the entry is in the scope of the search before returning the entry to the client as a search result.

  6. Directory Server frees memory that was allocated for the operation.

The following figure shows how Directory Server processes the search request.

Figure 11–1 Directory Server Performing an Extensible Match Search

Flow diagram shows Directory Server allocating a PBlock
for the search, finding and returning results, and freeing the PBlock.

The main filter functions are as follows: