[Zope-dev] ZCatalog Brains

Michel Pelletier michel@digicool.com
Wed, 23 May 2001 12:13:55 -0700 (PDT)


On Wed, 23 May 2001, Chris Withers wrote:

> Hi,
> 
> Is it still fair game to use the data_record_normalized_score_ attibute of
> ZCatalog Brain objects?

Yes.

> If so, is it accurate and meaningful?

Only for queries involving text indexes, and even then it's not very
meaningful.  It takes the entire batch of search results, from the most
relevant (word occourance score) the the least relevent, and normalizes
all their scores between 0 and 100 (or 0 and 1, same difference).

> Finally, is there any way I can do the Google-esque thing of showing the snippet
> of the searched etxt with the words that were found highlighted?

Yes, You would have to fetch the object and then scan it for the search
terms.

-Michel