Learning To Rank For Retrieval And Recommendation