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:
- Convert query → query vector
- Convert documents → document vectors (offline, at index time)
- 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
| Aspect | Keyword search | Similarity search |
|---|---|---|
| Matching signal | Term overlap | Geometric closeness |
| Index | Inverted index | Vector index (HNSW, IVF…) |
| Handles synonyms | Poorly (needs synonyms lists) | Natively |
| Handles exact IDs | Strong | Weak alone |
| Explainability | High (matched terms) | Lower (scores) |
| Query latency | Milliseconds | Milliseconds 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.