[Zope-Checkins] CVS: Zope2 - TextIndex.py:1.1.2.7
andreas@digicool.com
andreas@digicool.com
Wed, 16 May 2001 12:49:56 -0400 (EDT)
Update of /cvs-repository/Zope2/lib/python/Products/PluginIndexes/TextIndex
In directory korak.digicool.com:/tmp/cvs-serv4427/PluginIndexes/TextIndex
Modified Files:
Tag: ajung-dropin-registry
TextIndex.py
Log Message:
rewrote some stinking splitter code
--- Updated File TextIndex.py in package Zope2 --
--- TextIndex.py 2001/05/16 16:09:13 1.1.2.6
+++ TextIndex.py 2001/05/16 16:49:55 1.1.2.7
@@ -111,7 +111,7 @@
from Products.PluginIndexes import PluggableIndex
from Products.PluginIndexes.common.ResultList import ResultList
-from Splitter import availableSplitters
+import Splitter
from Lexicon import Lexicon, stop_word_dict
@@ -179,10 +179,9 @@
self.call_methods = call_methods
# Default Splitter
- self.availableSplitters = availableSplitters
- self.useSplitter = self.availableSplitters[0]
+ self.availableSplitters = Splitter.availableSplitters
+ self.useSplitter = self.availableSplitters[0][0]
-
# Default text index operator (should be visible to mgmt
self.operators = { 'andnot':AndNot, 'and':And,
'near':Near, 'or':Or }
@@ -354,7 +353,8 @@
return 0
lexicon = self.getLexicon(self._lexicon)
- splitter=lexicon.Splitter
+# splitter=lexicon.Splitter
+ splitter = Splitter.getSplitter(self.useSplitter)
wordScores = OIBTree()
last = None