> I think for the filters, you should first identify the objectClass > and then > the attributes such as mail or givenName. The attributes that you > are > searching is within the inetOrgPerson objectClass. The > inetOrgPerson is > defined in inetorgperson.schema. > > # inetOrgPerson > # The inetOrgPerson represents people who are associated with an > # organization in some way. It is a structural class and is derived > # from the organizationalPerson which is defined in X.521 [X521]. > objectclass ( 2.16.840.1.113730.3.2.2 > NAME 'inetOrgPerson' > DESC 'RFC2798: Internet Organizational Person' > SUP organizationalPerson > STRUCTURAL > MAY ( > audio $ businessCategory $ carLicense $ departmentNumber $ > displayName $ employeeNumber $ employeeType $ givenName $ > homePhone $ homePostalAddress $ initials $ jpegPhoto $ > labeledURI $ mail $ manager $ mobile $ o $ pager $ > photo $ roomNumber $ secretary $ uid $ userCertificate $ > x500uniqueIdentifier $ preferredLanguage $ > userSMIMECertificate $ userPKCS12 ) > ) > > For the first case, the attributes filter goes first, and that > failed before > it checks the second condition for objectClass. > > > first: > > (&(|(mail=a*)(givenName=a*))(objectClass=inetOrgPerson)) >
logically, the first part of the filter should return true, since i have some entries that mail and/or givenName is start with 'a'. if the first condition is failed, when i reverse it (as in second case), it should fail too. > Also for third case, are you missing the two right parenthses )'s > at the > end? > > > > third: > > (|( &(objectClass=inetOrgPerson)(mail=a*) > (&(objectClass=inetOrgPerson)(givenName=a*)) > )) <== the missing two )'s. > sorry for the typo error. is actually (|(&(objectClass=inetOrgPerson)(mail=a*))(&(objectClass=inetOrgPerson)(givenName=a*))) i just rewrite the third case, as below (|(&(mail=a*)(objectClass=inetOrgPerson))(&(givenName=a*)(objectClass=inetOrgPerson))) it's working! just wonder why the first case is not working (&(|(mail=a*)(givenName=a*))(objectClass=inetOrgPerson)) With Andreas Hasenack's suggestion, i also tried to reindex using slapindex, the first case still not working. > >i have three identical filter > > > > first: > > (&(|(mail=a*)(givenName=a*))(objectClass=inetOrgPerson)) > > > > second: > > (&(objectClass=inetOrgPerson)(|(mail=a*)(givenName=a*))) > > > > third: > > > (|(&(objectClass=inetOrgPerson)(mail=a*)(&(objectClass=inetOrgPerson)(givenName=a*)) > > > > however, the first filter i didn't get any result, but the second > and > > third filter i get what i want. > > > > anyone know what is the problem with the first filter? the > entries i want > > to search for contains all the three attribute (mail, givenName, > > objectClass) > > _______________________________________ YM - 離線訊息 就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。 http://messenger.yahoo.com.hk
