Document-order comparison. Positions compare by their full trail ([...path, offset]) lexicographically; a shorter prefix sorts first.
[...path, offset]
Document-order comparison. Positions compare by their full trail (
[...path, offset]) lexicographically; a shorter prefix sorts first.