[Zope] Query Keyword Index unexpected behavior
Yuri
yurj at alfa.it
Wed Mar 23 04:21:03 EST 2005
>
>
> 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
>
Dear Chris,
this is an "already discussed issue" :)
http://www.dzug.org/mailinglisten/zope-org-zope/archive/2003/2003-12/1070709691550/index_html
> The ZCatalog treats an empty *string* in a special way to support[...]
"AND"[...]
I've solved it in /PluginIndexes/common/util.py. When the param is a record,
around line 95, I've added:
if keys == ['']: keys = None
Is it correct? Seems to work with all indexes I've and KeywordIndexes, which
works also with AND as operator.
---
Note: you also have to use lines to use the KeywordIndex:
<textarea name="COLL:lines"></textarea>
That was my solution.
I think the "ManagableIndex" with the KeywordIndex replacement should
be added, maybe calling it KeywordIndexNG :)
More information about the Zope
mailing list