[pylucene-dev] problems with DefaultSimilarity.tf?

Andi Vajda vajda at osafoundation.org
Tue Sep 5 19:10:15 PDT 2006


On Tue, 5 Sep 2006, Aaron Lav wrote:

> It looks to me as if, when I obtain a DefaultSimilarity object and
> attempt to call its tf method (to weight term frequency), it
> mishandles the case where it's passed a Python float.  (My application
> does this because it's doing the same thing as a Java
> SimilarityDelegator, and it just delegates the tf method without
> alteration.)  A workaround is to pass a Python integer.
>
> I've attached tf.py, which attempts to demonstrate the problem, and
> lucene.cpp.patch (against r290), which seems to fix the problem for me.

Indeed.

Your fix is checked into svn now.
Thanks !

Andi..


More information about the pylucene-dev mailing list