[Xapian-discuss] Does match weight include doc weight from index-time?
Henry
henka at cityweb.co.za
Wed Dec 24 06:15:57 GMT 2008
Quoting myself, since everyone else is goofing off,
>> Does a match weight calculation (BM25) factor in the document page
>> weight (eg, $analyzer->index_text( $text, $weight )) used during
>> index-time, or is it not related at all?
>
> Found the answer:
>
> http://www.xapian.org/docs/apidoc/html/classXapian_1_1BM25Weight.html#a0
>
> parameter k1==importance of wdf ($weight above is wdf increment)
I found through experimentation that unless I bumped k1 significantly
(::BM25Weight), any reasonable weight value for a term wouldn't even
creep into the significand (mantissa) of the match weight to make any
difference. This is particularly true of a large database where many
matches will have the same weight.
Tentatively, what seems to work for me so far is using
::BM25Weight(k1=100) resulting in index_text($term, 1-100) now having
meaning (where previously, even if I used a weight of 1000, it still
wouldn't impact the match weight at all).
Cheers
Henry
More information about the Xapian-discuss
mailing list