used cosine similarity to re-rank documents