I have 100 million entries in my sample collection. I want to have another collection with all the individual user names "user.screen_name"
I have the following structure in my collection of mododb samples:
{
"_id" : ObjectId("515af34297c2f607b822a54b"),
"text" : "random text goes here",
"user" :
{
"id" : 972863366,
"screen_name" : "xname",
"verified" : false,
"time_zone" : "Amsterdam",
}
}
When I try to do something like "distinct (user.id) .length", I get the following error:
"errmsg" : "exception: distinct too big, 16mb cap",
I need an efficient way to have another collection with only {"user_name": "name"} different users in my collection "sample". so I can query the size of this new database and get the number of individual users. (and for further analysis in the future)