@@ -17,7 +17,7 @@ val aggregation: IpRangeAggregation =
17
17
ipRangeAggregation(
18
18
name = " ip_range_agg" ,
19
19
field = Document .stringField,
20
- ranges = Chunk (
20
+ ranges = NonEmptyChunk (
21
21
IpRange .IpRangeBound (to = Some (" 10.0.0.5" )),
22
22
IpRange .IpRangeBound (from = Some (" 10.0.0.5" ))
23
23
)
@@ -30,7 +30,7 @@ val aggregation: IpRangeAggregation =
30
30
ipRangeAggregation(
31
31
name = " ip_range_agg" ,
32
32
field = " ipField" ,
33
- ranges = Chunk (
33
+ ranges = NonEmptyChunk (
34
34
IpRange .IpRangeBound (to = Some (" 10.0.0.5" )),
35
35
IpRange .IpRangeBound (from = Some (" 10.0.0.5" ))
36
36
)
@@ -43,7 +43,7 @@ val cidrAggregation: IpRangeAggregation =
43
43
ipRangeAggregation(
44
44
name = " cidr_agg" ,
45
45
field = " ipField" ,
46
- ranges = Chunk (
46
+ ranges = NonEmptyChunk (
47
47
IpRange .IpRangeBound (mask = Some (" 10.0.0.0/25" )),
48
48
IpRange .IpRangeBound (mask = Some (" 10.0.0.128/25" ))
49
49
)
@@ -53,7 +53,7 @@ val cidrAggregation: IpRangeAggregation =
53
53
If you want to explicitly set the keyed property:
54
54
``` scala
55
55
val multipleAggregations =
56
- ipRangeAggregation(" ip_range_agg" , " ipField" , Chunk (IpRange .IpRangeBound (to = Some (" 10.0.0.5" ))))
56
+ ipRangeAggregation(" ip_range_agg" , " ipField" , NonEmptyChunk (IpRange .IpRangeBound (to = Some (" 10.0.0.5" ))))
57
57
.keyedOn
58
58
.withAgg(maxAggregation(" maxAgg" , " someField" ))
59
59
```
0 commit comments