Ritangkar Dey
Home / Lab / Product Search Engine
Search & Personalisation

Product Search Engine

Structured filters plus a hand-written BM25 ranker over a 124-product catalog.

DeterministicFlagship WorkBM25Information retrievalSpring Boot
INTERACTIVE DEMOhard-coded · synthetic data · runs in your browser

The Problem

Search relevance is revenue. Teams often configure a search engine without understanding the ranking underneath it.

How It Works

  1. Tokenise (lowercase, stop-words removed) and index name, description, use case, brand and material.
  2. Apply hard filters first — category, colour, max price, in-stock.
  3. Rank the survivors with BM25 (k1 = 1.5, b = 0.75), breaking ties by rating.

Technically Interesting

IDF is computed over the whole catalog, not the filtered subset, so term rarity stays meaningful when filters narrow the result.

Why It Matters

Knowing the ranking function from first principles is what makes Solr/Elastic relevance tuning a decision rather than trial and error.

Scope & honesty. Synthetic catalog. Built from scratch for understanding, not as a replacement for a search platform.