SlicedBytes slice = new SlicedBytes(ArrayBytes.EMPTY_BYTES, 0);
do {
Bytes term = query.term();
slice.reInitialize(query.term(), 0, term.getLength());
root.count(slice, forkThreshold);
} while(query.anyNext());
long counted = root.hits;
int numSlots = 1 << integerLogBase2RoundDown((long)(Math.sqrt(counted)/lengthToRowRatio));
long minHits = (counted / numSlots) >> 8;
SlotBuffer slotBuffer = new SlotBuffer();
root.buildSlotBuffer(ArrayBytes.EMPTY_BYTES, minHits, slotBuffer);