MongoDB Atlas Vector Search
Parent: MongoDB Atlas · researched 2026-05-28T18:35:53.040Z· 19 sources · 10 concepts · skill mongodb-atlas-vector-search
```python
HNSW Tuning Parameters
- Recommendation: Start with defaults. Only tune if ANN recall < 0.90 in production. [source]
Quantization
ANN (Approximate Nearest Neighbor)
- numCandidates: Controls recall-latency tradeoff. Higher = better recall + slower. Rule of thumb: 10-20x the limit. Hard minimum equals limit. [source]
ENN (Exact Nearest Neighbor)
- ENN guarantees perfect recall but O(N) scan. Use only for: small collections (<100K docs), high-accuracy requirements, offline batch evaluation. Do not use in production at scale. [source]
3. Hybrid Search ($rankFusion / $scoreFusion)
- Combines semantic vector search with keyword full-text search. [source]
$rankFusion (Reciprocal Rank Fusion — recommended)
- RRF is robust to score magnitude differences between vector and full-text scores. Better than $scoreFusion when scores are on different scales. [source]
4. Voyage AI Auto-Embedding
- Atlas Vector Search + Voyage AI auto-embedding lets you skip the embedding pipeline entirely - Atlas embeds at index-build time and at query time. [source]
- Voyage 4 model family (as of 2026): [source]
- voyage-4-large: 1024 dims, best quality [source]
- voyage-4-lite: 512 dims, fastest + most economical [source]
- voyage-4-finance: Finance-domain specialized [source]
- voyage-4-code: Code and programming specialized [source]
Parent-Document Retrieval
- Index small chunks for precise retrieval, but return the parent document for full context: [source]
Dedicated Search Nodes
- Vector Search in production should use dedicated Search Nodes to avoid resource contention with OLTP queries. HNSW graphs must fit in RAM for fast ANN. [source]
- 1M vectors × 1536 dims × float32 ≈ 6 GB raw; with HNSW graph ≈ 9-12 GB [source]
- Use S30_HIGHCPU_NVME or larger for production vector workloads [source]
- Use Storage-Optimized tiers when index exceeds RAM [source]
7. Anti-Patterns
- Wrong similarity metric: Using euclidean with normalized embeddings (should use dotProduct); using cosine with unnormalized embeddings and comparing absolute distances [source]
- No filter fields declared in index but using filter in $vectorSearch: Causes full ANN scan before filtering, not pre-filter → worst of both worlds [source]
- numCandidates too low: Values close to limit severely degrade recall [source]
- ENN in production at scale: O(N) scan; destroys query latency for collections > 100K docs [source]
- Not sizing Search Nodes for vector workload: Embedded mongot on shared cluster causes OLTP latency spikes [source]
- Dimension mismatch: numDimensions in index must match exactly what the embedding model outputs [source]
- Querying without the vector index active: Atlas returns an error or falls back to collection scan; wait for index build to complete [source]
References
Children
- HNSW Index Parameters (frontier)
- Vector Quantization (frontier)
- Hybrid Search (frontier)
- Voyage AI Embeddings (frontier)
- RAG Patterns (frontier)
- Search Nodes (frontier)
- Embedding Pipelines (frontier)
- Multi-Vector Patterns (frontier)
Frontier under this node: Embedding Pipelines, HNSW Index Parameters, Hybrid Search, Multi-Vector Patterns, RAG Patterns, Search Nodes, Vector Quantization, Voyage AI Embeddings