[Xapian-discuss] word pair indexing and querying
James Aylett
james-xapian at tartarus.org
Thu Sep 21 18:28:18 BST 2006
On Thu, Sep 21, 2006 at 06:14:35PM +0100, richard at lemurconsulting.com wrote:
> > (Hmm ... we don't have a way of giving one half of a Query() branch a
> > bigger weight than another, do we? I'm thinking of having an operator
> > which effectively just frobs q_t appropriately in BM25.)
>
> We don't currently, but such a thing would be very easy to implement. The
> hardest part would be making a reasonable interface for it in the API.
We could have a new constructor to Xapian::Query():
----------------------------------------------------------------------
using Xapian;
// with q1, q2
Query q = new Query(Query::OP_WEIGHTED_OR, q1, q2, 2.0);
// q1 terms are twice as important as q2
----------------------------------------------------------------------
or something similar. Or, I suppose, an optional parameter to the end
of every query constructor that weights the first leg over the second
(or a float iterator for the iterator constructor?).
J
--
/--------------------------------------------------------------------------\
James Aylett xapian.org
james at tartarus.org uncertaintydivision.org
More information about the Xapian-discuss
mailing list