19. Search and Inverted Indexes
Interview questions
Interview questions (with the counter-questions you'll get)
Q1. How would you implement search for a product catalogue?
They're testing: the end-to-end picture.
Think about your answer first, then open it.
Q2. What is an inverted index?
They're testing: the core data structure.
Think about your answer first, then open it.
Q3. How does ranking work?
They're testing: relevance basics.
Think about your answer first, then open it.
Q4. How would you design autocomplete?
They're testing: a classic sub-problem.
Think about your answer first, then open it.
Q5. How do you keep the search index consistent with the database?
They're testing: data sync and failure thinking.
Think about your answer first, then open it.
Q6. How do you scale a search cluster?
They're testing: shards vs replicas.
Think about your answer first, then open it.
Q7. How would you handle typos in search?
They're testing: practical relevance.
Think about your answer first, then open it.
Q8. What's the difference between keyword search and vector search?
They're testing: modern awareness.
Think about your answer first, then open it.
Q9. Why is deep pagination slow in a sharded search engine?
They're testing: understanding scatter-gather costs.
Think about your answer first, then open it.
Q10. The search cluster is down. What should the site do?
They're testing: graceful degradation.
Think about your answer first, then open it.