IndexBuilder indexBuilder = new IndexBuilder(new File(directory,basename).getAbsolutePath(), documentSequence);
indexBuilder.termProcessor(termProcessor).documentsPerBatch(
documentsPerBatch);
if (tmpDirectory != null)
indexBuilder.batchDirName(tmpDirectory.getAbsolutePath());
indexBuilder.run();
return 0;
}
}