diff --git a/server/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java b/server/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java index 44af17e954d53..88854aba1746b 100644 --- a/server/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java +++ b/server/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java @@ -777,7 +777,7 @@ private boolean preprocessBulkRequest(Task task, BulkRequest bulkRequest, String for (DocWriteRequest docWriteRequest : bulkRequest.requests) { IndexRequest indexRequest = getIndexWriteRequest(docWriteRequest); if (indexRequest != null) { - needsProcessing |= preprocessor.needsProcessing(docWriteRequest, indexRequest, metadata); + needsProcessing = needsProcessing || preprocessor.needsProcessing(docWriteRequest, indexRequest, metadata); } if (docWriteRequest instanceof IndexRequest ir) {