1. A method comprising: by one or more computing devices, accessing a social graph comprising a plurality of nodes and a plurality of edges connecting the nodes, each of the edges between two of the nodes representing a single degree of separation between them, the nodes comprising: a first node corresponding to a first user associated with an online social network; and a plurality of second nodes that each correspond to an object associated with the online social network, each object being of a particular object type; by one or more computing devices, receiving a search query from the first user; by one or more computing devices, determining one or more search terms based on the received search query, each search term comprising a prefix and a suffix, wherein each prefix corresponds to an edge type and an object type of the social graph, and wherein each suffix corresponds to a particular node of the plurality of nodes; by one or more computing devices, for each of the search terms: generating a first binary number based on the each search term's prefix and suffix; and accessing and retrieving one or more search results of the each search term from one or more data stores by hashing the first binary number, wherein each search result corresponds to a node of the plurality of second nodes; and by one or more computing devices, aggregating search results of the respective search terms.