{
  "id": "mongodb/query-pattern-not-covered-by-index",
  "signature": "MongoServerError: query pattern not covered by any index",
  "signature_zh": "MongoServerError: 查询模式未被任何索引覆盖",
  "regex": "query pattern not covered by any index",
  "domain": "mongodb",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "A query's filter or sort pattern does not match any existing index, forcing a collection scan.",
  "root_cause_type": "generic",
  "root_cause_zh": "查询的过滤或排序模式与任何现有索引不匹配，导致全集合扫描。",
  "versions": [
    {
      "version": "mongodb-5.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "mongodb-6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "mongodb-7.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Creating an index on a different field does not help; the index must match the query pattern.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Using hint() to force an unrelated index still results in a scan.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Create a compound index that matches the query filter and sort fields in the correct order.",
      "success_rate": 0.9,
      "how": "Create a compound index that matches the query filter and sort fields in the correct order.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use explain() to analyze the query and determine the optimal index.",
      "success_rate": 0.95,
      "how": "Use explain() to analyze the query and determine the optimal index.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Create a compound index that matches the query filter and sort fields in the correct order.",
    "Use explain() to analyze the query and determine the optimal index."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.mongodb.com/docs/manual/indexes/#indexes-and-query-performance",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2024-01-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}