Using inverse operators for queries
First Claim
Patent Images
1. A method comprising:
- receiving, from a client system of a first user, a query comprising one or more n-grams;
parsing the one or more n-grams of the query to identify a first query constraint and one or more second query constraints, wherein the first query constraint has been previously flagged as identifying greater than a threshold number of objects;
generating a query command based on the query, wherein the query command comprises an inverse constraint associated with the first query constraint and the one or more second query constraints; and
generating one or more search results based on the query command, each search result corresponding to an object of a plurality of objects.
1 Assignment
0 Petitions
Accused Products
Abstract
In one embodiment, a method includes receiving, from a client system of a first user, a query comprising one or more n-grams, parsing the one or more n-grams of the query to identify a first query constraint and one or more second query constraints, wherein the first query constraint has been previously flagged as identifying greater than a threshold number of objects, generating a query command based on the query, wherein the query command comprises an inverse constraint associated with the first query constraint and the one or more second query constraints, and generating one or more search results based on the query command, each search result corresponding to an object of a plurality of objects.
61 Citations
20 Claims
-
1. A method comprising:
-
receiving, from a client system of a first user, a query comprising one or more n-grams; parsing the one or more n-grams of the query to identify a first query constraint and one or more second query constraints, wherein the first query constraint has been previously flagged as identifying greater than a threshold number of objects; generating a query command based on the query, wherein the query command comprises an inverse constraint associated with the first query constraint and the one or more second query constraints; and generating one or more search results based on the query command, each search result corresponding to an object of a plurality of objects.
-
-
2. The method of claim 1, further comprising:
sending, to the client system, one or more of the search results for display to the first user.
-
3. The method of claim 1, wherein:
-
the first query constraint is for a first object-type and the inverse constraint is for the first object-type;
orthe first query constraint is for the first object-type and the inverse constraint is for a second object-type.
-
-
4. The method of claim 1, wherein the inverse constraint is for a first object-type and one or more of the second query constraints are for one or more second object-types.
-
5. The method of claim 1, wherein:
-
the first query constraint comprises an inner constraint and an outer constraint; and the query command comprises the an intersect of the inverse constraint and the inner constraint.
-
-
6. The method of claim 1, further:
-
the first query constraint is for a first object-type, the first query constraint corresponding to an inverted index mapping the first object-type to a second object-type; and the inverse constraint is for the second object-type, the inverse constraint corresponding to a forward index mapping the second object-type to the first object-type.
-
-
7. The method of claim 1, further comprising:
-
identifying a first set of objects matching the inverse constraint; identifying a second set of objects matching the one or more second query constraints; and wherein generating the one or more search results based on the query command comprises generating the one or more search results based on the first and second sets.
-
-
8. The method of claim 7, wherein generating the one or more search results based on the first and second sets comprises generating a search result corresponding to each object identified in both of the first set of objects and the second set of objects.
-
9. The method of claim 7, wherein each search result corresponds to an object of the second set of objects that is connected to one or more of the objects of the first set of objects.
-
10. The method of claim 7, wherein each search result corresponds to an object of the first set of objects that is connected to one or more of the objects of the second set of objects.
-
11. The method of claim 7, wherein identifying the second set of objects matching the one or more second query constraints comprises identifying one or more objects of the plurality of objects that are connected to one or more of the objects in the first set of objects.
-
12. The method of claim 1, further comprising:
-
determining a number of objects satisfying the first query constraint; and generating the query command with the inverse constraint if the number of objects is greater than a threshold number of objects.
-
-
13. The method of claim 1, further comprising:
-
flagging one or more query constraints, wherein each flagged query constraint has been identified as identifying greater than a threshold number of objects when executed; determining whether the first query constraint is one of the flagged query constraints; and generating a querying command comprising the inverse constraint if the first query constraint is a flagged query constraint.
-
-
14. The method of claim 1, wherein the query is a structured query comprising references to one or more selected objects accessible by the computing device.
-
15. The method of claim 1, wherein the query is a text string.
-
16. The method of claim 1, further comprising:
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 the first user; and a plurality of second nodes corresponding to the plurality of objects, respectively.
-
17. The method of claim 16, wherein the query comprises references to one or more selected nodes from the plurality of nodes and one or more selected edges from the plurality of edges.
-
18. The method of claim 17, wherein:
-
the first query constraint is for a first object-type corresponding to one or more nodes of a first node-type that are each connected by one of the selected edges referenced in the query to one or more nodes of a second node-type; and the inverse constraint is for a second object-type corresponding to one or more nodes of the second node-type that are connected by the one of the selected edges referenced in the query to one or more nodes of the first node-type.
-
-
19. One or more computer-readable non-transitory storage media embodying software that is operable when executed to:
-
receive, from a client system of a first user, a query comprising one or more n-grams; parse the one or more n-grams of the query to identify a first query constraint and one or more second query constraints, wherein the first query constraint has been previously flagged as identifying greater than a threshold number of objects; generate a query command based on the query, wherein the query command comprises an inverse constraint associated with the first query constraint and the one or more second query constraints; and generate one or more search results based on the query command, each search result corresponding to an object of a plurality of objects.
-
-
20. A system comprising:
- one or more processors; and
a memory coupled to the processors comprising instructions executable by the processors, the processors operable when executing the instructions to;receive, from a client system of a first user, a query comprising one or more n-grams; parse the one or more n-grams of the query to identify a first query constraint and one or more second query constraints, wherein the first query constraint has been previously flagged as identifying greater than a threshold number of objects; generate a query command based on the query, wherein the query command comprises an inverse constraint associated with the first query constraint and the one or more second query constraints; and generate one or more search results based on the query command, each search result corresponding to an object of a plurality of objects.
- one or more processors; and
Specification