1. A method performed by one or more server devices, comprising: receiving, at one or more processors of the one or more server devices, a search query from a client device; identifying, by one or more processors of the one or more server devices, a set of documents based on the search query; identifying, by one or more processors of the one or more server devices, anchor text, in a plurality of documents, that matches the search query, each of the anchor text being associated with a link; determining, by one or more processors of the one or more server devices, whether a majority of the links point to a particular document in the set of documents; assigning, by one or more processors of the one or more server devices, a first value to the particular document when a majority of the links point to the particular document, where the first value does not equal zero, and where a quantity of first values assigned to the particular document is restricted over a given period of time; assigning, by one or more processors of the one or more server devices, a second value to the particular document when there is not a majority of the links that point to the particular document, where the second value is equal to zero; and using, by one or more processors of the one or more server devices, the assigned value as a measure of quality for the particular document in subsequently received search queries.