$skip (aggregation)

On this page



Skips over the specified number of documents that pass into the stage and passes the remaining documents to the next stage in the pipeline.

The $skip stage has the following prototype form:

{ $skip: <positive integer> }

$skip takes a positive integer that specifies the maximum number of documents to skip.


Consider the following example:

    { $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.