Elasticsearch Interview Prep
5 min read Quiz at the end
Key ES interview topics: inverted index, text vs keyword, shards, must vs filter, aggregations.
Elasticsearch Interview Topics
- Index vs Collection — ES index is like a DB table; documents are rows stored as JSON
- Shards and replicas — shards split data for scale; replicas provide redundancy and read throughput
- Inverted index — ES builds an inverted index mapping words to document IDs for fast full-text search
- Analysers — process text: tokenise into terms, lowercase, remove stopwords, stem
- text vs keyword — text is analysed for full-text search; keyword is exact-match only
- must vs filter — must affects relevance score; filter is binary and cached (faster)
- Aggregations — metrics (sum, avg, min) and buckets (terms, date_histogram, range)
- Near real-time — documents are searchable within 1 second (controlled by refresh_interval)
Topic Quiz · 2 questions
Test your understanding before moving on
1. What is a shard in Elasticsearch?
💡 Shards split an index across nodes for horizontal scaling — each shard is a Lucene index.
2. What does near real-time mean in Elasticsearch?
💡 ES refreshes the index every 1 second by default making new documents searchable within ~1s.