To determine which pages are relevant to a search query, Facebook utilizes a natural language processor (both to suggest search terms and identify connections) combined with algorithms that examine the “nodes” or connections of a searcher’s network to find content friends have “liked” that match the search. Graph Search can also consider second-degree connections or friends of friends, as well as content which has been shared either directly with the searcher or publicly on Facebook.
Unlike standard search engines, Facebook owns all of the data (page posts, photos, videos, etc.)which has ever been posted to the network. This inherent advantage enabled Facebook to implement a unique indexing structure to categorize the data based on a number of predefined properties. This indexing of owned data allows Facebook to quickly search, sort, identify and return relevant content.
They dubbed this infrastructure “Unicorn.” Similar to a standard search engine, it supports search queries including “multi-hop” queries in a series of steps while searching “nodes” in a similar style to the way a search engine utilizes keywords.
Via Antonino Militello