我是MongoDB的新手,可能是一个菜鸟问题。
我想计算在MongoDB中使用聚合的消息字段中“ lupoK”重复的次数-“ message”:“ 第一个lupoK lupoK ”,我正在使用studio3t界面。
我的文档结构是-
{
"_id" : ObjectId("5df9c780b05196da93be262b"),"id" : "61a4c53a-aa99-4336-ab4f-07bb7f618889","time" : "00:00:45","username" : "siul","message" : "***first lupoK lupoK***","emoticon_place" : [
{
"_id" : "128428","begin" : NumberInt(6),"end" : NumberInt(10)
}
],"fragments" : [
{
"text" : "first "
},{
"emoticon" : {
"emoticon_id" : "128428","emoticon_set_id" : ""
},"text" : "***lupoK***"
},"text" : "***lupoK***"
}
]
}
提前谢谢!