diff roundup/backends/indexer_dbm.py @ 3544:5cd1c83dea50

Features and fixes. Feature: - trackers may configure custom stop-words for the full-text indexer Fixed: - fixes in scripts/import_sf.py - fix some unicode bugs in roundup-admin import - Xapian indexer wasn't actually being used - fix indexing of message content on roundup-admin import
author Richard Jones <richard@users.sourceforge.net>
date Mon, 06 Feb 2006 21:00:47 +0000
parents a615cc230160
children 91c495476db3
line wrap: on
line diff
--- a/roundup/backends/indexer_dbm.py	Mon Feb 06 02:35:47 2006 +0000
+++ b/roundup/backends/indexer_dbm.py	Mon Feb 06 21:00:47 2006 +0000
@@ -14,7 +14,7 @@
 #     that promote freedom, but obviously am giving up any rights
 #     to compel such.
 # 
-#$Id: indexer_dbm.py,v 1.6 2005-04-28 00:21:42 richard Exp $
+#$Id: indexer_dbm.py,v 1.7 2006-02-06 21:00:47 richard 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,9 +23,9 @@
 
 import os, shutil, re, mimetypes, marshal, zlib, errno
 from roundup.hyperdb import Link, Multilink
-from roundup.backends.indexer_common import Indexer, is_stopword
+from roundup.backends.indexer_common import Indexer as IndexerBase
 
-class Indexer(Indexer):
+class Indexer(IndexerBase):
     '''Indexes information from roundup's hyperdb to allow efficient
     searching.
 
@@ -38,6 +38,7 @@
     where identifier is (classname, nodeid, propertyname)
     '''
     def __init__(self, db):
+        IndexerBase.__init__(self, db)
         self.indexdb_path = os.path.join(db.config.DATABASE, 'indexes')
         self.indexdb = os.path.join(self.indexdb_path, 'index.db')
         self.reindex = 0
@@ -96,7 +97,7 @@
         # find the unique words
         filedict = {}
         for word in words:
-            if is_stopword(word):
+            if self.is_stopword(word):
                 continue
             if filedict.has_key(word):
                 filedict[word] = filedict[word]+1

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