Commit fee654c4 authored by Andreas Jung's avatar Andreas Jung

clearing a complete ZCatalog did not clear the vocabulary of a TextIndex.

parent d897151c
......@@ -87,7 +87,7 @@
"""
__version__ = '$Revision: 1.15 $'[11:-2]
__version__ = '$Revision: 1.16 $'[11:-2]
import string, re
......@@ -194,8 +194,6 @@ class TextIndex(PluggableIndex.PluggableIndex, Persistent,
if extra: self.vocabulary_id = extra.vocabulary
else: self.vocabulary_id = "Vocabulary"
self._lexicon = None
if lexicon is not None:
......@@ -210,8 +208,6 @@ class TextIndex(PluggableIndex.PluggableIndex, Persistent,
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 @@ class TextIndex(PluggableIndex.PluggableIndex, Persistent,
"""Reinitialize the text index."""
self._index = IOBTree()
self._unindex = IOBTree()
self.getLexicon().clear()
self._lexicon = None
def _convertBTrees(self, threshold=200):
......
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