3. The computer implemented method of claim 1 , wherein selecting from a plurality of partitions of a user-term index, partitions of the user-term index that are associated with connections of the user in a social networking system comprises: performing a hash function to associate the user identifier to a particular partition of the user-term index; and selecting the particular partition of the user-term index.
1. A computer implemented method comprising: receiving a query comprising a term from a user; selecting from a plurality of partitions of a user-term index, partitions of the user-term index that are associated with connections of the user in a social networking system, the user-term index comprising time-ordered database shards of records, where data in the user-term index is arranged by user identifier and includes a plurality of user identifiers associated with a plurality of users of a social networking system and a plurality of term identifiers associated with a plurality of terms used by the plurality of users; matching the term identifier to corresponding term identifiers in the selected partitions, the selected partitions including user identifiers associated with connections of the user, and wherein the matching identifies post identifiers for posts that include the term and are associated with a connection of the user; and retrieving posts from an index using the identified post identifiers, the retrieved posts for presentation to the user.