GLOSSARY

Query Match

Query match describes how well a result aligns with the user’s query. In practice, it covers match types (exact, phrase, token, fuzzy, semantic) and the rules that fire when a query equals certain patterns.

What is Query Match?

Query match is the matching logic and score that connect a query to a result. It spans match types (exact/phrase/token/fuzzy/semantic), field priorities (title > attributes > description), and rules that trigger on specific queries (e.g., best bets, redirects, promotions).

How It Works (quick)

  • Match types:
    • Exact/keyword fields for SKU/brand.
    • Phrase/bigram for common units (“air max 270”).
    • Fuzzy for typos (length-aware).
    • Semantic via vectors.
  • Field weighting: BM25F or similar to weight title/attributes higher.
  • Rules: If query matches pattern (brand-only, policy term), then redirect/promote or adjust boosts.
  • Evidence & highlights: Show why a result matched (terms/phrases/entities).

Why It Matters in E-commerce

  • Precision: Clean match logic keeps page one relevant.
  • Control: Query-match rules route brand/navigational searches correctly.
  • Explainability: Clear highlights build trust.

Best Practices

  • Guardrails: Protect SKU/MPN/brand with exact fields; cap fuzzy and popularity boosts.
  • Category-aware: Different match priorities per category (model names vs generic).
  • Late-bound synonyms: Apply at query time; localize per market.
  • Rule hygiene: Version and QA query-match rules; avoid over-broad patterns.
  • Metrics: Track P@k/NDCG, zero-results, and redirect accuracy.

Challenges

  • Over-expansion from synonyms, brittle rules, multilingual tokenization, and brand cannibalization.

Examples

  • Query “gift card” → rule redirects to gift card landing.
  • Query “gore tex jacket” → phrase match + normalized hyphen returns GORE-TEX jackets.
  • Query “iphon 15 case” → fuzzy rescues typo; field boosts keep title hits on top.

Summary

Query match is the foundation of relevance and routing. Combine precise match types with a small set of audited rules, then let ranking balance quality and business goals.

FAQ

Query match vs ranking?

Match narrows and scores relevance evidence; ranking blends that with business features (LTR).

Do vectors replace match types?

No—vectors add meaning; keep exact/phrase for precision and control.

How many rules are safe?

Keep a small, audited set for high-value intents; rely on retrieval for the rest.