我正在使用skip limit and aggregate,但它不起作用。
db.collation
.skip(400)
.limit(100)
.aggregate([{$sample: {size: 50}}])怎样才是正确的方法?
发布于 2022-11-29 09:07:34
尝试将其作为聚合管道的一部分:
演示- https://mongoplayground.net/p/LhTNE85OZVS
db.collection.aggregate([
{
$skip: 400
},
{
$limit: 100
},
{
$sample: {
size: 50
}
}
])https://stackoverflow.com/questions/74609699
复制相似问题