| Steps To Reproduce: |
let mut vec = Vec::new();
|
for n in 0..10000 {
|
let new_doc = doc! {
|
"title": "T", "year": 2020, "plot": "plot description",
|
};
|
vec.push(new_doc);
|
}
|
all.insert_many(vec, None).unwrap();
|
// drop collection
|
let pipeline = vec![
|
doc! { "$documents": [ { "dens": 0 } ] },
|
doc! { "$densify": {
|
"field": "dens",
|
"range": { "step": 1, "bounds": [0, 10000]}
|
}},
|
doc! { "$addFields": doc! {
|
"title": "T",
|
"year": 2020,
|
//"rand": {"$rand": {} },
|
"_id": {"$rand": {} },
|
}},
|
// doc! { "$out": "all" },
|
doc! { "$merge": "all" },
|
];
|
db.aggregate(pipeline, None).unwrap();
|
|