Query to filter by filed in array of deeply nested documents

Hi, @John_Page, really appreciate your answer!

fieldToFilterBy currently is the only field that participates in filtering, but in future there will be more (not much, just 2-4 new). Those fields will be represented on each level and in filtering their values not necessary have to be on the same level.

You mean that creating of several indexes or one compound index on such array with deeply nested documents (lets call it array of paths, cause there is no branching just a path inside element of an array) will poorly result on update speed?

What do you mean by “large query”: just it’s length or performance impact?
The problem with using $or is that I don’t know the max size. As for now db has limit of 100, but standards may change and ideally we all don’t want to stick to some constants. That’s why I really hope that mongodb will have something like recursive search inside nested structure in future)