I have an LDAP search filter, e.g.
(|(a=c)(b=d))
which returns all entries where the attribute "a" matches "c"
or "b" matches "d".
I'd like to formulate a filter where the search would stop
if any entry matched "a=c". "b=c" should only be searched
for if there was no matching entry for "a=b".
This is similar to "short-circuit" evaluation in the
programming language C:
if ( a == c || b == d ) .....
"b==d" would not be checked if "a==c" was already true.
Is there a way to specify this behaviour with LDAP
search filters?
Heiner
--
___ _
/ __| |_ _____ _____ _ _ Heiner STEVEN <heiner...@nexgo.de>
\__ \ _/ -_) V / -_) ' \ Shell Script Programmers: visit
|___/\__\___|\_/\___|_||_| http://www.shelldorado.com/
>[If this is the wrong newsgroup, please direct me to the right one]
>
>I have an LDAP search filter, e.g.
>
> (|(a=c)(b=d))
>
>which returns all entries where the attribute "a" matches "c"
>or "b" matches "d".
>
>I'd like to formulate a filter where the search would stop
>if any entry matched "a=c". "b=c" should only be searched
>for if there was no matching entry for "a=b".
[b=d and a=c in above sentence rathe rthan b=c and a=bI persume]
Anyway - I suspect that this is implementation dependent. The
directory servr might choose to look at the search criteria and then
search first on the indexed attribute (perhaps b is indexed and a is
not).
I also suspect that there could be issues with handling of referrals
(or chaining in X.500) and possible sorting of results - which all
together make life difficult for implementors.
--
Rgds
Paul Webster