diff roundup/backends/indexer_common.py @ 3092:a8c2371f45b6

Some cleanup: * indexer_rdbms.Indexer now subclasses from indexer_common.Indexer instead of indexer_dbm.Indexer * rdbms_common doesn't call save_index anymore * so we can remove save_index from indexer_rdbms and back_tsearch2 * indexer_rdbms.Indexer.rollback() wasn't used at all, so remove it * move is_stopword code to indexer_common
author Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
date Sat, 08 Jan 2005 16:16:59 +0000
parents 6da931530497
children 5cd1c83dea50
line wrap: on
line diff
--- a/roundup/backends/indexer_common.py	Sat Jan 08 14:52:13 2005 +0000
+++ b/roundup/backends/indexer_common.py	Sat Jan 08 16:16:59 2005 +0000
@@ -1,8 +1,21 @@
-#$Id: indexer_common.py,v 1.3 2005-01-08 11:25:23 jlgijsbers Exp $
+#$Id: indexer_common.py,v 1.4 2005-01-08 16:16:59 jlgijsbers Exp $
 import re
 
 from roundup import hyperdb
 
+stopwords = [
+"A", "AND", "ARE", "AS", "AT", "BE", "BUT", "BY",
+"FOR", "IF", "IN", "INTO", "IS", "IT",
+"NO", "NOT", "OF", "ON", "OR", "SUCH",
+"THAT", "THE", "THEIR", "THEN", "THERE", "THESE",
+"THEY", "THIS", "TO", "WAS", "WILL", "WITH" 
+]
+
+is_stopword = {}
+for word in stopwords:
+    is_stopword[word] = None
+is_stopword = is_stopword.has_key
+
 def _isLink(propclass):
     return (isinstance(propclass, hyperdb.Link) or
             isinstance(propclass, hyperdb.Multilink))

Roundup Issue Tracker: http://roundup-tracker.org/