未知字段 [dest],未找到解析器 - 重建索引时出错
unknown field [dest], parser not found- error coming while reindexing
使用以下代码进行索引时,出现错误,因为未找到未知字段解析器:
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
}
}
})
使用以下代码进行索引时,出现错误,因为未找到未知字段解析器:
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
}
}
})