Detailed reference of prototypes, properties and methods available in the
Javascript environment of your Helma web applications.

Fields and methods of the jala.IndexManager class.
jala IndexManager(name, dir, lang)
Constructs a new IndexManager object.
parameters
String name The name of the index, which is the name of the directory the index already resides or will be created in.
helma.File dir The base directory where this index's directory is already existing or will be created in.
String lang The language of the documents in this index. This leads to the proper Lucene analyzer being used for indexing documents.
methods
  • log(level, msg)
see
jala IndexManager.Job(id, type, data)
Creates a new Job instance.
parameters
Number id The Id of the job
Number type The type of job, which can be either jala.IndexManager.Job.ADD, jala.IndexManager.Job.REMOVE or jala.IndexManager.Job.OPTIMIZE.
Object data The data needed to process the job.
properties
see
Number jala. IndexManager.MAXTRIES
Constant defining the maximum number of tries to add/remove an object to/from the underlying index.
Number jala. IndexManager.NORMAL
Constant defining normal mode of this index manager.
Number jala. IndexManager.REBUILDING
Constant defining rebuilding mode of this index manager.
Number jala.IndexManager.Job. type
The type of the job
The data needed to process this job. For adding jobs this property must contain the {@link helma.Search.Document} instance to add to the index. For removal job this property must contain the unique identifier of the document that should be removed from the index. For optimizing jobs this property is null.
Number jala.IndexManager.Job. errors
An internal error counter which is increased whenever processing the job failed.
see
Date jala.IndexManager.Job. createtime
The date and time at which this job was created.
Number jala. IndexManager.Job.ADD
Constant defining an add job
Number jala. IndexManager.Job.REMOVE
Constant defining a removal job
Number jala. IndexManager.Job.OPTIMIZE
Constant defining an optimizing job
Methods
jala.IndexManager. getIndex()
Returns the underlying index.
returns
The index this queue is working on.
jala.IndexManager. getStatus()
Returns the status of this manager.
returns
The status of this index manager.
see
jala.IndexManager. setStatus(s)
Modifies the status of this manager, which has implications on how index modifying jobs are handled. If the status is {@link #REBUILDING}, all jobs are queued until the status is set back to {@link #NORMAL}.
parameters
Number s The new status of this manager.
see
jala.IndexManager. getQueue()
Returns the queue this index manager is using.
returns
The queue.
jala.IndexManager. getName()
Returns the name of the index manger, which is equal to the name of the underlying index
returns
The name of the index manager
jala.IndexManager. getIdFieldname()
Returns the name of the field containing the unique identifier of document objects in the index wrapped by this IndexManager. Defaults to "id".
returns
The name of the id field in the index
see
jala.IndexManager. setIdFieldname(name)
Sets the name of the field containing the unique identifier of document objects in the index wrapped by this IndexManager.
parameters
name
see
jala.IndexManager. hasOptimizingJob()
Returns true if the underlying index is currently optimized.
returns
True in case the index is optimized, false otherwise.
jala.IndexManager. isRebuilding()
Returns true if the underlying index is currently rebuilding.
returns
True in case the index is rebuilding, false otherwise.
Starts the IndexManager worker thread that processes the job queue
Stops this IndexManager instance
jala.IndexManager. isRunning()
Returns true if this IndexManager instance is running
returns
True if this IndexManager instance is running, false otherwise.
jala.IndexManager. log(level, msg)
Helper function that prefixes every log message with the name of the IndexManager.
parameters
String level An optional logging level. Accepted values
String msg The log message are "debug", "info", "warn" and "error".
jala.IndexManager. add(doc)
Queues the document object passed as argument for addition to the underlying index. This includes that all existing documents with the same identifier will be removed before the object passed as argument is added.
parameters
helma.Search.Document doc The document object that should be added to the underlying index.
returns
True if the job was added successfully to the internal queue, false otherwise.
see
jala.IndexManager. remove(id)
Queues the removal of all index documents whose identifier value ("id" by default) matches the number passed as argument.
parameters
Number id The identifier value
returns
True if the removal job was added successfully to the queue, false otherwise.
jala.IndexManager. optimize()
Queues the optimization of the underlying index.
returns
True if the optimizing job was added, false otherwise, which means that there is already an optimizing job waiting in the queue.
Fri, 05 Feb 2010 17:40:07 GMT.

core framework

optional modules

java libraries

properties files