Dieter Maurer ha scritto:

Yuri wrote at 2005-6-7 10:37 +0200:
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...

But your index currently has unnormalized values.
Thus, you must rebuild it.

I don't need it for other objects I already have. But, as a bonus, it would not be so bad, so it is not really a problem :)

When you rebuild it, you can also give it a different name.

Why? I usually gave it the name of the form input I want to index...

I though just to index the new objects... but I miss the picture maybe, what is so important with the names "NormalizedSearchableText" and "SearchableText"?

Or you mean I have to do something about  SearchableText()?

Yes, replace it by "NormalizedSearchableText".

How? :-? Maybe I miss some overloading or acquisition?

Can I hook somewhere in the middle, so I Index them in the way I want? :)

You can (and must) normalized the search terms.
However, the indexed values need be normalized, too.

Almost surely, there are not now. This means, rebuilding the
index -- this time with normalization...

And how do I add it? Just creating the python script and using acquisition? How does it work? :P
Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to