Unable to sort by a Clustered Index

I have a clustered collection that uses custom ids of unique integers. When I query using a sort by _id, the result is not sorted and sometimes returns different results.

This collection has a secondary index, but that index is not usable. When explaining the query plan it seems that no index is used, as indexFilterSet is set to false.

Is it possible to sort by _id descending in a clustered index? I cannot find documentation detailing that this is not possible, but it doesn’t seem to work.

This is the type of query I am attempting:
db.collection.find({}).sort({ _id: -1}).limit(5)

Hi @A_O2, and welcome to the MongoDB Community forums! :wave:

MongoDB should have no issues sorting by an index in either ascending (1) or descending (-1) order. Can you post a screen shot where this is not happening?