mongodb-search
npx machina-cli add skill romiluz13/mongodb-agent-skills/mongodb-search --openclawMongoDB Search: Engine, Relevance, and Operations
MongoDB Search guidance for Atlas and self-managed deployments. This skill contains 24 rules across 6 categories. It focuses on deployment routing, index/mapping guardrails, query composition, hybrid orchestration, and production operations.
Critical Warning
Search behavior is release-sensitive. Before applying any advanced pattern, confirm deployment track (Atlas vs local Atlas vs self-managed Community), MongoDB version, and feature status (GA/Preview/Public Preview).
When to Apply
Use this skill when you are:
- Creating or updating Atlas Search indexes and mappings
- Building
$searchand$searchMetapipelines - Choosing analyzers, autocomplete settings, synonyms, and facets
- Debugging relevance quality or response shape (
highlight,returnStoredSource,returnScope) - Triaging Search alerts, metrics, and index build failures
- Deploying Search on MongoDB Community (
mongot,searchCoordinator) - Orchestrating hybrid retrieval with
$rankFusionand$scoreFusion
Scope Boundary with mongodb-ai
This skill owns search engine semantics and operations. Hand off to mongodb-ai when the request is primarily about:
- Embedding model/provider compatibility (including Voyage
input_type) - RAG ingestion/chunking and agent-memory design
- Vector retrieval tuning strategies centered on model behavior
Rule Categories by Priority
| Priority | Category | Impact | Prefix | Rules |
|---|---|---|---|---|
| 1 | Deployment Modes and Release Gates | CRITICAL | deploy- | 5 |
| 2 | Index Architecture and Mappings | CRITICAL | index- | 6 |
| 3 | Query Composition and Relevance | CRITICAL | query- | 5 |
| 4 | Hybrid and Vector Interop | HIGH | hybrid- | 3 |
| 5 | Operations and Troubleshooting | HIGH | ops- | 4 |
| 6 | Skill Boundary Rules | MEDIUM | boundary- | 1 |
Quick Reference
1. Deployment Modes and Release Gates (CRITICAL) - 5 rules
deploy-track-detection- Detect Atlas vs local Atlas vs Community before commandsrelease-status-gating- Tag guidance as GA/Preview/Public Previewcommunity-preview-safety- Treat Community Search as preview and gate production usecommunity-prereqs-mongot-auth- Replica set, keyfile auth, andsearchCoordinatoruser requirementscommunity-mongot-health-check- Validatemongothealth and queryability before tuning
2. Index Architecture and Mappings (CRITICAL) - 6 rules
index-static-vs-dynamic-mappings- Prefer static mappings, constrain dynamic scopeindex-fields-limit-guardrail- Respond to Search Max Fields Indexed alertsindex-ngram-limit-guardrail- Control nGram/edgeGram/autocomplete field growthindex-analyzer-selection- Align analyzer and tokenizer with operator intentindex-synonyms-lifecycle- Safe synonym source design and update behaviorindex-facet-field-typing- Correct facet-compatible field typing
3. Query Composition and Relevance (CRITICAL) - 5 rules
query-compound-structure- Usemust/should/mustNot/filtercorrectlyquery-operator-selection- PicktextvsphrasevsautocompletevsqueryStringquery-score-tuning- Tune scoring intentionally with measurable guardrailsquery-return-shape- Usehighlight,returnStoredSource, andreturnScopecorrectlyquery-facet-pipelines- Prefer$searchMetafor facet-only metadata
4. Hybrid and Vector Interop (HIGH) - 3 rules
hybrid-lexical-prefilter-routing- Route simple vs advanced prefilters correctlyhybrid-fusion-stage-gates- Enforce version and stage limits for fusion operatorshybrid-strategy-selection- Choose fusion-only vs two-stage retrieval thoughtfully
5. Operations and Troubleshooting (HIGH) - 4 rules
ops-alerts-and-metrics-runbook- Alert-to-action runbook for top Search incidentsops-index-build-failure-triage- Structured triage for Pending/Building/Stale/Failedops-log-driven-debugging- Debug with explain, metrics, and health signalsops-reindex-change-management- Safe rollout and rollback for index definition updates
6. Skill Boundary Rules (MEDIUM) - 1 rule
boundary-handoff-to-mongodb-ai- Transfer provider/model concerns tomongodb-ai
Docs Quick Map
See references/docs-navigation.md for release-sensitive routing and boundary checks.
Production Readiness Checklist
- Confirm deployment track and MongoDB version before selecting syntax.
- Confirm release status for every feature (GA/Preview/Public Preview).
- Confirm index definitions are constrained and alert-safe.
- Confirm query design (
compound, operator choice, scoring) with explain and metrics. - Confirm hybrid stage/version compatibility before rollout.
- Confirm boundary handoff to
mongodb-aifor provider/model semantics.
Source
git clone https://github.com/romiluz13/mongodb-agent-skills/blob/main/plugins/mongodb-agent-skills/skills/mongodb-search/SKILL.mdView on GitHub Overview
MongoDB Search provides guidance for Atlas and self-managed deployments. It covers index/mapping guardrails, query composition, hybrid retrieval, and production operations, consolidating 24 rules across 6 categories to improve relevance and reliability.
How This Skill Works
The skill organizes guidance into rule categories and enforces deployment-aware checks (Atlas, local Atlas, Community) before operations. It emphasizes static index design, proper query structure with must/should/mustNot/filter, careful analyzer choices, and hybrid fusion through $rankFusion/$scoreFusion to optimize relevance and performance.
When to Use It
- Creating or updating Atlas Search indexes and mappings
- Building $search and $searchMeta pipelines
- Choosing analyzers, autocomplete settings, synonyms, and facets
- Debugging relevance quality or response shape (highlight, returnStoredSource, returnScope)
- Triaging Search alerts, metrics, index build failures; deploying in Community; or orchestrating hybrid search
Quick Start
- Step 1: Determine deployment mode (Atlas vs Community) and plan index scope
- Step 2: Create or update Atlas Search index definitions and mappings
- Step 3: Implement a $search or $searchMeta pipeline and validate results
Best Practices
- Prefer static mappings to control field growth (index-static-vs-dynamic-mappings)
- Align analyzer/tokenizer with operator intent (index-analyzer-selection)
- Monitor and guard against Search Max Fields Indexed and nGram field growth
- Use must/should/mustNot/filter correctly to compose effective queries (query-compound-structure)
- Validate output shape with highlight and returnStoredSource to ensure reliable results
Example Use Cases
- Define static index mappings for a product catalog in Atlas
- Build an autocomplete pipeline using edge n-grams
- Tune synonyms lifecycle to avoid stale mappings
- Diagnose low relevance using query-score-tuning patterns
- Deploy mongot-based Search on MongoDB Community for hybrid search