Generating logical expressions for search queries
Abstract
In one embodiment, a method comprises receiving a search request; generating a search query based on the search request, the search query including a logical expression, the logical expression including a logical operator that operates on multiple operands, at least one of the operands including an optional search constraint and an associated weight; searching a data store to identify a set of objects matching the search query, the set of objects including a subset of objects satisfying the logical expression, each object in the subset satisfying at least one of the operands, for each operand that includes an optional search constraint, at least a proportion of the objects in the subset satisfying the optional search constraint, the proportion determined based on the associated weight; and sending instructions for presenting a search-results page, the search-results page including search results corresponding to the objects in the identified set of objects.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A method comprising, by a computing system:
receiving, from a client device of a user of an online social network, a search request comprising one or more search terms inputted by the user; generating, by the computing system, a search query based on the search request, wherein the search query comprises a first logical expression, the first logical expression comprising a first logical operator that operates on a plurality of first operands, and wherein at least one of the first operands comprises an optional search constraint and an associated weight; searching a data store of the online social network to identify a set of objects matching the search query, wherein the set of objects comprises a subset of objects satisfying the first logical expression, each object in the subset of objects satisfying at least one of the first operands, and wherein for each first operand that comprises an optional search constraint, at least a proportion of the objects in the subset of objects satisfy the optional search constraint, the proportion determined based on the associated weight; and sending, to the client device of the user, instructions for presenting a search-results page responsive to the search request, the search-results page comprising a plurality of search results corresponding to a plurality of the objects in the identified set of objects, respectively.
2 . The method of claim 1 , wherein at least one of the first operands comprises a second logical expression, the second logical expression comprising a second logical operator that operates on one or more second operands.
3 . The method of claim 1 , wherein the search query comprises a second logical expression, the second logical expression comprising a second logical operator that operates on one or more second operands, and wherein one of the second operands comprises the first logical expression.
4 . The method of claim 3 , wherein a minimum ratio of a number of objects in the subset of objects to a number of objects in the set of objects is determined based on a weight associated with the second operand comprising the first logical expression.
5 . The method of claim 1 , wherein at least one object in the set of objects is not in the subset of objects.
6 . The method of claim 1 , wherein at least one of the first operands comprises some or all of the search terms of the search request.
7 . The method of claim 1 , wherein at least one the optional search constraints comprises a locality constraint or a social-graph constraint.
8 . The method of claim 1 , wherein each associated weight is specified as a percentage, fraction, decimal, ratio, whole number, or any combination thereof
9 . The method of claim 1 , wherein at least one of the first operands does not have an associated weight.
10 . The method of claim 9 , wherein each first operand that does not have an associated weight is a non-optional search constraint, and wherein, for each non-optional search constraint, all of the objects in the subset of objects satisfy the non-optional search constraint.
11 . The method of claim 1 , wherein searching the data store of the online social network to identify the set of objects matching the search query comprises searching the data store to identify objects not satisfying the optional search constraints, and then searching the data store to identify objects satisfying the optional search constraints until at least the proportion of the objects in the subset of objects satisfy the optional search constraints.
12 . The method of claim 1 further comprising ranking the objects in the identified set of objects, wherein the search-results page presents the search results ordered based on the rankings of their corresponding objects.
13 . The method of claim 12 , wherein the objects in the identified set of objects are ranked based on social graph information.
14 . The method of claim 12 , wherein the online social network comprises 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 user; and a plurality of second nodes respectively corresponding to a plurality of objects.
15 . The method of claim 14 , wherein, for each object in the identified set of objects, the ranking is based on a number of edges connecting a second node corresponding to the object to another node in the social graph.
16 . The method of claim 1 , wherein the search query is generated based on social-networking information associated with the user.
17 . One or more computer-readable non-transitory storage media embodying software that is operable when executed to:
receive, from a client device of a user of an online social network, a search request comprising one or more search terms inputted by the user; generate, by the computing system, a search query based on the search request, wherein the search query comprises a first logical expression, the first logical expression comprising a first logical operator that operates on a plurality of first operands, and wherein at least one of the first operands comprises an optional search constraint and an associated weight; search a data store of the online social network to identify a set of objects matching the search query, wherein the set of objects comprises a subset of objects satisfying the first logical expression, each object in the subset of objects satisfying at least one of the first operands, and wherein for each first operand that comprises an optional search constraint, at least a proportion of the objects in the subset of objects satisfy the optional search constraint, the proportion determined based on the associated weight; and send, to the client device of the user, instructions for presenting a search-results page responsive to the search request, the search-results page comprising a plurality of search results corresponding to a plurality of the objects in the identified set of objects, respectively.
18 . The media of claim 17 , wherein at least one of the first operands comprises a second logical expression, the second logical expression comprising a second logical operator that operates on one or more second operands.
19 . The media of claim 17 , wherein the search query comprises a second logical expression, the second logical expression comprising a second logical operator that operates on one or more second operands, and wherein one of the second operands comprises the first logical expression.
20 . A system comprising: one or more processors; and a non-transitory memory coupled to the processors comprising instructions executable by the processors, the processors operable when executing the instructions to:
receive, from a client device of a user of an online social network, a search request comprising one or more search terms inputted by the user; generate, by the computing system, a search query based on the search request, wherein the search query comprises a first logical expression, the first logical expression comprising a first logical operator that operates on a plurality of first operands, and wherein at least one of the first operands comprises an optional search constraint and an associated weight; search a data store of the online social network to identify a set of objects matching the search query, wherein the set of objects comprises a subset of objects satisfying the first logical expression, each object in the subset of objects satisfying at least one of the first operands, and wherein for each first operand that comprises an optional search constraint, at least a proportion of the objects in the subset of objects satisfy the optional search constraint, the proportion determined based on the associated weight; and send, to the client device of the user, instructions for presenting a search-results page responsive to the search request, the search-results page comprising a plurality of search results corresponding to a plurality of the objects in the identified set of objects, respectively.Join the waitlist — get patent alerts
Track US2017277802A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.