未知字段[目标],未找到解析器-重新索引时出现错误 [英] unknown field [dest], parser not found- error coming while reindexing
本文介绍了未知字段[目标],未找到解析器-重新索引时出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用以下代码建立索引时,由于找不到未知字段解析器而产生错误:
While indexing with the following code, error arises as unknown field parser not found:
client.reindex({
body: {
script: {
source: {
index: index,
type: "_doc",
query: {
term: {
id: id
}
}
},
dest: {
index: dest_ind
}
}
}
}
推荐答案
Place dest
outside and not nested in 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
}
}
})
这篇关于未知字段[目标],未找到解析器-重新索引时出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文