db.yourCollection.createIndex({<field>:<1 or -1>})db.yourCollection.getIndexes() //查看當前collection的索引ide