Skip to main content
InterviewHubPRO
Section Overview
Q36

Question 36 of 50

Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

72%
Elasticsearch & Lucene (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

Lucene Inverted Index Deep Dive: Term dictionary, Term index (FST), and Postings lists with Skip lists.

senior LevelMost AskedelasticsearchAdvanced Internals

In Simple Words: An inverted index maps terms to the list of document IDs that contain them:

  1. Term Index (FST - Finite State Transducer): Stored in RAM. A compressed prefix automaton that points to offsets in the Term Dictionary, avoiding disk lookups for every term.
  2. Term Dictionary: Alphabetically sorted list of all unique terms stored on disk.
  3. Postings Lists: Linked lists of Document IDs containing the term, along with term frequencies and byte offsets for phrase searches.
  4. Skip Lists: Allows Lucene to skip large blocks of irrelevant document IDs during boolean AND/OR intersections, achieving sub-millisecond query evaluation.