What Is Vector Search?
Type "affordable smartphone" into a keyword search engine and it looks for documents containing exactly those words. It won't find an article about "cheap phones" — even though that's exactly what you meant.
Vector search solves this. Instead of matching strings, it matches meaning.
Text as coordinates
Every word, sentence, or document can be represented as a list of numbers — a vector — in a high-dimensional space. Vectors that share meaning cluster close together. Vectors with different meanings sit far apart.

"affordable smartphone" → [0.23, -0.87, 0.41, ...] # 768 numbers
"cheap phone" → [0.21, -0.84, 0.39, ...] # nearly identical
"database indexing" → [0.94, 0.12, -0.73, ...] # completely different
The model that produces these vectors is called an embedding model. It's a neural network trained to place similar concepts near each other in that high-dimensional space.
The search operation
Once every document in your corpus has been embedded, a search becomes three steps:
- ▸Embed the query text with the same model
- ▸Find the vectors in your index nearest to the query vector
- ▸Return those documents
This is k-Nearest Neighbor (kNN) search — finding the k closest points. Similarity is measured by a distance function (usually cosine similarity for text).
Why this matters in production
| Scenario | Keyword fails | Vector succeeds |
|---|---|---|
| User types "fast phone" | Misses "high-performance mobile" | Finds it |
| Multi-language content | Needs per-language logic | Language-agnostic |
| Typos and paraphrasing | Returns nothing | Finds intent |
| Concepts, not terms | "heart disease" misses "cardiac" | Handles it |
[Key Insight] Vector search doesn't replace keyword search — it complements it. For exact IDs, codes, or error strings, keyword still wins. The real power comes from combining both: hybrid search.
The 4-generation arc of search
Search engines have evolved through four clear stages:
- ▸Keyword (BM25) — exact term matching, fast and interpretable, brittle on paraphrasing
- ▸Semantic (Dense vectors) — embedding-based kNN, understands meaning and synonyms
- ▸Hybrid — both signals combined, best quality across all query types (NDCG@10: 0.91)
- ▸Agentic — systems that plan multi-step retrieval, decompose queries, reason over results
We're currently in the hybrid → agentic transition. Every production search system worth building today starts with hybrid.
What you'll learn in this series
- ▸How embeddings encode meaning into numbers
- ▸The three similarity metrics and when each one wins
- ▸How HNSW makes search fast at million-document scale
- ▸Dense, sparse, and hybrid search — built from scratch
- ▸How to measure and improve search quality
Start with embeddings next.