[Xapian-discuss] Giving weights to terms
James Aylett
james-xapian at tartarus.org
Tue Jun 12 10:38:03 BST 2007
On Tue, Jun 12, 2007 at 07:01:46AM +0000, David wrote:
> Is it possible to give more weights to terms that I *know* are more
> important?
When you are indexing in your own code (as opposed to using omindex,
for instance), you can specify a 'wdfinc' (basically the weight of the
term) to the Document::add_posting() and Document::add_term()
methods. See the documentation for details, but basically it's an
extra parameter after the term (for add_term) or term and position
(for add_posting).
If you're indexing using scriptindex, you can use the weight= action
to change the wdfinc, but this isn't as granular, because it applies
to the indexing of an entire scriptindex input field.
J
--
/--------------------------------------------------------------------------\
James Aylett xapian.org
james at tartarus.org uncertaintydivision.org
More information about the Xapian-discuss
mailing list