[Zope] ZCatalog operators name translation

Tino Wildenhain tino@wildenhain.de
Thu, 02 Aug 2001 17:29:49 +0200


Hi,

--On Donnerstag, 2. August 2001 09:58 -0300 Rogerio Atem de Carvalho 
<ratem@censa.com.br> wrote:

> Hi,
>>
>> > The "any way"  is to patch the sources of TextIndex.py :-)
>> > Andreas
>>
>> May be its more clean and easy to do the replacement of the operators
>> with an external method or the like before passing them to TextIndex
> How can I do it "before passing them to TextIndex"?

With zcatalog you define an attribute to index it. Instead of indexing
the attribute (may be a string with the text you want to index)
you can also direct to a method which does some replacement first, zcatalog
will then index the results of the method rather then the raw string.

If I understand your problem right, it was not the text you want to change
but the question to the catalog to retrieve values.
This problem is even simpler resolved. You get the question as a string
from your formular, take this before calling the search function and
replace the brasilian "and" with the english "and" keyword :)

Regards
Tino