THE INDEX MANAGER
The IndexManager manages all the pieces that constitute an index and coordinate the searches, indexing, word list viewing, etc. In other words, the IndexManager is needed to do just about everything to and with an index and is the central mechanism within the entire indexing and retrieval engine.
If you are going to be accessing an index through multiple threads, you will need to have a separate index manager for each thread or by using mutexes coordinate the access to a single index manager. (In other words, only one thread may access the same index manager at the same time.) When the same index is accessed via multiple index managers, the first index manager to open the index gets read/write access and the rest get read only access. For future compatibility, it is wise to close the index of the first index manager to access a given index last.