mongodb-search-and-ai

Build and fine-tune MongoDB Atlas Search, Vector Search, and Hybrid Search indexes and queries.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/re-sohail/e-commerce --skill mongodb-search-and-ai-re-sohail
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mongodb-search-and-ai
Source: https://github.com/re-sohail/e-commerce/tree/main/.agents/skills/mongodb-search-and-ai
Command: npx skills add https://github.com/re-sohail/e-commerce --skill mongodb-search-and-ai-re-sohail

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

MongoDB users often struggle to design, configure, and tune Atlas Search, Vector Search, and Hybrid Search indexes for text, semantic, or combined queries, leading to poor relevance and performance.

Core Features & Use Cases

  • Search Type Recommendation: Determines whether lexical, semantic, or hybrid search is best for a given use case.
  • Index Creation Guidance: Generates precise index JSON for lexical, vector, or hybrid configurations, with version checks for fusion stages.
  • Query Construction & Optimization: Provides aggregation pipelines for $search, $vectorSearch, $rankFusion, and $scoreFusion, including filters and pre‑filters.
  • Safety Checks: Validates existing indexes, cluster version, and read‑only mode before performing actions.

Quick Start

Design an Atlas Search index for the "products" collection that supports autocomplete and fuzzy matching.

Frequently Asked Questions about mongodb-search-and-ai

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a MongoDB Atlas Search index for autocomplete and fuzzy matching?

To build a MongoDB Atlas Search index for autocomplete and fuzzy matching, use this Skill to generate precise index JSON configurations and construct the necessary aggregation pipelines for lexical text queries.

When should I use hybrid search instead of vector search in MongoDB?

Use hybrid search instead of vector search when combining semantic relevance with exact keyword matching. This Skill recommends the appropriate search type and generates $rankFusion or $scoreFusion pipelines for combined queries.

What's the best way to optimize MongoDB vector search query performance?

Optimize MongoDB vector search query performance by using this Skill to construct tailored $vectorSearch aggregation pipelines, apply pre-filters, and validate existing index configurations against cluster versions.

Does MongoDB Atlas Search support $rankFusion for combining lexical and semantic results?

MongoDB Atlas Search supports $rankFusion for combining lexical and semantic results. This Skill performs version checks to ensure compatibility before generating fusion stage aggregation pipelines.

Why is my MongoDB Atlas Search index not returning relevant results?

Your MongoDB Atlas Search index may lack proper configuration for your text or semantic use case. Use this Skill to troubleshoot search performance, validate existing indexes, and fine-tune query structures.