Skip to content

Query Processing Overview Vintage

Understanding what a user means when they type a query is one of the most complex problems in search. Bill Slawski analyzed dozens of patents that reveal how Google dissects, classifies, rewrites, and expands queries before ever matching them to documents.

The Query Understanding Pipeline

Query Classification

Google classifies every query to determine the best way to process and rank results for it.

Classification Dimensions

DimensionCategoriesEffect on Results
IntentInformational, Navigational, Transactional, LocalDetermines which ranking signals dominate
TopicNews, Health, Finance, Science, Entertainment, etc.Selects specialized data sources
Freshness NeedBreaking news, Trending, Seasonal, EvergreenControls freshness boost
AmbiguitySingle intent, Multiple possible intentsDetermines result diversity
LocalityGlobal, National, Regional, LocalFilters by geographic relevance
SensitivityNormal, Adult, Medical, LegalApplies content filters

Decision Tree Classification

Source: How Google Might Classify Queries Differently at Different Data Centers (2011)

Query Rewriting and Expansion

Google often modifies queries before processing them. The query you type is not necessarily the query Google evaluates.

Types of Query Modification

TypeInput ExampleModified QueryPurpose
Spelling fix"resturant""restaurant"Correct errors
Synonym expansion"automobile""automobile OR car"Broaden results
Entity expansion"Apple""Apple Inc. (technology company)"Disambiguate
Context addition"weather""weather [user location]"Add implicit context
Temporal"election results""election results 2024"Add time context
Personal context"my calendar""[user name] calendar"On-device personalization

Personalized Query Rewriting on Mobile

A 2021 patent described how mobile devices rewrite queries using on-device personal Knowledge Graphs:

This on-device processing means personal information stays private while still enabling personalized query understanding.

Source: Rewritten Queries and User-Specific Knowledge Graphs (2021)

Context Vectors: Understanding Word Meaning

Bill's analysis of the Context Vectors patent revealed how Google handles polysemy (words with multiple meanings).

The Polysemy Problem

The word "bank" can mean:

  • A financial institution
  • The side of a river
  • A pool shot technique
  • A data storage unit

Context vectors encode the surrounding context of each word usage, creating different representations for different meanings. This allows Google to:

  1. Match queries to the right meaning — "bank fishing tips" matches river bank content
  2. Group semantically related content — Even without identical keywords
  3. Understand specialist vocabulary — Technical terms in their professional context

Source: Google Patents Context Vectors to Improve Search (2016)

BERT and Question Answering

Bill's later analyses covered neural network approaches to query understanding, including BERT-based question answering.

How BERT Question Answering Works

What This Means for Content

  • Content does not need to explicitly phrase itself as answering a specific question
  • Semantic similarity between question meaning and passage meaning is what matters
  • Long-form, well-structured content with clear informational passages performs well
  • FAQ sections with complete answers align well with this system

Source: Question Answering Using Text Spans With Word Vectors (2021)

Search Suggestions and Autocomplete

Patents describe the systems behind Google's search suggestions:

Suggestion Ranking Factors

  • Query frequency — How often users search for this term
  • Query freshness — Trending queries get boosted
  • User match — Suggestions personalized to user history
  • Geographic match — Location-relevant suggestions prioritized
  • Session context — Prior queries in the session influence suggestions
  • Entity associations — Suggestions connected to recognized entities

Predictive Query Suggestions on Mobile

Phone keyboards and smaller screens make query suggestions even more critical. Patents describe:

  • Character-level prediction — Suggestions appear after just 1-2 characters
  • Touch-optimized layouts — Suggestions designed for thumb interaction
  • Voice-to-text integration — Suggestions adapt to voice input patterns

Source: Phone Keyboards and Searchers Using Predictive Query Suggestions (2008)

Time and Query Quality

A 2006 patent Bill analyzed explored how query quality is measured and how the age of results affects query satisfaction.

Measuring Query Quality

  • Result click rates — Higher click rates suggest better query interpretation
  • Result diversity — Good queries return varied, relevant results
  • Satisfaction signals — Users not refining their query suggests satisfaction
  • Time-document correlation — For some queries, newer documents are more satisfying

Source: A Role for Time and Query Quality in Search Results (2006)

Key Takeaways

  1. Your query gets rewritten — Google modifies queries before matching them to documents. Optimize for meaning, not just exact keywords.
  2. Intent determines ranking weights — Informational queries use different signals than transactional or local queries.
  3. Context defines word meaning — Google uses surrounding context to determine which meaning of a word is intended.
  4. Answer quality matters for featured snippets — BERT-based systems find answers by semantic similarity, not keyword matching.
  5. Search suggestions shape user behavior — What Google suggests influences what people search for, creating a feedback loop.
  6. Personal context stays on-device — Mobile query rewriting uses personal data without sending it to Google's servers.

A tribute to Bill Slawski (1958-2022) — the foremost authority on search engine patent analysis.