[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndexNG - TextIndexNG.py:1.2.2.19
Andreas Jung
andreas@digicool.com
Tue, 22 Jan 2002 12:37:36 -0500
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndexNG
In directory cvs.zope.org:/tmp/cvs-serv11843
Modified Files:
Tag: ajung-textindexng-branch
TextIndexNG.py
Log Message:
added simple interface for stop words
=== Zope/lib/python/Products/PluginIndexes/TextIndexNG/TextIndexNG.py 1.2.2.18 => 1.2.2.19 ===
+ ###################################################################
+ # Stopword handling
+ ###################################################################
+
+ def getStopWords(self):
+ return self._stopwords.items()
+
+ def manage_addStopWord(self, newword, RESPONSE=None, URL1=None):
+ """ add a new stop word """
+
+ self._stopwords[newword] = ''
+
+ if RESPONSE:
+ RESPONSE.redirect(URL1 + '/manage_stopwords?manage_tabs_message=Word%20added')
+
+
+ def manage_delStopWord(self, words, RESPONSE=None, URL1=None):
+ """ delete a list of stop words """
+
+ for w in words: del self._stopwords[w]
+
+ if RESPONSE:
+ RESPONSE.redirect(URL1 + '/manage_stopwords?manage_tabs_message=Word%20deleted')
+
+
def manage_setPreferences(self,extra,
REQUEST=None,RESPONSE=None,URL2=None):
""" preferences of TextIndex """