{
  "id": "data/elasticsearch-mapping-conflict",
  "signature": "Elasticsearch mapping conflict: field 'timestamp' has different type in different indices",
  "signature_zh": "Elasticsearch映射冲突：字段'timestamp'在不同索引中类型不同",
  "regex": "mapper \\[\\w+\\] cannot be changed from type \\[\\w+\\] to \\[\\w+\\]",
  "domain": "data",
  "category": "schema_error",
  "subcategory": null,
  "root_cause": "When creating an index pattern or alias that spans multiple indices, Elasticsearch detects that the same field has incompatible types (e.g., 'date' in one index and 'text' in another), preventing unified search.",
  "root_cause_type": "generic",
  "root_cause_zh": "当创建跨多个索引的索引模式或别名时，Elasticsearch检测到同一字段具有不兼容的类型（如一个索引中为'date'，另一个中为'text'），导致无法统一搜索。",
  "versions": [
    {
      "version": "Elasticsearch 7.17",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Elasticsearch 8.6",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Elasticsearch 8.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Data in the deleted index is lost unless reindexed, which can be time-consuming.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Dynamic mapping can still produce conflicting types across indices.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Reindex the conflicting indices into a new index with a unified mapping, then use an alias to point to the new index.",
      "success_rate": 0.9,
      "how": "Reindex the conflicting indices into a new index with a unified mapping, then use an alias to point to the new index.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a runtime field in the index pattern to cast the conflicting field to a common type at query time.",
      "success_rate": 0.75,
      "how": "Use a runtime field in the index pattern to cast the conflicting field to a common type at query time.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Reindex the conflicting indices into a new index with a unified mapping, then use an alias to point to the new index.",
    "Use a runtime field in the index pattern to cast the conflicting field to a common type at query time."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html",
  "official_doc_section": null,
  "error_code": "illegal_argument_exception",
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.84,
  "resolvable": "true",
  "first_seen": "2024-01-18",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}