Pipeline fields - project stage impact

does the Project stage deal with just presentation layer or is it a filter? …and to elaborate on this: if the original doc contains fields: A, B, C … then a Project stage is for just field A…at the next stage of the pipeline do B and C still exist for logic purposes i.e. Matching

I know this is an odd example but it is the easiest way to explain it…

in the same vein; if original doc contains fields : A, B, C and then a stage is a $lookUp where another doc is joined in with fields 1, 2, 3… can one use 1,2,3 in a downstream stage if they are not projected?

I think the documentation for $project does a fine job of explaining this. And for the sake of clarity, what do you mean by “filter”?

Give it a try.

I didn’t quite follow this one, but give it a try too. If there’s no $project between stages, then all the fields from the previous stage are available in the next stage.

1 Like