Make autoIndex syncIndex instead of createIndex #14602
Labels
enhancement
This issue is a user-facing general improvement that doesn't fix a bug or add a new feature
new feature
This change adds new functionality, like a new method or class
Prerequisites
馃殌 Feature Proposal
autoIndex will check existing indexes instead of re-creating indexes everytime the app runs
Motivation
Mongoose docs explains that autoIndex is not advised to production environments because it creates indexes everytime the app runs. This makes the process of introducing indexes tricky in production. Mongoose offers synIndexes, but this has to be called individually for each model.
Example
No response
The text was updated successfully, but these errors were encountered: