[Xapian-discuss] Sorting by a custom expr

James Aylett james-xapian at tartarus.org
Fri Jan 20 10:24:30 GMT 2006


On Fri, Jan 20, 2006 at 07:00:27AM -0300, Carlos Pita wrote:

> I need to keep a fixed relevance number for each document which is
> precalculated from "business variables" external to the query. Call
> it brel and then call qrel the relevance coming from the query,
> which would be calculated by xapian.  brel and qrel are combined in
> an expression like (B * brel + Q * qrel), with B and Q constants, to
> obtain the final relevance according to which the documents
> (products) must be sorted.

You should be able to do this with a custom weighting class. This
isn't supported in most of the bindings yet, but it'll work from C++.

Cheers,
James

-- 
/--------------------------------------------------------------------------\
  James Aylett                                                  xapian.org
  james at tartarus.org                               uncertaintydivision.org



More information about the Xapian-discuss mailing list