Take a query and find the most relevant documents from a set of possibilities.

We can rank documents based on the probability that they are relevant to the query. (This is called The Probability Ranking Principle.)