发布于 2015-09-14 14:55:48 | 122 次阅读 | 评论: 0 | 来源: 网络整理
Skips over the specified number of documents that pass through the $skip in the pipeline before passing all of the remaining input.
$skip takes a single numeric (positive whole number) value as a parameter. Once the operation has skipped the specified number of documents, it passes all the remaining documents along the pipeline without alteration. Consider the following example:
db.article.aggregate(
{ $skip : 5 }
);
This operation skips the first 5 documents passed to it by the pipeline. $skip has no effect on the content of the documents it passes along the pipeline.