comparison roundup/hyperdb.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 0e5f15520e70
children 507b2df02956
comparison
equal deleted inserted replaced
3543:0735c4587852 3544:5cd1c83dea50
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: hyperdb.py,v 1.115 2006-01-25 02:24:28 richard Exp $ 18 # $Id: hyperdb.py,v 1.116 2006-02-06 21:00:44 richard Exp $
19 19
20 """Hyperdatabase implementation, especially field types. 20 """Hyperdatabase implementation, especially field types.
21 """ 21 """
22 __docformat__ = 'restructuredtext' 22 __docformat__ = 'restructuredtext'
23 23
882 source = self.exportFilename(dirname, nodeid) 882 source = self.exportFilename(dirname, nodeid)
883 883
884 dest = self.db.filename(self.classname, nodeid, create=1) 884 dest = self.db.filename(self.classname, nodeid, create=1)
885 ensureParentsExist(dest) 885 ensureParentsExist(dest)
886 shutil.copyfile(source, dest) 886 shutil.copyfile(source, dest)
887
888 mime_type = None
889 if self.getprops().has_key('type'):
890 mime_type = self.get(itemid, 'type')
891 if not mime_type:
892 mime_type = self.default_mime_type
893 self.db.indexer.add_text((self.classname, nodeid, 'content'),
894 self.get(nodeid, 'content'), mime_type)
887 895
888 class Node: 896 class Node:
889 ''' A convenience wrapper for the given node 897 ''' A convenience wrapper for the given node
890 ''' 898 '''
891 def __init__(self, cl, nodeid, cache=1): 899 def __init__(self, cl, nodeid, cache=1):

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