Search · eCommerceIn productionNDA
A search box that understood a half-inch brass faucet.
The catalog was full of part numbers, fractional dimensions and trade abbreviations. Default platform search returned nothing for most of the queries customers actually typed.
- Category
- Search · eCommerce
- Result
- 12ms p95
- Engine
- Typesense · self-hosted
- Status
- In production
The problem
Zero results on real queries.
Customers searched the way they speak: half-inch rather than 0.5", part numbers without dashes, brand names spelled phonetically. Default search matched literal strings and returned nothing.
Because nothing was logged, nobody knew how often it happened. The failure was invisible in every report while being obvious to every customer.
Where results did come back, ordering was driven by text-match score rather than anything commercially sensible, so in-stock, high-margin products sat below discontinued lines.
The hard parts
What made relevance hard.
- The same dimension appeared in four notations across the catalog and had to be normalised
- Part numbers needed to match with or without separators, and partially
- Trade synonyms and phonetic spellings existed only in the heads of the sales team
- Ranking had to weigh stock and commercial priority alongside text relevance
- The index had to stay in step with a catalog that changed daily
Architecture
Index to result set.
- 01modelCatalog fields mapped to searchable, filterable and ranking attributes
- 02normaliseDimensions, units and part-number formats standardised on the way in
- 03indexProducts written into self-hosted Typesense, updated on catalog change
- 04enrichSynonyms and abbreviations added from real query logs and sales input
- 05querySearch hits Typesense directly with facets and typo tolerance applied
- 06rankRanking rules weigh stock and commercial priority with text score
- 07learnQueries and zero-result terms logged and fed back into synonyms
Stack
- Typesense
- Laravel
- Shopify
- MongoDB
- Redis
What shipped
What shipped.
- Faceted search across products and collections with structured filter groups
- Typo tolerance and unit normalisation for fractional dimensions
- Partial and separator-insensitive part-number matching
- Synonym sets maintained from real search logs
- Ranking rules that account for stock and commercial priority
- Search analytics: top queries, zero-result terms, click-through by position
Result
12ms
p95 query latency · p99 under 15ms
Fast, but relevance was the win.
Ninety-five per cent of queries return in twelve milliseconds, with p99 under fifteen. Speed was the easy part.
The change that mattered was relevance: the queries that previously returned nothing now return the right product, and zero-result terms are logged so the synonym set keeps improving.
Search analytics also became a demand signal — the team can see what customers ask for and do not stock.
Next step