Aggregations: fixed value count so it can be used in terms order

Closes #7050
This commit is contained in:
Colin Goodheart-Smithe 2014-07-28 09:19:01 +01:00
parent 2e9ee5c937
commit f7b7f67522
1 changed files with 6 additions and 1 deletions

View File

@ -30,7 +30,7 @@ import java.io.IOException;
/**
* An internal implementation of {@link ValueCount}.
*/
public class InternalValueCount extends InternalNumericMetricsAggregation implements ValueCount {
public class InternalValueCount extends InternalNumericMetricsAggregation.SingleValue implements ValueCount {
public static final Type TYPE = new Type("value_count", "vcount");
@ -61,6 +61,11 @@ public class InternalValueCount extends InternalNumericMetricsAggregation implem
return value;
}
@Override
public double value() {
return value;
}
@Override
public Type type() {
return TYPE;