Answer the question
In order to leave comments, you need to log in
Why can't I create indexes in MongoDB?
Good evening, I want to create an index in my MongoDB database, but it is not created and throws out the following error:
Here is the index creation code:
collection.createIndex({login: data[1]}, {unique: true}, (err, result) => { // data[1] хранит в себе значение поля login
console.log(err, result)
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question