HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
32.10 slapi_mr_indexer_create()
Calls the indexer factory function for the plug-in responsible for a specified matching rule.
Description This function calls the indexer factory function for the plug-in responsible for
handing a specified matching rule. The matching rule is identified by the OID in the
SLAPI_PLUGIN_MR_OID parameter.
If no plug-ins are associated with this matching rule, the function calls the indexer factory function
for each matching rule plug-in until the SLAPI_PLUGIN_MR_INDEX_FN parameter is set to an
indexer function.
Before calling this function, make sure that the parameter block pb contains the information
needed by the indexer factory function. You can pass information to the indexer factory function
by using the following parameters:
SLAPI_PLUGIN_MR_OID should contain the OID of the matching rule that you want used
for indexing or sorting.
SLAPI_PLUGIN_MR_TYPE should contain the attribute type that you want used for indexing
or sorting.
SLAPI_PLUGIN_MR_USAGE should specify if the indexer will be used for indexing
(SLAPI_PLUGIN_MR_USAGE_INDEX) or for sorting (SLAPI_PLUGIN_MR_USAGE_SORT).
The indexer factory function should set the following parameters:
SLAPI_PLUGIN_MR_OID should contain the official OID of the matching rule that you want
used for indexing or sorting.
SLAPI_PLUGIN_MR_INDEX_FN should specify the name of the indexer function responsible
for indexing or sorting, based on the matching rule OID or attribute type.
SLAPI_PLUGIN_OBJECT should contain any information that you want passed to the
indexer function.
SLAPI_PLUGIN_DESTROY_FN should specify the name of the function responsible for
freeing any memory allocated by this indexer factory function. For example, memory allocated
for a structure that you pass to the indexer function using SLAPI_PLUGIN_OBJECT.
For more information on filter index functions and indexer functions, see Chapter 11 “Writing
matching rule plug-ins”.
Syntax
#include "slapi-plugin.h"
int slapi_mr_indexer_create (Slapi_PBlock *opb);
Parameters This function takes the following parameter:
Parameter block containing information about the matching rule and attribute type to
be used in indexing or sorting.
pb
Returns This function returns the result code returned by the indexer factory function.
32.10 slapi_mr_indexer_create() 263