我想知道是否有某種方式可以通過Ajax調用或類似方式獲取mongoDB的所有索引?Ajax調用getIndexes MongoDB
當我一直在尋找通過的文件,我發現這個約getIndexes(): http://docs.mongodb.org/manual/reference/method/db.collection.getIndexes/但是這似乎是一個MongoDB的shell函數...
我想獲得的所有指標在某種程度上是這樣的:
$(function(){
$.ajax({
url: "URL FOR QUERING ALL INDEXES",
type: 'get',
dataType: 'jsonp',
jsonp: 'jsonp',
success: function (data) {
console.log('success', data);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
console.log('error', errorThrown);
}
});
});
啊哈OK,謝謝! =) –