I'm having trouble applying IndexWriter 2-phase commit to make a transaction involving two different indexes. The scenario,
1. Open index1 2. Open index2 3. Make change1 to index1 4. Make change2 to index2 5. index1.prepareCommit() successfully flushes 6. index2.prepareCommit() successfully flushes 7. index1.commit() successfully (segmentN file written) 8. index2.commit() If step 8 fails, how can I roll back step 7 w/o implementing my own undo logic? I want to make change1 and change2 a single transaction. Thanks, An