[Xapian-discuss] Relevance, weighting and searching by specifically weighted text

Richard Boulton richard at tartarus.org
Wed Jun 1 12:14:45 BST 2011

On 1 June 2011 11:06, Justin Finkelstein
> I've been asked if it's possible to narrow queries to just a particular
> field (translating into fields with a specific weight) within the index.
> I've had a look at the reference for the
> Xapian_Enquire::set_weighting_scheme method and cannot see a way where
> altering the parameters of the BM25 weighting scheme can achieve this.
> Is there a way this can be done?

Yes, there is.  You need to index each field you want to be able to
search (or weight) individually, with a unique prefix.  Then, see


More information about the Xapian-discuss mailing list