File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 2626//! let _agg_req: Aggregations = serde_json::from_str(elasticsearch_compatible_json_req).unwrap();
2727//! ```
2828
29- use std:: collections:: { HashMap , HashSet } ;
29+ use std:: collections:: HashSet ;
3030
31+ use rustc_hash:: FxHashMap ;
3132use serde:: { Deserialize , Serialize } ;
3233
3334use super :: bucket:: {
@@ -43,7 +44,7 @@ use super::metric::{
4344/// defined names. It is also used in buckets aggregations to define sub-aggregations.
4445///
4546/// The key is the user defined name of the aggregation.
46- pub type Aggregations = HashMap < String , Aggregation > ;
47+ pub type Aggregations = FxHashMap < String , Aggregation > ;
4748
4849/// Aggregation request.
4950///
Original file line number Diff line number Diff line change @@ -2362,7 +2362,8 @@ mod tests {
23622362 let mut agg_res = search ( & index, & agg_req) ?;
23632363
23642364 // --- Aggregations: terms on host and tags ---
2365- let mut agg_req2: Aggregations = Aggregations :: with_capacity ( 20 ) ;
2365+ let mut agg_req2: Aggregations =
2366+ Aggregations :: with_capacity_and_hasher ( 20 , Default :: default ( ) ) ;
23662367 agg_req2. insert (
23672368 "tags" . to_string ( ) ,
23682369 serde_json:: from_value ( json ! ( { "terms" : { "field" : "tags" } } ) ) ?,
You can’t perform that action at this time.
0 commit comments