# Inverted Index

> A list of each word and the pages that hold it. It makes word search fast.

**Field:** Artificial Intelligence  
**Category:** Retrieval & Search  
**Also known as:** Inverted File Index, Posting List, Search Index (Keywords)

## Think of it like

It is like the index at the back of a book. Look up a word and get the pages it is on.

## Definition

An inverted index is a list of every word, each with the documents that hold it. A normal file goes from a document to its words. This goes the other way, from a word to its documents. To search, the engine looks up each word and joins the lists. That is why keyword search stays fast over millions of pages. Most search engines are built on one.

## Example

Three pages mention "llama". The index line reads llama: page 2, page 7, page 9. A search for llama jumps straight there.

## Why it matters

It makes keyword search fast at any size. BM25 and hybrid search sit on top of it.

## Common mistake

Thinking it understands meaning. It only knows which words appear where.

## Three principles

- **Word to pages.** The reverse of a normal file.
- **Join the lists.** Many words, one fast answer.
- **Exact words.** No sense of meaning.

## Related terms

- [Keyword Search](https://learn.benibix.com/term/ai/keyword-search)
- [Okapi BM25](https://learn.benibix.com/term/ai/okapi-bm25)
- [Sparse Vector](https://learn.benibix.com/term/ai/sparse-vector)
- [Hybrid Search](https://learn.benibix.com/term/ai/hybrid-search)
- [Indexing](https://learn.benibix.com/term/marketing/indexing)

![Left, three pages, each holding a few words. Right, an index with one line per word: llama points to pages 2 and 9, alpaca points to page 7, wool points to pages 2 and 7. A search for llama follows its line straight to pages 2 and 9.](https://learn.benibix.com/diagrams/ai3-inverted-index.svg)

---

Source: https://learn.benibix.com/term/ai/inverted-index
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
