The `syncIndexes()` function ensures that the indexes in the db are the same as the indexes in your schema
For discriminators, syncIndexes only syncs the indexes defined on the discriminator schema, not the base schema
More on syncIndexes 👉 mongoosejs.com/docs/api.html…#MongoDB
Mongoose 6.2.7 released
🏎️ Avoid running validation on every array element if there's no validators to run
🛠️ Correctly populate in batches when batchSize is set
Full changelog: github.com/Automattic/mongoo…#NodeJS#MongoDB#JavaScript
Pro tip: if you use separate npm modules to share schemas between projects, list Mongoose as a `peerDependency` of the shared schemas lib
If you can't, wrap shared schemas in `new Schema()` to avoid "different copy of Mongoose" errors
#NodeJS#MongoDB#JavaScript
We're shipping a neat perf improvement in v6.2.7.
Looks like a 35% speedup in our basic benchmark (saving a new document with a big array of primitives) counting network round trip
#NodeJS#MongoDB#JavaScript