Rv: Re: [Zope] why a xcatalog keywordindex is mandatory?

Yurj yurj at alfa.it
Sun Dec 7 08:37:07 EST 2003


> The ZCatalog treats an empty *string* in a special way to support
> search forms: an empty string is considered as "no restriction".
>
> A ":lines" control does not return a string but a list.
> An empty list is not considered as "no restriction".
>
> What you see here, is a bug in the "AND" implementation
> of "KeywordIndex". An empty list together with the
"AND"
> operator should be interpreted as "no restriction".
> Due to the bug, it is considered as "no results".

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.

________________________________________________
Message sent using ALFANET Caorle WEBMAIL 1.0




More information about the Zope mailing list