I have a document with a field containing a very long string. I need to concatenate another string to the end of the string already contained in the field.
db.getCollection('').update(
// query
{},
// update
{
$set: {:this.+""}
},
// options
{
"multi" : true, // update only one document
"upsert" : false // insert a new document, if no existing document match the query
});