dtSearch Text Retrieval Engine Programmer's Reference
Multithreaded Indexing and Searching

Rules for multithreaded use of the dtSearch Engine.

The dtSearch Engine supports multithreaded indexing and searching. 

API Objects. As a general rule, any API function can be called from any thread at any time. However, access to API objects such as SearchResults, IndexJob, etc. is not synchronized, so a single API object may not be accessed from more than one thread at a time. 

IndexCache is designed to operate as a thread-safe singleton so it can be accessed from multiple threads concurrently. 

Concurrent index access. An index can be searched on multiple threads concurrently, even if it is also being updated or compressed. 

An index can only be updated or compressed by one indexing job at a time. Therefore, even though the dtSearch Engine can conduct index update operations in multiple threads concurrently, each thread has to be updating a different index. 

Options. Option settings are maintained separately for each thread, so changes to options in one thread will not affect a job in progress on another thread. When a new thread is started, it will inherit the most recent option settings from other threads in the process.