{
"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
}
原因:
你用的是什么版本的ElasticSearch,5.X以上版本没有string类型了,换成了text和keyword作为字符串类型。
elasticsearch 设置mapping时出错
http://ask.csdn.net/questions/678700