I am new to MongoDB and might be its a noob question.
I want to count the number of times "lupoK" repeated in the message field which is - "message" : "first lupoK lupoK" using aggregation in MongoDB, I am using studio3t interface.
My document structure is -
{
"_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***"
},
{
"emoticon" : {
"emoticon_id" : "128428",
"emoticon_set_id" : ""
},
"text" : "***lupoK***"
}
]
}
Thanks in advance!!!