Assert.assertEquals("writer has non-deleted docs",
0, w.numDocs());
w.close();
DirectoryReader r = DirectoryReader.open(d);
Assert.assertEquals("reader has wrong number of deleted docs",
numDeletedDocs, r.numDeletedDocs());
return r;
}
/** alternate scorer skipTo(),skipTo(),next(),next(),skipTo(),skipTo(), etc
* and ensure a hitcollector receives same docs and scores