[Date Prev][Date Next]
Re: Little clue
"Kurt D. Zeilenga" wrote:
> At 11:49 PM 2001-09-07, Pierangelo Masarati wrote:
> >> --On Donnerstag, 6. September 2001 18:58 +0200 Pierangelo Masarati
> >> <firstname.lastname@example.org> wrote:
> >> > Look at these two filters:
> >> >
> >> > '(&(description=xxxx)(ntaccount=*)(mail=*)(!(mysoc=*))(!(mymail=*)))'
> >> >
> >> > '(&(!(|(mymail=*)(mysoc=*)))(description=xxxx)(ntaccount=*)(mail=*))'
> >> In Boolean algebra these seem to be the same:
> >> a ^ b ^ c ^ (!d) ^ (!e)
> >> <=> a ^ b ^ c ^ ((!d) ^ (!e)) #assiociativ
> >> <=> a ^ b ^ c ^ (!(d v e)) #deMorgan
> >> <=> (!(d v e)) ^ a ^ b ^ c #kommutativ
> >I guess this is the right answer (not only because that's what I expected :)
> >> However, LDAP uses a 3-state logic. Any terms that evaluate to undef?
> >I expect them to behave the same also in case the 'mysoc' and 'mymail'
> >terms are undef, because of the negations (!), right?
> Yes, because !undef is undef and (&(undef)...) is undef
OK. I checked it out with OpenLDAP and works consistently with
my expectation. The point is that I spend a couple fo days trying
to make things work out of a Lotus Notes server which was giving
completely different results for the two queries (~2000 vs. ~8000,
which is the "right" answer). Moreover, to those saying the
common part '(&(description=xxxx)(ntaccount=*)(mail=*))' doesn't
matter because ... it's common, well, when I used it that way I got
~8000 matches; this way: '(&(ntaccount=*)(mail=*)(description=xxxx))'
I got only ~7000! I was trying to figure out if there was any
LDAP-ish explanation before issuing a possible bug notification.
Thanks for the help.
Dr. Pierangelo Masarati | voice: +39 02 2399 8309
Dip. Ing. Aerospaziale | fax: +39 02 2399 8334
Politecnico di Milano | mailto:email@example.com
via La Masa 34, 20156 Milano, Italy |