lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Sorting in lucene through Document boosting
Date Sat, 13 Sep 2008 22:59:07 GMT

: I thought of setting boost value for documents at index time, with the
: value of my sort field, and then making custom Similarity class which
: would disregard Lucene scoring and take in evaluation only this document
: boost.

the general idea should work, but a few things to pay attention to...

1) document boosts are folded into the fieldNorm, so make sure you don't

2) your lengthNorm function needs to return a constant

3) you'll need to adjust your boost values so that when the fieldNorms are 
converted to the internal 'byte' representation they are still unique ... 
with some simple experimentation you can find an approach that helps you 
genreate a mapping from 1,2,3,4,5... to a,b,c,d,... where a<b<c<....


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message