Unable to export files when query is based on aggregation

Anand Saran shared this problem 2 months ago
Solved

Hi,

I have been facing an issue of not being able to export results when running a query of the following structure.

db.Collection.aggregate([{

$match: {condtion1:"",

condition2:""

}

}, {

$group: {

_id: {

...

},

count: {

$sum: 1

}

}

}, {

$project: {

...

}

}, {

$match: {

count: {

$gt: 1

}

}

}, {

$sort: {

_id: -1

}

}])

I am getting the below error:{

"message" : "cursor.size is not a function",

"stack" : "script:71:25"

}

Comments (2)

photo
1

Which version are you using? The latest version is 5.2.3, if you are using an older build, please download and give it a try.

photo
1

Resolved in 5.2.3