How do we rank documents in terms of search results relevance?

Ranking