johnl/xapian-fu — pull request #17 by ragalie (2012-05-14 02:41:19+00:00)
Title: Adds support for term weights when indexing

Xapian supports adding extra weight to certain terms as part of the
indexing process.

This commit adds a :weights option to XapianDb.new which takes a
function that returns an integer weight value for the given key and
value. This weight value is then passed to the TermGenerator as part
of the index_text process.

If a weights function isn't provided, the current default of 1 is
passed instead.