[Zope-Checkins] CVS: Zope2 - TextIndex.py:1.1.2.2
andreas@digicool.com
andreas@digicool.com
Mon, 14 May 2001 16:14:32 -0400 (EDT)
Update of /cvs-repository/Zope2/lib/python/Products/PluginIndexes/TextIndex
In directory korak.digicool.com:/tmp/cvs-serv26787/TextIndex
Modified Files:
Tag: ajung-dropin-registry
TextIndex.py
Log Message:
update
--- Updated File TextIndex.py in package Zope2 --
--- TextIndex.py 2001/05/14 18:54:54 1.1.2.1
+++ TextIndex.py 2001/05/14 20:14:31 1.1.2.2
@@ -111,7 +111,7 @@
from Products.PluginIndexes import PluggableIndex
from Products.PluginIndexes.ResultList import ResultList
-from Splitter import Splitter
+from Splitter import Splitter,availableSplitters
from Lexicon import Lexicon, stop_word_dict
from Products.PluginIndexes.ResultList import ResultList
@@ -175,6 +175,11 @@
self.ignore_ex = ignore_ex
self.call_methods = call_methods
+ # Default Splitter
+ self.availableSplitters = availableSplitters
+ self.splitter = self.availableSplitters[0]
+
+
self.clear()
if lexicon is None:
@@ -667,6 +672,15 @@
if (len(query) != 1): raise QueryError, "Malformed query"
return query[0]
+
+
+ def manage_setPreferences(self,splitter,REQUEST=None,RESPONSE=None,URL1=None):
+ """ preferences of TextIndex """
+
+ self.splitter = splitter
+
+ if RESPONSE:
+ RESPONSE.redirect(URL1 + '/manage_main?manage_tabs_message=Preferences%20saved')
index_html = DTMLFile('dtml/index', globals())