Skip to content

Commit d7c2e83

Browse files
committed
Add missing parameter to date range aggregation method (Port of #4024)
1 parent 1790a09 commit d7c2e83

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Nest/Aggregations/Bucket/DateRange/DateRangeAggregation.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ public interface IDateRangeAggregation : IBucketAggregation
1717
[DataMember(Name ="format")]
1818
string Format { get; set; }
1919

20+
[DataMember(Name="missing")]
21+
object Missing { get; set; }
22+
2023
[DataMember(Name ="ranges")]
2124
IEnumerable<IDateRangeExpression> Ranges { get; set; }
2225

@@ -32,6 +35,7 @@ public DateRangeAggregation(string name) : base(name) { }
3235

3336
public Field Field { get; set; }
3437
public string Format { get; set; }
38+
public object Missing { get; set; }
3539
public IEnumerable<IDateRangeExpression> Ranges { get; set; }
3640
public string TimeZone { get; set; }
3741

@@ -47,6 +51,8 @@ public class DateRangeAggregationDescriptor<T>
4751

4852
string IDateRangeAggregation.Format { get; set; }
4953

54+
object IDateRangeAggregation.Missing { get; set; }
55+
5056
IEnumerable<IDateRangeExpression> IDateRangeAggregation.Ranges { get; set; }
5157

5258
string IDateRangeAggregation.TimeZone { get; set; }
@@ -57,6 +63,8 @@ public class DateRangeAggregationDescriptor<T>
5763

5864
public DateRangeAggregationDescriptor<T> Format(string format) => Assign(format, (a, v) => a.Format = v);
5965

66+
public DateRangeAggregationDescriptor<T> Missing(object missing) => Assign(missing, (a, v) => a.Missing = v);
67+
6068
public DateRangeAggregationDescriptor<T> Ranges(params IDateRangeExpression[] ranges) =>
6169
Assign(ranges.ToListOrNullIfEmpty(), (a, v) => a.Ranges = v);
6270

0 commit comments

Comments
 (0)