[Zope] Pre-indexing filter and accented letters
Yuri
yurj at alfa.it
Tue Jun 7 04:37:26 EDT 2005
Dieter Maurer ha scritto:
>Yuri wrote at 2005-6-6 11:56 +0200:
>
>
>>I would like to index a text property of an object in the ZCatalog. The
>>text is in French language, but I have a problem: I have to find results
>>for the related non accented letters!
>>
>>I mean, If I do a search for "actualite", the index should return also
>>the object which text contains "actualitè".
>>
>>
>
>Implement a PythonScript that performs the normalization of
>"context.SearchableText()", say "NormalizedSearchableText".
>
>Ensure, it is acquirable by your indexed objects.
>
>Index "NormalizedSearchableText" rather than "SearchableText"
>and use this index for your searches.
>
>Ensure, that you perform the same normalization on search
>terms before you use them in a query.
>
>
Weel, I cannot change the index, it already has his name... it is a
collection of thousands of object, this one I want to pre-filter before
index are just a small part...
Or you mean I have to do something about SearchableText()?
I have to index in a way the user find the term even if it does not use
accented letters on a current index that already has indexed thousands
of objects...
Can I hook somewhere in the middle, so I Index them in the way I want? :)
>By the way, "ManagableIndex" greatly facilitates the inclusion
>of normalizers. However, it currently does not interface with
>a "TextIndex" (only a "WordIndex").
>
>
I'll take a look, thanks :)
More information about the Zope
mailing list