该
Request字段在您的文档中尚不存在,因此您的脚本需要首先创建它:
POST _reindex{ "source": { "index": "testindex" }, "dest": { "index": "testindex1" }, "script": { "inline": "ctx._source.Request = [:]; ctx._source.Request.field3 = ctx._source.remove("field2") ]" }}
或更短一些:
POST _reindex{ "source": { "index": "testindex" }, "dest": { "index": "testindex1" }, "script": { "inline": "ctx._source.Request = [field3: ctx._source.remove("field2") ]" }}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)