{
  "id": "elasticsearch/missing-pipeline-processor-required-field",
  "signature": "ElasticsearchParseException: Pipeline [my_pipeline] processor [set] requires field [field] but it is not defined in the pipeline definition",
  "signature_zh": "Elasticsearch 解析异常：管道 [my_pipeline] 处理器 [set] 需要字段 [field]，但管道定义中未定义该字段",
  "regex": "ElasticsearchParseException: Pipeline \\[.*\\] processor \\[.*\\] requires field \\[.*\\] but it is not defined in the pipeline definition",
  "domain": "elasticsearch",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "An ingest pipeline processor references a field that is not declared in the pipeline's field list or is missing from the source document.",
  "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.5.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The pipeline definition still lacks the field declaration; the processor will fail again.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The configuration is identical; the error will persist.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Update the pipeline to include the required field in its definition: `PUT _ingest/pipeline/my_pipeline { \"processors\": [ { \"set\": { \"field\": \"my_field\", \"value\": \"default\" } } ], \"version\": 1 }`.",
      "success_rate": 0.95,
      "how": "Update the pipeline to include the required field in its definition: `PUT _ingest/pipeline/my_pipeline { \"processors\": [ { \"set\": { \"field\": \"my_field\", \"value\": \"default\" } } ], \"version\": 1 }`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the field is optional, add an `if` condition in the processor: `PUT _ingest/pipeline/my_pipeline { \"processors\": [ { \"set\": { \"field\": \"my_field\", \"value\": \"default\", \"if\": \"ctx.my_field != null\" } } ] }`.",
      "success_rate": 0.85,
      "how": "If the field is optional, add an `if` condition in the processor: `PUT _ingest/pipeline/my_pipeline { \"processors\": [ { \"set\": { \"field\": \"my_field\", \"value\": \"default\", \"if\": \"ctx.my_field != null\" } } ] }`.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Update the pipeline to include the required field in its definition: `PUT _ingest/pipeline/my_pipeline { \"processors\": [ { \"set\": { \"field\": \"my_field\", \"value\": \"default\" } } ], \"version\": 1 }`.",
    "If the field is optional, add an `if` condition in the processor: `PUT _ingest/pipeline/my_pipeline { \"processors\": [ { \"set\": { \"field\": \"my_field\", \"value\": \"default\", \"if\": \"ctx.my_field != null\" } } ] }`."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.elastic.co/guide/en/elasticsearch/reference/7.17/ingest.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-11-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}