Skip to main content
InterviewHubPRO
Section Overview
Q29

Question 29 of 50

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

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

How does the Read / Search Path work in Elasticsearch (Scatter-Gather)?

senior LevelelasticsearchAdvanced Internals

In Simple Words:

  1. Query Phase (Scatter): Coordinating node broadcasts search query to a primary or replica shard for every shard in the index. Each shard computes local matching scores and returns top K document IDs and scores.
  2. Fetch Phase (Gather): Coordinating node merges all shard results, sorts them to determine the global top K, and sends targeted requests only to the specific shards holding those document IDs to retrieve the full _source JSON.