{
  "id": "elasticsearch/search-template-runtime-error",
  "signature": "ElasticsearchParseException: failed to parse search template [my_template]; error: Mustache runtime error at line 10: [{{#users}}] section has no closing tag",
  "signature_zh": "Elasticsearch解析异常：无法解析搜索模板 [my_template]；错误：Mustache 运行时错误在第10行：[{{#users}}] 部分缺少结束标签",
  "regex": "ElasticsearchParseException: failed to parse search template \\[.*?\\]; error: Mustache (syntax|runtime) error at line \\d+",
  "domain": "elasticsearch",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "A search template written in Mustache syntax has malformed tags (unclosed sections, mismatched delimiters, or nested errors) that prevent compilation.",
  "root_cause_type": "generic",
  "root_cause_zh": "用 Mustache 语法编写的搜索模板存在格式错误的标签（未闭合的部分、不匹配的分隔符或嵌套错误），导致无法编译。",
  "versions": [
    {
      "version": "7.17.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"
    },
    {
      "version": "8.12.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Loses template dynamicity, requiring separate queries for each use case, increasing code complexity.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "May create nested section errors if the section is already closed, leading to further parsing failures.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Validate the template using `POST _scripts/painless/_execute` or a Mustache linter to find unclosed sections. Fix by ensuring every `{{#section}}` has a corresponding `{{/section}}`.",
      "success_rate": 0.85,
      "how": "Validate the template using `POST _scripts/painless/_execute` or a Mustache linter to find unclosed sections. Fix by ensuring every `{{#section}}` has a corresponding `{{/section}}`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Simplify the template by breaking it into smaller parts and testing each with `GET /my_index/_search/template`.",
      "success_rate": 0.8,
      "how": "Simplify the template by breaking it into smaller parts and testing each with `GET /my_index/_search/template`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use `POST _scripts/my_template` to update the template with corrected syntax, then test with `GET /_scripts/my_template`.",
      "success_rate": 0.9,
      "how": "Use `POST _scripts/my_template` to update the template with corrected syntax, then test with `GET /_scripts/my_template`.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Validate the template using `POST _scripts/painless/_execute` or a Mustache linter to find unclosed sections. Fix by ensuring every `{{#section}}` has a corresponding `{{/section}}`.",
    "Simplify the template by breaking it into smaller parts and testing each with `GET /my_index/_search/template`.",
    "Use `POST _scripts/my_template` to update the template with corrected syntax, then test with `GET /_scripts/my_template`."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html",
  "official_doc_section": null,
  "error_code": "ES_SEARCH_TEMPLATE_PARSE_ERR",
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.86,
  "resolvable": "true",
  "first_seen": "2024-04-22",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}