How Search Engines Work

Today, finding what you’re looking for online is fairly easy. One simply needs to visit Google.com or some other search engine and type in a few words that describe what you’re looking for, and then you’re presented with a list of tens of thousands of results related to your search. Even better, they’re ordered based on what the search engine “thinks” is the most relevant to the least relevant.

That wasn’t always the case in the early days of the internet. People had to rely on directories, links, or word of mouth to find what they were looking for online.

Today, the simple act of searching betrays a surprisingly complex system which makes that search possible. While it may seem easy, it’s actually quite difficult to present a user with the most important information, in seconds, from the almost five billion web pages currently on the internet. In addition to that, of the two trillion searches Google processes each year, 15 percent of those are brand new⁠⁠—meaning they have never been searched in the history of humankind⁠—and yet Google is expected to find good pages to answer those queries. How could you possibly write a program to sort through five billion pages for specific content that the user will be happy with, all in less than one second?