HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
SLAPI_PLUGIN_MR_INDEX_FN parameter) to generate the key (specified in the
SLAPI_PLUGIN_MR_KEYS parameter).
d. The server uses the keys and the query operator to find potential candidates in the
indexes.
The server considers all entries to be potential candidates if at least one of the following is
true:
The matching rule plug-in has no indexer function (specified in the
SLAPI_PLUGIN_MR_INDEX_FN parameter).
No index applies to the search (for example, if the query operator does not correspond
to an index).
No keys are generated for the specified values.
3. For each candidate entry, the server performs the following tasks to determine if the entry
matches the search filter:
a. The server calls the filter matching function (which is specified in the
SLAPI_PLUGIN_MR_FILTER_MATCH_FN parameter), passing in the filter object, the
entry, and the attributes of the entry.
b. If the entry does not match, but the search request also specifies that the attributes in
the DN should be searched, the server calls the filter matching function again, passing
in the filter object, the entry, and the attributes in the DN.
4. The server then checks the value returned by the filter matching function:
If the function returns 0, the entry matched the search filter.
If the function returns -1, the entry did not match the search filter.
If the function returns an LDAP error code (a positive value), an error occurred.
5. If the entry matches the filter, the server verifies that the entry is in the scope of the search
before returning the entry to the LDAP client as a search result.
11.4.2 Query operators in matching rules
As discussed in “How the server handles the filter, the server uses a query operator when
searching the index for possible candidates.
This applies to the ldbm default back end database. If you are using your own back end or if you
have not set up indexing by matching rules, the server does not make use of the query operator.
The server checks the value of the SLAPI_PLUGIN_MR_QUERY_OPERATOR parameter to determine
which operator is specified. The following table lists the possible values for this parameter.
Table 11-3 Query operators in extensible match filters
DescriptionOperator
<SLAPI_OP_LESS
<=SLAPI_OP_LESS_OR_EQUAL
=SLAPI_OP_EQUAL
>=SLAPI_OP_GREATER_OR_EQUAL
>SLAPI_OP_GREATER
If the query operator is SLAPI_OP_EQUAL, the server attempts to find the keys in the index that
match the value specified in the search filter. In the case of the other query operators, the server
attempts to find ranges of keys that match the value.
94 Writing matching rule plug-ins