Writing The Indexer Function - Netscape DIRECTORY SERVER 6.02 - PLUG-IN Manual

Table of Contents

Advertisement

Input and Output Parameters Available to a Indexer Factory Function (Continued)
Table 11-1
Parameter Name
SLAPI_PLUGIN_PRIVATE
SLAPI_PLUGIN_MR_OID
SLAPI_PLUGIN_MR_INDEX_FN
SLAPI_PLUGIN_DESTROY_FN
SLAPI_PLUGIN_OBJECT

Writing the Indexer Function

The indexer function takes a single
never be called for the same indexer object concurrently. (If you plan to manipulate
global variables, keep in mind that the server can call this function concurrently for
different indexer objects.)
The indexer function should do the following:
Get the values of the following parameters:
1.
Generate index keys for these values, and set the
2.
parameter to the array of these keys.
Return 0 (or the result code
3.
successfully.
The server adds or removes the keys and the corresponding values from the
appropriate indexes.
Data Type
void *
char *
void *
(function
pointer)
void *
(function
pointer)
void *
Get the indexer object from the
parameter is set).
Get the array of values that you want indexed from the
SLAPI_PLUGIN_MR_VALUES
Description
(Input parameter) Pointer to any private
data originally specified in the initialization
function. (See "Writing an Initialization
Function" on page 143 for details.)
(Output parameter) Official matching rule
OID of the index.
(Output parameter) Name of the function
called by the server to generate a list of keys
used for indexing a set of values.
(Output parameter) Name of the function to
be called to free the indexer object.
(Output parameter) Pointer to the indexer
object created by your factory function.
argument. This function will
Slapi_PBlock
SLAPI_PLUGIN_OBJECT
parameter.
) if everything completed
LDAP_SUCCESS
Chapter 11
Indexing Based on Matching Rules
parameter (if the
SLAPI_PLUGIN_MR_KEYS
Writing Matching Rule Plug-Ins
133

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 6.02

Table of Contents