[Xapian-discuss] Sorting by a custom expr
James Aylett
james-xapian at tartarus.org
Fri Jan 20 11:47:20 GMT 2006
On Fri, Jan 20, 2006 at 08:06:47AM -0300, Carlos Pita wrote:
> Umh, I can't see how to get a value from a document while
> computing weight inside a subclass of Xapian::Weight. The
> interface
>
> Xapian::weight get_sumpart (Xapian::termcount, Xapian::doclength len)
> Xapian::weight get_sumextra (Xapian::doclength len)
>
> doesn't take the document as a parameter but just the
> the document length. And the brel I need is a custom value
> attached to the document. Am I missing something?
Umm, good point :-(
I think Olly was planning on fiddling with this interface at some
point, although I may be making that up. I think he needs to discuss
this, really - he's on holiday at the moment, and will be back in
February.
I can't think of a terribly efficient way of doing this without that
kind of change. I *think* the change could be done in
common/leafpostlist.h, but I haven't touched anything to do with that
part of the system before so I don't know what kind of knock-on
effects would result from trying to send in the document or docid as
well as the doclen.
J
--
/--------------------------------------------------------------------------\
James Aylett xapian.org
james at tartarus.org uncertaintydivision.org
More information about the Xapian-discuss
mailing list