[MongoDB] dup key: { itemId: null }, labels: {}
Started getting this error for no reason, because I made aggregate and found no itemId with count > 1
1 Reply
db.Collection.aggregate([{$group : { "_id" : '$itemId', count : {$sum : 1}}}, {$sort : { "count" : -1 }}])
returns
{
_id: null,
count: 10
}
and other count == 1 so no duplicates