By ranking, we refer to categorizing examples into one of K categories. On the other hand, sorting refers to coming up with the ordering of the data that agrees with some ground truth preference function.