> From: Hayes, Mark [mailto:[EMAIL PROTECTED]] > > I understand there are three modes for using IndexReader and > IndexWriter: > > A- IndexReader for reading only, not deleting > B- IndexReader for deleting (and reading) > C- IndexWriter (for adding and optimizing)
That sounds right. > Any number of readers may be used concurrently in mode A. Correct. > But for B and C > the reader or writer may not be kept open for long periods. The length of time doesn't really matter. What matters is that only one of B or C can be done at once. That's to say, only a single process/thread may modify an index at once. Modification should be single threaded. > Therefore for B and C each set of changes should be made inside a > synchronized block where the reader or writer is opened and > closed. That, or B and C should be done from a single flow of control. The most efficient update approach is to batch deletions and insertions. Doug -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
