The operators that you can use in search filters are listed in Table 13–5:
Table 13–5 Search Filter Operators
Operator |
Description |
|
---|---|---|
= |
Returns entries containing attribute values that exactly match the specified value. For example, cn=Bob Johnson |
|
=string*string |
Returns entries containing attributes containing the specified substring. For example, cn=Bob*cn=*Johnsoncn=*John*cn=B*John (The asterisk (*) indicates zero (0) or more characters.) |
|
\>= |
Returns entries containing attributes that are greater than or equal to the specified value. For example, buildingname \>= alpha |
|
<= |
Returns entries containing attributes that are less than or equal to the specified value. For example, buildingname <= alpha |
|
=* |
Returns entries containing one or more values for the specified attribute. For example, cn=* telephonenumber=* manager=* |
|
~= |
Returns entries containing the specified attribute with a value that is approximately equal to the value specified in the search filter. For example, cn~=suret l~=san fransico could return cn=sarette l=san francisco The Approximate operator is experimental and works only with English language strings. It does not work with non-ASCII based strings, such as Ja or Zn. |
Extended operators exist that extend searches to dn attributes (cn:dn:=John, for example) and provide support for internationalized searches.