Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我们有一个帖子集合,帖子中嵌入了一组评论。
我将如何写一个查询说,只拉出帖子 11-20?一个 mongoid 解决方案会更好,但一个 mongo 查询对象也可以
你想要 $slice 运算符
http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24sliceoperator