qq_18620535
zhangzheny
采纳率33.3%
2018-01-23 10:20

elasticsearch 设置mapping时出错

10
已采纳

在使用官方文档案例
PUT /my_store
{
"mappings" : {
"products" : {
"properties" : {
"productID" : {
"type" : "string",
"index":"not_analyzed"
}
}
}
}
}
时报错:
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "No handler for type [string] declared on field [productID]"
}
],
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [products]: No handler for type [string] declared on field [productID]",
"caused_by": {
"type": "mapper_parsing_exception",
"reason": "No handler for type [string] declared on field [productID]"
}
},
"status": 400
}

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

相关推荐