Directory dir = getRunData().getDirectory();
Analyzer analyzer = getRunData().getAnalyzer();
IndexWriter iw = new IndexWriter(dir, analyzer, true);
Config config = getRunData().getConfig();
boolean cmpnd = config.get("compound",true);
int mrgf = config.get("merge.factor",OpenIndexTask.DEFAULT_MERGE_PFACTOR);
int mxbf = config.get("max.buffered",OpenIndexTask.DEFAULT_MAX_BUFFERED);
iw.setUseCompoundFile(cmpnd);
iw.setMergeFactor(mrgf);
iw.setMaxBufferedDocs(mxbf);
getRunData().setIndexWriter(iw);
return 1;