A method and system for generating a ranking function to rank the
relevance of documents to a query is provided. The ranking system learns
a ranking function from training data that includes queries, resultant
documents, and relevance of each document to its query. The ranking
system learns a ranking function using the training data by weighting
incorrect rankings of relevant documents more heavily than the incorrect
rankings of not relevant documents so that more emphasis is placed on
correctly ranking relevant documents. The ranking system may also learn a
ranking function using the training data by normalizing the contribution
of each query to the ranking function so that it is independent of the
number of relevant documents of each query.