ordinalRange

fun ordinalRange(segmentNumber: Long, from: Key?, to: Key?): IntRange

The ordinals of segmentNumber whose keys lie in [from, to], both bounds inclusive.

Ordinals ascend with keys, so a key range is one contiguous ordinal range. That is how a query's key bounds are pushed into ordinal space instead of being applied after every candidate has been decoded.