We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73ee949 commit ca80ec2Copy full SHA for ca80ec2
server/src/main/java/org/elasticsearch/action/search/QueryPhaseResultConsumer.java
@@ -390,6 +390,9 @@ private static InternalAggregations aggregate(
390
int resultSetSize,
391
AggregationReduceContext reduceContext
392
) {
393
+ if (resultSetSize == 0) {
394
+ return null;
395
+ }
396
if (resultSetSize == 1) {
397
if (partialResults.hasNext()) {
398
return InternalAggregations.reduce(partialResults.next(), reduceContext);
0 commit comments