[Zope-CVS] CVS: Products/ZCTextIndex - ZCTextIndex.py:1.1.2.3

Jeremy Hylton jeremy@zope.com
Wed, 1 May 2002 12:35:24 -0400


Update of /cvs-repository/Products/ZCTextIndex
In directory cvs.zope.org:/tmp/cvs-serv4327

Modified Files:
      Tag: TextIndexDS9-branch
	ZCTextIndex.py 
Log Message:
Use the real lexicon with the ZopeSplitter


=== Products/ZCTextIndex/ZCTextIndex.py 1.1.2.2 => 1.1.2.3 ===
+from Products.ZCTextIndex.Lexicon import Lexicon
 from Products.ZCTextIndex.QueryEngine import QueryEngine
 from Products.ZCTextIndex.QueryParser import QueryParser
 
-from Products.ZCTextIndex.tests.testIndex import SimpleLexicon
+from Products.PluginIndexes.TextIndex.Splitter.ZopeSplitter.ZopeSplitter \
+     import ZopeSplitter
 
 from Products.PluginIndexes.common.PluggableIndex \
      import PluggableIndexInterface
@@ -14,8 +16,9 @@
     __implements__ = PluggableIndexInterface
 
     def __init__(self, doc_attr="text"):
+        self.lexicon = Lexicon(ZopeSplitter)
         self.engine = QueryEngine()
-        self.index = Index(SimpleLexicon(), doc_attr)
+        self.index = Index(self.lexicon, doc_attr)
         self.parser = QueryParser()
 
     def index_object(self, docid, obj, thresh=None):