Compound indexes: the rule that makes them work

Equality, then sort, then range. Get the field order wrong and the index may as well not exist.