1.Using positioning operator :
var query = Query.And(Query.EQ("Id", id)); var update = Update.Set("CommetList.10.Creator", "Jack");
Also, you probably need to add id to the Comment class. In this case, you can update the corresponding request comment as follows:
var query = Query.And(Query.EQ("Id", id), Query.EQ("CommentList.Id", commentId)); var update = Update.Set("CommentList.$.Creator", "Jack");
2. You can download the whole topic and swap comments from C # using linq, for example. Or you can also use $ slice as follows:
var comments = themeCollection .FindAs<Comment>() .SetFields(Fields.Slice("Comments", 40, 20)) .ToList();
source share