lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: IndexWriter stopped before commit
Date Wed, 13 May 2009 09:33:04 GMT
Unfortunately, no.

If the JRE crashes/exits without IndexWriter.commit (or close) being
called, then the index will reflect none of the changes during that

There will be partial files in there (that's why you see so much disk
space being used) but there's no segments file describing what these
files are; when you next open a writer on that indexed, these
unreferenced files will be cleaned up.

Maybe you could add the indexes one by one, calling commit() after
each addition?  This way if a crash happens, the index will just
fallback to the last commit.


On Wed, May 13, 2009 at 3:08 AM, liat oren <> wrote:
> Hi all,
> I ran a code that joins a list of indexes to one index.
> The commit and close of the writer is done when we finish looping on the
> list of the original paths.
> An error occured before it arrived to the commit part.
> The index size is big, so it looks like the data is there, but when I check
> the number of documents, it shows 0.
> I unlocked the index, and I also tried to commit it, but it still shows 0.
> Is there a way to "save" the data instaed of re-running the join code?
> Thanks,
> Liat

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

View raw message