Two Words, Two Lists
A search for several words keeps only the pages on every list.
In this lesson
- It starts with a question. A small website about Fiji food has an index. It says “cassava” is on pages 2, 5, 8 and 9, and “recipe” is on pages 3, 5, 9 and 11. Ana searches for cassava recipe. Which pages contain both words?
- The idea you will find. Each extra word keeps only the pages that are on every list. — The index holds one list of pages for each word. For a search of several words, the engine fetches each list and keeps the page numbers they share, just as you did. That is why adding a word can only shrink the set of matches or leave it the same, and why a careful extra word is the quickest way to a better result.
- How you learn it. By doing: sorting, counters.
- Length. 6 short steps. Progress saves on this phone.
Part of How Search Finds Things
How a search engine answers in a fraction of a second, and what decides the order.