1. A method performed by one or more computers, the method comprising: identifying, by the one or more computers, a set of documents based on a search query from a user device; identifying, by the one or more computers, a particular document in the set of documents; determining, by the one or more computers, a number of first links that are included in the set of documents and that (i) have anchor text that includes a term of the search query, and (ii) refer to the particular document; determining, by the one or more computers, whether the number of the first links that are included in the documents in the set of documents and that (i) have anchor text that includes a term of the search query, and (ii) refer to the particular document exceeds a predetermined threshold; in response to determining, by the one or more computers, that the number of the first links that are included in the documents in the set of documents and that (i) have anchor text that includes a term of the search query, and (ii) refer to the particular document exceeds the predetermined threshold, using a first value to modify a quality score that is associated with the particular document; and storing, by the one or more computers, the modified quality score for use in ranking the particular document in response to subsequently received search queries.