{
  "id": "elasticsearch/ingest-pipeline-processor-failure",
  "signature": "IngestProcessorException: pipeline [my_pipeline] failed at processor [set] with message [field [user.email] is required]",
  "signature_zh": "IngestProcessorException: 管道 [my_pipeline] 在处理器 [set] 处失败，消息为 [字段 [user.email] 是必需的]",
  "regex": ".*IngestProcessorException.*pipeline.*failed at processor.*with message.*required.*",
  "domain": "elasticsearch",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "An ingest pipeline processor requires a field that is missing in the incoming document, causing the pipeline to abort with a validation error.",
  "root_cause_type": "generic",
  "root_cause_zh": "摄取管道处理器需要文档中缺少的字段，导致管道因验证错误而中止。",
  "versions": [
    {
      "version": "7.10.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "7.17.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "8.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "8.11.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This removes all pipeline processing, which may break other data transformations or enrichments that are needed.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This pollutes the data with meaningless values and may cause downstream issues in queries or aggregations.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The error is by design; upgrading does not change the validation logic for required fields.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Modify the pipeline to use an `if` condition or `on_failure` handler to skip missing fields: PUT _ingest/pipeline/my_pipeline { \"processors\": [ { \"set\": { \"field\": \"user.email\", \"value\": \"{{_ingest._source.user.email}}\", \"if\": \"ctx.user?.email != null\" } } ] }",
      "success_rate": 0.88,
      "how": "Modify the pipeline to use an `if` condition or `on_failure` handler to skip missing fields: PUT _ingest/pipeline/my_pipeline { \"processors\": [ { \"set\": { \"field\": \"user.email\", \"value\": \"{{_ingest._source.user.email}}\", \"if\": \"ctx.user?.email != null\" } } ] }",
      "condition": "",
      "sources": []
    },
    {
      "action": "Add a default value processor before the failing one to ensure the field exists: { \"set\": { \"field\": \"user.email\", \"value\": \"unknown@example.com\", \"override\": false } }",
      "success_rate": 0.82,
      "how": "Add a default value processor before the failing one to ensure the field exists: { \"set\": { \"field\": \"user.email\", \"value\": \"unknown@example.com\", \"override\": false } }",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use the `script` processor to conditionally set the field: { \"script\": { \"source\": \"if (ctx.user == null) { ctx.user = [:]; } if (ctx.user.email == null) { ctx.user.email = 'fallback@example.com'; }\" } }",
      "success_rate": 0.85,
      "how": "Use the `script` processor to conditionally set the field: { \"script\": { \"source\": \"if (ctx.user == null) { ctx.user = [:]; } if (ctx.user.email == null) { ctx.user.email = 'fallback@example.com'; }\" } }",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Modify the pipeline to use an `if` condition or `on_failure` handler to skip missing fields: PUT _ingest/pipeline/my_pipeline { \"processors\": [ { \"set\": { \"field\": \"user.email\", \"value\": \"{{_ingest._source.user.email}}\", \"if\": \"ctx.user?.email != null\" } } ] }",
    "Add a default value processor before the failing one to ensure the field exists: { \"set\": { \"field\": \"user.email\", \"value\": \"unknown@example.com\", \"override\": false } }",
    "Use the `script` processor to conditionally set the field: { \"script\": { \"source\": \"if (ctx.user == null) { ctx.user = [:]; } if (ctx.user.email == null) { ctx.user.email = 'fallback@example.com'; }\" } }"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.84,
  "resolvable": "true",
  "first_seen": "2023-11-22",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}