Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes Class Reference
Inheritance diagram for
Inheritance graph
Collaboration diagram for
Collaboration graph

List of all members.

Public Member Functions

def __init__
def mainloop
def init_request
def run
def logRuntime

Public Attributes


Detailed Description

This tool allows you to control xapian's index of Moin.

Detailed Instructions:
General syntax: moin [options] index build [build-options]

[options] usually should be:

[build-options] see below:
Please note:
* You must run this script as the owner of the wiki files,
  usually this is the web server user.
* You may add the build-option --files=files.lst to let the indexer
  also consider the filesystem filenames contained in that file (one
  filename per line). Search results from these files will be "found"
  under a special pseudo page called FS (like File System).
  Without this option, the indexer will just consider pages and attachments.

1. Conditionally (considering modification time) update the index:
   moin ... index build --mode=update

2. Unconditionally add to the index:
   moin ... index build --mode=add

3. Completely rebuild the index (1-stage):
   moin ... index build --mode=rebuild

   Note: until it has completely built the new index, the wiki will still
   use the old index. After rebuild has completed, it kills the old index
   and moves the new index into its place.
   If the wiki uses the index at that moment, that might have unwanted side
   effects. If you want to avoid that and you can accept a short downtime,
   consider using this safer method:

   Completely rebuild the index (2-stage):
   # takes long, does not interfere with wiki searches:
   moin ... index build --mode=buildnewindex
   stop this moin wiki process(es)
   # quick, replaces the old index with the new one:
   moin ... index build --mode=usenewindex
   start this moin wiki process(es)

Definition at line 15 of file

Constructor & Destructor Documentation

def (   self,

Reimplemented from MoinMoin.script.MoinScript.

Definition at line 63 of file

00064     def __init__(self, argv, def_values):
00065         MoinScript.__init__(self, argv, def_values)
00066         self.parser.add_option(
00067             "--files", metavar="FILES", dest="file_list",
00068             help="filename of file list, e.g. files.lst (one file per line)"
00069         )
00070         self.parser.add_option(
00071             "--mode", metavar="MODE", dest="mode",
00072             help="either add (unconditionally add), update (conditional update), rebuild (complete 1-stage index rebuild)"
00073                  " or buildnewindex and usenewindex (complete 2-stage index rebuild)"
00074         )

Member Function Documentation

def MoinMoin.script.MoinScript.init_request (   self) [inherited]
create request 

Definition at line 174 of file

00175     def init_request(self):
00176         """ create request """
00177         from MoinMoin.web.contexts import ScriptContext
00178         url = self.options.wiki_url or None
00179         self.request = ScriptContext(url,

Here is the caller graph for this function:

def MoinMoin.script.Script.logRuntime (   self) [inherited]
Print the total command run time. 

Definition at line 148 of file

00149     def logRuntime(self):
00150         """ Print the total command run time. """
00151         if self.options.show_timing:
00152             log("Needed %.3f secs." % (time.clock() - _start_time, ))

Here is the call graph for this function:

Reimplemented from MoinMoin.script.MoinScript.

Definition at line 75 of file

00076     def mainloop(self):
00077         self.init_request()
00078         # Do we have additional files to index?
00079         if self.options.file_list:
00080             self.files = file(self.options.file_list)
00081         else:
00082             self.files = None
00083         self.command()

Here is the call graph for this function:

def (   self,
  showtime = 1 
) [inherited]
Run the main function of a command. 

Definition at line 130 of file

00131     def run(self, showtime=1):
00132         """ Run the main function of a command. """
00133         global flag_quiet
00134         try:
00135             try:
00136                 self.options, self.args = self.parser.parse_args(self.argv)
00137                 flag_quiet = self.options.quiet
00138                 # ToDo check if we need to initialize request (self.init_request())
00139                 self.mainloop()
00140             except KeyboardInterrupt:
00141                 log("*** Interrupted by user!")
00142             except SystemExit:
00143                 showtime = 0
00144                 raise
00145         finally:
00146             if showtime:
00147                 self.logRuntime()

Here is the caller graph for this function:

Member Data Documentation

Definition at line 135 of file

Definition at line 102 of file

Definition at line 79 of file

Definition at line 113 of file

Definition at line 178 of file

The documentation for this class was generated from the following file: