Re: [ANN] Overriding Similarity

2007-03-02 Thread jreeman
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

Re: [ANN] Overriding Similarity

2007-03-02 Thread Doron Cohen
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

Re: [ANN] Overriding Similarity

2007-03-02 Thread jreeman
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

Re: Overriding Similarity

2006-08-19 Thread MH H
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

Re: Overriding Similarity

2006-08-19 Thread Chris Hostetter
: 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

Re: Overriding Similarity

2006-08-19 Thread MH H
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

Re: Overriding Similarity

2006-08-18 Thread Chris Hostetter
: 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

Overriding Similarity

2006-08-18 Thread Grant Ingersoll
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