Search query interactions
First Claim
1. A method comprising:
- receiving, from a client system of a first user, a query comprising one or more n-grams;
generating a plurality of query commands based on a parsing of the query input, wherein each query command comprises an inner query constraint and an outer query constraint;
scoring the plurality of query commands based at least in part on a number of objects matching the inner query constraint of the respective query command;
selecting, from the plurality of query commands, a first query command based at least in part on the respective scores of the query commands, wherein the first query command comprises a first inner query constraint and a first outer query constraint; and
executing the first query command to identify a plurality of objects, the plurality of objects being identified based on;
a first set of objects matching the first inner query constraint and at least in part matching the first outer query constraint; and
a second set of objects matching the first outer query constraint.
1 Assignment
0 Petitions
Accused Products
Abstract
In one embodiment, a method includes receiving a query comprising one or more n-grams, generating a plurality of query commands based on a parsing of the query input, wherein each query command comprises an inner query constraint and an outer query constraint, scoring the query commands based at least in part on a number of objects matching the inner query constraint of the respective query command, selecting a first query command based at least in part on the respective scores of the query commands, and executing the first query command to identify a plurality of objects based on: (1) a first set of objects matching the first inner query constraint and at least in part matching the first outer query constraint, and (2) a second set of objects matching the first outer query constraint.
67 Citations
20 Claims
-
1. A method comprising:
-
receiving, from a client system of a first user, a query comprising one or more n-grams; generating a plurality of query commands based on a parsing of the query input, wherein each query command comprises an inner query constraint and an outer query constraint; scoring the plurality of query commands based at least in part on a number of objects matching the inner query constraint of the respective query command; selecting, from the plurality of query commands, a first query command based at least in part on the respective scores of the query commands, wherein the first query command comprises a first inner query constraint and a first outer query constraint; and executing the first query command to identify a plurality of objects, the plurality of objects being identified based on; a first set of objects matching the first inner query constraint and at least in part matching the first outer query constraint; and a second set of objects matching the first outer query constraint.
-
-
2. The method of claim 1, further comprising:
parsing the one or more n-grams of the query identify a plurality of query constraints, wherein the inner query constraint and the outer query constraint of each generated query command corresponds to one of the identified query constraints.
-
3. The method of claim 1, further comprising:
-
generating one or more search results based on the first and second sets of objects, wherein each search result corresponds to an object of the plurality of objects; and sending, to the client system, one or more of the search results for display to the first user.
-
-
4. The method of claim 1, wherein the inner query constraint is for a first object-type and the outer query constraint is for a second object-type, and wherein the first object-type and the second object-type are each selected from a group consisting of:
- a user, a photo, a post, a webpage, an application, a location, and a user group.
-
5. The method of claim 1, further comprising:
-
scoring the first set of objects; and scoring the second set of objects based at least in part on the scores of the first set of objects.
-
-
6. The method of claim 1, wherein executing the first query command to identify the plurality of objects comprises:
-
identifying a first number of objects matching at least the first inner query constraint; and identifying a second number of objects matching both the first inner query constraint and the first outer query constraint.
-
-
7. The method of claim 1, wherein executing the first query command to identify the plurality of objects comprises:
-
identifying a first number of objects matching either the first inner query constraint or the first outer query constraint; and identifying a second number of objects matching both the first inner query constraint and the first outer query constraint.
-
-
8. The method of claim 1, further comprising determining one or more search intents of the query based at least on whether one or more of the n-grams in the query match terms corresponding to a search intent indexed in a pattern-detection model.
-
9. The method of claim 8, further comprising scoring the plurality of query commands based on one or more of the search intents.
-
10. The method of claim 9, wherein the one or more search intents comprise an intent to exclude converse search results.
-
11. The method of claim 9, wherein the one or more search intents comprise an intent to exclude inner search results, and wherein scoring the plurality of query commands comprises downgrading the score of each query command that generates search results corresponding to objects matching the inner query constraint of the respective query command.
-
12. The method of claim 9, wherein the one or more search intents comprise an intent to exclude duplicate search results, and wherein scoring the plurality of query comprises downgrading the score of each query command that generates search results corresponding to objects that match both the inner query constraint and the outer query constraint of the respective query command.
-
13. The method of claim 8, wherein, for each query command, one or more of the inner query constraint or the outer query constraint is generated based on one or more of the search intents.
-
14. The method of claim 1, wherein the plurality of objects comprises to one or more objects of the second set of objects matching the first outer query constraint, each object of the plurality of objects corresponding to a second object that is related by a constraint of the first query command to at least one object of the first set of objects matching the first inner query constraint.
-
15. The method of claim 1, wherein the first inner query constraint is nested in the first outer query constraint.
-
16. 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.
-
17. The method of claim 1, wherein the query is a text string.
-
18. 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.
-
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; generate a plurality of query commands based on a parsing of the query input, wherein each query command comprises an inner query constraint and an outer query constraint; score the plurality of query commands based at least in part on a number of objects matching the inner query constraint of the respective query command; select, from the plurality of query commands, a first query command based at least in part on the respective scores of the query commands, wherein the first query command comprises a first inner query constraint and a first outer query constraint; and execute the first query command to identify a plurality of objects, the plurality of objects being identified based on; a first set of objects matching the first inner query constraint and at least in part matching the first outer query constraint; and a second set of objects matching the first outer query constraint.
-
-
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; generate a plurality of query commands based on a parsing of the query input, wherein each query command comprises an inner query constraint and an outer query constraint; score the plurality of query commands based at least in part on a number of objects matching the inner query constraint of the respective query command; select, from the plurality of query commands, a first query command based at least in part on the respective scores of the query commands, wherein the first query command comprises a first inner query constraint and a first outer query constraint; and execute the first query command to identify a plurality of objects, the plurality of objects being identified based on; a first set of objects matching the first inner query constraint and at least in part matching the first outer query constraint; and a second set of objects matching the first outer query constraint.
- one or more processors; and
Specification