lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Veentjer - Anchor Men" <p.veent...@anchormen.nl>
Subject RE: Indexing in multi-threaded environment
Date Tue, 03 May 2005 18:51:10 GMT
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:S.Vazquez-reyes@postgrad.manchester.ac.uk]
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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org






Mime
View raw message