Syntax
#include "slapi-plugin.h" int slapi_mr_indexer_create (Slapi_PBlock *opb); Parameters
#include "slapi-plugin.h" int slapi_mr_indexer_create (Slapi_PBlock *opb);
The function has the following parameters:
pb
Returns. The result code returned by the indexer factory function.
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).
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).