diff --git a/server/src/main/java/org/elasticsearch/action/search/SearchPhaseController.java b/server/src/main/java/org/elasticsearch/action/search/SearchPhaseController.java index b3562cc002b5b..43cbdfbeba143 100644 --- a/server/src/main/java/org/elasticsearch/action/search/SearchPhaseController.java +++ b/server/src/main/java/org/elasticsearch/action/search/SearchPhaseController.java @@ -636,7 +636,11 @@ private synchronized void consumeInternal(QuerySearchResult querySearchResult) { numReducePhases++; index = 1; if (hasAggs) { - progressListener.notifyPartialReduce(progressListener.searchShards(results.asList()), + List results = new ArrayList<>(); + for (int i = 0; i < this.results.length(); i++) { + results.add(this.results.get(i)); + } + progressListener.notifyPartialReduce(progressListener.searchShards(results), topDocsStats.getTotalHits(), aggsBuffer[0], numReducePhases); } }