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.
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.