call(back)

Design Product Browse and Search for an Online Store

Design category browsing and product search for a large consumer e-commerce platform: millions of SKUs with variants (size, colour), a category hierarchy, facets, promotions and global traffic. Reads dominate, but price, stock and promotions change constantly. Search and browse should answer under 200 ms at p95.

Cover the catalog model (products, variants, attributes, categories, facets, regional price and availability), the index schema and how it is rebuilt and incrementally updated, query processing (tokenisation, spelling, synonyms, filters, autocomplete), ranking (text relevance, popularity, margin, stock, personalisation, diversity) and how it is evaluated, category browsing with faceted navigation, sorting, pagination and caching, and the integration with product detail, cart and checkout so that a price or stock shown in results is validated before an order is placed.

Hints

Hint 1

Keep two stores: a catalog database as the source of truth and a search index derived from it through a change stream, so the index is always rebuildable and never authoritative for price or stock.

Hint 2

Index products with variants as nested documents, and keep the high-churn fields (price, stock) either out of the index or updated through a cheap partial-update path, with checkout validating against the catalog.

Hint 3

Ranking is a function to be measured: offline relevance judgements plus online A/B tests on click-through and conversion, with business signals (margin, stock) as tie-breakers and a diversity step at the end.

Asked at

Similar Problems5