1. A method comprising, by one or more computing devices: receiving from a first user of an online social network a search query; searching one or more data stores to identify one or more objects associated with the online social network that substantially match the search query, wherein each object is associated with a privacy setting, and wherein identifying the one or more objects is based in part on the privacy setting for each object; determining for each identified object a visibility of the object with respect to the first user, wherein: if the object is visible to the first user, then selecting the object; and if the object is not visible to the first user, then excluding the object; and generating one or more search results corresponding to the search query, wherein each search result corresponds to one of the selected objects having visibility that is visible to the first user; each search result comprising a reference to the identified object corresponding to the search result.