So far, there are three options. Looking for the most efficient in terms of performance
A collection that stores all messages from all conversations. Records of the form:
{ conv_id: 5; msg: "example"}The collection with the name - dialogue id, containing messages only from its own dialogue.
Collection with dialogs like:
{ conv_id: 5, #Ид диалога messages: [ { msg: "msg1" }, { msg: "msg2" } ] }(Not suitable due to 16MB limit)