Mongoimport 导数据自动去重

-upsert --upsertFields  可以实现mongodb按照指定字段去重,但是导入数据很慢

mongoimport --host 127.0.0.0.1 --port 27017 --username root --password root --collection info --db cust  --upsert --upsertFields custId --file  C:/Users/18482/Desktop/test/output/2.json

原文地址:https://www.cnblogs.com/xibuhaohao/p/12529999.html