$and to express both fields are empty db.tweets_v2.aggregate({
{match:{$and:[{replyto_id:$exist:false},{replyto_id:$exist:false}]}
});
There are few fixes,
$exists$exists$match[] not {}db.tweets_v2.aggregate([
{
$match: {
$and: [
{ replyto_id: { $exists: false } },
{ replyfrom_id: { $exists: false } } // change your second field name
]
}
}
])
Playground
Actually the $and is not needed, this one will also work:
db.tweets_v2.aggregate([
{
$match: {
replyto_id: { $exists: false } ,
replyfrom_id: { $exists: false }
}
}
])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With