Hi, all! I'm trying to query a Keyword Index using record attributes. The expression ZCatalog(myindex={'query':['foo','bar'], 'operator':'and'}) should return objects that have both "foo" AND "bar". In my case, no objects with "bar", but with "foo" a lot. The expr above returns ALL objects with "foo". Is it expected behavior? How to get what I really want: the objects with "foo" and "bar", that is None? TIA, -- -tick
Vital Lobachevsky wrote at 2005-3-18 20:09 +0200:
... I'm trying to query a Keyword Index using record attributes. The expression
ZCatalog(myindex={'query':['foo','bar'], 'operator':'and'})
should return objects that have both "foo" AND "bar". In my case, no objects with "bar", but with "foo" a lot. The expr above returns ALL objects with "foo". Is it expected behavior?
A really long standing bug... You might use a "Managable KeywordIndex" as a replacement for the broken stock Zope KeywordIndex. <http://www.dieter.handshake.de/pyprojects/zope> -- Dieter
Dieter Maurer wrote:
should return objects that have both "foo" AND "bar". In my case, no objects with "bar", but with "foo" a lot. The expr above returns ALL objects with "foo". Is it expected behavior?
A really long standing bug...
Is there a collector entry for this? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Chris Withers wrote at 2005-3-21 18:50 +0000:
Dieter Maurer wrote:
should return objects that have both "foo" AND "bar". In my case, no objects with "bar", but with "foo" a lot. The expr above returns ALL objects with "foo". Is it expected behavior?
A really long standing bug...
Is there a collector entry for this?
I do not know. But there are bug reports in the mailing list for years... -- Dieter
Dieter Maurer wrote:
should return objects that have both "foo" AND "bar". In my case, no objects with "bar", but with "foo" a lot. The expr above returns ALL objects with "foo". Is it expected behavior?
A really long standing bug...
Is there a collector entry for this?
I do not know.
But there are bug reports in the mailing list for years...
Could you rustle up a collector entry for it then, so it doesn't get forgotten? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Chris Withers wrote at 2005-3-23 09:50 +0000:
Dieter Maurer wrote:
should return objects that have both "foo" AND "bar". In my case, no objects with "bar", but with "foo" a lot. The expr above returns ALL objects with "foo". Is it expected behavior?
A really long standing bug... ... But there are bug reports in the mailing list for years...
Could you rustle up a collector entry for it then, so it doesn't get forgotten?
I would lose an argument to recommend my "ManagableIndex" alternative -- should the bug really get fixed (what I doubt). This bug might be a chance for the Zope community ;-) -- Dieter
Dieter Maurer wrote:
I would lose an argument to recommend my "ManagableIndex" alternative
How come? If ManageableIndex is as good as you say it is, I think it belongs in the Zope core. Remember TextIndex did eventually get replaced with ZCTextIndex ;-)
This bug might be a chance for the Zope community ;-)
Not really sure what you mean by that... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (3)
-
Chris Withers -
Dieter Maurer -
Vital Lobachevsky