Changed in version 4.4.在版本4.4中更改。
cursor.hint()
to perform a collection scan to return documents in natural order.cursor.hint()
结合使用可执行集合扫描,以按自然顺序返回文档。
For usage, see Force Collection Scans example in the 有关用法,请参阅cursor.hint()
reference page.cursor.hint()
参考页中的强制集合扫描示例。
Starting in MongoDB 4.4, you can specify a 从MongoDB 4.4开始,您可以在对视图运行$natural
sort when running a find
operation against a view.find
操作时指定$natural
排序。