{
  "id": "elasticsearch/action-request-validation-error",
  "signature": "ElasticsearchException: Validation Failed: 1: index is not specified;2: source is not specified;",
  "signature_zh": "ElasticsearchException：验证失败：1: 未指定索引；2: 未指定源；",
  "regex": "Validation Failed: \\d+: [a-z]+ is not specified",
  "domain": "elasticsearch",
  "category": "protocol_error",
  "subcategory": null,
  "root_cause": "An API request is missing required parameters such as index name or source body, causing validation to fail.",
  "root_cause_type": "generic",
  "root_cause_zh": "API请求缺少必需参数，如索引名称或请求体，导致验证失败。",
  "versions": [
    {
      "version": "elasticsearch 7.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "elasticsearch 8.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "elasticsearch 8.12.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "An empty body may still pass validation but can cause indexing errors if required fields are missing.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Retrying without fixing the missing parameters will always fail with the same validation error.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "HTTP method does not change required parameters; validation is based on the API endpoint and body.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Ensure the request includes both 'index' and 'body' parameters. For example, in Python: es.index(index=\"my_index\", body={\"field\": \"value\"})",
      "success_rate": 0.95,
      "how": "Ensure the request includes both 'index' and 'body' parameters. For example, in Python: es.index(index=\"my_index\", body={\"field\": \"value\"})",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use the REST API with proper path and body: POST /my_index/_doc { \"field\": \"value\" }",
      "success_rate": 0.98,
      "how": "Use the REST API with proper path and body: POST /my_index/_doc { \"field\": \"value\" }",
      "condition": "",
      "sources": []
    },
    {
      "action": "If using bulk API, verify each action line includes '_index' and '_source' fields.",
      "success_rate": 0.9,
      "how": "If using bulk API, verify each action line includes '_index' and '_source' fields.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "确保请求包含'index'和'body'参数。例如在Python中：es.index(index=\"my_index\", body={\"field\": \"value\"})",
    "使用正确的路径和请求体调用REST API：POST /my_index/_doc { \"field\": \"value\" }",
    "如果使用批量API，检查每个操作行是否包含'_index'和'_source'字段。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.82,
  "fix_success_rate": 0.95,
  "resolvable": "true",
  "first_seen": "2024-01-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}