Sun Java System Directory Server Enterprise Edition 6.0 Developer's Guide

Matching Rules

Parameters for registering matchingrule plug-in functions and arguments follow.

Table 18–22 Matching Rule Function and Argument Registration Parameters

Parameter ID  

Data Type  

Description  

SLAPI_MATCHINGRULE_DESC

-

Used to signify registration of the matching rule description with slapi_matchingrule_set().

SLAPI_MATCHINGRULE_NAME

-

Used to signify registration of the matching rule name with slapi_matchingrule_set().

SLAPI_MATCHINGRULE_OBSOLETE

-

Used to signify the matching rule is obsolete when registering with slapi_matchingrule_set().

SLAPI_MATCHINGRULE_OID

-

Used to signify registration of the matching rule object identifier with slapi_matchingrule_set().

SLAPI_MATCHINGRULE_SYNTAX

-

Used to signify registration of the matching rule syntax with slapi_matchingrule_set().

SLAPI_PLUGIN_DESTROY_FN

void *

Function called to free memory allocated to filter object. 

SLAPI_PLUGIN_MR_FILTER_CREATE_FN

void *

Filter factory function. 

SLAPI_PLUGIN_MR_FILTER_INDEX_FN

void *

Function called to set the indexer function. 

SLAPI_PLUGIN_MR_FILTER_MATCH_FN

void *

Function called to check for a match. 

SLAPI_PLUGIN_MR_FILTER_RESET_FN

void *

Function called to reset the match filter. 

SLAPI_PLUGIN_MR_FILTER_REUSABLE

unsigned int

Whether the filter is reusable. 

  • 0 false.

  • 1 true.

SLAPI_PLUGIN_MR_INDEXER_CREATE_FN

void *

Index factory function. 

SLAPI_PLUGIN_MR_INDEX_FN

void *

Function called to index a single entry. 

SLAPI_PLUGIN_MR_KEYS

struct berval **

Array of index keys corresponding to the attribute values. 

SLAPI_PLUGIN_MR_OID

char *

Object identifier (OID) corresponding to the extensible match rule. 

SLAPI_PLUGIN_MR_QUERY_OPERATOR

int

Type of operator used to check for matches. 

SLAPI_OP_EQUAL

SLAPI_OP_GREATER

SLAPI_OP_GREATER_OR_EQUAL

SLAPI_OP_LESS

SLAPI_OP_LESS_OR_EQUAL

SLAPI_OP_SUBSTRING

SLAPI_PLUGIN_MR_TYPE

char *

Matching rule filter type. 

SLAPI_PLUGIN_MR_USAGE

unsigned int

Whether to use the rule to index or to sort. 

SLAPI_PLUGIN_MR_USAGE_INDEX

SLAPI_PLUGIN_MR_USAGE_SORT

SLAPI_PLUGIN_MR_VALUE

struct berval *

Attribute value to match. 

SLAPI_PLUGIN_MR_VALUES

struct berval **

Array of attribute values to match. 

SLAPI_PLUGIN_OBJECT

void *

Filter object for extensible match. 

You define this data structure to use in a matching rule plug-in.