mongodb中createIndex()有什么用mongodb中createIndex()的作用:在mongodb中createIndex()可以用来创建索引,需要注意的是在3.0.0版本前创建索引方法为“db.collection.ensureIndex()”,之后的版本才使用“db.c