Skip to content
Blog

From Keyword Matching to Semantics: How Similarity Search Changes Retrieval

See how retrieval evolved from exact keyword matching to semantic similarity search, and what each approach is still good at.

Published on • November 22, 2026

AI Assistant

Introduction

For decades, search meant keyword matching: does the document contain the words in the query? That approach built the modern web — but it breaks down the moment users ask questions in different words than the documents use. Similarity search changes the game by matching meaning instead of strings.

The Keyword Era

Classical retrieval works on lexical overlap:

  • Boolean search — documents containing all (or any) query terms
  • TF-IDF — reward terms that are frequent in a document but rare across the corpus
  • BM25 — a refined TF-IDF with saturation and length normalization; still the backbone of Elasticsearch and Lucene

Keyword search is fast, explainable, and precise for exact terms: error codes, part numbers, names. Its weakness is vocabulary mismatch:

  • Query: “how do I recover a locked account”
  • Document: “password reset procedure for disabled users”

Zero overlapping content words — yet the document is exactly what the user needs. Lexical search misses it.

The Semantic Shift

Semantic search embeds both query and documents into a vector space where closeness means relatedness:

  1. Convert query → query vector
  2. Convert documents → document vectors (offline, at index time)
  3. Rank documents by similarity to the query vector

Now “recover a locked account” and “password reset for disabled users” land near each other, even with no shared keywords.

As Pinecone’s learning materials describe it, vector similarity search lets you query by concept rather than literal terms — the reason it became the default retrieval layer for LLM applications.

What Actually Changed in the Stack

AspectKeyword searchSimilarity search
Matching signalTerm overlapGeometric closeness
IndexInverted indexVector index (HNSW, IVF…)
Handles synonymsPoorly (needs synonyms lists)Natively
Handles exact IDsStrongWeak alone
ExplainabilityHigh (matched terms)Lower (scores)
Query latencyMillisecondsMilliseconds with ANN

Why Modern Retrieval Uses Both

In practice, the winner is hybrid search: run BM25 and vector search in parallel, then fuse the rankings (often with reciprocal rank fusion). Keyword legs catch exact identifiers; the semantic leg catches paraphrase and intent.

Conclusion

Similarity search did not kill keyword matching — it completed it. Lexical retrieval answers “does it contain these words?”; vector retrieval answers “does it mean the same thing?”. Modern search platforms answer both, then blend the results.

References