GLOSSARY

Search Algorithm

A search algorithm is the logic that finds and orders results. Good ones mix keyword signals with business rules so shoppers see relevant, in-stock items first.

What is a Search Algorithm?

A search algorithm is the set of retrieval and ranking steps that turn a query into an ordered list of results. It combines lexical match (BM25/phrases), semantic signals (vectors), filters/ACL, and business features (stock, rating, price, margin).

How It Works (quick)

  • Analyze query: Language detect → tokenize/lemmatize → detect phrases/entities.
  • Recall: Lexical (inverted index), optional dense retrieval (ANN vectors).
  • Filter: Apply hard rules first (OOS, region, permissions).
  • Rank: Blend text scores with quality/business features; optional Learning to Rank.
  • Controls: Diversity, brand caps, promotions; log why this result.

Why It Matters in E-commerce

  • Speed to product: Clean top-k reduces pogo-sticking.
  • Business fit: Surfaces in-stock, high-quality items that match intent.
  • Explainability: Highlights and score breakdowns build trust.

Best Practices

  • Hybrid retrieval: BM25 + vectors; keep exact fields for SKU/brand.
  • Category/locale tuning: Footwear ≠ electronics; en-GB ≠ en-US.
  • Guardrails: Cap popularity/freshness boosts; enforce OOS and compliance early.
  • Observability: Track NDCG/CTR/conv, zero-results, tail latency; keep golden sets.
  • Versioning: Configs and models with rollback.

Summary

A search algorithm is retrieval + ranking under guardrails. Hybrid evidence plus clear controls delivers relevant, shoppable results.