Indexing Based on Object Type
First Claim
Patent Images
1. A method comprising, by one or more computing devices:
- determining rankings for a plurality of objects of a social-networking system, wherein;
the social-networking system comprises a social graph that comprises a plurality of nodes and a plurality of edges connecting the nodes,each object corresponds to a node of the social graph, andeach ranking for each object is determined based on a number of edges being connected to the node to which the respective object corresponds;
storing the objects in a plurality of partitions of a database, wherein each partition stores only objects having a particular ranking; and
indexing the objects in the partitions by a plurality of search indices that each index only a particular one of the plurality of partitions.
1 Assignment
0 Petitions
Accused Products
Abstract
In one embodiment, a method includes maintaining data stores for objects of a social-networking system, each data store being configured to store objects of a particular one of multiple object types indexed by a search index; receiving an object; identifying an object type of the received object; storing the received object in at least one data store being configured to store objects of the identified object type; and updating the search index of the at least one data store based on the received object.
-
Citations
20 Claims
-
1. A method comprising, by one or more computing devices:
-
determining rankings for a plurality of objects of a social-networking system, wherein; the social-networking system comprises a social graph that comprises a plurality of nodes and a plurality of edges connecting the nodes, each object corresponds to a node of the social graph, and each ranking for each object is determined based on a number of edges being connected to the node to which the respective object corresponds; storing the objects in a plurality of partitions of a database, wherein each partition stores only objects having a particular ranking; and indexing the objects in the partitions by a plurality of search indices that each index only a particular one of the plurality of partitions.
-
-
2. The method of claim 1, further comprising:
-
receiving a search query for at least one of the plurality of objects; and determining an object type associated with the search query, wherein each of the plurality of objects is associated with an object type of a plurality of object types.
-
-
3. The method of claim 2, wherein each of the plurality of partitions stores objects of only a particular one of a plurality of object types.
-
4. The method of claim 3, wherein each object comprises one or more of a user profile, photo, post, web page, application, video file, audio file, comment, event, message, offer, and review.
-
5. The method of claim 4, further comprising sending the search query to a first partition of the plurality of partitions, wherein the first partition stores objects of the object type associated with the search query, and wherein the first partition stores objects having a first ranking;
- and
identifying one or more search results for the search query from the first partition using the search index that indexes only the first partition.
- and
-
6. The method of claim 5, further comprising:
-
determining that a number of identified search results from the first partition exceeds a threshold number of search results; and sending the identified search results to a computing device from which the search query was received.
-
-
7. The method of claim 5, further comprising:
-
determining that a number of identified search results from the first partition is less than a threshold number of search results; and sending the search query to a second partition of the plurality of partitions, wherein the second partition stores objects of the object type associated with the search query, and wherein the second partition stores objects having a second ranking, the second ranking being lower than the first ranking.
-
-
8. The method of claim 7, further comprising:
-
identifying one or more additional search results for the search query from the second partition using the search index that indexes only the second partition; and sending the identified search results and the identified additional search results to a computing device from which the search query was received.
-
-
9. One or more computer-readable non-transitory storage media embodying software that is operable when executed to:
-
determine rankings for a plurality of objects of a social-networking system, wherein; the social-networking system comprises a social graph that comprises a plurality of nodes and a plurality of edges connecting the nodes, each object corresponds to a node of the social graph, and each ranking for each object is determined based on a number of edges being connected to the node to which the respective object corresponds; store the objects in a plurality of partitions of a database, wherein each partition stores only objects having a particular ranking; and index the objects in the partitions by a plurality of search indices that each index only a particular one of the plurality of partitions.
-
-
10. The media of claim 9, wherein the software is further operable when executed to:
-
receive a search query for at least one of the plurality of objects; and determine an object type associated with the search query, wherein each of the plurality of objects is associated with an object type of a plurality of object types.
-
-
11. The media of claim 10, wherein each of the plurality of partitions stores objects of only a particular one of a plurality of object types.
-
12. The media of claim 11, wherein the software is further operable when executed to:
-
send the search query to a first partition of the plurality of partitions, wherein the first partition stores objects of the object type associated with the search query, and wherein the first partition stores objects having a first ranking; and identify one or more search results for the search query from the first partition using the search index that indexes only the first partition.
-
-
13. The media of claim 12, wherein the software is further operable when executed to:
-
determine that a number of identified search results from the first partition exceeds a threshold number of search results; and send the identified search results to a computing device from which the search query was received.
-
-
14. The media of claim 12, wherein the software is further operable when executed to:
-
determine that a number of identified search results from the first partition is less than a threshold number of search results; and send the search query to a second partition of the plurality of partitions, wherein the second partition stores objects of the object type associated with the search query, and wherein the second partition stores objects having a second ranking, the second ranking being lower than the first ranking.
-
-
15. A system comprising:
-
one or more processors; and one or more computer-readable non-transitory storage media embodying software that is operable when executed by the processors to; determine rankings for a plurality of objects of a social-networking system, wherein; the social-networking system comprises a social graph that comprises a plurality of nodes and a plurality of edges connecting the nodes, each object corresponds to a node of the social graph, and each ranking for each object is determined based on a number of edges being connected to the node to which the respective object corresponds; store the objects in a plurality of partitions of a database, wherein each partition stores only objects having a particular ranking; and index the objects in the partitions by a plurality of search indices that each index only a particular one of the plurality of partitions.
-
-
16. The system of claim 15, wherein the software is further operable when executed by the processors to:
-
receive a search query for at least one of the plurality of objects; and determine an object type associated with the search query, wherein each of the plurality of objects is associated with an object type of a plurality of object types.
-
-
17. The system of claim 16, wherein each of the plurality of partitions stores objects of only a particular one of a plurality of object types.
-
18. The system of claim 17, wherein the software is further operable when executed by the processors to:
-
send the search query to a first partition of the plurality of partitions, wherein the first partition stores objects of the object type associated with the search query, and wherein the first partition stores objects having a first ranking; and identify one or more search results for the search query from the first partition using the search index that indexes only the first partition.
-
-
19. The system of claim 18, wherein the software is further operable when executed by the processors to:
-
determine that a number of identified search results from the first partition exceeds a threshold number of search results; and send the identified search results to a computing device from which the search query was received.
-
-
20. The system of claim 18, wherein the software is further operable when executed by the processors to:
-
determine that a number of identified search results from the first partition is less than a threshold number of search results; and send the search query to a second partition of the plurality of partitions, wherein the second partition stores objects of the object type associated with the search query, and wherein the second partition stores objects having a second ranking, the second ranking being lower than the first ranking.
-
Specification