The simplest search keeps the listings that write the query word and orders them newest first. This loveseat enters the top 10 because its text contains 'sofa' and it is recent; relevance does not enter the order.
Chapters
- IntroHow we keep scoreHow do we know whether a search is good?
- 1Recency searchShow the newest listings first
- 2Query normalizationMeet the seller halfway on words
- 3Lexical matchOrder by text fit, not by age
- 4Spelling normalizationWhat if I mistype a word?
- 5Entity-tagged matchingName the attributes, not the seller's words
- 6Canonical search policyKeep the rug, remove the rug pad
- 7Attribute boostingUse what I meant, not only the words I typed
- 8Learned rankingLet data choose the weights
- 9Hybrid searchmissingFind the meaning, not only the words
- 10Cross-encoder rerankingmissingRead the query and the listing together
- 11Two-tower retrievalmissingTeach the vectors what this catalog means
The ranked listings for the selected level appear here. Click a listing to see the signals that placed it.
Show the newest listings first
- 1Start simple
Go through every listing and keep the ones whose text contains the query word. Order the kept listings newest first.
- 2Where it breaks
'couch' finds couch listings but no sofa-only listing: this chapter has no word switches yet, so nothing bridges the gap between the two words. 'carpet' finds carpet listings but no rug that is titled 'rug'. And a fresh but weak match outranks the best match, because only age decides the order. Before you press, guess: for 'carpet', will it find one listing — or every rug?
- 3The fix
Build a word table once, ahead of time: for every word, the listings that contain it. Look the query words up exactly as typed: keep only listings that contain every query word, then order them newest first.
- 4What it is called
The word table is an inverted indexA table built once, ahead of time: for every word, the list of listings that contain it. Like the index at the back of a book. A query then looks up its words instead of scanning every listing.. Ordering by age only is recency ranking. Chapter 2 adds three switches that change which words are looked up: stemmingCut a word to its stem, so that 'bikes', 'biking' and 'bike' all become 'bike' and match each other., synonym expansionAlso search for words with the same meaning, so 'couch' also finds 'sofa'. and variant normalisationTreat 'mid-century', 'mid century' and 'midcentury' as the same word.. WANDSThe public product-search dataset this app searches. It provides the catalog (42,994 products) and the human relevance grades (Exact, Partial, Irrelevant) for the evaluated queries. has no date, so the posted date here is a deterministic synthetic overlay column spread over 180 days: many listings share a date, and those ties fall to a stable id order rather than to a finer clock.
Did chapter 1 make search better?
Loading the measured scorecard.
Chapter 1 in engineering terms
- Capability
- Retrieve strict word matches and order them newest first.
- Mechanism
- TokeniseSplit a text into single lower-case words without punctuation. the query and require every word, exactly as typed, to appear in the listing. No stemmingCut a word to its stem, so that 'bikes', 'biking' and 'bike' all become 'bike' and match each other., no synonymsAlso search for words with the same meaning, so 'couch' also finds 'sofa'., no variant collapsingTreat 'mid-century', 'mid century' and 'midcentury' as the same word.. Order the strict matches newest first.
- Trade-off
- Strict matchingThe step that decides which listings are candidates at all. is predictable but brittle: a different word for the same thing finds nothing, and a plural finds no singular. Newest-first can bury the best match under a fresh but weaker one. WANDSThe public product-search dataset this app searches. It provides the catalog (42,994 products) and the human relevance grades (Exact, Partial, Irrelevant) for the evaluated queries. has no date, so the posted date is a deterministic synthetic overlay.
- Fixes
- Without a first ranker the book has nothing to run, so evaluation has no ranking to gradeA number from 0 to 3 that says how good one listing is for one query. Here it is the WANDS human label: Exact = 3, Partial = 1, Irrelevant = 0. 0 = useless, 3 = exactly what was asked for. The grades are the answer key; the click log is simulated from them..
Matching decides which listings are candidates. Scoring decides their order. This level changes both.Dotted words have a definition: hover or tap them.