lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claudio Gennaro <claudio.genn...@isti.cnr.it>
Subject R: sumOfSquaredWeights for lengthNorm
Date Mon, 10 Aug 2009 13:57:43 GMT
Yes, this is probably the right way, but the problem is how. The method
lengthNorm(String fieldName, int numTerms) of the Similarity Class takes as
input parameter only the number of terms of the current doc being indexed.
Instead, I need the evaluate the sum of the squared of the distinct term
frequencies.

Claudio

-----Messaggio originale-----
Da: Grant Ingersoll [mailto:gsingers@apache.org] 
Inviato: lunedì 10 agosto 2009 15.18
A: java-user@lucene.apache.org
Oggetto: Re: sumOfSquaredWeights for lengthNorm

You can override the Similarity class and set it on both the  
IndexWriter and the IndexReader.   Is that your question?

On Aug 10, 2009, at 3:55 AM, Claudio Gennaro wrote:

> Dear all,
>
>
>
> I read a very old message on the list about the use of  
> sumOfSquaredWeights
> in lengthNorm (Mon, 06 Mar 2006 19:06:28 GMT from Eugene). I just  
> wanted to
> do the same, i.e., to override the Similarity class of Lucene in  
> order to
> normalize the term weights of a doc with the sum of the squares of  
> doc term
> frequencies in the doc.
>


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



---------------------------------------------------------------------
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