[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
回覆: Re: Filter Problem
- To: Shuh Chang <schang@axalto.com>, OpenLDAP-software@OpenLDAP.org
- Subject: 回覆: Re: Filter Problem
- From: Kenny Chong <kennycyb@yahoo.com>
- Date: Tue, 21 Feb 2006 10:28:10 +0800 (CST)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=O/11M2WnNi61GVjihYnWyBtmHXC8npmfic9pSeus1vz7ytR4HAXE5kB56SJ4HRanz94YvJOLZU5LqCg2vLDNeFW+YN91zyOZ1lW0KlfdK8v8x58WMu1EnnJYOSsbHs06IXkelHN8S1PV/XmMfz6PtoSn+byi+kcBdvk0PPTAqI4= ;
- In-reply-to: <003d01c63649$7252a850$c5601bac@axalto.com>
> 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