[Zope-dev] Catalog relevance ranking

Michel Pelletier michel@digicool.com
Fri, 17 Sep 1999 17:50:59 -0400


The catalog now does relevance ranking.  If you search for an object and
specify a TextIndex search term, the result objects returned will have
two new attributes 'data_record_score_' and
'data_record_normalized_score_'.

The score is the frequency of the search term found in the document.
The normalized score is the score normalized between 0 and 1.

This is a big plus, since the catalog now returns hits in essentially
random order.

If you do not specify a text index search term, 'data_record_score_' and
'data_record_normalized_score_' will both be set to 'None', so you can
check for the precense of a score in DTML with <dtml-if>.

Relevance ranking can be found in the CVS version of Zope.  See
CHANGES.txt (in the CVS) for more details.

Have fun!

-Michel