In the lecture on aggregation performance, the instructor mentions that once you transform the data then you can no longer take advantage of indexing in future stages. I’m a little confused on what actually counts as data transformation and what stages you should avoid before you have finished with operations that take advantage of indexing. There’s the obvious stages that can fundamentally change the shape of the data like $group and $unwind. When the instructor says indexes can’t be used after any data transformation, does that include stages like $addFields or $project? Does it depend on what is added?
Thanks for your help.