[Xapian-devel] Is it possible to reset the parameters in BM25 each time a new query enters?

Richard Boulton richard at tartarus.org
Fri Feb 18 22:33:05 GMT 2011


2011/2/18 Shen Li <te_quira at hotmail.com>:
> I'm trying to improve the search results of our collection by tuning the
> parameters in the BM25 weighting schema. Since our collection includes
> several databases, such as for pictures, websites, etc., I would like to use
> different values of the same schema to calculate the weights. Yet,
> rebuilding each time after the change was done to the head file seems not an
> optimal approach and costs too much time. Then I'm wondering that whether
> there's some way to change the values without rebuilding. Also, I'm
> considering applying the BM25 schema with different parameters values
> according to a specific query, or according to the kind of databases it
> searches. Any suggestion is welcomed and appreciated!

You absolutely can set the BM25 parameters without reindexing - the
parameters are just set when setting the weight object on the enquire
object - this is all done at search time, not at index time.

-- 
Celestial Navigation Limited, incorporated in England & Wales
(registration number 06978117), registered office address: 58
Kingsway, Duxford, Cambridgeshire, CB224QN, UK.



More information about the Xapian-devel mailing list