I have collection foo with documents like:
foo
{site_id: \'xxx\', title: {ru: \'a\', en: \'b\'}, content:
there is a update field operator $setOnInsert which meets your requirement. Please read the documents here: https://docs.mongodb.com/manual/reference/operator/update/setOnInsert/#up._S_setOnInsert