Hello. I am currently trying to prevent duplicate data in one particular field from being entered into my database. My data is a comment feed from a web scraping application and I need to prevent duplicate entries from being added. I tried creating a unique index in MongoDB compass, but it seems that the data input stops upon finding the duplicate data. I know that ordered:false will prevent this, but is there a way to set ordered:false in MongoDB Compass or Atlas? Thanks!
In Compass, if you Insert Data ▼, then Import File and you DON’T select the option Stop on errors you will be doing something similar to an unordered insert. Duplicated documents, according to _id and unique indexes, should not be inserted and all other documents will be despite the errors.