MongoDB Atlas Search and Vector Search
Parent: MongoDB Atlas · Published reference · snapshot 2026-09-08 · skill mongodb-atlas-expert/references/mongodb-search-ai.md
↓ Facts as markdownall context files
```python
These notes link each claim to its source. Some citations identify archived research reports that are no longer hosted on this site. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.
Pagination with Atlas Search
- For deterministic pagination (not skip/limit): [archived source: https://llms-explorer.com/sources/mdb-context-hub/mongodb-search-ai/#pagination-with-atlas-search]
Atlas Vector Search
- See mongodb-atlas-vector-search for the complete reference. Key summary: [archived source: https://llms-explorer.com/sources/mdb-context-hub/mongodb-search-ai/#atlas-vector-search]
Hybrid Search ($rankFusion)
- Combine Atlas Search (BM25) with Vector Search (HNSW) results: [archived source: https://llms-explorer.com/sources/mdb-context-hub/mongodb-search-ai/#hybrid-search-rankfusion]
Auto Embedding (Voyage AI)
- Skip the external embedding pipeline: [archived source: https://llms-explorer.com/sources/mdb-context-hub/mongodb-search-ai/#auto-embedding-voyage-ai]
Search Node Architecture
- For production, use dedicated Search Nodes to isolate Atlas Search / Vector Search workloads from OLTP: [archived source: https://llms-explorer.com/sources/mdb-context-hub/mongodb-search-ai/#search-node-architecture]
- S20_HIGHCPU_NVME, S30_HIGHCPU_NVME, etc. [archived source: https://llms-explorer.com/sources/mdb-context-hub/mongodb-search-ai/#search-node-architecture]
- Zero-downtime migration: enable Search Nodes → Atlas replications in background → automatic traffic switch [archived source: https://llms-explorer.com/sources/mdb-context-hub/mongodb-search-ai/#search-node-architecture]
- See mongodb-atlas-search-nodes for sizing guide [archived source: https://llms-explorer.com/sources/mdb-context-hub/mongodb-search-ai/#search-node-architecture]
When to Use Atlas Search vs Text Indexes
- Always prefer Atlas Search for production full-text search. Text indexes are only appropriate for very small collections or simple dev prototypes. [archived source: https://llms-explorer.com/sources/mdb-context-hub/mongodb-search-ai/#when-to-use-atlas-search-vs-text-indexes]
Anti-Patterns
- Dynamic true + all fields queried: Dynamic mapping indexes everything, making the index large. Use explicit mappings for production. [archived source: https://llms-explorer.com/sources/mdb-context-hub/mongodb-search-ai/#anti-patterns]
- No search node for production Vector Search: Resource contention with OLTP causes latency spikes [archived source: https://llms-explorer.com/sources/mdb-context-hub/mongodb-search-ai/#anti-patterns]
- numCandidates too low: numCandidates: limit = minimal recall; use 10-20× limit [archived source: https://llms-explorer.com/sources/mdb-context-hub/mongodb-search-ai/#anti-patterns]
- Missing filter fields in vector index: filter in $vectorSearch requires the field to be declared as type: "filter" in the index definition; otherwise falls back to post-filter (much less efficient) [archived source: https://llms-explorer.com/sources/mdb-context-hub/mongodb-search-ai/#anti-patterns]
References
- Atlas Search Documentation [archived source: https://llms-explorer.com/sources/mdb-context-hub/mongodb-search-ai/#references]
- $search Aggregation Stage [archived source: https://llms-explorer.com/sources/mdb-context-hub/mongodb-search-ai/#references]
- $rankFusion [archived source: https://llms-explorer.com/sources/mdb-context-hub/mongodb-search-ai/#references]
- Atlas Vector Search [archived source: https://llms-explorer.com/sources/mdb-context-hub/mongodb-search-ai/#references]
- Voyage AI Auto-Embedding [archived source: https://llms-explorer.com/sources/mdb-context-hub/mongodb-search-ai/#references]
Where this helps
- Building a hybrid search feature that needs to merge keyword relevance (BM25) with semantic similarity (vector search) into one ranked result set. [source] — AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.
- Deciding whether a production Vector Search workload needs dedicated Search Nodes to avoid resource contention with the OLTP cluster. [source] — AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.
- Adopting automated embedding, via Voyage AI models through autoEmbed, to skip maintaining an external embedding pipeline. [source] — AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.
- Implementing deterministic pagination for a search UI where skip/limit pagination would be too slow or unstable at depth. [source] — AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.
Project ideas
- Build a $rankFusion query that merges Atlas Search (BM25) and Atlas Vector Search (HNSW) results into a single hybrid-ranked response. [source] — AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.
- Migrate an external embedding pipeline to Atlas's built-in autoEmbed field type backed by Voyage AI, and compare operational complexity before and after. [source] — AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.
- Provision dedicated Search Nodes for a production Vector Search workload and measure query latency before and after isolating it from OLTP. [source] — AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.
- Build a vector index with an explicitly declared filter-type field so filters in $vectorSearch use the index instead of falling back to a much slower post-filter. [source] — AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.
Common mistakes
- Leaving dynamic mapping enabled with every field queried, producing an unnecessarily large index instead of using explicit mappings in production. [source] — AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.
- Running production Vector Search without a dedicated Search Node, letting it contend for resources with OLTP and causing latency spikes. [source] — AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.
- Setting numCandidates too close to limit, which minimizes recall — a 10–20× multiple of limit is the recommended starting point. [source] — AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.
- Omitting a field from the vector index's filter-type declaration and then filtering on it in $vectorSearch anyway, which silently falls back to a much less efficient post-filter. [source] — AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.
Known issues
- This pack's own summary field is malformed, a stray code-fence marker instead of a real summary, a sign the source content it was generated from may have been imperfectly extracted — verify details against the fuller mongodb-atlas-search and mongodb-atlas-vector-search references before relying on this pack alone. [source] — AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.
- Auto-embedding via Voyage AI depends on a specific external model family (voyage-4-large, voyage-4, voyage-4-lite, voyage-code-3); switching providers or models later requires re-embedding existing data. [source] — AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.
- Search Node migration to production is described as zero-downtime via background replication and automatic traffic switch, but that migration still needs to be planned and executed deliberately, not assumed automatic on enabling the feature. [source] — AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.
- Text indexes are explicitly called out as appropriate only for very small collections or simple dev prototypes — they are not a long-term substitute for Atlas Search. [source] — AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.
Children
- Atlas Search Lucene Architecture (frontier, viability 3.17 / 5, below research gate)
- Atlas Vector Search HNSW IVF (frontier, viability 3.45 / 5)
- RAG Patterns with Vector Search (frontier, viability 3.20 / 5)
- Atlas Search Analyzers and Tokenizers (frontier, viability 4.28 / 5)
- Stored Source Performance Optimization (frontier, viability 2.95 / 5, below research gate)
- Auto Embedding Voyage AI (frontier, viability 3.67 / 5)
- Search Nodes Dedicated Infrastructure (frontier, viability 3.60 / 5)
- Lexical Prefilters for Vector Search (frontier, viability 3.92 / 5)
- Atlas Hybrid Fusion and BM25 Diagnostics
Frontier under this node: Atlas Search Analyzers and Tokenizers (4.28), Atlas Search Lucene Architecture (3.17), Atlas Vector Search HNSW IVF (3.45), Auto Embedding Voyage AI (3.67), Lexical Prefilters for Vector Search (3.92), RAG Patterns with Vector Search (3.20), Search Nodes Dedicated Infrastructure (3.60), Stored Source Performance Optimization (2.95)