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.

Mike

---------------------------------------------------------------------
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