Forum: Ferret Adjusting scores

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Mark J. (Guest)
on 2006-01-14 15:31
(Received via mailing list)
One other mod to Ferret I've found useful is to add
the following line at the top of the each_hit() block
in Search::IndexSearcher.search:

      score = yield( doc, score ) if block_given?

This allows a block attached to a search call to adjust
document scores before documents are sorted, based on
some (possibly dynamic) numerical factors associated
with the document, e.g. the number and importance of
incoming links to the document (Google's PageRank).
David B. (Guest)
on 2006-01-15 01:25
(Received via mailing list)
Thanks Mark. Keep these ideas coming. I'll be considering them all for
the next version of Ferret.

Dave
This topic is locked and can not be replied to.