We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b5c7ce commit 9555514Copy full SHA for 9555514
src/Nest/Domain/Aggregations/AggregationsHelper.cs
@@ -1,3 +1,4 @@
1
+using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
@@ -109,7 +110,18 @@ public Bucket<HistogramItem> Histogram(string key)
109
110
{
111
var bucket = this.TryGet<Bucket>(key);
112
var b = new Bucket<HistogramItem>();
- b.Items = bucket.Items.OfType<HistogramItem>().ToList();
113
+
114
+ b.Items = bucket.Items.OfType<KeyItem>()
115
+ .Select(x =>
116
+ new HistogramItem
117
+ {
118
+ Key = long.Parse(x.Key),
119
+ KeyAsString = x.Key,
120
+ DocCount = x.DocCount
121
+ }
122
+ )
123
+ .ToList();
124
125
return b;
126
}
127
0 commit comments