Understanding Matching Rules

Matching rules are used by the directory server to compare two values for
the same attribute, that is, to perform matching operations on them. There are
several different types of matching rules, including:

Equality matching rules

These matching rules are used to determine whether two values are logically equal to each other. Different implementations of equality matching rules can use different criteria for making this determination (for example, whether to ignore differences in capitalization or deciding which spaces are significant).

Ordering matching rules

These matching rules are used to determine the relative order for two values, for example, when evaluating greater-or-equal or less-or-equal searches, or when the results need to be sorted.

Substring matching rules

These matching rules are used to determine whether a given substring assertion matches a particular value. A substring assertion is composed of at least one element from the following sets: at most one subInitial element, zero or more subAny elements, and at most one subFinal element.

Approximate matching rules

These matching rules are used to determine whether two values are approximately equal to each other. This is frequently based on “sounds like” or some other kind of fuzzy algorithm. Approximate matching rules are not part of the official LDAP specification, but they are included in the directory server for added flexibility.