On Mar 12, 2009, at 10:47 AM, Niels Ott wrote:

Michael McCandless schrieb:
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.

Is there a built-in mechanism in the IndexReader to reload the index every now and then, after having checked that it has changed?

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

So there is no means to do this automatically? I mean, I can count documents while adding them and do commit() every now and then, or I could commit every time one hour of indexing has passed, etc...


It's called Solr  ;-)

Solr has controls for all of these things. I know that isn't necessarily satisfactory and that you may not want to switch, but you can always go look at the code for how it is implemented. Otherwise, Lucene-wise, you have to manage the lifecycle of the readers, committing, etc..

-Grant

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