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

Re: A tricky matched values problem



David Chadwick wrote:

> Thomas Salter providing the following filter:
>
> (OR(AND(mail=sean.mullan@sun.com)(telephoneNumber=47))(cn=
> Sean*))
>
> to an entry containing the following attributes.
>
> cn: Sean Mullan
> mail: sean.mullan@sun.com
> mail: mullan@east.sun.com
> telephoneNumber: +1 781 442 0926
> telephoneNumber: 555-9999
>
> As you can see, the overall filter is true, the AND is false, but the
> mail attribute value matches true. The question is "does matched
> ValuesOnly apply to the mail attribute or not". ie. should one or two
> mail attribute values be returned.
>
> On the FOR side (one returned value), we have that the AVA was
> true,
> On the AGAINST side, we have that the AVA did not contribute to
> the overall filter matching true.
>
> My first reaction was to say that only one mail value should be
> returned, but whilst drafting the proposed textual addition to X.500 I
> have started to change my mind.

I would say "hmm" :-) I think the matchedValuesOnly will be extremely
useful but will also require clients to construct filters carefully. I
would rather have sound logic and careful filters than something that is
not intuitive. If the AND clause does not contribute to truth then the
matchedValuesOnly shouldn't apply. If the intent was to constrain a
telephonenumber search with a mail attribute and also get mail matches as
well then the filter should be,

(OR(AND(mail=sean.mullan@sun.com)(telephoneNumber=47))(mail=sean.mullan@sun.com)(cn=Sean*))

The premise here is that only attributes in a clause expression that
contributes to the overall (outer) truth should contribute. This would
mean that, although the mail part of the AND clause contributes true, the
AND clause evaluates false to the outer expression and therefore should
not contribute values.

> What does anyone else think.

IMHO but open to counter argument. I think a consistent and easily
reasoned scheme is needed.

Paul Dale
--
Product Development Manager
pdale@intracus.com
www.intracus.com
All views expressed are my own and do not represent those of Intracus Ltd.