Mercurial > p > roundup > code
diff roundup/backends/back_anydbm.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 | c1c67c62b699 |
line wrap: on
line diff
--- a/roundup/backends/back_anydbm.py Thu Apr 21 02:40:57 2005 +0000 +++ b/roundup/backends/back_anydbm.py Thu Apr 28 00:21:42 2005 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -#$Id: back_anydbm.py,v 1.186 2005-03-03 22:16:32 richard Exp $ +#$Id: back_anydbm.py,v 1.187 2005-04-28 00:21:42 richard Exp $ '''This module defines a backend that saves the hyperdatabase in a database chosen by anydbm. It is guaranteed to always be available in python versions >2.1.1 (the dumbdbm fallback in 2.1.1 and earlier has several @@ -41,7 +41,11 @@ from blobfiles import FileStorage from sessions_dbm import Sessions, OneTimeKeys -from indexer_dbm import Indexer + +try: + from indexer_xapian import Indexer +except ImportError: + from indexer_dbm import Indexer def db_exists(config): # check for the user db @@ -90,7 +94,7 @@ self.newnodes = {} # keep track of the new nodes by class self.destroyednodes = {}# keep track of the destroyed nodes by class self.transactions = [] - self.indexer = Indexer(self.dir) + self.indexer = Indexer(self) self.security = security.Security(self) # ensure files are group readable and writable os.umask(0002)
