lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Bende <>
Subject Open IndexWriter to prior commit
Date Tue, 05 Sep 2017 20:22:24 GMT
I was reading this blog post about Lucene transactions (thank you to
Mike for writing this):

I'm interested in the part that references distributed transactions and says:

"if Lucene completed its 2nd phase commit but the database's 2nd phase
hit some error or crash or power loss, you can easily rollback
Lucene's commit by opening an IndexWriter on the prior commit. "

I see that you can pass in an IndexWriterConfig with an IndexCommit
which will tell the IndexWriter where to open from...

What is the best way to get access to the prior IndexCommit?

It looks like you could open a StandardDirectoryReader and then call
getIndexCommit(), but I wasn't sure if there was a better or easier
way using some information that is already in the existing



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

View raw message