You should only give a single thread access to the indexwriter. I have created 
a indexupdater that stores all the delete and write requests and once and a 
while a thread (triggered by Quartz) processes the requests in a single batch.
 
another way would be synchronizing the indexupdater and only letting a single 
thread have access and process the request direct. The problem is that your 
indexupdater will be blocked and there will be a lot of overhead if you update 
the indexer a document at a time. 

________________________________

From: Sodel Vazquez-Reyes [mailto:[EMAIL PROTECTED]
Sent: Tue 3-5-2005 20:11
To: lucene-user@jakarta.apache.org
Subject: Indexing in multi-threaded environment



Hi,
I am starting my application in multi-threaded environment,
could somebody show me any examples with serialize calls to the
IndexWriter.addDocument(Document)?

because my idea is to use RAMDirectory based in parallel, one in each
thread, and merges them into a single index on the disk using
IndexWriter.addIndexes(Directory[]) method, It is working with a single
process but I have problems with my threads implementation.
Or any ideas about this.

Best regards.
Sodel.

--
Sodel Vazquez-Reyes
PhD Student

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to