[Zope-CVS] CVS: Products/ZCTextIndex - Index.py:1.1.2.27
Tim Peters
tim.one@comcast.net
Fri, 3 May 2002 16:03:31 -0400
Update of /cvs-repository/Products/ZCTextIndex
In directory cvs.zope.org:/tmp/cvs-serv5828
Modified Files:
Tag: TextIndexDS9-branch
Index.py
Log Message:
search(): It's impossible that the result map already has docid as a
key, so don't waste time doing result.get(docid, 0) (that must be 0).
=== Products/ZCTextIndex/Index.py 1.1.2.26 => 1.1.2.27 ===
# scaled int * unscaled float / scaled int -> unscaled float
w = tf * idf / self._docweight[docid]
- result[docid] = result.get(docid, 0) + scaled_int(w)
+ result[docid] = scaled_int(w)
return result
def query_weight(self, terms):