lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Why is frequency a float number
Date Thu, 04 Mar 2010 17:50:24 GMT

:    I was wondering why TF method gets a float parameter. Isn't frequency
: always considered to be integer? 
: 
:    public abstract float tf(float freq)

Take a look at how PhraseQuery and SPanNearQuery use tf(float).

For simple terms (and TermQuery) tf is always an integer, but when dealing 
with phrases the concept of a "sloppy match" (ie: a phrase with a gap in 
the middle) results in a fractional "frequency" value because it is not as 
good as an "exact" match on the phrase (which does result in an integer tf 
value)




-Hoss


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