[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndex - TextIndex.py:1.16

Andreas Jung andreas@zope.com
Wed, 3 Oct 2001 13:44:01 -0400


Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndex
In directory cvs.zope.org:/tmp/cvs-serv533/lib/python/Products/PluginIndexes/TextIndex

Modified Files:
	TextIndex.py 
Log Message:
clearing a complete ZCatalog did not clear the vocabulary of a TextIndex.


=== Zope/lib/python/Products/PluginIndexes/TextIndex/TextIndex.py 1.15 => 1.16 ===
         else:       self.vocabulary_id = "Vocabulary"
 
-        
-
         self._lexicon = None
 
         if lexicon is not None:
@@ -210,8 +208,6 @@
     def getLexicon(self, vocab_id=None):
         """Return the Lexicon in use. Removed lots of stinking code"""
 
-        
-
         if self._lexicon is None:
             ## if no lexicon is provided, create a default one
             try:
@@ -232,6 +228,7 @@
         """Reinitialize the text index."""
         self._index   = IOBTree()
         self._unindex = IOBTree()
+        self.getLexicon().clear()
         self._lexicon = None
 
     def _convertBTrees(self, threshold=200):