File tree 4 files changed +7
-10
lines changed
4 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 37
37
//! "ranges": [
38
38
//! { "from": 3.0, "to": 7.0 },
39
39
//! { "from": 7.0, "to": 20.0 }
40
- //! ],
41
- //! "keyed": false
40
+ //! ]
42
41
//! }
43
42
//! }
44
43
//! }"#;
Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ pub struct HistogramAggregation {
116
116
/// bounds would not be returned.
117
117
pub extended_bounds : Option < HistogramBounds > ,
118
118
/// Whether to return the buckets as a hash map
119
+ #[ serde( default ) ]
119
120
pub keyed : bool ,
120
121
}
121
122
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ pub struct RangeAggregation {
57
57
/// range. Extra buckets will be created until the first to, and last from, if necessary.
58
58
pub ranges : Vec < RangeAggregationRange > ,
59
59
/// Whether to return the buckets as a hash map
60
+ #[ serde( default ) ]
60
61
pub keyed : bool ,
61
62
}
62
63
Original file line number Diff line number Diff line change 93
93
//! { "from": 3.0, "to": 7.0 },
94
94
//! { "from": 7.0, "to": 20.0 },
95
95
//! { "from": 20.0 }
96
- //! ],
97
- //! "keyed": false
96
+ //! ]
98
97
//! },
99
98
//! "aggs": {
100
99
//! "average_in_range": { "avg": { "field": "score" } }
@@ -891,8 +890,7 @@ mod tests {
891
890
{ "from": 7.0, "to": 19.0 },
892
891
{ "from": 19.0, "to": 20.0 },
893
892
{ "from": 20.0 }
894
- ],
895
- "keyed": false
893
+ ]
896
894
},
897
895
"aggs": {
898
896
"average_in_range": { "avg": { "field": "score" } },
@@ -908,8 +906,7 @@ mod tests {
908
906
{ "from": 7.0, "to": 19.0 },
909
907
{ "from": 19.0, "to": 20.0 },
910
908
{ "from": 20.0 }
911
- ],
912
- "keyed": false
909
+ ]
913
910
},
914
911
"aggs": {
915
912
"average_in_range": { "avg": { "field": "score" } },
@@ -928,8 +925,7 @@ mod tests {
928
925
{ "from": 7.0, "to": 19.0 },
929
926
{ "from": 19.0, "to": 20.0 },
930
927
{ "from": 20.0 }
931
- ],
932
- "keyed": false
928
+ ]
933
929
},
934
930
"aggs": {
935
931
"average_in_range": { "avg": { "field": "score" } },
You can’t perform that action at this time.
0 commit comments