使用Cosmos DB for MongoDB API (版本3.4),以下查找查询与方法游标排序相结合似乎行为不正确:
db.test.find({"field1": "value1"}).sort({"field2": 1})
如果满足以下所有条件,则会发生错误:
默认索引策略被丢弃--不管之后是否使用createIndex()创建了自定义索引。
find()查询不返回任何文档(Find(filter).Count() == 0)
定义排序顺序的排序文档只包含一个字段。不管这个字段是存在还是已经被索引,都不重要。使用排序文档中的两
MongoDB排序函数非常新。您能在与数据库本身无关的对象和/或数组上使用它们吗?
var mongo = require('mongodb'),
Server = mongo.Server,
Db = mongo.Db,
sortingFun = mongo.internalSortFilterFunction(); // By the miracle of imagination, this is a made-up line.
例如,有名为的sift:MongoDB启发的数组过滤。但有更多类似的工具,不同的
我在服务器上使用爬虫(FreeBSD 8.3)。这个爬虫(unicrawler )正在使用mongodb,但不幸的是,我在数据库中输入了很多数据。现在我收到这样的信息:
/usr/UniCrawler/api/node_modules/mongodb/lib/mongodb/connection/base.js:242
throw message;
^
MongoError: too much data for sort() with no index. add an index or specify a smaller lim