Requirements
What it is
Clarify:
- goal: customers find and add what they searched for, quickly; fewer searches that end with nothing added;
- scale: 3,000,000 searches a day, about 104 a second at peak; 50,000 products per city;
- latency: results within 150 ms (p99), and suggestions as the user types within 50 ms;
- queries: short, misspelt, mixed Hindi and English ('doodh', 'atta 5kg', 'amul buter');
- constraints: only products in stock at the customer's store; exact brand searches must show that brand first.
Why it matters
Search has a stated intent, so relevance comes first and personalisation second.
- A wrong result for 'Amul butter' is a failure no matter how well it suits the user's taste.
- Mixed-language, misspelt queries make query understanding a major part of the design.
In the real world: Grocery search queries in India are often transliterated Hindi or regional words typed in English letters, so a purely English keyword index misses many of them.
Designing search like recommendations, leading with personalisation. Personalise only among relevant results.