MongoDB expressions polymerization stage

Aggregate expression

1. path expression field

$field
$field.subfield

2. System variable expression

$$variable 

3. constant expression

# $literal 用于表示常量,即此处的 $name 表示的是字符串 "$name"
$literal:"$name" 

Pipeline stage polymerization

$projectRe-project on the input document
$matchinput document screening
$limitselected documents published before the pipeline N
$skipskipped-N papers document the pipe
$unwindto expand the array field in the input document
$sortinput document sort
$lookupthe input query document
$groupon the document input packet
$outthe document output pipeline

Guess you like

Origin www.cnblogs.com/zy108830/p/12639648.html