📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

为什么这个错误发生 #

invalid_type_name_exception 表示映射中使用了无效的类型名称。

如何修复 #

1. 使用正确的类型 #

PUT /<index>
{
  "mappings": {
    "properties": {
      "field": { "type": "text" }  # 正确的类型
    }
  }
}

2. 检查支持的类型 #

支持:text, keyword, integer, long, float, double, boolean, date 等。

预防措施 #

  • 查阅官方文档了解支持的类型