DocumentIndexBuilder dib = new DocumentIndexBuilder(index, "document");
BitIndexPointer p;
for(int[] list : postings)
{
final int doclen = StaTools.sum(list);
p = dios.writePostings(new ArrayOfIdsIterablePosting(list));
DocumentIndexEntry die = new BasicDocumentIndexEntry(doclen, p);
dib.addEntryToBuffer(die);
}
dios.close();
dib.finishedCollections();