lucene-java-user mailing list archives

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

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



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

View raw message