Currently for $or specifying a hint is ambiguous since more than one index can be used. It would be nice to have a syntax to specify a hint of/for multiple indexes.
I have no idea how to do this; Maybe you could specify a list and the query optimizer will try to the choose per query clause...
As the query optimizer gets more complex (and more than one index can be used per query) this is only going to become more of an issue.
- is related to
-
SERVER-17128 Apply index filters to individual $or clauses for rooted $or queries
- Backlog
- related to
-
SERVER-22741 Ability to hint index intersection
- Backlog