1. A method performed by a data processing apparatus, the method comprising: receiving a search query over a network, the search query comprising a query term and a categorical identifier; selecting a domain name associated with the categorical identifier; generating, based on selecting a first result set of resources responsive to the query term, a second result set of resources in which a respective domain name for each resource matches the determined domain name associated with the categorical identifier; selecting a resource identifier associated with the categorical identifier, the selected resource identifier comprising the determined domain name and a path; enhancing a respective relevance score of each resource in the second result set whose respective resource identifier includes the selected resource identifier, a magnitude of enhancement being based on a weight associated with the categorical identifier, the respective relevance score indicating a degree of relevance between the resource and the query term; ranking each of the resources in the second result set based on the respective relevance scores; annotating, with categorical identifier, one or more indicia identifying the resources of the ranked second result set whose respective resource identifier matches the selected resource identifier associated with the categorical identifier; and providing the annotated indicia over the network as a search engine result of the search query.
4. The method of claim 1 , wherein generating the second result set comprises: selecting a predetermined minimum number of resources which are associated with the domain name.