After running archive and creating an online archive, the index size did not change. Is this expected, shouldn't the index not include archived document?

I’m working with a MongoDB replica set, and after performing an online archiving operation, I’ve noticed that the index size for the archived collection remains unchanged. I’ve been tasked with reducing this index size. Should I manually drop and recreate the indexes to exclude archived documents? I’ve come across suggestions to use the compact command, but it appears that this command doesn’t selectively exclude archived documents.(please correct me if I’m wrong here)

Additionally, I’m curious if the index size will automatically decrease when the archived data, subject to a time-to-live (TTL) expiration, is deleted from the collection. Can you provide insights on these considerations?

2 Likes