Now that I think about it, putting the score-multiplier into the FreqFile does offer a benefit I hadn't considered before. It makes it possible to tie the score multiplier to a term within a doc, rather than a field within a doc.
Say you have a doc with a "body" field that's 1000 terms long, with 3 instances of "foo", right near the top. Say you have another doc with a "body" that's 1000 terms long, and that it also has 3 instances of "foo" but they're buried near the end, and therefore not as important.
Under the current implementation, these two docs will score identically against a query for "body:foo", as the freq is identical and so is the output of lengthNorm(1000). But if you stuff the score multiplier into the FreqFile, a sophisticated indexing app could assign a higher score multiplier to the term "body:foo" in the first doc.
Associating a score multiplier with each position (a.k.a. WEIGHT_PER_POSITION, BOOST_PER_POSITION) would achieve the same end, but at the expense of much more processing per document, as the score would have to be built up position by position. OTOH, it would produce more accurate results for queries where only certain positions ought to be considered, such as phrase queries.
Marvin Humphrey Rectangular Research http://www.rectangular.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]