All level 4 passages

How a Search Index Finds a Word

Suppose a library of digital documents contains millions of pages. To answer a search for “harbor,” a computer could reopen every page and scan every word. That method works in principle but wastes time by repeating the same reading for each query.

A search system instead prepares an inverted index. For every selected term, the index stores a list of documents, or positions within documents, where that term occurs. The ordinary document leads to its words; the inverted structure leads from a word back to documents.

Building the index requires choices. Text is divided into tokens, common words may receive special treatment, and related forms such as “walk” and “walking” may or may not be grouped. The system must also update entries when documents change. Those decisions affect what a query can find.

Finding documents that contain a word is only one stage. A search engine may rank results using term frequency, location, links, freshness, authority, or other signals. The index supplies candidates quickly; ranking tries to order them usefully. An index therefore exchanges work now for speed later. It consumes storage and preparation time so repeated searches need not reread the entire collection. Like a book index, it points toward likely locations, though a digital version can record far more relationships and be rebuilt when the collection changes.

Check your understanding

Answer 4 questions about this passage and see why each answer is right

Questions and pace mode are free with sign-in.

Sign in free to answer

About pace mode

Signed in, you can choose a pace from 150 to 400 words per minute. A highlight moves through the passage, then the questions check what you understood. Choose Off to read at your own speed.

Pace mode measures this reading session. It is not a measure of your overall reading ability.

Practice reading