How does Google understand a search query?
Google interprets the query's words and context, matches related wording and retrieves pages that may answer it.
Why it matters to youUnderstand why different search phrases can lead to the same pages.
Google interprets a search query using its words and context. It then retrieves pages that may be relevant and ranks the results.
A note before you dive in: the first half of this lesson is the plain idea you need for your first page. The second half covers retrieval internals and goes deeper than you need. Skim it and come back when you’re curious.
For example, a search for a “dripping tap” may return pages that use “leaking faucet.” The words differ, but the page can still match the repair the person needs.
Those pages first need to be processed for the index. It helps to separate that earlier page-processing work from the work performed when someone searches.
Page processing and query processing
The two stages do different jobs:
- Page processing: records information about fetched content for later retrieval.
- Query processing: interprets a particular search, retrieves relevant pages and ranks them.
The following steps are a simplified information-retrieval model. They are not a complete description of Google’s private implementation.
Indexer side: what happens to your page
When Google’s crawler fetches your page, the indexer does roughly the following:
- Tokenization: splits the URL, title, headings and body into individual words. Punctuation gets stripped.
- Normalization: lowercases everything, handles apostrophes, removes diacritics.
- Stemming: collapses morphological variants (running to run, shoes to shoe, feet to foot) using algorithms like Porter’s stemmer.
- Phrase extraction: common multi-word phrases get indexed as units in addition to individual terms.
- Posting list updates: for every term, the indexer adds an entry (called a “posting”) recording your document’s ID and where in the document the term appeared (slug, title, H1, H2, body).
The output of indexer-side work is the inverted index, a single unified data structure that maps every term in Google’s vocabulary to a list of document IDs containing that term, along with positional metadata about where in each document the term appears. This is documented in Google’s research on web indexing, and the inverted index is the core data structure powering search.
For a page targeting a product-type phrase, the indexer records postings for each stemmed term found across the slug, title and headings. Posting metadata matters because slugs, titles and H1s carry more weight than body terms when computing relevance.
Query side: what happens when someone searches
When a user enters a query, Google runs:
- Query understanding: BERT, a language model Google has used in Search since 2019, analyzes the query to work out its meaning, especially for longer or conversational queries.
- Synonym expansion: Google’s synonym tables (built from query log mining, documented in Patent US7636714B1) rewrite or augment the query with known synonyms.
- Candidate retrieval: Google looks up the now-expanded query terms in the inverted index, intersecting posting lists to find documents matching the terms.
- Ranking: the candidate set (typically a few hundred to a few thousand documents) is ranked using PageRank, click history, BERT relevance scoring on the candidates, position weights, freshness and other signals.
- Results presentation: the top results are returned, usually with diversity filters that limit how many results from any single domain appear.
A page can appear for a query that uses different wording from its title. Synonyms and context help connect the query with relevant content.
That connection also matters when publishing another page. Two differently worded keyword targets may still refer to the same topic. Check the search results before assuming they need separate pages.
Critical clarification on BERT
Google’s official 2019 announcement positioned BERT primarily as a query-understanding tool, not as an indexer-side analysis applied to every page on the web. Google’s spokespeople explicitly stated BERT doesn’t assign values to pages.
Semantic matching helps interpret wording and context. It is a different job from establishing that users find a page useful. Backlinks and organic activity provide external evidence beyond the wording on the page.
Keep that distinction when using this model: matching content to a query establishes relevance. It does not mean the page has validated its own claims.
How synonyms are identified
Different phrases can describe the same thing. Search systems can learn those relationships from language, query patterns and the context of the words.
Mechanism 1: query log mining (Patent US7636714B1)
A Google patent describes learning synonym relationships from query logs. The following steps explain that research approach:
- Generate pseudo-queries. For every multi-term query in the logs, replace each term or phrase with a placeholder token. So a query like “gm used car prices” produces pseudo-queries like “: used car prices”, “gm : car prices”, “gm used : prices”.
- Find shared pseudo-queries. If users searched both “gm used car prices” and “general motors used car prices”, both produce the same pseudo-query when “gm” or “general motors” gets replaced with the placeholder. The differing phrases, “gm” and “general motors”, become candidate synonyms in this context.
- Statistical validation. Candidates are tested against four criteria:
- frequently_alterable: of all queries containing phrase A, what percentage have a corresponding query with phrase B substituted? (Threshold: about 1%.)
- frequently_much_in_common: of those query pairs, what percentage share at least 3 search results in the top 10? (Threshold: 60%+.)
- frequently_altered: how often does the same user submit both queries within a short time window? (Threshold: 1 in 2000 queries.)
- high_altering_ratio: do users substitute in both directions (A to B and B to A)? Asymmetric substitution rejects the candidate.
- Confidence scoring. A specific function (evidence = 1.0 - exp(-soft_and/1.5)) combines test results. Above 0.6 typically validates; above 0.9 is high confidence.
- Context-specific tracking. Synonyms are tracked per-context. The patent’s own example: “download” is generally not a good synonym for “free”, but in the context of “free photos” and “download photos” it is. Google tracks synonym validity for up to about 10,000 different contexts per phrase.
Mechanism 2: distributional embeddings (Word2Vec era, 2013+)
Word2Vec uses neural networks to learn vector representations of words from massive text corpora. Words used in similar contexts end up near each other in vector space.
This catches synonyms users haven’t substituted in queries yet. Even without query log evidence, “automobile” and “car” have similar vectors because they appear in nearly identical sentence contexts across the web.
Mechanism 3: contextual transformer models (BERT era, 2018+)
BERT produces context-dependent embeddings. The same word gets different vectors depending on surrounding text. “Bank” in “river bank” gets a different vector than “bank” in “bank account”.
For synonymy and ranking, BERT excels at paraphrase matching. Research has shown empirically that BERT in ranking strongly prefers semantic matches between paraphrase tokens.
How they work together
These approaches illustrate different ways to connect related wording:
- Query log mining handles synonyms with strong empirical user behavior signals.
- Word2Vec-style embeddings fill in synonyms without enough query volume.
- BERT handles context-dependent semantics and paraphrase matching at query time.
When Google decides two of your pages target “the same query”, any combination of these mechanisms might contribute. The practical implication: you cannot reliably differentiate slugs using terms that are synonymous, paraphrastic, or commonly substituted by users.
The patent’s thresholds and the model descriptions above are research details. They are not verified settings for today’s Google Search. For a publishing decision, use the actual search results and your existing page-query data.