I'm having some issues creating multiple compound indexes on one of my schemas in MongoDB. When using MongoLab, I know some indexes are not created when they are too long, due to a naming issue. So I suspect this might be the reason why some are not created
var Schema = new mongoose.Schema({ ... });
// Created
Schema.index({
one: 1,
three: 1
});
// Not Created
Schema.index({
one: 1,
two: 1,
three: 1,
four: 1,
five: 1,
six: 1,
seven: 1,
eight: 1,
nine: 1,
ten: 1
});
Schema.index({ one: 1, two: 1, three: 1, four: 1, five: 1, six: 1, seven: 1, eight: 1, nine: 1, ten: 1 }, { name: 'my_index_name' } );
– Induction