1. A method comprising: receiving a query at a front-end server of a computing device, wherein the query is associated with a user account in a social networking application; determining, by the front-end server, whether the user account has a social networking relationship with more than a threshold number of other user accounts in the social networking application; if the user account has a social networking relationship with more than the threshold number of other user accounts, providing the received query and only an identifier of the user account to each of a plurality of index servers by the front-end server; if the user account does not have a social networking relationship with more than the threshold number of other user accounts, providing the received query and identifiers of other user accounts that have a social networking relationship with the user account by the front-end server; and receiving, by the front-end server, identifiers of one or more documents from each of the plurality of index servers, wherein each of the identified one or more documents was selected by an index server based on the received query and one or more documents that were endorsed by one or more users that are associated with one or more of the other user accounts that have a social networking relationship with the user account, wherein each of the plurality of index servers stores a mapping of only each user account in the social networking application with more than the threshold number of social networking relationships to documents that were endorsed by users that are associated with user accounts that have a social networking relationship with the user accounts with more than the threshold number of social networking relationships.