lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: sorting by per doc hit count
Date Tue, 19 Dec 2006 22:14:37 GMT

: Foolish me...override a static method...silly silly. Still, I think
: there must be some way. I don't care about the field
: normalization...there must be some way to make it return a constant 1
: when using a new Similarity class.

as discussed: norms are a value explicitly stored in your index, so the
easiest way to ensure that they don't factor into the score is to use
OMIT_NORMS (or use your custom SImilarity with your customlengthNorm
function) when indexing.

once your index is built, the only way to ignore norms is with a custom
IndexReader (it's the "IndexReader.norms" method you need to worry about)

fortunately FilterIndexReader solves a lot of the busy work so you can
focus on just the norms method.



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message