Commit de87a900 authored by Andreas Jung's avatar Andreas Jung

clearing the vocabulary made it impossible to create a new ZCatalog

*sigh*
parent fee654c4
......@@ -87,7 +87,7 @@
"""
__version__ = '$Revision: 1.16 $'[11:-2]
__version__ = '$Revision: 1.17 $'[11:-2]
import string, re
......@@ -189,12 +189,12 @@ class TextIndex(PluggableIndex.PluggableIndex, Persistent,
# Default text index operator (should be visible to ZMI)
self.useOperator = 'or'
self.clear()
if extra: self.vocabulary_id = extra.vocabulary
else: self.vocabulary_id = "Vocabulary"
self._lexicon = None
self.clear()
if lexicon is not None:
......@@ -228,7 +228,8 @@ class TextIndex(PluggableIndex.PluggableIndex, Persistent,
"""Reinitialize the text index."""
self._index = IOBTree()
self._unindex = IOBTree()
self.getLexicon().clear()
if self.getLexicon():
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