Commit a9357e8e authored by Guido van Rossum's avatar Guido van Rossum

length() is used by ZCTextIndex.numWords() -- it is supposed to return

the number of words in the index (at least to return a number
comparable to the number displayed under "# objects" by TextIndex).
parent 8b4268a8
...@@ -82,8 +82,8 @@ class BaseIndex(Persistent): ...@@ -82,8 +82,8 @@ class BaseIndex(Persistent):
self._docwords = IOBTree() self._docwords = IOBTree()
def length(self): def length(self):
"""Return the number of documents in the index.""" """Return the number of words in the index."""
return len(self._docwords) return len(self._wordinfo)
def get_words(self, docid): def get_words(self, docid):
"""Returns the wordids for a given docid""" """Returns the wordids for a given docid"""
......
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