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:

  1. Classifies query intent — navigational vs. discovery, head vs. tail
  2. Applies business constraints — category filters, eligibility, merchandising policies
  3. 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 TypeExampleBest 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

QueryGoverned 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

Series

People