Skip to content

Commit ab5da65

Browse files
committed
added comment
1 parent aed8bd0 commit ab5da65

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

x-pack/plugin/downsample/src/main/java/org/elasticsearch/xpack/downsample/MetricFieldProducer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ public void collect(SortedNumericDoubleValues docValues, IntArrayList docIdBuffe
166166
case min -> min = Math.min(value, min);
167167
case max -> max = Math.max(value, max);
168168
case sum -> sum.add(value);
169+
// This is the reason why we can't use GaugeMetricFieldProducer
170+
// For downsampled indices aggregate metric double's value count field needs to be summed.
169171
case value_count -> count += Math.round(value);
170172
}
171173
}

0 commit comments

Comments
 (0)