Operations in LDAP queries
The following table shows an overview of the operations that can be used for LDAP queries.
|
Operation |
Characters |
Usage |
|---|---|---|
|
Equal |
= |
Checks for equality of a field with the specified string |
|
Any |
* |
Specifies that a field can have any content except NULL |
|
Bracketing |
() |
Separates individual query parts within a nested query |
|
And |
& |
Connects queries together. All queries must be true |
|
Or |
| |
Connects queries together. At least one query must be true |
|
Not |
! |
Removes all objects from the search result that are found by the queries |
Example:
Compound operations create an LDAP query. The following table shows the structure of an LDAP query using two examples:
|
Query result |
Query structure |
|---|---|
|
All objects of LDAP class user |
(objectClass=user) |
|
All objects of the LDAP class user whose e-mail address does not begin with the string test |
(&(objectClass=user) (!(mail=test*))) |
