MongoDB中的索引列表? [英] A list of indices in MongoDB?

查看:147
本文介绍了MongoDB中的索引列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在shell中查看mongodb中的集合的索引列表?我阅读了 http://www.mongodb.org/display/DOCS/Indexes 但我看不到任何东西。



<$ p $

解决方案

p> db.test.getIndexes()

  help; 
db.help();
db.test.help();


Is there a way to see a list of indices on a collection in mongodb in shell? i read through http://www.mongodb.org/display/DOCS/Indexes but i dont see anything

解决方案

From the shell:

db.test.getIndexes()

For shell help you should try:

help;
db.help();
db.test.help();

这篇关于MongoDB中的索引列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆