lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <>
Subject Re: sorting by per doc hit count
Date Wed, 20 Dec 2006 03:41:33 GMT
I appreciate your help Hoss. That has cleared up some things for me. The 
problem reamins that I would like to be able to switch between the hits 
per doc Similarity and the default Similarity on  any given search. I 
was hoping that I could index with DefaultSimilarity and store the norms 
for normal relevancy searching. Then I would need to ignore or make 
constant the norms with a custom Similarity for hits per doc searching. 
It would seem that this is not as easy as I had hoped it might be.

- Mark

Chris Hostetter wrote:
> : 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:
> For additional commands, e-mail:

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

View raw message