I have came across in one of my readings that remove() function will delete the documents without any changes to the existing indexes.
for instance: "db.users.remove() - This will remove all of the documents in the users collection. This doesn’t actually remove the collection, and any indexes created on it will still exist."
I would like to understand why the indexes are retained when the actual referenced data is removed / deleted in that specific collection? is there any specific use case?
Thank you