我是ElasticSearch的新手。我正在为ElasticSearch集群中的某些索引重新编制索引。当我尝试为具有大量数据的索引重新编制索引时,出现了Socket hang hang错误。
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',});