Red Hat Directory Server 8.0 Administrator's Guide
3.1. Search Filter Syntax
The basic syntax of a search filter is:
attribute operator value
For example:
buildingname>=alpha
In this example, buildingname is the attribute, >= is the operator, and alpha is the value. Filters
can also be defined that use different attributes combined together with Boolean operators.
Search filters are described in detail in the following sections:
• Section 3.1.1, “Using Attributes in Search Filters”
• Section 3.1.2, “Using Operators in Search Filters”
• Section 3.1.3, “Using Compound Search Filters”
• Section 3.1.4, “Search Filter Examples”
3.1.1. Using Attributes in Search Filters
When searching for an entry, the attributes associated with that type of entry can be specified,
such as using the cn attribute to search for people with a specific common name.
Examples of attributes that people entries include are the following:
• cn for the person's common name.
• sn for the person's surname, last name, or family name.
• telephoneNumber for the person's telephone number.
• buildingName for the name of the building in which the person resides.
• l for the physical location of the person.
3.1.2. Using Operators in Search Filters
The operators that can be used in search filters are listed in Table B.1, “Search Filter
Operators”. In addition to these search filters, special filters can be specified to work with a
preferred language collation order. For information on how to search a directory with
international charactersets, see Section 4, “Searching an Internationalized Directory”.
Appendix B. Finding Directory Entries
560