ApproxMatch is an LDAP SearchFilter defined in RFC 4511 which states:

"An ApproxMatch filter is TRUE when there is a value of the attribute type or subtype for which some locally-defined approximate matching algorithm (e.g., spelling variations, phonetic match, etc.) returns TRUE. If a value matches for equality, it also satisfies an approximate match. If approximate matching is not supported for the attribute, this filter item should be treated as an EQUALITY."

None of the RFCs define a MatchingRule for APPROXIMATE

Although ApproxMatch is mentioned in RFC 4511 in the description of LDAP SearchFilters none of the RFCs define a MatchingRule for APPROXIMATE. This implies that the operations and specifics of how an APPROXIMATE MatchingRule works is left to the LDAP Server Implementations on how it works. An ApproxMatch filter may be used to determine whether an entry contains at least one value for a specified attribute that is approximately equal to a given value. The LDAP specifications do not define what exactly "approximately equal to" means, so that is left up to individual LDAP Server Implementations to determine. Many servers use a "sounds like" mechanism with an algorithm based on Soundex or one of the Metaphone variants.

The string representation of an ApproxMatch filter is constructed as follows:

  • An open parenthesis
  • The attribute description (potentially including attribute options)
  • A tilde character An equal sign The value to compare (aka the assertion value)
  • A close parenthesis

For Example, it might be reasonable to expect a filter of %prettify

/% to match entries with givenName values of either John or Jon.

Although it seems like a significant oversight or omission, the LDAP specifications do not make any provision for ApproxMatch matching Rules. A number of individual LDAP Server Implementations provide this capability anyway so that it may be possible to configure the approximate match behavior on a per-attribute basis, but the inconsistency of approximate matching capabilities between server implementations makes approximate matching something that is often avoided in LDAP-enabled applications.

An approximate search filter is a type of LDAP SearchFilter that can be used to identify entries that contain a value for a given attribute that is approximately equal to a given assertion value. The server will use an approximate matchingRule to make the determination.


We have seen X-APPROX used to indicate that ApproxMatch matching Rules be applied.

More Information#

There might be more information for this subject on one of the following:

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-13) was last changed on 01-Dec-2015 12:34 by jim