Commit f8d4e017 authored by Jeffrey Shell's avatar Jeffrey Shell

fixed bug in .clear() method

parent 4b118367
...@@ -127,8 +127,8 @@ Notes on a new text index design ...@@ -127,8 +127,8 @@ Notes on a new text index design
$Id: TextIndex.py,v 1.7 1997/12/01 22:58:48 jeffrey Exp $''' $Id: TextIndex.py,v 1.8 1997/12/02 19:36:19 jeffrey Exp $'''
__version__='$Revision: 1.7 $'[11:-2] __version__='$Revision: 1.8 $'[11:-2]
from Globals import Persistent from Globals import Persistent
import BTree, IIBTree import BTree, IIBTree
...@@ -164,7 +164,7 @@ class TextIndex(Persistent): ...@@ -164,7 +164,7 @@ class TextIndex(Persistent):
self._reindex() self._reindex()
def clear(self): def clear(self):
self._init() self._index=BTree()
def positions(self, docid, words): def positions(self, docid, words):
"""Return the positions in the document for the given document """Return the positions in the document for the given document
...@@ -626,6 +626,9 @@ for word in stop_words: stop_word_dict[word]=None ...@@ -626,6 +626,9 @@ for word in stop_words: stop_word_dict[word]=None
############################################################################## ##############################################################################
# #
# $Log: TextIndex.py,v $ # $Log: TextIndex.py,v $
# Revision 1.8 1997/12/02 19:36:19 jeffrey
# fixed bug in .clear() method
#
# Revision 1.7 1997/12/01 22:58:48 jeffrey # Revision 1.7 1997/12/01 22:58:48 jeffrey
# Allow indexing of non-text fields # Allow indexing of non-text fields
# #
......
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