Re: Letor: returning MSet after re-ranking

James Aylett <[email protected]>
Newsgroups gmane.comp.search.xapian.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.