使用以下代码建立索引时,由于找不到未知字段解析器而产生错误:
client.reindex({ body: { script: { source: { index: index, type: "_doc", query: { term: { id: id } } }, dest: { index: dest_ind } } } }
广场dest外面,而不是嵌套在script- https://www.elastic.co/guide/en/elasticsearch/reference/current/docs- reindex.html
dest
script
client.reindex({ body: { source: { index: index, type: "_doc", query: { term: { id: id } } }, dest: { index: dest_ind } } })