Geosearch
Draw a radius on a map, prune candidates with spatial indexes, and blend text relevance with distance decay.
The stumper
coffee returns the best-reviewed café 400 km away.
For local search, relevance has a second dimension: distance. A perfect café across the ocean is not a useful answer when you want coffee now.
Spatial indexes prune the map before distance is computed. Bounding boxes are cheap; geohashes encode cells into strings; trees organize space so nearby candidates can be found without scanning every place.
The final score blends text relevance with proximity. The blend is a product decision: exact intent should usually outrank closeness, but not always.
Try it before you read on
Open the Lab tab. Change a parameter, break something, and form a hypothesis before reading the explanation.
Checkpoint
3 questions. Explanations appear after submission.
1. Why is haversine needed for distance on Earth?
2. What does a geohash prefix represent?
3. What does distance decay do in ranking?