[Zope] Ignore stopwords/characters in alphabetical results

Dieter Maurer dieter at handshake.de
Thu Feb 2 14:34:34 EST 2006


Ken Ara wrote at 2006-2-2 00:41 -0800:
>I have been asked to improve the order of search
>results, so that stop words and certain characters at
>the beginning of a title are ignored. "Final Report",
>"The Final Report" and "[Final] Report" all need to
>appear under the letter 'F'. 

Thus, you only want the change the result order.

Unless you want relevancy ranking (which is not the case,
depending on your description), ordering has nothing to
do with the indexes (at least not the text indexes).

Ordering can be done with "sequence.sort" (documented in
the Zope Online help system) or with Python's "sort" method.
In both cases, you can provide your own comparison function.
The comparison faction to use the vocabulary to check for
stopwords (words not known by the vocabulary are stopwords).

-- 
Dieter


More information about the Zope mailing list