Verifies that the indexes expected for a query actually exist in the mongo database.
Verifies that the indexes expected for a query actually exist in the mongo database.
Logs an error via QueryLogger#logIndexMismatch
if there is no matching index.
This version of validaateIndexExpectations is intended for use in cases where
the indexes are not explicitly declared in the class, but the caller knows what set
of indexes are actually available.
the query being validated.
a list of the indexes
true if the required indexes are found, false otherwise.
Verifies that the index expected by a query both exists, and will be used by MongoDB to execute that query.
Verifies that the index expected by a query both exists, and will be used by MongoDB to execute that query. (Due to vagaries of the MongoDB implementation, sometimes a conceptually usable index won't be found.)
the query
the list of indexes that exist in the database