@@ -26,12 +26,15 @@ public interface IHistogramAggregation : IBucketAggregation
26
26
[ JsonProperty ( "extended_bounds" ) ]
27
27
ExtendedBounds < double > ExtendedBounds { get ; set ; }
28
28
29
- [ JsonProperty ( "pre_offset ") ]
29
+ [ Obsolete ( "Removed in Elasticsearch 2.0. Will be removed in the next major version of NEST ") ]
30
30
long ? PreOffset { get ; set ; }
31
31
32
- [ JsonProperty ( "post_offset ") ]
32
+ [ Obsolete ( "Removed in Elasticsearch 2.0. Will be removed in the next major version of NEST ") ]
33
33
long ? PostOffset { get ; set ; }
34
34
35
+ [ JsonProperty ( "offset" ) ]
36
+ double ? Offset { get ; set ; }
37
+
35
38
[ JsonProperty ( "missing" ) ]
36
39
double ? Missing { get ; set ; }
37
40
}
@@ -46,6 +49,7 @@ public class HistogramAggregation : BucketAggregationBase, IHistogramAggregation
46
49
public ExtendedBounds < double > ExtendedBounds { get ; set ; }
47
50
public long ? PreOffset { get ; set ; }
48
51
public long ? PostOffset { get ; set ; }
52
+ public double ? Offset { get ; set ; }
49
53
public double ? Missing { get ; set ; }
50
54
51
55
internal HistogramAggregation ( ) { }
@@ -72,8 +76,10 @@ public class HistogramAggregationDescriptor<T>
72
76
ExtendedBounds < double > IHistogramAggregation . ExtendedBounds { get ; set ; }
73
77
74
78
long ? IHistogramAggregation . PreOffset { get ; set ; }
75
-
79
+
76
80
long ? IHistogramAggregation . PostOffset { get ; set ; }
81
+
82
+ double ? IHistogramAggregation . Offset { get ; set ; }
77
83
78
84
double ? IHistogramAggregation . Missing { get ; set ; }
79
85
@@ -102,9 +108,13 @@ public HistogramAggregationDescriptor<T> OrderDescending(string key) =>
102
108
public HistogramAggregationDescriptor < T > ExtendedBounds ( double min , double max ) =>
103
109
Assign ( a => a . ExtendedBounds = new ExtendedBounds < double > { Minimum = min , Maximum = max } ) ;
104
110
105
- public HistogramAggregationDescriptor < T > PreOffset ( long preOffset ) => Assign ( a => a . PreOffset = preOffset ) ;
111
+ [ Obsolete ( "Removed in Elasticsearch 2.0. Will be removed in the next major version of NEST" ) ]
112
+ public HistogramAggregationDescriptor < T > PreOffset ( long preOffset ) => this ;
106
113
107
- public HistogramAggregationDescriptor < T > PostOffset ( long postOffset ) => Assign ( a => a . PostOffset = postOffset ) ;
114
+ [ Obsolete ( "Removed in Elasticsearch 2.0. Will be removed in the next major version of NEST" ) ]
115
+ public HistogramAggregationDescriptor < T > PostOffset ( long postOffset ) => this ;
116
+
117
+ public HistogramAggregationDescriptor < T > Offset ( double offset ) => Assign ( a => a . Offset = offset ) ;
108
118
109
119
public HistogramAggregationDescriptor < T > Missing ( double missing ) => Assign ( a => a . Missing = missing ) ;
110
120
}
0 commit comments