Can't make an AdvancedQuery with NOT
I just installed AdvancedQuery 0.6 in my Plone site, as it seems to be the only way to do boolean search expressions. Here's the query I'm trying to make: query = Eq('Title','kitchen') & - Eq('Subject','deck') The idea, obviously, is to get all docs with keywords of "kitchen" AND NOT "deck" I'm getting this as an error: AttributeError: Eq instance has no attribute '__neg__' This query works as expected: query = Eq('Subject','kitchen') & Eq('Subject','deck') Installation details: Plone 2.0.5 Zope 2.7.3-0, python 2.3.4, darwin AdvancedQuery 0.6 No IncrementalSearch No ManagableIndex Any ideas? Thanks, Willis Morse ShiftClick, LLC
Willis Morse wrote at 2005-2-9 09:56 -0500:
I just installed AdvancedQuery 0.6 in my Plone site, as it seems to be the only way to do boolean search expressions.
Here's the query I'm trying to make:
query = Eq('Title','kitchen') & - Eq('Subject','deck')
The "not" operator uses the symbol "~" (tilde) and not "-" (minus). -- Dieter
Wow, that was easy. I guess I've got to bump up the font size in my browser :-) Thanks so much for the quick response. I'll try to come up with a more challenging question next time. Willis Morse ShiftClick, LLC On Feb 9, 2005, at 5:21 PM, Dieter Maurer wrote:
Willis Morse wrote at 2005-2-9 09:56 -0500:
I just installed AdvancedQuery 0.6 in my Plone site, as it seems to be the only way to do boolean search expressions.
Here's the query I'm trying to make:
query = Eq('Title','kitchen') & - Eq('Subject','deck')
The "not" operator uses the symbol "~" (tilde) and not "-" (minus).
-- Dieter
participants (2)
-
Dieter Maurer -
Willis Morse