Shi*_*arg 6 node.js elasticsearch node-modules elastic-stack elasticsearch-5
我是 ElasticSearch 的新手。我正在为 ElasticSearch 集群中的一些索引重新建立索引。当我尝试重新索引具有大量数据的索引时,我收到套接字挂起错误。
const elasticsearch = require('elasticsearch');
const tempclient = new elasticsearch.Client({
host: clusterhost,
log: [{
type: 'stdio',
levels: ['error'],
}],
maxRetries: 50,
requestTimeout: 1000 * 60 * 120,
keepAliveFreeSocketTimeout: 1000 * 60 * 120,
});
await tempclient.reindex({
body: {
source: {
index: indexes[i].index,
},
dest: {
index: `logs-${yearMonth[0]}`,
},
script: {
source: "ctx._type = 'doc';",
},
},
timeout: '120m',
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3130 次 |
| 最近记录: |