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 {
231
231
while ((batchedResult = batchedResults .poll ()) != null ) {
232
232
topDocsStats .add (batchedResult .v1 ());
233
233
consumePartialMergeResult (batchedResult .v2 (), topDocsList , aggsList );
234
+ addEstimateAndMaybeBreak (batchedResult .v2 ().estimatedSize );
234
235
}
235
236
for (QuerySearchResult result : buffer ) {
236
237
topDocsStats .add (result .topDocs (), result .searchTimedOut (), result .terminatedEarly ());
@@ -392,7 +393,7 @@ private MergeResult partialReduce(
392
393
return new MergeResult (
393
394
processedShards ,
394
395
newTopDocs ,
395
- newAggs == null ? null : DelayableWriteable .referencing (newAggs ),
396
+ newAggs != null ? DelayableWriteable .referencing (newAggs ) : null ,
396
397
newAggs != null ? DelayableWriteable .getSerializedSize (newAggs ) : 0
397
398
);
398
399
}
You can’t perform that action at this time.
0 commit comments