Skip to content

Commit 9612928

Browse files
committed
moved extended_bound state to interface and POCO version of the DateHistogram request as well
1 parent 4a0a549 commit 9612928

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Nest/DSL/Aggregations/DateHistogramAggregationDescriptor.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ public interface IDateHistogramAggregator : IBucketAggregator
5353

5454
[JsonProperty("order")]
5555
IDictionary<string, string> Order { get; set; }
56+
57+
[JsonProperty("extended_bounds")]
58+
IDictionary<string, object> ExtendedBounds { get; set; }
5659
}
5760

5861
public class DateHistogramAggregator : BucketAggregator, IDateHistogramAggregator
@@ -71,6 +74,7 @@ public class DateHistogramAggregator : BucketAggregator, IDateHistogramAggregato
7174
public string PreOffset { get; set; }
7275
public string PostOffset { get; set; }
7376
public IDictionary<string, string> Order { get; set; }
77+
public IDictionary<string, object> ExtendedBounds { get; set; }
7478
}
7579

7680
public class DateHistogramAggregationDescriptor<T> : BucketAggregationBaseDescriptor<DateHistogramAggregationDescriptor<T>, T>, IDateHistogramAggregator where T : class
@@ -105,6 +109,8 @@ public class DateHistogramAggregationDescriptor<T> : BucketAggregationBaseDescri
105109

106110
IDictionary<string, string> IDateHistogramAggregator.Order { get; set; }
107111

112+
IDictionary<string, object> IDateHistogramAggregator.ExtendedBounds { get; set; }
113+
108114
public DateHistogramAggregationDescriptor()
109115
{
110116
this.Format("yyyy-MM-dd");
@@ -207,12 +213,10 @@ public DateHistogramAggregationDescriptor<T> OrderDescending(string key)
207213
return this;
208214
}
209215

210-
[JsonProperty("extended_bounds")]
211-
internal IDictionary<string, object> _ExtendedBounds { get; set; }
212216

213217
public DateHistogramAggregationDescriptor<T> ExtendedBounds(string min, string max)
214218
{
215-
this._ExtendedBounds = new Dictionary<string, object> { { "min", min }, { "max", max } };
219+
Self.ExtendedBounds = new Dictionary<string, object> { { "min", min }, { "max", max } };
216220
return this;
217221
}
218222

0 commit comments

Comments
 (0)