From 6c372bb257cd4eba21a70e066b7509bf8088f17b Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 21 May 2002 15:18:34 +0000 Subject: [PATCH] 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). --- BaseIndex.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseIndex.py b/BaseIndex.py index 751d090..1b64059 100644 --- a/BaseIndex.py +++ b/BaseIndex.py @@ -82,8 +82,8 @@ def __init__(self, lexicon): self._docwords = IOBTree() def length(self): - """Return the number of documents in the index.""" - return len(self._docwords) + """Return the number of words in the index.""" + return len(self._wordinfo) def get_words(self, docid): """Returns the wordids for a given docid"""