lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Garski <>
Subject RE: Exceptions When Indexing with Multi-threading
Date Thu, 29 Oct 2009 16:33:36 GMT
Does each thread have its own IndexWriter?  This could cause the issue
you describe.

IndexWriter is thread-safe so that multiple threads can use the same
instance, however you will see a performance degradation compared to
only having one thread modify the index.  We've done quite a bit of
testing for that case a while back and only have one thread modifying an
index at a time.


-----Original Message-----
From: Li Bing [] 
Sent: Wednesday, October 28, 2009 10:57 PM
Cc: Li Bing - Gmail
Subject: Exceptions When Indexing with Multi-threading

Dear all,

Today I got exceptions when indexing with multi-threading. It says
that "" or "" are accessed by other
processes. So it cannot rename ...

However, I have used "ReaderWriterSlim" lock to avoid the relevant
folders to be accessed by multiple threads at the same time. For
example, if the indexing is done in D:\Test\, I use "ReaderWriterSlim"
to prevent other threads from writing in the folder. I think the above
exceptions should not happen if I do that. However, it is NOT true.

Any other ways to avoid the problem?

Thanks so much!

View raw message