From 8184789e82aa9f5f3de781f73acc91bce9d1a5da Mon Sep 17 00:00:00 2001 From: Antonio Matarrese Date: Sat, 13 Jan 2018 18:19:06 +0000 Subject: [PATCH] updated comment, 3rd attempt --- .../search/aggregations/bucket/terms/StringTerms.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/StringTerms.java b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/StringTerms.java index 185f333b74cef..bfd8a4e955e3a 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/StringTerms.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/StringTerms.java @@ -70,7 +70,8 @@ public Number getKeyAsNumber() { try { return Long.parseLong(termBytes.utf8ToString()); } catch (NumberFormatException ignored) { - //failed to detect an Integer + //first tried to parsed as an Integer in order to not lose accuracy + //in case the values is bigger than 2^52 } return Double.parseDouble(termBytes.utf8ToString()); }