I tried to do an conditional
$lookup, and i added a filter on top of its pipeline.
That filter doesn’t need the other collection, but its not optimized.
I think there is no way to have conditional stage, so i tried this hoping that it would be optimized.
Inside the lookup pipeline
let : ["a" "$a"] pipeline : [(= "$$a" -1)]
"$$a" is never -1 so never lookup is needed, its always  , without any need to even check the other collection, but its not optimized, costs similar to a lookup that would read the document from the other collection.
Is there a way to make conditional stages, in general?
(i only know a way to undo