[Zope-Checkins] CVS: Zope2 - Catalog.py:1.60.2.8
Jim Fulton
jim@digicool.com
Mon, 19 Mar 2001 14:13:44 -0500 (EST)
Update of /cvs-repository/Zope2/lib/python/Products/ZCatalog
In directory korak:/tmp/cvs-serv3883
Modified Files:
Tag: zope-2_3-branch
Catalog.py
Log Message:
Fixed stupid bug that I added over the weekend. Now, when we create a
(Un)text index, we give the index our lexicon directly, except that I
gave it the vocabulary. :( I now give it the lexicon, by getting it
from the vocabulary. I added an interface to do this cleanly.
--- Updated File Catalog.py in package Zope2 --
--- Catalog.py 2001/03/17 18:15:25 1.60.2.7
+++ Catalog.py 2001/03/19 19:13:44 1.60.2.8
@@ -354,7 +354,9 @@
indexes[name] = UnIndex.UnIndex(name)
elif index_type == 'TextIndex':
lexicon=self.lexicon
- if type(lexicon) is type(''): lexicon=getattr(self, lexicon)
+ if type(lexicon) is type(''):
+ lexicon=getattr(self, lexicon).getLexicon()
+
indexes[name] = UnTextIndex.UnTextIndex(name, None, None, lexicon)
elif index_type == 'KeywordIndex':
indexes[name] = UnKeywordIndex.UnKeywordIndex(name)