lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugene <echot...@gmail.com>
Subject sumOfSquaredWeights for lengthNorm
Date Mon, 06 Mar 2006 19:06:28 GMT
Hi,

I would like to override the Similarity class lengthNorm(String 
fieldName, int numTerms) so that it behaves similar to queryNorm(float 
sumOfSquaredWeights).  So the method signature becomes lengthNorm(String 
fieldName, float sumOfSquaredWeights) where sumOfSquaredWeights = sum of 
the squares of doc term weights.

Looking at the way sumOfSquaredWeights was used in 
org.apache.lucene.search.Query weight method, I would like to have a 
weight method in org.apache.lucene.document.Field (or may be in 
org.apache.lucene.document.Document) which returns the weight based on 
the terms in the Field. Can anyone tell me how to start?

Thanks.

--
Eugene

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