$skip (aggregation)
Definition
$skip
- Skips over the specified number of documents thatpass into the stage and passes the remaining documents to the nextstage in the pipeline.
The $skip
stage has the following prototype form:
- { $skip: <positive integer> }
$skip
takes a positive integer that specifies themaximum number of documents to skip.
Example
Consider the following example:
- db.article.aggregate(
- { $skip : 5 }
- );
This operation skips the first 5 documents passed to it by thepipeline. $skip
has no effect on the content of thedocuments it passes along the pipeline.
See also
Aggregation with the Zip Code Data Set,Aggregation with User Preference Data