net.grcomputing.opencms.search.lucene
Class CronIndexManager

java.lang.Object
  |
  +--net.grcomputing.opencms.search.lucene.CronIndexManager

public class CronIndexManager
extends java.lang.Object

Handles the cron updates to the Lucene index.

Author:
Matt Butcher mbutcher@grcomputing.net
See Also:
http://grcomputing.net

Field Summary
static java.lang.String PARAM_CREATE_INDEX
          Param to control whether or not index is created.
static java.lang.String PARAM_REGISTRY_PATH
          THis param designates an alternate registry path.
 
Constructor Summary
CronIndexManager()
           
 
Method Summary
 java.lang.String launch(CmsObject cmso, java.lang.String params)
          This method is executed by the cron manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_CREATE_INDEX

public static java.lang.String PARAM_CREATE_INDEX
Param to control whether or not index is created. IF this param is set to "true", then the old index will be destroyed and a new one created. Otherwise, the old index will be updated. usage in cron: "createIndex=true".


PARAM_REGISTRY_PATH

public static java.lang.String PARAM_REGISTRY_PATH
THis param designates an alternate registry path. If this is set, then the specified registry file will be used instead of the system registry.xml file. Usage in cron: "registry=/path/to/registry.xml"

Constructor Detail

CronIndexManager

public CronIndexManager()
Method Detail

launch

public java.lang.String launch(CmsObject cmso,
                               java.lang.String params)
                        throws java.lang.Exception
This method is executed by the cron manager. It invokes the main IndexManager to update the Lucene indices. Indexing is a big job, and it may throw IOExceptions or CmsExceptions, and possibly classloader exceptions. Usually, and attempt is made to minimize small errors in order to get the index built.

Supported Params:

example params string: "param1=true,param2=/path,param3=test me"

Throws:
java.lang.Exception - when anything goes wrong.
See Also:
IndexManager


Copyright © 2003 Matt Butcher of Global Resources for Computing. Reporoduction and modification of this documents are allowed as in accordance with the GPL v2. Refer to COPYING.txt for information on acceptible use