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 7dd3c3b324562..2ca6c85db31a5 100644 --- a/server/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java +++ b/server/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java @@ -781,7 +781,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) {