System Design
4. Database FundamentalsAnimated
Full-Text Indexing
An index for searching words inside text.
The idea
An inverted index maps each word to the documents containing it, so text search needs no scan.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- client
- gateway / proxy
- service
- cache
- data store
- queue / stream
Embed the query into a meaning vector.
- step:
- 1/4
- at:
- Query
1/8
The green dot is a request moving through the system.
Step by step
- 1Split text into tokens
- 2Normalise (lowercase, stem)
- 3Build word to document lists
- 4Look up query words and rank
Where it is used
Search boxes and logs.
Watch out for
Relevance tuning takes effort.