Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

So far we’ve only seen the limit and project stages, however, there are many other stages available in Mongo. The common stages are listed in the table below.

Name

Description

project

Reshapes the records from the previous stage of the pipeline for the next stage.

match

Filters the records from the previous stage of the pipeline for the next stage.

limit

Limits the number of records from the previous stage of the pipeline for the next stage.

skip

Skips a number of records from the previous stage of the pipeline for the next stage.

group

Groups records by a specified identifier from the previous stage of the pipeline for the next stage.

sort

Sorts the records from the previous stage of the pipeline for the next stage.