Design Nearby Business Search With Geo Filtering and Ranking
Last updated: November 29, 2026
Quick Overview
Design the backend that answers queries like "tacos near me, open now, under $$" for a map viewport or user location, returning ranked businesses in under 200 ms at peak traffic.
Yelp
November 29, 20260
0
0 solved
Design the backend that answers queries like "tacos near me, open now, under $$" for a map viewport or user location, returning ranked businesses in under 200 ms at peak traffic.
Local search is Yelp's core product, so this is a natural flagship design question. Interviewers expect you to separate candidate retrieval (geo plus text) from ranking, pick a spatial index you can defend, and handle density differences between Manhattan and rural Montana.
What the Interviewer Expects
- Separate retrieval, filtering and ranking into clear stages
- Choose and justify a geo index (geohash, S2 cells, or a search engine geo_shape field)
- Handle dense and sparse areas with adaptive radius
- Keep fast changing signals (open now, ad budget) out of the slow index path
- Give a latency budget per stage and a caching plan
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How do you blend paid ads into organic results without hurting trust?
- How would you keep the index fresh when an owner updates hours?
- How would you personalize ranking without making cold start users see bad results?
- How do you evaluate a new ranking model offline and online?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: query by text ("tacos", or a category), location (point plus radius, or a map bounding box), and filters (open now, price, rating, features like outdoor seating). Return 20 results per pag...
High-Level Design
Client calls a Search API service. It calls a query understanding service (spell correction, mapping "tacos" to the Mexican and Food Trucks categories, detecting a location in the text like "in SoMa")...