使用以下代码进行索引时,由于未找到未知字段解析器而出现错误:
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
client.reindex({
body: {
source: {
index: index,
type: "_doc",
query: {
term: {
id: id
}
}
},
dest: {
index: dest_ind
}
}
})
关于javascript - 未知字段 [dest],未找到解析器 - 重建索引时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55487765/