05 · Search & Discovery
Search that survives a real catalog.
A search box is judged on its worst query, not its best. Part numbers, fractions, abbreviations and misspellings are where default search fails and where most of the revenue-bearing intent actually lives.
The problem
Zero results on the query that mattered.
Default platform search matches strings. Real catalogs are full of things that do not match cleanly: a half-inch fitting written four different ways, a part number with or without dashes, a brand name spelled the way customers hear it rather than the way it is registered.
The visible symptom is a zero-results page. The invisible one is worse: results that come back in a useless order, so the customer assumes you do not stock the item.
Most teams have no data on any of this, because nobody logs what was searched and what came back empty.
What we build
Relevance, then speed.
- Faceted product and collection search with structured filter groups
- Synonyms, typo tolerance and explicit ranking rules per collection
- Search analytics: top queries, zero-result queries, click-through by position
- Vector and semantic search for cases where keyword matching cannot work
- Index pipelines that stay in sync with the catalog as it changes
Architecture
Catalog to result set.
- 01modelCatalog fields are mapped to searchable, filterable and ranking attributes
- 02indexProducts are written into Typesense, then updated on catalog change
- 03enrichSynonyms, abbreviations and unit variants are added from real query logs
- 04queryA search hits Typesense directly with filters and typo tolerance applied
- 05rankRanking rules reorder by business priority, not just text score
- 06learnQueries and zero-result terms are logged and fed back into synonyms
Stack
- Typesense
- Laravel
- Shopify
- MongoDB
- Embeddings
- Vector search
Questions
Asked most often.
Why Typesense rather than Elasticsearch or Algolia?
It is fast, open-source, self-hostable and considerably simpler to operate for catalog-scale search. For product discovery that combination usually wins; where a project genuinely needs something else, we say so.
What does 12ms p95 mean?
Ninety-five per cent of production queries return in twelve milliseconds or less, measured at the search engine. p99 stays under fifteen.
Can it search more than products?
Yes — collections, documentation and internal records all index the same way. The same engine often backs a RAG pipeline.
How do synonyms get maintained?
From your own search logs. Zero-result queries are the highest-value input, which is why logging them is part of the build rather than an add-on.
Next step