In a somewhat mysterious press conference held on January 15th, Facebook announced a new addition to their website , their own search engine — This entirely personalized search engine displays a different set of results to every user. Unlike Google’s “Search Plus Your World” or traditional search engines, it is virtually impossible for two to users see the same set of search results. Facebook’s search engine is algorithmically crafted to display only results relevant to the users personal likes and interests.
The Math Behind Facebook’s Search Engine
EdgeRank
It’s commonly known that Facebook uses a mathematical algorithm called EdgeRank to determine the content in any given users news feeds. Each “Edge” in EdgeRank is made up of three factors: Affinity, Weight, and Time Decay. As posts get older, they tend to fall down faster. Comments, shares, and likes can boost the relevance and length of time that a post stays at the top. There is also speculation that when a close friend interacts with a post, that post gets a higher boost in your newsfeed than when an average acquaintance interacts with the post.
Affinity Coefficient
Facebook scores every binary combination of users with an Affinity Coefficient, ranging from 0-1. The more often you interact with someone, the higher Affinity score you two have. You can see results of the Affinity Coefficient in action by clicking your chat icon — The users that you’re closest with appear at the top. This score is also used when looking for friends. Say you have 6 friends named Jim, the friend with the highest Affinity score will appear at the top of the results.
Factors that play into Affinity Coefficient: Time viewing their profile, frequency of chats & messages, public interaction (like, comment, share), number of mutual friends, poking, tagged pictures together, attending the same events, tagging in status updates, duration of friendship, network, overlapping likes and interests.
Standardized Interaction
Some people spend hours on Facebook, liking virtually every picture they see. Others sparingly interact with new content. Facebook standardizes interaction to each user. If you rarely comment on photos, commenting on a photo will increase the relevance of that content much more than someone who comments on dozens of photos per day.
Indexing & Retrieval System
Google indexes page’s using links, it breaks down web content using Latent Semantic Indexing. Facebook is indexing their own database, the map of their graph. As of 2013, there are 240 billion photos, 1 billion people, 1 trillion connections, and tens of billions of status updates. This content cannot be retrieved using standard indexing measures — Facebook developed an indexing methodology that is crafted to pull from your own archives. You only have the ability to search content that has already been shared with you. Even limiting Graph Search in this way, users will still be searching tens of millions of graph nodes.
Facebook’s system first breaks apart the user’s query into one of the many understood functions.