I found it is very easy to come into OutOfMemoryError.
My idea is that lucene could set the RAM memory Automatically,
but I couldn't find the API. My code: 

IndexWriterConfig iwc = new IndexWriterConfig(Version.LUCENE_40, analyzer);
int mb = 1024 * 1024;
double ram = Runtime.getRuntime().maxMemory() / mb;
iwc.setRAMBufferSizeMB(ram);

but still OutOfMemoryError, can anyone help me ? thx



-----
--------------------------
Email: [email protected]
--------------------------
--
View this message in context: 
http://lucene.472066.n3.nabble.com/how-to-avoid-OutOfMemoryError-while-indexing-tp4036484.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to