}
pages = new PagedFile(pagesFile);
pageBi = pages.getBytesInterface();
maxDocIdFile = new MappedBytesInterface(openFile("maxdocid"));
if (newIndex) {
maxDocIdFile = maxDocIdFile.ensureSizeAtLeast(8);
maxDocIdFile.putLong(0, 0);
int pageLocation = writePlan(new PagePlan(), 0);
if (pageLocation != 0)
throw new RuntimeException("page location not at root - unexpected");
}
docIdToDoc = new MappedBytesInterface(openFile("docidtodoc"));
docFields = new MappedBytesInterface(openFile("docfields"));
overflowFieldData = new ChunkedMemoryMappedFile(openFile("overflow"));
this.maxDocId = maxDocIdFile.getLong(0);
} catch (FileNotFoundException e) {