[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Search problem with non-default attributes. (ITS#1993)
Full_Name: Fatih BUGAN
Version: 2.0.25
OS: linux slackware
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (144.122.247.48)
I am using openLDAP 2.0.25, JAVA SDK 1.3.1_02, ldapjdk_4.1.jar (or ldapjdk.jar)
at slackware linux.
When I try to search my Entries with
MY_FILTER= "(cn=*)";
or
MY_FILTER= "(cn=fatih)";
or
MY_FILTER= "(cn=fa*)";
I can take my entries easily
but when I want to search with something different from default attributes, some
problems occur.
I determined these attributes in mySchema.schema in
"/usr/local/etc/openldap/schema" directory. All of them have
1.3.6.1.4.1.1466.115.121.1.15 type SYNTAX.
I have no problem with these attributes. I can write all of them to LDAP in a
normal way.
If I use filter including non-default attributes:
MY_FILTER= "(some-attr=*)";
I can find entries as I expect ( so, all entries comes :) ) but,
MY_FILTER= "(some-attr=fa*)";
with the filter, as above, I couldn't get any entries. On the other hand, I have
lots of them matches these type of filters.
------------------------
LDAPSearchResults res = null;
// String MY_FILTER= "(cn=*)";
// String MY_FILTER= "(some-attr=*)";
String MY_FILTER= "(some-attr=fa*)";
LDAPSearchConstraints cons = myConn.getSearchConstraints();
cons.setMaxResults(100);
try{
res = myConn.search(searchDN,LDAPConnection.SCOPE_SUB,MY_FILTER,null,false,cons);
}catch(Exception e){
e.printStackTrace();
}
System.out.println("res.hasMoreElements(): "+res.hasMoreElements());
//gives me "false"
while (res.hasMoreElements()){
// -------some code here-----
}
------------------------
is this a bug? (I hope not. cos, I'll have to change thousands of codes as
generally happens :) )
thanks for all,
Fatih BUGAN
TURKEY-ANKARA