Jala 1.3

Class jala.IndexManager

Object
   |
   +--jala.IndexManager

class jala.IndexManager


This class basically sits on top of a helma.Search.Index instance and provides methods for adding, removing and optimizing the underlying index. All methods generate jobs that are put into an internal queue which is processed asynchronously by a separate worker thread. This means all calls to add(), remove() and optimize() will return immediately, but the changes to the index will be done within a short delay. Please keep in mind to change the status of this IndexManager instance to REBUILDING before starting to rebuild the index, as this ensures that all add/remove/optimize jobs will stay in the queue and will only be processed after switching the status back to NORMAL. This ensures that objects that have been modified during a rebuilding process are re-indexed properly afterwards.
Defined in IndexManager.js

See:


Nested Class Summary
<static class> jala.IndexManager.Job
 
Field Summary
<static>  <final> Number MAXTRIES
          Constant defining the maximum number of tries to add/remove an object to/from the underlying index.
<static>  <final> Number NORMAL
          Constant defining normal mode of this index manager.
<static>  <final> Number REBUILDING
          Constant defining rebuilding mode of this index manager.
 
Constructor Summary
jala.IndexManager (<String> name, <helma.File> dir, <String> lang)
            Constructs a new IndexManager object.
 
Method Summary
 Boolean add(<helma.Search.Document> doc)
           Queues the document object passed as argument for addition to the underlying index.
 void log()
           Helper function that prefixes every log message with the name of the IndexManager.
 Boolean optimize()
           Queues the optimization of the underlying index.
 Boolean remove(<Number> id)
           Queues the removal of all index documents whose identifier value ("id" by default) matches the number passed as argument.

Field Detail

MAXTRIES

<static> <final> Number MAXTRIES

NORMAL

<static> <final> Number NORMAL

REBUILDING

<static> <final> Number REBUILDING

Constructor Detail

jala.IndexManager

jala.IndexManager(<String> name, <helma.File> dir, <String> lang)

Method Detail

add

Boolean add(<helma.Search.Document> doc)

log

void log()

optimize

Boolean optimize()

remove

Boolean remove(<Number> id)

Jala 1.3

Documentation generated by JSDoc on Tue Jan 8 15:45:31 2008