lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From escher2k <esche...@yahoo.com>
Subject Enhance similarity to pass in field name (Reposting)
Date Thu, 04 Jan 2007 23:53:44 GMT

Hi, 
  I am trying to create a linear function  to influence the similarity
computation. For example - 
  if tf = 4, f(tf) = 150 * 1 + 150 * 0.3 
                     = 195 

The first occurrence is multiplied by 150. The next three occurrences are
mulitplied by 150 and 
divided by 10 (3/10). 

However, we don't have access to the field name in the function public float
tf(float freq). 
Is there any way out ? I would think passing the field name along with the
freq to 
create public float tf(float freq, String fieldName)  would be useful -
unless there is a better way. 

Sorry, the subject line was not clear previously.

Thanks.
-- 
View this message in context: http://www.nabble.com/Enhance-similarity-to-pass-in-field-name-%28Reposting%29-tf2922901.html#a8170311
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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