Commit 09afa685 authored by Tim Peters's avatar Tim Peters

Got rid of _add_undoinfo; it's clearer to do the one-liner inline.

parent 7634c526
......@@ -75,7 +75,7 @@ class CosineIndex(BaseIndex):
for i in range(len(uniqwids)):
self._add_wordinfo(uniqwids[i], freqs[i], docid)
self._docweight[docid] = docweight
self._add_undoinfo(docid, wids)
self._docwords[docid] = WidCode.encode(wids)
return len(wids)
def _search_wids(self, wids):
......@@ -136,9 +136,6 @@ class CosineIndex(BaseIndex):
#print "->", weights[i]
return d.keys(), weights, scaled_int(W)
def _add_undoinfo(self, docid, wids):
self._docwords[docid] = WidCode.encode(wids)
# The rest are helper methods to support unit tests
def _get_wdt(self, d, t):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment