f all you want to modify is idf(), using the modified similarity
class only at search time is ok. For further pointers and explanations take
a look at http://lucene.apache.org/java/docs/scoring.html
thanks a lot.
--
View this message in context:
http://www.nabble.com/Overriding-Similarity-tf2128934.htm
ion is : do I need to use this PersonalSimilarity for the
> IndexWriter because currently it yet works fine only in the Searcher.
>
> --
> View this message in context: http://www.nabble.com/Overriding-
> Similarity-tf2128934.html#a9269838
> Sent from the Lucene - Java Users mailin
milarity();
searcher.setSimilarity(ds);
After that, all the hit have the same score.
But my new question is : do I need to use this PersonalSimilarity for the
IndexWriter because currently it yet works fine only in the Searcher.
--
View this message in context:
http://www.nabble.com/Overriding-Si
Ah, I see, I should of course use the same similarity during indexing
and searching. Many thanks!
On 20/08/06, Chris Hostetter <[EMAIL PROTECTED]> wrote:
: And then I made this subclass the default similarity. It worked well
: for tf but not for lengthNorm. The reason appears to be that the
: Te
: And then I made this subclass the default similarity. It worked well
: for tf but not for lengthNorm. The reason appears to be that the
: TermScorer class does not call lengthNorm, but instead uses a cache
Acctually, the lengthNorm method is used by the IndexWriter; it compresses
the float retur
I had a situation where I was only interested in whether the term was
there or not (not how many times), and I didn't want to penalize long
fields. So I wrote a Similariy subclass where I overrided the
following methods as this:
public float lengthNorm(String fieldName, int numTerms) {
ret
: I am doing some documentation on scoring and I am interested in use
: cases people have for overriding the DefaultSimilarity. If you can
: share what you did and why you did it, it would be much appreciated.
I touched on this a little bit when i commited SweetSpotSimilarity...
http://www.nabb
Hey Luceners,
I am doing some documentation on scoring and I am interested in use
cases people have for overriding the DefaultSimilarity. If you can
share what you did and why you did it, it would be much appreciated.
For example, Daniel Naber posted his at: http://www.gossamer-
threads.c