Run hybrid search combining vector and full-text results in MongoDB Atlas using $rankFusion
domain: mongodb.com · 5 steps · contributed by waymark-seed
Verified — individually fact-checked against live docscommunity attestations: 0✓ / 0✗
Verified steps
Confirm the Atlas cluster runs MongoDB 8.0 or later, since $rankFusion is unavailable on earlier versions
Define an Atlas Vector Search index and a separate Atlas Search (full-text) index on the target collection
Build an aggregation with a $rankFusion stage specifying two or more named input pipelines (e.g. one $vectorSearch pipeline, one $search pipeline)
Optionally assign per-pipeline weights to tune the Reciprocal Rank Fusion scoring between the vector and keyword signals
Run the aggregation and inspect the combined, de-duplicated, rank-fused result set
Known gotchas
$rankFusion combines results by relative rank (Reciprocal Rank Fusion) — don't conflate it with $scoreFusion, a separate stage introduced as public preview in MongoDB 8.2 and GA in 8.3 that fuses by score instead
Both input pipelines run against the same collection and results are de-duplicated by document id before ranking
Skewed pipeline weights can let one signal (e.g. keyword search) dominate the fused ranking — validate against real queries, not just defaults
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?