comparison MoinMoin/script/index/build.py @ 946:72aeb2ba133d

support complete rebuild of the index
author Franz Pletz <fpletz AT franz-pletz DOT org>
date Fri, 14 Jul 2006 15:12:34 +0200
parents 45e286183872
children 41f6f7708466
comparison
equal deleted inserted replaced
945:248789a3f155 946:72aeb2ba133d
20 "--files", metavar="FILES", dest="file_list", 20 "--files", metavar="FILES", dest="file_list",
21 help="filename of file list, e.g. files.lst (one file per line)" 21 help="filename of file list, e.g. files.lst (one file per line)"
22 ) 22 )
23 self.parser.add_option( 23 self.parser.add_option(
24 "--mode", metavar="MODE", dest="mode", 24 "--mode", metavar="MODE", dest="mode",
25 help="either add (unconditionally add to index) or update (update an existing index)" 25 help="either add (unconditionally add to index), update (update an existing index) or rebuild (remove and add)"
26 ) 26 )
27 27
28 def mainloop(self): 28 def mainloop(self):
29 self.init_request() 29 self.init_request()
30 # Do we have additional files to index? 30 # Do we have additional files to index?
38 """ Xapian index build script class """ 38 """ Xapian index build script class """
39 39
40 def command(self): 40 def command(self):
41 from MoinMoin.search.Xapian import Index 41 from MoinMoin.search.Xapian import Index
42 Index(self.request).indexPages(self.files, self.options.mode) 42 Index(self.request).indexPages(self.files, self.options.mode)
43 #Index(self.request).test(self.request)
44 43