Ranking documents for retrieval by bayesian modeling of a relevance distribution