File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
server/src/main/java/org/elasticsearch/action/search Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -231,6 +231,7 @@ public SearchPhaseController.ReducedQueryPhase reduce() throws Exception {
231231 while ((batchedResult = batchedResults .poll ()) != null ) {
232232 topDocsStats .add (batchedResult .v1 ());
233233 consumePartialMergeResult (batchedResult .v2 (), topDocsList , aggsList );
234+ addEstimateAndMaybeBreak (batchedResult .v2 ().estimatedSize );
234235 }
235236 for (QuerySearchResult result : buffer ) {
236237 topDocsStats .add (result .topDocs (), result .searchTimedOut (), result .terminatedEarly ());
@@ -392,7 +393,7 @@ private MergeResult partialReduce(
392393 return new MergeResult (
393394 processedShards ,
394395 newTopDocs ,
395- newAggs == null ? null : DelayableWriteable .referencing (newAggs ),
396+ newAggs != null ? DelayableWriteable .referencing (newAggs ) : null ,
396397 newAggs != null ? DelayableWriteable .getSerializedSize (newAggs ) : 0
397398 );
398399 }
You can’t perform that action at this time.
0 commit comments