Knowledgebase Home Page  >  SearchUnit
Search the Knowledge Base
What does "You can not run two simultaneous operations on the same index directory" mean?
https://keyoti.com/kb/Default.aspx?ToDo=view&questId=277&catId=54

Options

Print this page
Email this to a friend

Problem:

Unlimited numbers of processes can perform concurrent searches on an index, however certain index building operations can only be performed by one process at a time. 

If two processes attempt to open the index with write privilege, you will see the error "You can not run two simultaneous operations on the same index directory".

For example, if the Windows Service is currently rebuilding the index, and the Index Management tool is opened on that same index directory, the error will be shown.  Or, programmatically if 2 instances of DocumentIndex are attempting to work on the same index directory, one will be blocked with the error.

 

Resolution:

To resolve the problem, wait until the other process has finished.  If however you are certain that another process is not currently running on the index directory, you can unlock the index using the Index Manager Tool (it gives you the option to unlock the index when the error above is shown).  Note though, that if you incorrectly unlock an index that is actually being used elsewhere, you may corrupt the index.

If you are creating DocumentIndex objects programmatically, ensure you always call DocumentIndex.Close() as soon as you are finished with it.

As a rule, indexes are only left in a locked state if the process that locked it crashes, or DocumentIndex.Close() is not called in user code.


Related Questions:

Attachments:

No attachments were found.