|| at Nov 7, 2007 at 4:52 pm
On Wed, Nov 07, 2007 at 04:41:22PM +0000, James Aylett wrote:
On Wed, Nov 07, 2007 at 11:37:37AM -0500, Aleph Thomas wrote:
Maybe that not solve my question, because, in case that I need put
different relevance?, what I need put in my search query? Suppose tat
I am using xapian.
Weighting the terms generated from different input fields at index
time means that you don't have to do anything at all at search time -
it will just work.
The approach James suggests will work, if I understand the original
But its limitations are that the relative importance of the fields is
fixed at index time, and that the factors have to be integers.
You can achieve a similar effect at search time by varying the wqf
(within query frequency) of terms in the query, but again the factors
have to be integers.
As of 1.0.4, you can use OP_SCALE_WEIGHT to increase or decrease the
importance of subqueries, which allows this to be done at query time so
the relative importance of the fields can be varied easily. And
OP_SCALE_WEIGHT allows the factor to any non-negative real number.