Why Ecommerce Search Needs Governance & How It Improves Retrieval
Authors: Alexander Marquardt, Honza Král, Taylor Roy (Elastic)
Summary
Ecommerce search fails not because of bad retrieval technology, but because of a missing governance layer between the user’s query and the retrieval engine. This article (Part 1 of a series) introduces why governance is necessary and what it enables.
The Core Problem
Different query types need fundamentally different treatment:
- “oranges” (navigational) → lexical with category constraint to produce section
- “gift for grandpa who has a sweet tooth” (discovery) → semantic retrieval
- “fruit high in vitamin C under $4” → semantic + category + price filters
A single retrieval strategy handles none of these optimally. Without governance, teams fall into endless relevance tuning without ever resolving the underlying routing problem.
What Governance Means
A governance layer sits upstream of retrieval and:
- Classifies query intent — navigational vs. discovery, head vs. tail
- Applies business constraints — category filters, eligibility, merchandising policies
- Routes to appropriate retrieval strategy — lexical, semantic, or hybrid
Key distinction: Governance ≠ Hybrid Search. Hybrid is one retrieval strategy; governance decides which strategy to use.
The Spaghetti Anti-Pattern
Without governance, search logic accumulates in application code:
- Thousands of lines of if/else, regex, conditional query modifications
- Every business change requires an engineering ticket and deployment cycle
- Fragmented, unauditable, brittle behavior
Head vs. Tail Queries
| Query Type | Example | Best Strategy |
|---|---|---|
| Head (deterministic) | “oranges”, “milk”, “iPhone 15 Pro” | Lexical + constraints |
| Tail (exploratory) | “gift for grandpa”, “shoes for standing all day” | Semantic |
| Mixed | ”fruit high in vitamin C under $4” | Semantic + hard filters |
Constraints are Orthogonal to Retrieval Method
Applying constraints to semantic retrieval ≠ hybrid search. Filters/boosts can be applied to any retrieval approach. Governance decides both which retrieval strategy AND what constraints to enforce.
Example Governed Query Plans
| Query | Governed Plan |
|---|---|
| ”chocolate without peanuts” | Lexical + exclusion filter for peanuts |
| ”cheap olive oil” | Lexical + price filter capped at threshold |
| ”fruit high in vitamin C under $4” | Semantic + category:fruit + price<$4 |
Related Concepts
- Search Governance — the central concept introduced here
- Search Intent — understanding query type is the first governance step
- Query Types — taxonomy of ecommerce query types
- Hybrid Search — one retrieval strategy that governance may choose
- Retrieval Pipeline — governance sits upstream of retrieval
Series
- Part 2: Ecommerce Search Governance - Move Faster Not Slower
- Part 6: Elasticsearch Personalized Search in Ecommerce - Improve Relevance