Rv: Re: [Zope] why a xcatalog keywordindex is mandatory?
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". You can use my "ManagableIndex". It comes with a "KeywordIndex" that is correct in this respect.
Thanks! It happens also with OR. If I use a record with operator: 'and', it acts as or. Don't know why... :)
>I've tried to change, in the form, COLL with COLL2 and do in the report >script: > ><dtml-call "REQUEST.set('COLL',_['COLL2'])"> > >but it gives error (Error Type: TypeError >Error Value: object has read-only attributes)
Did I already tell you that you *MUST* include tracebacks in error reports? You find tracebacks in "<http://yourZope/error_log>". The traceback tells you were the exception was raised.
I've solved with REQUEST.set('COLL', {}) before copyng :) ________________________________________________ Message sent using ALFANET Caorle WEBMAIL 1.0
Yurj wrote at 2003-12-7 11:21 -0100:
...
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". You can use my "ManagableIndex". It comes with a "KeywordIndex" that is correct in this respect.
Thanks! It happens also with OR.
I know. The difference: it is correct to return no results for an empty "or" search while an empty "and" search must return all objects..
If I use a record with operator: 'and', it acts as or. Don't know why... :)
I do not either. But, there are several problem reports for KeywordIndexes in the mailing lists. Maybe, you search for them... -- Dieter
participants (2)
-
Dieter Maurer -
Yurj