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

Re: A tricky matched values problem



Dear Harald,

Thanks for this.

In message <4.2.0.58.19991001115130.02aec8a0@dokka.maxware.no>, Harald
Tveit Alvestrand <Harald@Alvestrand.no> writes
>At 12:48 30.09.99 +0100, Anthony Hodson wrote:
>>Hi, David! Erik!!
>>
>>The solution to this which is given in the FDAM says (to counter this
>>kind of problem):
>>
>>"The matchedValuesOnly argument indicates that certain attribute values
>>are to be omitted from the returned entry information. Specifically,
>>where an attribute to be returned is multi-valued, and some but not all
>>of the values of that attribute contributed to the search filter, in its
>>last effective form (i.e. taking relaxed matching rules into account)
>>returning TRUE via filter items other than present, then the values that
>>did not so contribute are omitted from the returned entry information.
>>An attribute value is said to contribute to the search filter if it is
>>matched by any non-negated filter item in the filter (see 7.8.1),
>>whether or not omission of that item would have led to a different
>>outcome in the selection of the containing entry."
>>
>>Does this resolve the problem?
>
>It seems to me that matchedValuesOnly is asked to perform tasks of 
>intuiting the user's state of mind, which usually means that there's 
>something wrong with the design.

Of course, we started off with a broken design, but the one chosen
reflects the Molesworth principle, which is:

        If in doubt, send too much.

It's also a simple algorithm.

The problem with what you suggest is that, if you have two parts of a
filter, both of which match, which values do you send? 

All the best

Anthony


>
>What about redefining the thing as an attribute return filter:
>
>INPUT:
>   Attribute search filter
>
>OUTPUT:
>   Only those values of that attribute, for all selected entries, that match
>   the filter.
>
>If the intent of the
>
>(OR(AND(mail=sean.mullan@sun.com)
>        (telephoneNumber=47))
>    (cn=Sean*))
>
>was to return all persons named Sean, and point out the one who had this
>email address, it could be written as
>
>(OR(AND(mail=sean.mullan@sun.com)
>        (telephoneNumber=47)
>    (cn=Sean*)
>
>RETURNFILTERED (mail=sean.mullan@sun.com)
>
>this would return all people named Sean, and the email address for the
>one who matched that.
>
>If the intent was something else, one could state that.
>Simpler? Better?
>
>                      Harald
>
>--
>Harald Tveit Alvestrand, Maxware, Norway
>Harald.Alvestrand@maxware.no
>

Anthony Hodson <aeh@xdotd.demon.co.uk>      X   X    DDD
XdotD Associates                             X X  O  D  D
Spring Lanes House, Holly Spring Lane         X  OOO D   D  
Bracknell, Berks RG12 2JL, ENGLAND           X X  O  D  D
Tel: +44 1344 310665                        X   X    DDD
Fax: +44 870 056 8242