HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
The filter object specified in the SLAPI_PLUGIN_OBJECT parameter.
The filter destructor function specified in the SLAPI_PLUGIN_DESTROY_FN parameter.
Information specified in the filter object is used by both the filter index function and the filter
matching function.
11.2.4 How the server uses parameter blocks
The server uses parameter blocks as a means to pass information to and from plug-in functions.
When calling your matching rule plug-in functions, the server creates a new parameter block,
set some input parameters, and pass the parameter block to your function. After retrieving output
parameters from the block, the server typically frees the parameter block from memory.
In general, you should not expect a parameter block to be passed between plug-in functions. The
value of a parameter set by one plug-in function may not necessarily be accessible to other plug-in
functions, because each function is usually passed a new and different parameter block.
11.3 Indexing based on matching rules
This section explains how to set up the server to index entries using a matching rule.
Note:
You also need to define an initialization function to register your indexer factory function.
11.3.1 How the server sets up the index
When the server encounters a matching rule OID in an index directive in the server configuration
file, the server determines which plug-in supports the matching rule identified by the OID. Refer
to “How the server associates plug-ins with OIDs”, for details.
The server gets the OID returned in the SLAPI_PLUGIN_MR_OID parameter and associates this
OID with the rest of the attribute indexing information (for example, the attribute type and the
type of index) for future reference.
When adding, modifying, or deleting the values of an attribute, the server checks this information
to determine if the attribute is indexed. Refer to “How the server updates the index”, for
information on how attributes are indexed.
11.3.2 How the server updates the index
When a value is added, modified, or removed from an attribute in an entry (or when the RDN
of an entry is changed), the server performs the following tasks if that attribute has an index that
uses matching rules:
1. In a new Slapi_PBlock parameter block, the server sets the following parameters:
Sets the OID in the SLAPI_PLUGIN_MR_OID parameter.
Sets the attribute type (of the value being added, modified, or removed) in the
SLAPI_PLUGIN_MR_TYPE parameter.
2. Next, the server calls the indexer factory function (specified in the
SLAPI_PLUGIN_MR_INDEXER_CREATE_FN parameter) for the plug-in to create the indexer
object.
3. The server generates the index keys for the values to be added or deleted:
90 Writing matching rule plug-ins