Well ... every time the RAM buffer is full, a new segment is flushed
to the Directory, but that is not necessarily a "commit" in that
an IndexReader would see the new segment, nor, that the segment would
survive if the machine suddenly crashed.

You should't rely on when specifically IndexWriter makes its changes
visible to readers.  The best way to be sure is to close the writer.

There is work underway now, in this issue:

  https://issues.apache.org/jira/browse/LUCENE-1044

that will add an explicit "commit" call, which you would use to 1)
make the changes visible to readers, and 2) sync the index such that
if the machine crashed (after commit returns) then your changes as of
the commit will survive.  But it's not committed yet ... it will be in
2.4.

One way for a reader to check if a new commit has happened is to
call the isCurrent method.  Maybe that helps?

Mike

<[EMAIL PROTECTED]> wrote:

Hi,

if I understand this property correctly every time the ram buffer is full it gets automaticaly written to disk. Something like a commit in a database.
Thus if my application dies, all docs in the buffer get lost. Right?

If so, is there any event/callback etc. which informs my application that
such a commit happend?

Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to