last day (14 days later) » 

1:50 PM
-3
Q: MongoDB Aggregation 16MB limit on version 2.6.4

KarthikI got a really optimised query which I am happy with Thx to Anand Jayabalan who answered my earlier question However, when I run this query for some $match conditions ... db.baskets.aggregate([ { "$match": {storeId: 53}, }, { "$group": { "_id": { "year": {"$year": "...

 
Can I please have the reason for down voting?
I dont really understand what other examples I can give. In the beginning of the question I explained its a continuation of stackoverflow.com/questions/25846034/…. Where you can find the document structure.
I have used allowDiskUse I don't get it to work..
 
Maybe add the match conditions that make it fail, if that might matter.
 
Thanks ReneIt that is @rene? Does the question deserve down vote for just missing the match conditions?
the match condition is "$match": {storeId: 53}, but if I switch the storeId which got more information I get the above error.
 
@Karthik I can't judge if the downvotes are deserved. The best advice I can give is to keep that discussion on your meta question. It only triggers possible downvoters here. And that information about the match to your question...
Shouldn't cursor:0 not be cursor: {}?
 
Yes I did use db.baskets.aggregate([], {cursor: 0})
 
1:50 PM
You are doing it wromg if you do that
 
not sure rene
 
It either should be cursor :{}
 
let me post the full query I tried
 
or cursor: {batchSize:0 }
 
I havent tried that
let me try that
No luck... i get
uncaught exception: aggregate failed: {
"errmsg" : "exception: aggregation result exceeds maximum document size (16MB)",
"code" : 16389,
"ok" : 0
}
for query
db.baskets.aggregate([
{
"$match": {storeId: 11},
},
{
"$group": {
"_id": {
"year": {"$year": "$completed"},
"month": {"$month": "$completed"},
"day": {"$dayOfMonth": "$completed"},
"hour": {"$hour": "$completed"}
},
"totalTip": {
"$push": "$tip"
},
"basketTransactionCashTotal": {
"$push": "$basketTransactionCash"
},
"basketTransactionCardTotal": {
"$push":"$basketTransactionCard"
},
"consumerIds": {
"$push": "$consumerId"
},
"storeId": {
"$addToSet": "$storeId"
},
"basketIds": {
"$push": "$basketId"
sorry I cant format properly
 
1:59 PM
Is that call going directly to mongoDB?
The array is the pipeline?
 
yes. i use RoboMongo client..
Not sure what you mean by array pipeline.
do you want me to try on mongo shell?
let me try on mongo shell
hi rene
amazing
it worked in mongo shell... sorry to be so dump
dumb*
 
Np at least you found your root cause
 
do you think it will work with my nodejs driver
 
I learned something about mongodb...
 
:)
can you please post this as an answer
I will accept it...
 
2:11 PM
I have no idea, I only followed your links. As I said, I'm not a mongodb dev, nor nodejs dev, sorry.
@Karthik No, I won't. Please self-answer your question.
 
ha nice.. I will figure out the rest
 
Great, good luck!
 
no issues... i thought you will get some reputation points... also not a lot of people are as polite as you rene..
thanks so much...
 
you're welcome.
 

last day (14 days later) »