Letor: returning MSet after re-ranking

James Aylett james-xapian at tartarus.org
Thu Aug 4 14:16:17 BST 2016


On Thu, Aug 04, 2016 at 06:32:36AM +0100, Olly Betts wrote:

> It may not be the perfect API, but it at least offers more flexibility
> that just passing some new weights.  It is quite a primitive operation,
> but that makes it a good building block too.
> 
> Say you have the suggested method:
> 
> rerank_mset(vector<double> updated_weights)

If I suggested that (I can't remember now), I wasn't happy with it :)

I think I was preferring to pass in the new order of things. Computing
the swaps feels like something which should be implemented once, in
situations where you already know the order.

Could we expose a swap method, and then provide a helper that will
calculate the swaps needed? Would that be sufficiently flexible, while
making this case simpler (from the outside; the complexity is still
there, of course)?

J

-- 
  James Aylett, occasional trouble-maker
  xapian.org



More information about the Xapian-devel mailing list