[Xapian-devel] Dealing with negative weights

Olly Betts olly at survex.com
Sat Jun 22 12:11:41 BST 2013


On Sat, Jun 22, 2013 at 12:41:52PM +0530, Aarsh Shah wrote:
> I was adding the calculations for a lower bound to get_sumpart() (DLH has
> no term independent component) when I realized that the same lower bound
> will be calculated for each term-docment pair that get_sumpart is called
> pair which basically reduces efficiency. How do I calculate the lower bound
> for a term only once and then use it ?

Can you calculate it in the init() method of your subclass and store it
in a member variable?

Cheers,
    Olly



More information about the Xapian-devel mailing list