Search Redesign
Replace a slow LIKE-based search with something users won't dread.
The situation
Product search p95 latency is 1.8 seconds. The team wants sub-300ms with better ranking, without standing up new infrastructure this quarter.
Context
- Current implementation uses ILIKE across three columns.
- Catalog has 1.2M products and grows ~3% monthly.
- The platform team has rejected adding Elasticsearch this quarter.
Your objectives
- Bring p95 search latency under 300ms.
- Improve top-3 result relevance on a benchmark set.
- Stay within existing Postgres + Redis infrastructure.
Phases
Profile the current path
Find where the time goes.
Prototype trigram + ranking
Postgres pg_trgm + scoring.
Cache hot queries
Redis layer with invalidation plan.
Write the design doc
Trade-offs, rollout, metrics.
Tasks
- Profile current ILIKE query pathDay 1
- Prototype pg_trgm + GIN indexDay 2
- Tune ranking on benchmark setDay 3
- Add Redis hot-query cache layerDay 4
- Write design doc + rollout planDay 5
- Review with platform teamDay 6
Inbox for this scenario
Open inboxSara Iyer · Product Manager
MondaySearch is killing conversion
Funnel data is clear — abandonment spikes the moment search takes longer than ~1s. We need a fix.
Neel Krishna · Tech Lead
MondayConstraints recap
Postgres + Redis only this quarter. Keep the design doc focused on what we can ship, not what we wish we had.
Vikram Joshi · Platform Engineer
TuesdayIndex bloat warning
Heads up — pg_trgm GIN indexes get fat fast on a 1.2M catalog. Plan for VACUUM cadence in your rollout.
Success criteria
- Benchmark shows ≥6x latency improvement.
- Relevance score improves on the 200-query eval set.
- Design doc reviewed by the platform team.
Stakeholders
- NKsupportive
Neel Krishna
Tech Lead
- SIneutral
Sara Iyer
Product Manager
Deliverables
Benchmark report
pendingBefore/after latency + relevance.
Design doc
pendingApproach, trade-offs, rollout plan.
Prototype PR
pendingReviewed, gated behind a flag.
Competencies assessed
- Algorithm DesignWeight 30%
- Performance TuningWeight 30%
- Technical CommunicationWeight 25%
- Trade-off AnalysisWeight 15%