我正在使用 client.bulk 方法插入彈性搜索。我需要根據檔案在 client.bulk 中傳遞 retry_on_conflict 引數。
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html
下面的代碼我正在嘗試,但得到了錯誤。
const options = {
index: config.aws.es.index,
body: bulkBody,
retry_on_conflict: 5
// retryOnCflict: 5 (Tried this also)
};
client.bulk(options, (err, { body }) => {
if (err) {
reject(err);
} else {
// console.log('ES bulk result: %j', body);
resolve(body);
}
});
錯誤 :
warnings: [
'Client - Unknown parameter: "retryOnConflict", sending it as query parameter'
],
任何人都可以幫助我了解如何在 client.bulk() 中添加 retry_on_conflict。
uj5u.com熱心網友回復:
添加retry_on_conflict在批量請求的主體,如圖這里
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/365801.html
上一篇:logstash在第1行、第1列(位元組1)處應為[\\t\\r\\n]、\"#\"、\"input\"、\"filter\&
