Supervised Contrastive Learning Approach for Contextual Ranking