I am new to ElasticSearch.I am reindexing some indexes in my ElasticSearch Cluster. While I am trying to reindex an index that has a large amount of data I am getting Socket hang up error.
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',
});