diff roundup/backends/rdbms_common.py @ 3295:a615cc230160

added Xapian indexer; replaces standard indexers if Xapian is available
author Richard Jones <richard@users.sourceforge.net>
date Thu, 28 Apr 2005 00:21:42 +0000
parents 440f0a6a2e3c
children ae1093684ef5
line wrap: on
line diff
--- a/roundup/backends/rdbms_common.py	Thu Apr 21 02:40:57 2005 +0000
+++ b/roundup/backends/rdbms_common.py	Thu Apr 28 00:21:42 2005 +0000
@@ -1,4 +1,4 @@
-# $Id: rdbms_common.py,v 1.151 2005-03-03 22:16:32 richard Exp $
+# $Id: rdbms_common.py,v 1.152 2005-04-28 00:21:42 richard Exp $
 ''' Relational database (SQL) backend common code.
 
 Basics:
@@ -39,7 +39,10 @@
 
 # support
 from blobfiles import FileStorage
-from indexer_rdbms import Indexer
+try:
+    from indexer_xapian import Indexer
+except ImportError:
+    from indexer_rdbms import Indexer
 from sessions_rdbms import Sessions, OneTimeKeys
 from roundup.date import Range
 
@@ -321,6 +324,7 @@
         for klass in classes:
             for nodeid in klass.list():
                 klass.index(nodeid)
+        self.indexer.save_index()
 
     hyperdb_to_sql_datatypes = {
         hyperdb.String : 'TEXT',
@@ -1177,6 +1181,9 @@
         for method, args in self.transactions:
             method(*args)
 
+        # save the indexer
+        self.indexer.save_index()
+
         # clear out the transactions
         self.transactions = []
 

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