Opening a writer should be a very fast operation, but closing may be costly since that does a commit() to make the changes permanent in the IO system.

Still... if you don't need to refresh your searchers you may want to just leave the writers open, but perhaps lower the RAM buffer if you don't have enough memory dedicated to the JRE?

Mike

Ganesh wrote:

Whether it will be a good idea to open writer only when required. Whether opening writer will take some time as like searcher? Whether to initialize writer will take some time?

Regards
Ganesh

----- Original Message ----- From: "Michael McCandless" <luc...@mikemccandless.com >
To: <java-user@lucene.apache.org>
Sent: Thursday, January 08, 2009 3:52 PM
Subject: Re: Writer memory released after flush



IndexWriter holds onto the memory & recycles it. It's best to close the writer if you need to release the memory.

Mike

Ganesh wrote:

I am maintaing multiple indexes and all writers will be opened. Based on some criteria, the document is added to a particular index. I am using 50 MB of RAM buffer size. Whether the buffer will be released once flush or optinization done or the writer will maintain the memory and recyle it.

Regards
Ganesh


Send instant messages to your online friends http://in.messenger.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Send instant messages to your online friends http://in.messenger.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to