lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mufaddal Khumri" <>
Subject RE: Indexing in multi-threaded environment
Date Tue, 03 May 2005 19:18:24 GMT
Hi ,

The calls to the IndexWriter.addIndexes is synchronized. Your code
should not have to do anything more than just calling it.

I believe roughly this will be the scenario that you are looking for:
- while(there is more data)
	- spawn a thread to handle creating documents for this data
		- Thread creates documents and writes them to a
		- Write contents from the RAMDirectory to the File
system dir.
- end while

You can pass an instance of your fileWriter to each of your threads so
that they can write to it when they are done creating there individual

-----Original Message-----
From: Sodel Vazquez-Reyes
Sent: Tuesday, May 03, 2005 11:12 AM
Subject: Indexing in multi-threaded environment

I am starting my application in multi-threaded environment,
could somebody show me any examples with serialize calls to the

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 Vazquez-Reyes
PhD Student

To unsubscribe, e-mail:
For additional commands, e-mail:

This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity 
to whom they are addressed. If you have received this 
email in error please notify the system manager. Please
note that any views or opinions presented in this email 
are solely those of the author and do not necessarily
represent those of the company. Finally, the recipient
should check this email and any attachments for the 
presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email.
Consult your physician prior to the use of any medical
supplies or product.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message