1. A method implemented by one or more computers, the method comprising: obtaining a plurality of search results for a query based on first relevance scores; classifying the plurality of search results into a plurality of classifications; generating second relevance scores for the plurality of search results based on respective rankings of the plurality of search results in corresponding classifications of the plurality of classifications; and ranking the plurality of search results based on the first relevance scores and the second relevance scores.