主权项 |
1. A method comprising:
accessing a social graph comprising a plurality of nodes and a plurality of edges connecting the nodes, the nodes comprising:
a first node corresponding to a first user associated with an online social network; anda plurality of second nodes each corresponding to a plurality of objects, respectively, associated with the online social network, each object being a particular object-type, and wherein at least one object-type comprises an advertisement; receiving a query from a client system of the first user; identifying one or more objects matching the query, wherein at least one of the identified objects is an advertisement; calculating, for each identified advertisement, a score based at least in part on an affinity coefficient for the first node with respect to the second node corresponding to the identified advertisement; generating one or more search results corresponding to one or more of the identified objects matching the query, respectively, each search result comprising a reference to the corresponding identified object, wherein at least one of the search results corresponds to an identified advertisement having a score greater than a threshold score; and sending, responsive to the query, a search-results page to the client system of the first user for display, the search-results page comprising one or more of the generated search results. |