Benchmark benchmark = execBenchmark(algLines);
// 3. test number of docs in the index
IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory(), true);
int ndocsExpected = 2 * 20; // Reuters20ContentSource exhausts after 20 docs.
assertEquals("wrong number of docs in the index!", ndocsExpected, ir.numDocs());
ir.close();
}
// create the benchmark and execute it.
public static Benchmark execBenchmark(String[] algLines) throws Exception {