public static IndexWriterConfig createWriterConfig(Config config, PerfRunData runData, OpenMode mode, IndexCommit commit) {
// :Post-Release-Update-Version.LUCENE_XY:
Version version = Version.valueOf(config.get("writer.version", Version.LUCENE_47.toString()));
IndexWriterConfig iwConf = new IndexWriterConfig(version, runData.getAnalyzer());
iwConf.setOpenMode(mode);
IndexDeletionPolicy indexDeletionPolicy = getIndexDeletionPolicy(config);
iwConf.setIndexDeletionPolicy(indexDeletionPolicy);
if(commit != null)
iwConf.setIndexCommit(commit);