2
I have a collection with the field called "contact_id". In my collection I have duplicate records with this key.
How can I remove duplicates resulting in just one record? I’ve tried to:
db.Person Duplicate.ensureIndex ({ "contact_id": 1}, {únicas: verdadeiro, dropDups: true})
But it didn’t work because the dropDups function is no longer available in Mongodb 3.x
I am using 3.2
This solution is perfect as it will remove duplicates always leaving the original record.
– Paulo Luvisoto