Search filters enable you to define search criteria and provide more efficient and effective searches. The search filters are represented by Unicode strings.
The Active Roles console supports the standard LDAP search filters as defined in RFC2254.
The following table lists some examples of standard LDAP search filters.
Table 5: LDAP search filters
(objectClass=*)
|
All objects |
(&(objectCategory=person)(objectClass=user)(!cn=andy))
|
All user objects but "andy" |
(sn=sm*)
|
All objects with a surname that starts with "sm" |
(&(objectCategory=person)(objectClass=contact)(|(sn=Smith)(sn=Johnson)))
|
All contacts with a surname equal to "Smith" or "Johnson" |
Search filters use one of the following formats:
<filter>=(<attribute><operator><value>)
or
(<operator><filter1><filter2>)
In this example, <attribute> stands for the LDAP display name of the attribute by which you want to search.
The following table lists some frequently used search filter operators.
Table 6: Search filter operators
= |
Equal to |
~= |
Approximately equal to |
<= |
Lexicographically less than or equal to |
>= |
Lexicographically greater than or equal to |
& |
AND |
| |
OR |
! |
NOT |