throw new Exception("Can't create test dir " + testDir.toString());
}
LOG.info("Creating test index: " + testDir.getAbsolutePath());
File plain = new File(testDir, INDEX_PLAIN);
Directory dir = FSDirectory.open(plain);
IndexWriter writer = new IndexWriter(dir, new NutchDocumentAnalyzer(conf), true,
MaxFieldLength.UNLIMITED);
// create test documents
for (int i = 0; i < NUM_DOCS; i++) {
Document doc = new Document();
for (int k = 0; k < fieldNames.length; k++) {