parent
28503f04f7
commit
265387f348
|
@ -20,6 +20,7 @@ package org.elasticsearch.search.aggregations.metrics;
|
|||
|
||||
import org.apache.lucene.index.LeafReaderContext;
|
||||
import org.apache.lucene.index.SortedNumericDocValues;
|
||||
import org.apache.lucene.search.ScoreMode;
|
||||
import org.elasticsearch.common.lease.Releasables;
|
||||
import org.elasticsearch.common.util.BigArrays;
|
||||
import org.elasticsearch.common.util.LongArray;
|
||||
|
@ -125,6 +126,11 @@ public class ValueCountAggregator extends NumericMetricsAggregator.SingleValue {
|
|||
return new InternalValueCount(name, counts.get(bucket), metadata());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScoreMode scoreMode() {
|
||||
return valuesSource != null && valuesSource.needsScores() ? ScoreMode.COMPLETE : ScoreMode.COMPLETE_NO_SCORES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InternalAggregation buildEmptyAggregation() {
|
||||
return new InternalValueCount(name, 0L, metadata());
|
||||
|
|
Loading…
Reference in New Issue