On Fri, Jan 17, 2014 at 12:13 PM, Michael McCandless > Backing up, what is your app doing, that it so strongly relies on > knowing whether commit() would do anything? Usually, commit is > something you call rarely, for "safety" purposes to ensure if the > world comes crashing down, you'll have a known state in the index on > restart.
We use quite conservative commit policy - commit almost every time when a new document is added to the index (or updated/deleted) - hence the need to know if commit() is necessary. This might sound sub-optimal, but I think it is justifiable because in our application the incoming data stream is not really intense: we normally get just a handful of documents added in a minute. The ability to see those newly added (updated, deleted) documents instantly is far more important. Committing often also gives extra security: in case if the system crashes, we are pretty sure we haven't lost anything as rebuilding the index can take days. We could, of course, reindex just the missing documents but finding out what exactly is missing is not trivial. m. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org