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
o equality, =
o Greater than. >
o Greater than or equal to. >=
o Less than, <
o 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
o Anded: (&(filter1)(filter2)) e.g: '(&(ou=Peons)(sn=S*))'
o Ored: (|(filter1)(filter2)) e.g. '(|(cn=V*)(sn=X*))'
o Negated: (!(filter)) e.g. '(!(sn=Mair))'
See EsLdapExamples class>> exampleFilter* for examples.
Warning:
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
o LDAP_SCOPE_BASE - search only the base DN
o LDAP_SCOPE_ONELEVEL - search the base DN and just one level down
o 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