1. A method comprising: receiving, from a client system of a first user of an online social network, a structured query comprising references to one or more selected objects associated with the online social network; generating a query command based on the structured query, wherein the query command comprises an inner query constraint and an outer query constraint; identifying a first set of objects matching the inner query constraint and at least in part matching the outer query constraint; identifying a second set of objects matching the outer query constraint; and 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.
1. A method comprising: receiving, from a client system of a first user of an online social network, a structured query comprising references to one or more selected objects associated with the online social network; generating a query command based on the structured query, wherein the query command comprises an inner query constraint and an outer query constraint; identifying a first set of objects matching the inner query constraint and at least in part matching the outer query constraint; identifying a second set of objects matching the outer query constraint; and 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. 9. The method of claim 1 , wherein identifying the first set of objects matching the inner query constraint and at least in part matching the outer query constraint comprises: identifying a first number of objects matching either the inner query constraint or the outer query constraint; and identifying a second number of objects matching both the inner query constraint and the outer query constraint.