LDAP Search Filters
Table B-2
Search Filter Boolean Operators
Operator
Symbol
&
AND
|
OR
!
NOT
Boolean expressions are evaluated in the following order:
•
Innermost to outermost parenthetical expressions first
•
All expressions from left to right
Search Filter Examples
The following filter searches for entries containing one or more values for the
manager attribute. This is also known as a presence search:
manager=*
The following filter searches for entries containing the common name Ray Kultgen.
This is also known as an equality search:
cn=Ray Kultgen
The following filter returns all entries that do not contain the common name Ray
Kultgen:
(!(cn=Ray Kultgen))
The following filter returns all entries that contain a description attribute that
contains the substring
description=*X.500*
The following filter returns all entries whose organizational unit is Marketing and
whose description field does not contain the substring
(&(ou=Marketing)(!(description=*X.500*)))
524
Netscape Directory Server Administrator's Guide • August 2002
Description
All specified filters must be true for the statement to be true. For example:
(&(filter)(filter)(filter)...)
At least one specified filter must be true for the statement to be true. For example:
(|(filter)(filter)(filter)...)
The specified statement must not be true for the statement to be true. Only one filter
is affected by the NOT operator. For example:
(!(filter))
X.500
:
:
X.500
Need help?
Do you have a question about the NETSCAPE DIRECTORY SERVER 6.1 - ADMINISTRATOR and is the answer not in the manual?
Questions and answers