Added docs about calculating sort index