HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
11.3.6 Getting and setting parameters in indexer functions
The following table summarizes the different parameters that the indexer function should get
and set in the parameter block that is passed in.
Table 11-2 Input and output parameters available to an indexer function
DescriptionData typeParameter name
Input parameter. Pointer to an array of berval
structures containing the values of the entry's
attributes that need to be indexed.
struct berval **SLAPI_PLUGIN_MR_VALUES
Input parameter. Pointer to the indexer object
created by the indexer factory function. Refer to
“Writing the indexer factory function”, for details.
void *SLAPI_PLUGIN_OBJECT
Output parameter. Keys generated for the values
specified in the SLAPI_PLUGIN_MR_VALUES
parameter. The server creates indexes using these
keys.
struct berval **SLAPI_PLUGIN_MR_KEYS
11.4 Handling extensible match filters
This section explains how to set up the server to process searches that use extensible match filters
(matching rules).
Note:
You also need to define an initialization function to register your filter factory function.
11.4.1 How the server handles the filter
When the server processes a search request that has an extensible match filter, the server performs
the following tasks:
1. First, the server finds the plug-in associated with this OID, if an association between the
OID and plug-in has already been made.
If no association has been made, the server attempts to find a matching rule plug-in that
handles the OID. Refer to “How the server associates plug-ins with OIDs”, for details.
2. The server then attempts to generate a list of search result candidates from the indexes. In
a new Slapi_PBlock parameter block:
a. The server puts the filter object in the SLAPI_PLUGIN_OBJECT parameter and calls
the filter index function (specified in the SLAPI_PLUGIN_MR_FILTER_INDEX_FN
parameter).
b. The server checks the value of the SLAPI_PLUGIN_MR_QUERY_OPERATOR parameter.
If the operator is a known type (such as SLAPI_OP_EQUAL), the server will use the
operator when searching the index for candidates. For details, refer to “Query operators
in matching rules”.
c. The server sets the SLAPI_PLUGIN_MR_VALUES parameter to each of the values
specified in the filter and calls the indexer function (which is specified in the
11.4 Handling extensible match filters 93