Used for sorting documents across segments
Returns a long so that the natural ordering of long values matches the ordering of doc IDs for the given comparator