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 dce0a3325bce1..7dd3c3b324562 100644 --- a/server/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java +++ b/server/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java @@ -159,6 +159,9 @@ public TransportBulkAction( this.indexingPressure = indexingPressure; this.systemIndices = systemIndices; clusterService.addStateApplier(this.ingestForwarder); + + assert bulkRequestPreprocessors.get(bulkRequestPreprocessors.size() - 1) instanceof FieldInferenceBulkRequestPreprocessor + : "Last bulk request processor should be the inference processor"; } /**