Handling Sorting By Matching Rules - Netscape DIRECTORY SERVER 6.2 - PLUG-IN Manual

Table of Contents

Advertisement

Handling Sorting by Matching Rules

Find the corresponding attribute in the attributes passed into the function.
2.
Make sure to check for subtypes of an attribute (for example, "cn;lang-ja") in
the filter and in the attributes specified by
You can call the
the filter against the attributes passed in as arguments.
Using the query operator to determine how the values should be compared,
3.
compare the values from the filter against the values from the values in the
attribute.
Return one of the following values:
4.
Handling Sorting by Matching Rules
If you have set up indexing by a matching rule, you can also sort search results by
that matching rule. The server can use the keys in the index to sort the search
results.
When processing a request to sort by a matching rule, the server does the
following:
In a new
1.
parameters:
Next, the server calls the indexer factory function (specified in the
2.
SLAPI_PLUGIN_MR_INDEXER_CREATE_FN
The server generates the index keys for the values to be sorted:
3.
142
Netscape Directory Server Plug-In Programmer's Guide • December 2003
slapi_attr_type_cmp()
0 if the values of the attribute match the value specified in the filter.
-1 if the values don't match.
An LDAP error code (a positive number) if an error occurred.
parameter block, the server sets the following
Slapi_PBlock
Sets the OID in the
SLAPI_PLUGIN_MR_OID
Sets the attribute type (of the value being added, modified, or removed) in
the
SLAPI_PLUGIN_MR_TYPE
Sets the
SLAPI_PLUGIN_MR_USAGE
SLAPI_PLUGIN_MR_USAGE_SORT
object will be used for sorting, not indexing.)
The server sets the
SLAPI_PLUGIN_MR_VALUES
structures containing the values to be sorted.
berval
.
attrs
function to compare the attribute in
parameter.
parameter.
parameter to
. (This indicates that the created indexer
parameter) for the plug-in.
parameter to the array of

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 6.2

Table of Contents