MongoDB Crie Índice exclusivo
db.members.createIndex( { "user_id": 1 }, { unique: true } )
Upvote answer :-)
db.members.createIndex( { "user_id": 1 }, { unique: true } )