When you create an index in MongoDB, if you don’t specify a name for it, MongoDB will assign one.
The default name consists of each indexed field name concatenated with the key value for that field. For example, the sort order, or if it’s a text
index, the string _text
, or if it’s a 2dsphere
index, the string _2dsphere
, etc.
But you can assign your own name when creating indexes in MongoDB.
Continue reading