[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: search not commutative on |



Good day,

> why can't i switch search items in a filter with an or function
> e.g.
> ldapsearch   -v
> '(&(|(gidNumber=15000)(gidNumber=15500))(uid=kdeblonde))'
> ldap_init( <default>, 0 )
> filter pattern: (&(|(gidNumber=15000)(gidNumber=15500))(uid=kdeblonde))
> returning: ALL
> filter is: ((&(|(gidNumber=15000)(gidNumber=15500))(uid=kdeblonde)))
> uid=kdeblonde,ou=dekempen,ou=people,dc=bla,dc=bla
> objectClass=top
> objectClass=person
> objectClass=organizationalPerson
> objectClass=inetOrgPerson
> objectClass=posixAccount
> objectClass=inetLocalMailRecipient
> objectClass=shadowAccount
> objectClass=sambaAccount
> sn=Koen Deblonde
> uidNumber=15501
> gidNumber=15500
> objectClass=top
> ...
> 1 match



> 
> but
> ldapsearch   -v
> '(&(|(gidNumber=15500)(gidNumber=15000))(uid=kdeblonde))'
> ldap_init( <default>, 0 )
> filter pattern: (&(|(gidNumber=15500)(gidNumber=15000))(uid=kdeblonde))
> returning: ALL
> filter is: ((&(|(gidNumber=15500)(gidNumber=15000))(uid=kdeblonde)))
> 0 matches

>From your output, the gidNumber was the only thing that matched in the first
record.  None of your filter terms in the second search match.  I don't see
a "uid=kdeblonde" anywhere in your first record.

============================
Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948