Back to work
Resume Let's talk
Case study · Numerator

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.

Role Backend / ML engineer
Context Multi-country product catalogs
Stack FastAPI · Elasticsearch · Hugging Face · spaCy

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.

Architecture

Ingest New product raw record spaCy preprocess HF classifier brand · category Query User query free text Hybrid retrieval BM25 + dense vectors Elasticsearch faceted index Results ranked index + facets search

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.

Outcome

+23% brand / category attribution accuracy
Hybrid BM25 + dense vectors recover variants keyword search missed
Auto new products self-file under the right facets on ingest

Stack

FastAPIElasticsearchHugging FacespaCyTransformersPython

More on the search platform is on my resume.

Download resume Back to all work