From f7b7f6752270ad32a3c4229ef4a7ecee7a9228fc Mon Sep 17 00:00:00 2001 From: Colin Goodheart-Smithe Date: Mon, 28 Jul 2014 09:19:01 +0100 Subject: [PATCH] Aggregations: fixed value count so it can be used in terms order Closes #7050 --- .../metrics/valuecount/InternalValueCount.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/elasticsearch/search/aggregations/metrics/valuecount/InternalValueCount.java b/src/main/java/org/elasticsearch/search/aggregations/metrics/valuecount/InternalValueCount.java index 1844e3d2226..09fe5f74696 100644 --- a/src/main/java/org/elasticsearch/search/aggregations/metrics/valuecount/InternalValueCount.java +++ b/src/main/java/org/elasticsearch/search/aggregations/metrics/valuecount/InternalValueCount.java @@ -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;