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

Re: multi-exclusion search query



Sorry, I've just found the solution.

The correct syntax for multi-exclusion is 

(!(|(businessCategory=1)(businessCategory=2)))

the NOT operator can apparently only apply to one single value and 
not to a list. In order to exclude various values, one must first 
*match* the values that are not wanted, and then apply the NOT 
operator to the result.

I spent a little bit of time to find that...

The following url has been really useful in understanding the RFC 
(which is really too cryptic)

http://www.zvon.org/tmRFC/RFC2533/Output/chapter4.html#filter

This is a general description and explanation of the feature set 
selection predicates.

bye





On 12 Dec 2001, at 1:46, openldap-software@OpenLDAP.or wrote:

From:           	Tardis <tardis@writeme.com>
To:             	openldap-software@OpenLDAP.org
Subject:        	multi-exclusion search query
Date sent:      	Wed, 12 Dec 2001 01:46:19 +0100

> Hello,
> 
> I can't figure out how to make a query that will return all the entries, 
> except those matching a list of exclusions.
> 
> I'm trying :
> 
> (!(businessCategory=1)(businessCategory=2))
> 
> but this only excludes from the query the businessCategory=1 
> entries and not the businessCategory=2 entries. How should I write 
> the filter to exclude both?
> 
> TIA
> 


--
Tardis