InterviewLegend

Design Product Search

Commonly asked
Alex Chen40 min readUpdated 15 real interview reports

A storefront is the public shop a merchant sells through, its theme written in Liquid, Shopify's templating language, and almost every one of them has a search box. A shopper types a few words and expects results in a blink. Then they want to narrow those results by size, color, price band, or whether the item is actually in stock. That narrowing is faceting, and the little counts next to each option ("In stock 142", "Under $50 89") are facet counts. The job runs from the moment a shopper submits a query to a ranked, filtered page of products coming back. And the catalog underneath is never still: the merchant edits it while buyers drain it as they purchase.

The Shopify angle
The thing that makes this a Shopify problem is that you are not searching one giant catalog, you are searching millions of separate merchant catalogs that must never bleed into each other. A shopper on one store's search box should only ever see that store's products, so every query is scoped to a single shop. Shopify already shards its data by a shop id. It also groups shops into pods, sets of stores that live on their own isolated databases, so one store's busy day cannot starve another's. Product search inherits that shape: the index is partitioned by shop_id, a query is routed to the shard holding that one store's products, and the blast radius of a single query stays tiny. Say early that the corpus is per-merchant, and the whole design gets simpler. You are searching a catalog of a few thousand products far more often than a catalog of a few million.
What's inside
  • 1 diagram
  • 5 sections
  • about 40 min

Premium lessonShopify interview guide

These took digging.

What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.

100 companies. Checked every month.

Unlock all 100 companies

$49 a year · less than $1 a week · 30-day money-back guarantee

Had your Shopify interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Shopify interview guide

Know what Shopify asks before you walk in.

26 coding · 5 system design · 21 behavioral questions

Get Premium$49 a year · 30-day money-back guarantee
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.