2. A method performed by a data processing apparatus, the method comprising: accessing, by the data processing apparatus, a database that stores query-resource pairings and a respective weight for each query-resource pairing, each query-resource pairing identifying a single query and a single resource associated with the query; obtaining, by the data processing apparatus and in response to receiving a search query, search results, each search result referencing a respective resource and having a respective relevance score; identifying, by the data processing apparatus, a subset of the resources referenced by the search results that match at least one resource that is identified by one or more of the query-resource pairings; selecting, by the data processing apparatus, a set of the queries identified by query-resource pairings that identify a resource included in the subset based at least on the relevance score of the respective resource and the weight for each respective query-resource pairing providing, by the data processing apparatus, one or more of the queries of the set to the user device; generating, for each resource in the subset, a term vector from queries identified by stored query-resource pairings that correspond to the resource, wherein each dimension of the term vector corresponds to a distinct term of the queries identified by the stored query-resource pairings that correspond to the resource, and each dimension of the term vector has a value that is based on the respective weights of each query-resource pairing that identifies (i) the resource and (ii) a query that includes the distinct term that corresponds to the dimension; generating one or more clusters of resources based on the term vectors of each resource in the subset; for at least one cluster, selecting, as a representative query for the cluster, a query identified by stored query-resource pairings that correspond to the resources of the cluster based on the term vectors for each resource included in the cluster, wherein selecting a set of the queries identified by query resource pairings that identify a resource included in the subset comprises selecting the set of queries from the representative queries; generating, for each cluster, a rank score based on (i) the relevance scores of the search results that reference resources that match the resources of the cluster, and (ii) a quantity of the resources of the cluster; and selecting, as refinement clusters, n clusters with the highest rank score, wherein n is a positive integer, and wherein each representative query is selected from one of the refinement clusters, wherein selecting a set of the queries identified by query resource pairings that identify a resource included in the subset further comprises selecting one or more of the set of queries from the representative queries of m refinement clusters with the highest rank score, where m is a positive integer; generating a respective centroid for each refinement cluster, each centroid representing a weighted center of a term vector that corresponds to the refinement cluster; and generating, for each refinement cluster, a cluster score for each unique query identified by stored query-resource pairings that correspond to the resources of the refinement cluster based upon (i) a quantity of the query-resource pairings that identify the unique query, and (ii) a distance from the unique query to the centroid of the potential refinement cluster, wherein each representative query selected for each refinement cluster is a unique query that has a highest cluster score of the cluster scores for the unique queries identified by stored query-resource pairings that correspond to the resources of the refinement cluster.
2. A method performed by a data processing apparatus, the method comprising: accessing, by the data processing apparatus, a database that stores query-resource pairings and a respective weight for each query-resource pairing, each query-resource pairing identifying a single query and a single resource associated with the query; obtaining, by the data processing apparatus and in response to receiving a search query, search results, each search result referencing a respective resource and having a respective relevance score; identifying, by the data processing apparatus, a subset of the resources referenced by the search results that match at least one resource that is identified by one or more of the query-resource pairings; selecting, by the data processing apparatus, a set of the queries identified by query-resource pairings that identify a resource included in the subset based at least on the relevance score of the respective resource and the weight for each respective query-resource pairing providing, by the data processing apparatus, one or more of the queries of the set to the user device; generating, for each resource in the subset, a term vector from queries identified by stored query-resource pairings that correspond to the resource, wherein each dimension of the term vector corresponds to a distinct term of the queries identified by the stored query-resource pairings that correspond to the resource, and each dimension of the term vector has a value that is based on the respective weights of each query-resource pairing that identifies (i) the resource and (ii) a query that includes the distinct term that corresponds to the dimension; generating one or more clusters of resources based on the term vectors of each resource in the subset; for at least one cluster, selecting, as a representative query for the cluster, a query identified by stored query-resource pairings that correspond to the resources of the cluster based on the term vectors for each resource included in the cluster, wherein selecting a set of the queries identified by query resource pairings that identify a resource included in the subset comprises selecting the set of queries from the representative queries; generating, for each cluster, a rank score based on (i) the relevance scores of the search results that reference resources that match the resources of the cluster, and (ii) a quantity of the resources of the cluster; and selecting, as refinement clusters, n clusters with the highest rank score, wherein n is a positive integer, and wherein each representative query is selected from one of the refinement clusters, wherein selecting a set of the queries identified by query resource pairings that identify a resource included in the subset further comprises selecting one or more of the set of queries from the representative queries of m refinement clusters with the highest rank score, where m is a positive integer; generating a respective centroid for each refinement cluster, each centroid representing a weighted center of a term vector that corresponds to the refinement cluster; and generating, for each refinement cluster, a cluster score for each unique query identified by stored query-resource pairings that correspond to the resources of the refinement cluster based upon (i) a quantity of the query-resource pairings that identify the unique query, and (ii) a distance from the unique query to the centroid of the potential refinement cluster, wherein each representative query selected for each refinement cluster is a unique query that has a highest cluster score of the cluster scores for the unique queries identified by stored query-resource pairings that correspond to the resources of the refinement cluster. 3. The method of claim 2 , further comprising: for each resource in the subset: multiplying, by a constant factor, the value of each dimension of the term vector that corresponds to a distinct term that matches a term included in the received search query; and normalizing the term vector.