Skip to content

Commit

Permalink
Reduced Bulk response size to improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhisood committed Aug 18, 2020
1 parent d367303 commit 6efcc94
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions reindexAuditLogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ async function callBulkAPI(elindex) {
const bulkResponse = await elasticClient.bulk({
body: elindex,
timeout: '5m',
filterPath:'items.index._id,errors'
});
if(bulkResponse.errors) {
throw new Error(JSON.stringify(bulkResponse));
Expand Down
1 change: 1 addition & 0 deletions reindexLogstashLogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ async function callBulkAPI(elindex) {
const bulkResponse = await elasticClient.bulk({
body: elindex,
timeout: '5m',
filterPath:'items.index._id,errors'
});
if(bulkResponse.errors) {
console.error('ERROR RESPONSE_____________________________');
Expand Down
1 change: 1 addition & 0 deletions reindexRidesData.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ async function callBulkAPI(elindex) {
const bulkResponse = await elasticClient.bulk({
body: elindex,
timeout: '5m',
filterPath:'items.index._id,errors'
});
if(bulkResponse.errors) {
throw new Error(JSON.stringify(bulkResponse))
Expand Down

0 comments on commit 6efcc94

Please sign in to comment.