SELECT *
FROM student
WHERE joiningdate BETWEEN "2019-01-29" AND "2020-02-29" AND type = "student"
ORDER BY lastUpdateTimestamp DESC;
The index is right index. Query must produce all possible documents of given joiningdate and do explicit sort.
It can’t expose index order because leading index key is joiningdate which is range predicate.