Hi,
MongoDB Atlas Cluster v3.6
I have a watch stram and want to apply a filter.
My Watch starts with…
const stream = collection('mydb').watch([
{ $match: {
operationType: {
$in: ['insert','update'] },
'fullDocument.client_id': client_id+''
}
}
])
Where client_id is object in the document ( sting of o_id );
I’ve also tried…
const stream = collection('mydb').watch([
{ $match: {
client_id: client_id+''
}
}
])
But in both cases the stream includes updates for all changes to ‘mydb’ irrespective of a match on client_id ?
Any ideas where I’m going wrong ?