Home | Trees | Indices | Help |
|
---|
|
Responsible for updating and maintaining the search engine index.
A single _Indexer thread is created to handle all index modifications.
Once the thread is started, messages are sent to it by calling the instance with a task and an object, where the task is one of the following strings:
and the object is any object that make_document knows how to handle.
To properly shutdown the thread, send the stop task with None
as the
object. (This is normally handled by the turbolucene._stop function.)
To optimize the index, which can take a while, pass the optimize
task with None
for the object. (This is normally handled by the
TurboGears scheduler as set up by _schedule_optimization.)
See Also: turbolucene.start for details about make_document.
|
|||
Inherited from Inherited from Inherited from Inherited from Inherited from |
|||
Public API | |||
---|---|---|---|
|
|||
|
|||
Threaded methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
Inherited from |
|
Initialize the message queue and the PyLucene indexes. One PyLucene index is created/opened for each of the configured supported languages. This method uses the turbolucene.default_language and turbolucene.languages configuration settings.
Note: Instantiating this class starts the thread automatically. See Also:
|
Pass If If
See Also:
|
Main thread loop to do dispatching based on messages in the queue. This method expects that the queue will contain 3-tuples in the form of
(task, object, language), where task is one of add, update,
remove, optimize or stop, entry is any object that
make_document can handle or If the task is stop, then the thread shuts down.
|
Add a new object to the index. If
Note: This method is run in the thread. See Also: turbolucene.start for details about make_document. |
Remove an object from the index. If
Note: This method is run in the thread. See Also: turbolucene.start for details about make_document. |
Update an object in the index by replacing it. This method updates the index by removing and then re-adding the object.
Note: This method is run in the thread. See Also:
|
Note: This method is run in the thread. |
Note: This method is run in the thread. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Sun Apr 1 18:46:31 2007 | http://epydoc.sourceforge.net |