File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -372,6 +372,12 @@ public function commit(array $params = [])
372
372
$ bulkResponse = $ this ->client ->bulk ($ bulkQueries );
373
373
$ this ->stopwatch ('stop ' , 'bulk ' );
374
374
375
+ if ($ bulkResponse ['errors ' ]) {
376
+ throw new ClientErrorResponseException (
377
+ 'An error occurred during the commit to elasticsearch '
378
+ );
379
+ }
380
+
375
381
$ this ->bulkQueries = [];
376
382
$ this ->bulkCount = 0 ;
377
383
@@ -386,12 +392,6 @@ public function commit(array $params = [])
386
392
break ;
387
393
}
388
394
389
- if ($ bulkResponse ['errors ' ]) {
390
- throw new ClientErrorResponseException (
391
- 'An error occurred during the commit to elasticsearch '
392
- );
393
- }
394
-
395
395
$ this ->eventDispatcher ->dispatch (
396
396
Events::POST_COMMIT ,
397
397
new CommitEvent ($ this ->getCommitMode (), $ bulkResponse )
You can’t perform that action at this time.
0 commit comments