One other mod to Ferret I’ve found useful is to add
the following line at the top of the each_hit() block
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).