1. A method performed by a data processing apparatus, the method comprising: receiving a search query from a user, the user having a plurality of social affinity groups, each social affinity group identifying a group of users and the user as a proper subset of users of a network; receiving search results responsive to the search query, each search result referencing a corresponding resource that is determined to be responsive to the search query; identifying search results referencing resources that each have an association with one or more of the social affinity groups, where each association corresponds to one of a plurality of association types, each of the plurality of association types specifying one of a plurality of user actions performed by one or more different users of the one or more social affinity groups, the user actions including a user creation of an associated resource and a user endorsement of an associated resource; selecting one of the identified search results for annotation, wherein the selection is based in part on a pre-determined priority hierarchy of association types that specifies a different priority for each user action specified by an association type, and the selected search result has an association that corresponds to an association type with a highest priority among association types of the associations of the identified search results; annotating the selected search result, the annotation describing the association of one of the social affinity groups with the resource the selected search result references, and further identifying the social affinity group, the annotation comprising: determining a number of users that are members of the one of the social affinity groups; for each of a plurality of annotation terms, wherein each annotation term describes a relative threshold of a number of users that are members of the one of the social affinity groups, determining a target threshold for the annotation term, and wherein the target threshold for each annotation term is different from the target threshold for each other annotation term; determining, for each annotation term of the plurality of annotation terms, a threshold value based, at least in part, on the number of users that are members of the one of the social affinity groups and the target threshold for the annotation term; comparing the number of users that are members of the one of the social affinity groups to the threshold values; and applying, as the annotation, the annotation term having a target threshold that is i) less than the number of users that are members of the one of the social affinity groups and ii) that is greater than each other target threshold this is less than the number of users that are members of the one of the social affinity groups; presenting the annotated search result to the user.