{
  "id": "elasticsearch/geo-point-outside-bounds",
  "signature": "MapperParsingException: failed to parse geo_point field [location] - latitude [91.0] must be in range [-90.0, 90.0]",
  "signature_zh": "MapperParsingException：解析geo_point字段[location]失败 - 纬度[91.0]必须在[-90.0, 90.0]范围内",
  "regex": "latitude \\[.*\\] must be in range \\[-90\\.0, 90\\.0\\]",
  "domain": "elasticsearch",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "A geo_point field contains a latitude or longitude value outside the valid geographic range.",
  "root_cause_type": "generic",
  "root_cause_zh": "geo_point字段包含超出有效地理范围的纬度或经度值。",
  "versions": [
    {
      "version": "elasticsearch 7.10.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "elasticsearch 8.5.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "elasticsearch 8.11.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This breaks geo queries and aggregations, and loses spatial functionality.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This hides the data quality issue and may cause data loss without alerting the user.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "ignore_z_value only ignores altitude, not latitude/longitude range violations.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Clean the source data before indexing: filter out records where latitude is not between -90 and 90, e.g., using a Logstash mutate filter: filter { mutate { convert => [\"latitude\", \"float\"] } if [latitude] < -90 or [latitude] > 90 { drop {} } }",
      "success_rate": 0.95,
      "how": "Clean the source data before indexing: filter out records where latitude is not between -90 and 90, e.g., using a Logstash mutate filter: filter { mutate { convert => [\"latitude\", \"float\"] } if [latitude] < -90 or [latitude] > 90 { drop {} } }",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a pipeline with a script processor to validate and correct coordinates: PUT _ingest/pipeline/geo_validate { \"processors\": [ { \"script\": { \"source\": \"if (ctx.latitude < -90 || ctx.latitude > 90) { ctx.latitude = null }\" } } ] }",
      "success_rate": 0.9,
      "how": "Use a pipeline with a script processor to validate and correct coordinates: PUT _ingest/pipeline/geo_validate { \"processors\": [ { \"script\": { \"source\": \"if (ctx.latitude < -90 || ctx.latitude > 90) { ctx.latitude = null }\" } } ] }",
      "condition": "",
      "sources": []
    },
    {
      "action": "Set ignore_malformed to true on the geo_point field in the mapping, then filter out malformed documents after indexing using a query.",
      "success_rate": 0.7,
      "how": "Set ignore_malformed to true on the geo_point field in the mapping, then filter out malformed documents after indexing using a query.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在索引前清洗源数据：过滤掉纬度不在-90到90之间的记录，例如使用Logstash的mutate过滤器：filter { mutate { convert => [\"latitude\", \"float\"] } if [latitude] < -90 or [latitude] > 90 { drop {} } }",
    "使用包含脚本处理器的管道验证并修正坐标：PUT _ingest/pipeline/geo_validate { \"processors\": [ { \"script\": { \"source\": \"if (ctx.latitude < -90 || ctx.latitude > 90) { ctx.latitude = null }\" } } ] }",
    "在映射中将geo_point字段的ignore_malformed设为true，然后索引后通过查询过滤掉畸形文档。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.92,
  "resolvable": "true",
  "first_seen": "2024-03-22",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}