3.6 其他索引
全文索引,在字符串或字符串数组上
db.profiles.createIndex({comments:"text"})
地理位置索引
db.address.createIndex({"location":"2dsphere"})//球面空间
db.address.createIndex({"location":"2d"})//平面空间
Hash索引
db.address.createIndex({_id:"hashed"}) //利用hash函数计算字段的值
TTL索引
db.log_event.createIndex({date:1},{expireAfterSeconds:600}) //10分钟后自动删除