Wiki Markup |
---|
{scrollbar} |
RFC 2254 defines the query syntax for a directory service. The full syntax can be found in that specification. However, an overview of the most frequently used forms is given below.
Basic Form
A search filter contains one or more filter components where each component has one of four forms. In the table below, attribute
is a property of an object within the directory and value
is a string to match.
Form | Description |
---|---|
| Returns the objects where |
| Returns the objects where |
| Returns the objects where |
| Returns the objects where |
Note that the specification defines three other operators in addition to equals: ~=
, >=
, and <=
. These operators are not covered here.
Note: You might see search filters defined in the platform that contain {
n
} wheren
is some integer. Note that this syntax is not part of the search filter specification. Instead, it is a placeholder usingMessageFormat
syntax. The platform substitutes the values of the filter arguments into this filter expression and the resulting search filter is compliant with the search filter specification. That is the string that is sent to the directory service.
Wildcards
Values can contain asterisks. An asterisk represents zero or more characters. When it appears as the only character on the right hand side, it can be used as a test for the presence of an attribute.
Examples
Example | Description |
---|---|
| Return all objects where attribute |
| Return all objects where attribute |
| Return all objects where attribute |
| Return all objects where attribute |
| Return all objects where attribute |
| Return all objects where attribute |
Children Display |
---|