32Technology

How a search engine works

A search engine does most of its work before you type. A crawler follows links, an index files every word on a card, and a score puts the pages in order. Follow a crawl, look up words, weigh rare words and let links vote on a made up web of eight pages.

Key takeaways

  1. A crawler finds pages by following links. A page that nothing links to can be missed.
  2. An index lists, for every word, the pages that contain it. That is why a search is fast.
  3. A page can be scored by how often the words appear, and rare words count for more than common ones.
  4. A link is like a vote, and a vote from an important page counts for more. PageRank turns this into a rank that settles after a few rounds.
  5. The web and the numbers on this page are a toy model. Real engines use many more signals.

Sources

Most of these sites could not be opened while this page was written, so the facts were checked through search results that quote them. Crawling by following links and reading sitemaps, the index as a catalogue of words and the pages they are on, the random surfer, the damping factor of 0.85 (a 15 per cent chance of a random jump), the PageRank sum with a share of rank divided over the outgoing links, and tf idf as the share of a word times the log of the number of pages over the number of pages with the word, each appeared in at least two places. Google’s own documentation could not be read, and the sources are mostly secondary explainers. The web of eight pages, the page texts, the scores and the ranks are made up and were computed for this page. The page does not describe how any real search engine orders its results.