These are chat archives for Automattic/mongoose

Dec 2017
Dec 08 2017 06:43
Hi all, I am helping my company to transform the single node mongodb server to a sharded cluster, and we have multiple docker container which running our python backend, I would like to add mongos into each container so every backend worker is only talking to its own mongos. but I am not so sure about the memory consumption of mongos, especially I am wondering if mongos will perform merging operations when a cross shard aggregation/map-reduce is run, could somebody give me an advice?
Osama Bari
Dec 08 2017 11:30
Hi All,
if anyone is interested to join NodeJS Developers group in WhatsApp,
they can join with below link.
Dec 08 2017 16:03


const filter = { foo: { $in: ['a', 'b', 'c']} }; // foo has `unique: true`
const update = {
  $set: { foo: ???ARRAY_ELEMENT??? }
model.updateMany(filter, update, {});

I'm trying to do something in this manner. When run on empty model, i'd expect it to create 3 elements (one per each array value). How?