Hi all. I'm having problems with ldap search filters. I want to search through all the children of a root node. I want the users where the username of the email contains the query string. for example, if I have
- [email protected]
- foobar@foo_l.c_bar
and the search query is "l.c" I want only [email protected]
the following code, surprisingly, returns either the first and the second.
String query = "...";
DirContext dc = ...;
NamingEnumeration<SearchResult> ne = dc.search(root,
"(email=*{0}*@*)",
new Object[] { query }, null);
what's wrong in the "*...*@*"
query filter?