14. A computer readable storage device comprising instructions that, when executed by a data processing apparatus, cause the data processing apparatus to perform operations comprising: receiving a search query; identifying a first set of documents that are each (i) responsive to the search query, and (ii) classified as belonging to a first category of documents; identifying a second set of documents that are each (i) responsive to the search query, and (ii) classified as belonging to a second category of documents; determining a relevance of the first set of documents relative to the second set of documents based on (i) a relevance of the documents of the first set to the search query, and (ii) a relevance of the documents of the second set to the search query; determining a layout of a search results page in which links to one or more documents of the first set and links to one or more documents of the second set are to be presented based on the relevance of the first set of documents relative to the second set of documents, comprising: determining, based on the relevance of the first set of documents relative to the second set of documents, a size of a first area of the search results page in which the links to one or more documents of the first set are to be presented; and determining, based on the relevance of the first set of documents relative to the second set of documents, a size of a different, second area of the search results page in which links to one or more documents of the second set are to be presented; and providing, for display, the search results page.
14. A computer readable storage device comprising instructions that, when executed by a data processing apparatus, cause the data processing apparatus to perform operations comprising: receiving a search query; identifying a first set of documents that are each (i) responsive to the search query, and (ii) classified as belonging to a first category of documents; identifying a second set of documents that are each (i) responsive to the search query, and (ii) classified as belonging to a second category of documents; determining a relevance of the first set of documents relative to the second set of documents based on (i) a relevance of the documents of the first set to the search query, and (ii) a relevance of the documents of the second set to the search query; determining a layout of a search results page in which links to one or more documents of the first set and links to one or more documents of the second set are to be presented based on the relevance of the first set of documents relative to the second set of documents, comprising: determining, based on the relevance of the first set of documents relative to the second set of documents, a size of a first area of the search results page in which the links to one or more documents of the first set are to be presented; and determining, based on the relevance of the first set of documents relative to the second set of documents, a size of a different, second area of the search results page in which links to one or more documents of the second set are to be presented; and providing, for display, the search results page. 15. The computer readable storage device of claim 14 , wherein determining the relevance of the first set of documents relative to the second set of documents is further based on (i) a relevance of the first category of documents to the search query, and (ii) a relevance of the second category of documents to the search query.