Catalog search
platform
Keyword-only search kept missing brand and category variants, and new products landed under the wrong facets. I built hybrid retrieval over Elasticsearch and a classifier that files every product correctly the moment it's ingested.
The problem
Good products were invisible because they were filed — and matched — the wrong way.
Product search ran on classic keyword matching, which is unforgiving of the way people actually type. Brand spellings, abbreviations and category synonyms meant a query could miss items that were obviously relevant. The problem compounded on ingest: new products frequently landed under the wrong brand or category facet, so even a perfect query couldn't surface them.
Two different failures, one symptom — relevant products that users simply never saw.
The approach
I attacked both the query side and the ingest side, because fixing one without the other still leaves results wrong.
- Hybrid retrieval — combining BM25 keyword scoring with dense vector similarity, so semantically related brand and category variants surface even when the exact tokens don't match.
- Classification on ingest — a fine-tuned Hugging Face model, with spaCy preprocessing, assigns brand and category facets automatically as each product enters the index.
- Multi-catalog tuning — the model was tuned across US / CA / DE catalogs so attribution holds up across markets rather than overfitting to one.
Architecture
One index, two lanes: products are classified before indexing; queries blend keyword and vector relevance.
Key decisions
Fix relevance and attribution together
Hybrid retrieval only pays off if products are filed correctly, and correct facets only matter if the query can reach them. Treating ingest and query as one problem is what actually moved results.
Classify at ingest, not at query time
Assigning facets when a product enters the index keeps queries fast and lets the whole catalog benefit from every model improvement on the next reindex — no per-request inference.
Tune across markets
Validating on US, CA and DE catalogs kept the classifier honest, so gains reflected real generalization rather than one market's quirks.