@@ -27,6 +27,9 @@ public interface IHistogramAggregator : IBucketAggregator
27
27
28
28
[ JsonProperty ( "order" ) ]
29
29
IDictionary < string , string > Order { get ; set ; }
30
+
31
+ [ JsonProperty ( "extended_bounds" ) ]
32
+ IDictionary < string , object > ExtendedBounds { get ; set ; }
30
33
}
31
34
32
35
public class HistogramAggregator : BucketAggregator , IHistogramAggregator
@@ -37,6 +40,7 @@ public class HistogramAggregator : BucketAggregator, IHistogramAggregator
37
40
public double ? Interval { get ; set ; }
38
41
public int ? MinimumDocumentCount { get ; set ; }
39
42
public IDictionary < string , string > Order { get ; set ; }
43
+ public IDictionary < string , object > ExtendedBounds { get ; set ; }
40
44
}
41
45
42
46
public class HistogramAggregationDescriptor < T > : BucketAggregationBaseDescriptor < HistogramAggregationDescriptor < T > , T > , IHistogramAggregator
@@ -56,6 +60,8 @@ public class HistogramAggregationDescriptor<T> : BucketAggregationBaseDescriptor
56
60
57
61
IDictionary < string , string > IHistogramAggregator . Order { get ; set ; }
58
62
63
+ IDictionary < string , object > IHistogramAggregator . ExtendedBounds { get ; set ; }
64
+
59
65
public HistogramAggregationDescriptor < T > Field ( string field )
60
66
{
61
67
Self . Field = field ;
@@ -104,5 +110,11 @@ public HistogramAggregationDescriptor<T> OrderDescending(string key)
104
110
return this ;
105
111
}
106
112
113
+ public HistogramAggregationDescriptor < T > ExtendedBounds ( double min , double max )
114
+ {
115
+ Self . ExtendedBounds = new Dictionary < string , object > { { "min" , min } , { "max" , max } } ;
116
+ return this ;
117
+ }
118
+
107
119
}
108
120
}
0 commit comments