Hi Klaus, If you use a single instance of IndexWriter, you can call addDocument(...) on it without synchronizing (things are thread safe inside the call). If you are opening/closing IndexWriters yourself, then you have to make sure you have only 1 IndexWriter open at a time. If you have Lucene in Action, check out section 2.9.1 - http://www.lucenebook.com/search?query=concurrency+rules
Otis ----- Original Message ---- From: Klaus <[EMAIL PROTECTED]> To: java-user@lucene.apache.org Sent: Mon 20 Feb 2006 06:44:23 PM EST Subject: Lucene in multithreaded enviroment Hi I'm using Lucene in a web application. Every time a new object is added to the system the index will be updated. May there be any problems, if two objects were created at the same moment? I know Lucene has some locking mechanism. Thx klaus -----Ursprüngliche Nachricht----- Von: Amany Moussa [mailto:[EMAIL PROTECTED] Gesendet: Montag, 20. Februar 2006 21:22 An: java-user@lucene.apache.org Betreff: Re: Lucene CPU Utilization Thank you so much for your reply. I know that you answered this question before. I just wanted to post the question to receive more feedbacks and share the information. Thanks again. Amany M. --- Otis Gospodnetic <[EMAIL PROTECTED]> wrote: > I think I answered that question just the other > day.... privately... > No, there is nothing in Lucene to help you with CPU > utilization. > However, if you are running this on a UNIX box of > some kind, you can (re)nice the process and thus > lower its priority, giving other processes more time > with the CPU. Windows may have something similar. > > Otis > > ----- Original Message ---- > From: Amany Moussa <[EMAIL PROTECTED]> > To: java-user@lucene.apache.org > Sent: Monday, February 20, 2006 9:50:57 AM > Subject: Lucene CPU Utilization > > > Hello, > > I am building a Lucene index with over a million > documents retrieved from database. I am running the > application on Unix, I am getting a 100% CPU > utilization the moment the application start. > The application creates a list of small indices in a > temp directory then merge them all in the main index > file. > > Is there any way I can tune the indexing process and > reduce the CPU utilization. > Thanks much. > > Amany M. > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > > --------------------------------------------------------------------- > 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] > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]