Directory dir = getRunData().getDirectory();
Analyzer analyzer = getRunData().getAnalyzer();
IndexWriter writer = new IndexWriter(dir, analyzer, false);
Config config = getRunData().getConfig();
boolean cmpnd = config.get("compound",true);
int mrgf = config.get("merge.factor",DEFAULT_MERGE_PFACTOR);
int mxbf = config.get("max.buffered",DEFAULT_MAX_BUFFERED);
// must update params for newly opened writer
writer.setMaxBufferedDocs(mxbf);
writer.setMergeFactor(mrgf);
writer.setUseCompoundFile(cmpnd); // this one redundant?
getRunData().setIndexWriter(writer);
return 1;