Search Specification
The search filter string excludes instances of LdapEntry that do not match the string. At its simplest a filter is attribute operator value. Operator can test
equality, =
Greater than. >
Greater than or equal to. >=
Less than, <
Less than or equal to, <=
For instance, ‘(roomNumber>9000)’ matches instances of LdapEntry whose roomNumber is greater than 9000. Value can contain wild cards. Use '(objectClass=*)' if you want to match everything.
Filters can be componded
Anded: (&(filter1)(filter2)) e.g: '(&(ou=Peons)(sn=S*))'
Ored: (|(filter1)(filter2)) e.g. '(|(cn=V*)(sn=X*))'
Negated: (!(filter)) e.g. '(!(sn=Mair))'
See EsLdapExamples class>> exampleFilter* for examples.
Spaces in filter strings will cause them to fail. (See EsLdapExamples class >> exampleFilterUsingAndFail.)
The search base string sets the place to start the search in the LDAP directory hierarchy. Setting it to the DN ou=Payroll,dc=example,dc=com will cause the search to start at the organizationalUnit Payroll level.
The scope determines how far down from the base the search will look in the directory hierarchy. Scope is one of
LDAP_SCOPE_BASE - search only the base DN
LDAP_SCOPE_ONELEVEL - search the base DN and just one level down
LDAP_SCOPE_SUBTREE - search the base DN and its entire sub tree.
LDAP_SCOPE_SUBTREE is the scope default for a new instance of LdapSearch (LdapSearch new).
Last modified date: 05/25/2018