The interface of MongoDB has completely changed from the previous one. Here you can see the official documentation with some examples about how to search, insert and update but what about upserts?
Idea for meta: I've tried to search on google and on SO but many resources refer to the old interface. Maybe it would be nice to create a MongoLegacy tag.