Partial Recovery for Top-$k$ Ranking: Optimality of MLE and Sub-Optimality of Spectral Method