this is the command and the error generate:
db.tweets.aggregate(
{$project:{'entities.hashtags.text':1}},
{$unwind:'$entities.hashtags'},
{$group:{_id:'$entities.hashtags.text'}})
{
"errmsg" : "exception: aggregation result exceeds maximum document size (16MB)",
"code" : 16389,
"ok" : 0
}
i would want to do a follow query:
group by entities.hashtags.text and count the number of document that contains that hashtags for every hashtags taht exist.
this is a part of document:
...
entities: {
media: [
...
],
urls: [],
hashtags: [
{
text: "makeuploos",
indices: [
54,
65
]
},
{
text: "onbewerkt",
indices: [
66,
76
]
},
{
text: "hoer",
indices: [
77,
82
]
}
],
...
how can i do this??