int bufferCapacityPerIterator = totalBufferCapacity / numberOfPartitions;
List<Iterator<CartesianGeoRecord>> mergedIterators = new ArrayList<Iterator<CartesianGeoRecord>>(partitions.size());
for (int i = 0; i < partitions.size(); i++) {
BTree<CartesianGeoRecord> partition = partitions.get(i);
BitVector deletedDocs = deletedDocsList.get(i);
Iterator<CartesianGeoRecord> mergedIterator =
new ConvertedGeoRecordIterator(geoConverter, partition,
docid, deletedDocs);
mergedIterator = new BufferedOrderedIterator<CartesianGeoRecord>(mergedIterator,
geoRecordCompareByBitMag, bufferCapacityPerIterator);
mergedIterators.add(mergedIterator);
docid += deletedDocs.size() - deletedDocs.count();
}
orderedIteratorChain =
new OrderedIteratorChain<CartesianGeoRecord>(mergedIterators, geoRecordCompareByBitMag);
}