diff --git a/src/main/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchProgressListener.java b/src/main/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchProgressListener.java index adaad799..c62b9b86 100644 --- a/src/main/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchProgressListener.java +++ b/src/main/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchProgressListener.java @@ -68,7 +68,7 @@ public SearchResponse partialResponse() { protected void onListShards(List shards, List skippedShards, SearchResponse.Clusters clusters, boolean fetchPhase) { partialResultsHolder.hasFetchPhase.set(fetchPhase); - partialResultsHolder.totalShards.set(shards.size()); + partialResultsHolder.totalShards.set(shards.size() + skippedShards.size()); partialResultsHolder.skippedShards.set(skippedShards.size()); partialResultsHolder.successfulShards.set(skippedShards.size()); partialResultsHolder.clusters.set(clusters);