One more question, I am creating the index the following simple way:
{“a.b”: 1, “a.c”: 1}
My understanding is that it creates an index with a size which is quadratic as a function of the average array size (as the cartesian product is calculated). If true, this is an issue. I did not see anything equivalent to $elemMatch in the operators allowed in partialFilterExpression, is there something that could help, while ensuring that the find leverages the index properly and does not do a full scan?
If index size with a.b:1,a.c:1 is an issue, I would investigate by using only a.b:1 or a.c:1. The size would be smaller. The field with the highest number of different values will probably provide better performance. For example, if a.b is boolean and a.c is date, a.c index will be more selective.