IndexReader reader = IndexReader.open(dir);
Term aaa = new Term("content", "aaa");
Term bbb = new Term("content", "bbb");
Term ccc = new Term("content", "ccc");
assertEquals(reader.docFreq(ccc), 37);
reader.deleteDocument(0);
assertEquals(reader.docFreq(aaa), 37);
dir.tweakBufferSizes();
reader.deleteDocument(4);
assertEquals(reader.docFreq(bbb), 37);