Skip to content

Commit

Permalink
Update Bridge.php
Browse files Browse the repository at this point in the history
  • Loading branch information
pdphilip committed Sep 6, 2024
1 parent b2cb18e commit 9c30210
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/DSL/Bridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,10 @@ public function processInsertBulk(array $records, bool $returnData = false, stri
$finalResponse['hasErrors'] = $response['errors'];
$finalResponse['took'] = $response['took'];
foreach ($response['items'] as $count => $hit) {

$finalResponse['total']++;
$payload = $params['body'][($count * 2) + 1];
$id = $hit['index']['_id'];
$record = ['_id' => $id] + $payload;

if (! empty($hit['index']['error'])) {
$finalResponse['failed']++;
$finalResponse['error_bag'][] = [
Expand All @@ -420,9 +418,7 @@ public function processInsertBulk(array $records, bool $returnData = false, stri
} else {
$finalResponse['modified']++;
}

if ($returnData) {

$finalResponse['data'][] = $record;
}
}
Expand Down

0 comments on commit 9c30210

Please sign in to comment.