System Design · Senior · Question 54 of 75
What data structure makes full-text search fast?
- ✓Correct answer: An inverted index mapping each term to the documents containing it
- 2A B-tree on the whole text column
- 3A linked list of documents
Explanation
Search engines also store positions and statistics for ranking. LIKE '%term%' can't use a normal index efficiently.