A Theoretical Analysis of NDCG Type Ranking Measures