---
title: "Atlas Search: Matching Is Cheap, Materializing Isn't"
description: "Atlas Search finds matching document IDs fast, but materializing each hit from the collection is where the latency and CPU go. This trade-off map shows the benefit, the cost, and the condition for accepting that second phase."
---

# Atlas Search: Matching Is Cheap, Materializing Isn't

**Type:** [Trade-offs](https://yomu.fyi/visual-explainers/category/trade-offs.md)

![A left-to-right diagram of Atlas Search query execution: the search index matches and returns document IDs, then a batched id-lookup stage materializes full documents. Three labeled panels below show the benefit, the cost, and the condition for accepting that second-phase overhead.](https://yomufyi.s3.us-east-1.amazonaws.com/visual-explainers/d55a0009-5ead-4232-97e8-bf081f097694/image-741043d2-ab00-4162-b3b0-0ab145c46e9b.webp)

> Atlas Search finds matching document IDs fast, but materializing each hit from the collection is where the latency and CPU go. This trade-off map shows the benefit, the cost, and the condition for accepting that second phase.

## Explanation

Atlas Search splits a query into two phases: the search index matches the query and returns document identifiers, then the engine materializes those documents from the collection. The second phase is where cost hides, because each lookup can repeat query planning and collection resource acquisition instead of doing real retrieval work. Reusing a parameterized execution plan and batching lookups inside one shared resource scope removes most of that overhead, cutting end-to-end latency by up to 4.9x for $search and 5.5x for $vectorSearch in published benchmarks. The explainer frames this as a trade-off: the index buys relevance and speed, the materialization phase charges for volume, and the condition that decides whether the cost matters is how many documents you return and how often you ask.

## FAQ

### Why is Atlas Search's document materialization the expensive part?

The search index only returns matching document IDs. Turning those IDs into full documents re-runs query planning and collection resource acquisition, which MongoDB measured at roughly 30% of mongod CPU rather than real retrieval work. Reusing one parameterized SBE plan and batching lookups inside a shared resource scope removes most of that overhead.

### When does batched materialization actually pay off?

It pays off most when a query returns many documents and many clients run the same query shape, because batching amortizes resource acquisition across hits. Published benchmarks show up to 4.9x lower latency for $search at 10,000 results and roughly 2.75x throughput with 16 concurrent clients. Small top-k queries gain little.

### Do I need to change my application to get these gains?

No. The optimized id-lookup path ships in MongoDB 9.0, is enabled by default, and requires no application changes. The trade-off is architectural rather than code-level: you still pay a second lookup per hit, so bounding result counts and reusing query shapes remain your main levers.

**Tags:** [Atlas Search](https://yomu.fyi/topic/atlas-search.md), [Latency](https://yomu.fyi/topic/latency.md), [MongoDB Atlas](https://yomu.fyi/topic/mongodb-atlas.md), [Search](https://yomu.fyi/topic/search.md), [Vector Search](https://yomu.fyi/topic/vector-search.md)

## Related reading

### [Does Boolean still matter when AI can do the searching?](https://yomu.fyi/post/does-boolean-still-matter-when-ai-can-do-the-searching.md)
- Company: [Brandwatch](https://yomu.fyi/company/brandwatch.md)
- Author: Bianca Parvu
- Published: Nov 11, 2026
- Type: Explainer

Boolean remains essential for social listening because it gives researchers explicit rules for defining, inspecting, and reusing datasets, providing precision, transparency, and reproducibility. AI can accelerate Boolean query building by generating terms, fixing syntax, and assessing result quality, but the logic stays visible and editable, unlike black-box model decisions. A Foxit survey shows executives save 4h36m per week with AI but spend 4h20m verifying outputs, highlighting the verification burden. Cision’s Iris AI tools illustrate this approach: Query Writer creates a first draft from a plain-language prompt, Query Fixer catches syntax errors, and Query Health evaluates relevancy and source diversity. The goal is less manual work without removing control, with researchers retaining final judgment on query quality.


### [Genie One: The AI cowork home for everyone](https://yomu.fyi/post/genie-one-the-ai-cowork-home-for-everyone.md)
- Company: [Databricks](https://yomu.fyi/company/databricks.md)
- Author: Sydney Sundell, Elise Georis
- Published: Nov 11, 2026
- Type: Announcement

Genie One is Databricks’ enterprise home for AI cowork, unifying search, analysis, artifact creation, and cross-tool actions in one governed platform. Genie Search combines hybrid AI search over indexed documents, tickets, and wikis with over 100 MCP connectors for live information retrieval and actions. Users can create and refine slide decks, dashboards, and interactive pages as artifacts directly in conversation, with inspectable sources and governed data. Shareable skills capture workflows and run with each user’s permissions, while native apps for browser, desktop, mobile, Slack, and Microsoft Teams extend access. Unity Gateway provides admins with MCP policies, approval controls, tracing, and cost management as adoption grows.


### [Genie with Genie Ontology Delivers 1.6× the Accuracy with Less than Half the Tokens](https://yomu.fyi/post/genie-with-genie-ontology-delivers-1-6x-the-accuracy-with-less-than-ha.md)
- Company: [Databricks](https://yomu.fyi/company/databricks.md)
- Author: Jeff Fletcher, Rishabh Singh
- Published: Nov 11, 2026
- Type: Benchmark

Databricks developed a new enterprise data-agent benchmark in collaboration with Turing to evaluate Genie against two frontier agents on business questions in a live Databricks workspace. The benchmark uses a fictional UK energy company, Calderwick Energy, with hundreds of tables, notebooks, dashboards, saved SQL queries, and documents that capture institutional knowledge. Genie achieved a 91% pass rate, compared to 45% and 58% for the other agents, while using fewer than half the tokens and completing tasks 3-4x faster. Genie Ontology automatically extracts and organizes enterprise context from these assets, surfacing relevant information that table schemas alone cannot provide. The results demonstrate that context retrieval and harness quality, not just token-generating intelligence, determine agent performance on real-world enterprise tasks.


### [Token Pooling-Aware Training for Multi-Vector Embedding Models](https://yomu.fyi/post/token-pooling-aware-training-for-multi-vector-embedding-models.md)
- Company: [Hugging Face](https://yomu.fyi/company/hugging-face.md)
- Author: Tom Aarsen
- Published: Nov 11, 2026
- Type: Explainer

Multi-vector embedding models store many token vectors per document, causing large indexes. Token pooling via Ward hierarchical clustering merges similar token embeddings into groups, reducing the number of vectors, but aggressive compression can lose retrieval-relevant distinctions. Pooling-aware training addresses this by averaging a retrieval loss on unpooled and pooled embeddings, using a straight-through estimator to pass gradients through the discrete clustering. At pool\_factor=4, a normally trained model retains 94.6% of its unpooled nDCG@10, while pooling-aware training raises retention to 97.8% at the same 4x reduction in document vectors. Adaptive pooling with a calibrated threshold also benefits, retaining 97.3% of the unpooled score while storing 84.7% fewer vectors.


### [Optimizing Document Lookup: Making Atlas Search and Vector Search Up to 5x Faster](https://yomu.fyi/post/optimizing-document-lookup-making-atlas-search-and-vector-search-up-to.md)
- Company: [MongoDB](https://yomu.fyi/company/mongodb.md)
- Published: Nov 10, 2026
- Type: Problem & solution

MongoDB engineers identified that document materialization in Atlas Search and Vector Search spent roughly 30% of mongod CPU time on repeated query planning and collection resource acquisition rather than actual document retrieval. They redesigned the $\_internalSearchIdLookup stage to reuse a parameterized SBE execution plan and batch lookups within a shared resource scope. This eliminated redundant plan construction and amortized resource acquisition across multiple documents. In benchmarks, end-to-end query latency dropped up to 4.9x for $search and 5.5x for $vectorSearch at 10,000 results, and throughput under 16 concurrent clients increased approximately 2.75x. The optimizations ship in MongoDB 9.0, are enabled by default, and require no application changes.
