[Xapian-discuss] Sorting by a custom expr

Carlos Pita carlosjosepita at gmail.com
Fri Jan 20 10:00:27 GMT 2006


Hi!
I'm evaluating using xapian for indexing an ecommerce site,
instead of using a rdbms as we currently do. 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. Is there any way to do this
with xapian? I noticed that you can order by an arbitrary
document sort key but what I really need is to combine
this key with the relevance calculated by xapian weighting.
Sorting first by qrel and then by brel or vice versa
(*set_sort_by_value_then_relevance) *wouldn't work either.
What about bias functors? Can you give me some clue on
using them?
Thank you in advance.
Best regards,
Carlos



More information about the Xapian-discuss mailing list