diff --git a/server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java b/server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java index ed8b5f023a9dd..9e1d065c96dd6 100644 --- a/server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java +++ b/server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java @@ -646,7 +646,7 @@ private void setCurrentPhase(SearchPhase phase) { // onPhaseStart / onPhaseFailure / OnPhaseDone callbacks and the wrapping SearchPhase is being abandoned // (fe, has no onPhaseEnd callbacks called ever). To fix that, we would not send any notifications for this // phase. - currentPhaseHasLifecycle = !(phase instanceof WrappingSearchAsyncActionPhase); + currentPhaseHasLifecycle = ((phase instanceof WrappingSearchAsyncActionPhase) == false); } @Override