public void split() throws IOException {boolean success = false;DirectoryReader reader = DirectoryReader.open(input);try {createIndex(config1, dir1, reader, docsInFirstIndex, false);createIndex(config2, dir2, reader, docsInFirstIndex, true);success = true;} finally {if (success) {IOUtils.close(reader);} else {IOUtils.closeWhileHandlingException(reader);}}}
public virtual void Split(){bool success = false;DirectoryReader reader = DirectoryReader.Open(input);try{CreateIndex(config1, dir1, reader, docsInFirstIndex, false);CreateIndex(config2, dir2, reader, docsInFirstIndex, true);success = true;}finally{if (success){IOUtils.Dispose(reader);}else{IOUtils.DisposeWhileHandlingException(reader);}}}