lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: Memory during Indexing
Date Thu, 12 Mar 2009 09:47:48 GMT

Niels Ott wrote:

> Hi Mark,
> markharw00d schrieb:
>> Hi Niels,
>> See the javadocs for IndexWriter.setRAMBufferSizeMB()
> I tried different settings. Apart from the fact that my memory issue  
> seems to by my own fault, I'm wondering what Lucene does in the  
> background. Apparently it does flush(), but not commit()?
> At least my index remains empty when I'm querying. If I call  
> commit() every now and then (like every 500 documents), there are  
> data I can query.

That's right.

When RAM is full, IW flushes the pending changes to disk, but does not  
commit them, meaning external (newly opened or reopened) readers will  
not see the changes.

You must commit() or close() (which just calls commit() before  
closing) for external readers to see the changes.


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

View raw message