From MongoDB 4.4, it’s possible to hide an index from the query planner. This allows you to evaluate the potential impact of dropping an index without actually dropping the index.
You can use the getIndexes()
method to check whether or not an index is hidden. If an index is hidden, that index will display a hidden
field as having a value of true
(i.e. "hidden" : true
).