diff roundup/backends/indexer_dbm.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 2817a4db901d
children a615cc230160
line wrap: on
line diff
--- a/roundup/backends/indexer_dbm.py	Sat Jan 08 14:52:13 2005 +0000
+++ b/roundup/backends/indexer_dbm.py	Sat Jan 08 16:16:59 2005 +0000
@@ -14,7 +14,7 @@
 #     that promote freedom, but obviously am giving up any rights
 #     to compel such.
 # 
-#$Id: indexer_dbm.py,v 1.4 2005-01-05 22:14:21 jlgijsbers Exp $
+#$Id: indexer_dbm.py,v 1.5 2005-01-08 16:16:59 jlgijsbers Exp $
 '''This module provides an indexer class, RoundupIndexer, that stores text
 indices in a roundup instance.  This class makes searching the content of
 messages, string properties and text files possible.
@@ -23,19 +23,7 @@
 
 import os, shutil, re, mimetypes, marshal, zlib, errno
 from roundup.hyperdb import Link, Multilink
-from roundup.backends.indexer_common import Indexer
-
-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
+from roundup.backends.indexer_common import Indexer, is_stopword
 
 class Indexer(Indexer):
     '''Indexes information from roundup's hyperdb to allow efficient

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