嘿~ 今天天气不错嘛

Elasticsearch5.6 : [reindex] failed to parse field [script]

Elasticsearch | 作者 eboy | 发布于2017年09月18日 | 阅读数:7813

在看Elasticsearch5.6的文档,看到mapping这一段(“Custom type field”):
https://www.elastic.co/guide/e ... types
按着教程走的,但是输入代码;
POST _reindex
{
"source": {
"index": "twitter"
},
"dest": {
"index": "new_twitter"
},
"script": {
"source": """
ctx._source.type = ctx._type;
ctx._id = ctx._type + '-' + ctx._id;
ctx._type = 'doc';
"""
}
}
后,就报错了:
{
"error": {
"root_cause": [
{
"type": "parsing_exception",
"reason": "[reindex] failed to parse field [script]",
"line": 9,
"col": 5
}
],
"type": "parsing_exception",
"reason": "[reindex] failed to parse field [script]",
"line": 9,
"col": 5,
"caused_by": {
"type": "illegal_argument_exception",
"reason": "[script] unknown field [source], parser not found"
}
},
"status": 400
}
不知道是怎么回事,我的es和kibana都是5.6的。
希望有些眉目的前辈能点拨一下,谢谢。
已邀请:

要回复问题请先登录注册